[Pkg-octave-commit] [octave-interval] 01/04: Imported Upstream version 2.1.0

Oliver Heimlich oheim-guest at moszumanska.debian.org
Tue Jan 10 18:29:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

oheim-guest pushed a commit to branch master
in repository octave-interval.

commit ee4ee6ea0184169e50461ac564142507ee98aabb
Author: Oliver Heimlich <oheim at posteo.de>
Date:   Thu Dec 29 00:07:22 2016 +0100

    Imported Upstream version 2.1.0
---
 CITATION                                           |    4 +-
 DESCRIPTION                                        |    4 +-
 INDEX                                              |    3 +-
 NEWS                                               |   20 +
 doc/NEWS.texinfo                                   |   14 +
 doc/chapter/preface.texinfo                        |    8 +-
 doc/image/cameleon-start-end.svg.eps               |    2 +-
 doc/image/cameleon-transition.svg.eps              |    2 +-
 doc/image/inverse-power.svg.eps                    |    2 +-
 doc/image/octave-interval.ly.pdf                   |  Bin 18023 -> 18023 bytes
 inst/@infsup/acos.m                                |    9 +-
 inst/@infsup/asin.m                                |    9 +-
 inst/@infsup/atan.m                                |    9 +-
 inst/@infsup/cos.m                                 |   39 +-
 inst/@infsup/cosh.m                                |    9 +-
 inst/@infsup/exp.m                                 |    9 +-
 inst/@infsup/expm1.m                               |    9 +-
 inst/@infsup/infsup.m                              |    5 +-
 inst/@infsup/log.m                                 |    9 +-
 inst/@infsup/log10.m                               |    9 +-
 inst/@infsup/log1p.m                               |    9 +-
 inst/@infsup/log2.m                                |    9 +-
 inst/@infsup/polyval.m                             |    4 +
 inst/@infsup/sin.m                                 |   39 +-
 inst/@infsup/sinh.m                                |    9 +-
 inst/@infsup/tan.m                                 |    9 +-
 inst/__check_crlibm__.m                            |   62 +
 inst/test/crlibm.mat                               |  Bin 0 -> 846507 bytes
 inst/test/crlibm.tst                               |   98 +
 inst/test/crlibm_function.cc-tst                   |    7 +
 inst/test/ieee1788-constructors.tst                |  170 +
 inst/test/mpfr_function_d.cc-tst                   |   68 +
 src/Makefile                                       |   23 +-
 src/crlibm/AUTHORS                                 |    2 +
 src/crlibm/CMakeLists.txt                          |  154 +
 src/crlibm/COPYING                                 |  340 +
 src/crlibm/COPYING.LIB                             |  504 ++
 src/crlibm/ChangeLog                               |  125 +
 src/crlibm/INSTALL                                 |  370 +
 src/crlibm/Makefile.am                             |  134 +
 src/crlibm/Makefile.in                             | 1062 +++
 src/crlibm/NEWS                                    |    0
 src/crlibm/README                                  |   31 +
 src/crlibm/README.DEV                              |   23 +
 src/crlibm/TODO                                    |   66 +
 src/crlibm/VERSION                                 |    1 +
 src/crlibm/aclocal.m4                              | 1149 +++
 src/crlibm/acos-td.c                               | 1195 ++++
 src/crlibm/acos-td.h                               |  629 ++
 src/crlibm/asin-td.c                               | 1297 ++++
 src/crlibm/asin-td.h                               |  620 ++
 src/crlibm/asincos.c                               | 4488 ++++++++++++
 src/crlibm/asincos.h                               |  575 ++
 src/crlibm/atan-itanium.c                          |  846 +++
 src/crlibm/atan-pentium.c                          |  280 +
 src/crlibm/atan-pentium.h                          |  343 +
 src/crlibm/atan_accurate.c                         |  341 +
 src/crlibm/atan_accurate.h                         |  198 +
 src/crlibm/atan_fast.c                             |  506 ++
 src/crlibm/atan_fast.h                             |  680 ++
 src/crlibm/compile                                 |  347 +
 src/crlibm/config.guess                            | 1420 ++++
 src/crlibm/config.sub                              | 1799 +++++
 src/crlibm/configure                               | 7386 ++++++++++++++++++++
 src/crlibm/configure.ac                            |  419 ++
 src/crlibm/crlibm.h                                |  204 +
 src/crlibm/crlibm.spec                             |   42 +
 src/crlibm/crlibm_config.h.in                      |  168 +
 src/crlibm/crlibm_private.c                        |  397 ++
 src/crlibm/crlibm_private.h                        | 1048 +++
 src/crlibm/csh_fast.c                              |  721 ++
 src/crlibm/csh_fast.h                              |  771 ++
 src/crlibm/docs/latex/0_getting-started.tex        |  223 +
 src/crlibm/docs/latex/0_intro.tex                  |  558 ++
 src/crlibm/docs/latex/1_common.tex                 | 2180 ++++++
 src/crlibm/docs/latex/acos.tex                     |    4 +
 src/crlibm/docs/latex/asin.tex                     |  922 +++
 src/crlibm/docs/latex/atan.tex                     |  628 ++
 src/crlibm/docs/latex/crlibm.tex                   |  284 +
 src/crlibm/docs/latex/csh.tex                      |  620 ++
 src/crlibm/docs/latex/elem-fun.bib                 | 1431 ++++
 src/crlibm/docs/latex/exp.tex                      | 1098 +++
 src/crlibm/docs/latex/expm1.tex                    |    1 +
 src/crlibm/docs/latex/fig_exp/reconstruction.fig   |  519 ++
 src/crlibm/docs/latex/fig_exp/reconstruction.pstex |  997 +++
 .../docs/latex/fig_exp/reconstruction.pstex_t      |   89 +
 src/crlibm/docs/latex/fig_exp/rnd_to_nearest.fig   |  111 +
 src/crlibm/docs/latex/fig_exp/rnd_to_nearest.pstex |  386 +
 .../docs/latex/fig_exp/rnd_to_nearest.pstex_t      |   17 +
 .../docs/latex/fig_scs/exponent_representation.eps |  481 ++
 .../docs/latex/fig_scs/exponent_representation.pdf |  Bin 0 -> 4620 bytes
 src/crlibm/docs/latex/fig_scs/multiplication.eps   | 1237 ++++
 src/crlibm/docs/latex/fig_scs/multiplication.pdf   |  Bin 0 -> 6190 bytes
 src/crlibm/docs/latex/log.tex                      |  978 +++
 src/crlibm/docs/latex/log10.tex                    |  213 +
 src/crlibm/docs/latex/log1p.tex                    |    1 +
 src/crlibm/docs/latex/log2.tex                     |    1 +
 src/crlibm/docs/latex/pow.tex                      |   68 +
 src/crlibm/docs/latex/sqrt.tex                     |  323 +
 src/crlibm/docs/latex/trigo.tex                    | 1804 +++++
 src/crlibm/docs/latex/trigpi.tex                   |  292 +
 src/crlibm/docs/latex/tripledoubleprocedures.tex   | 3280 +++++++++
 src/crlibm/double-extended.h                       |  496 ++
 src/crlibm/exp-itanium.c                           |  723 ++
 src/crlibm/exp-td-standalone.c                     |   87 +
 src/crlibm/exp-td.c                                | 1363 ++++
 src/crlibm/exp-td.h                                |  685 ++
 src/crlibm/exp_build_coeffs/exp_fast_table.c       |  125 +
 src/crlibm/expm1-standalone.c                      |  119 +
 src/crlibm/expm1.c                                 | 2515 +++++++
 src/crlibm/expm1.h                                 |  715 ++
 src/crlibm/gappa/asin/asinAccuR0.gappa             |  502 ++
 src/crlibm/gappa/asin/asinAccuR1.gappa             |  450 ++
 src/crlibm/gappa/asin/asinAccuR2.gappa             |  450 ++
 src/crlibm/gappa/asin/asinAccuR3.gappa             |  450 ++
 src/crlibm/gappa/asin/asinAccuR4.gappa             |  450 ++
 src/crlibm/gappa/asin/asinAccuR5.gappa             |  450 ++
 src/crlibm/gappa/asin/asinAccuR6.gappa             |  450 ++
 src/crlibm/gappa/asin/asinAccuR7.gappa             |  450 ++
 src/crlibm/gappa/asin/asinAccuR8.gappa             |  450 ++
 src/crlibm/gappa/asin/asinAccuR9.gappa             |  380 +
 src/crlibm/gappa/asin/asinQuickR0.gappa            |  165 +
 src/crlibm/gappa/asin/asinQuickR1.gappa            |  175 +
 src/crlibm/gappa/asin/asinQuickR2.gappa            |  175 +
 src/crlibm/gappa/asin/asinQuickR3.gappa            |  175 +
 src/crlibm/gappa/asin/asinQuickR4.gappa            |  175 +
 src/crlibm/gappa/asin/asinQuickR5.gappa            |  175 +
 src/crlibm/gappa/asin/asinQuickR6.gappa            |  175 +
 src/crlibm/gappa/asin/asinQuickR7.gappa            |  175 +
 src/crlibm/gappa/asin/asinQuickR8.gappa            |  175 +
 src/crlibm/gappa/asin/asinQuickR9.gappa            |  168 +
 src/crlibm/gappa/exp-td/exp-td-accurate1.gappa     |  141 +
 src/crlibm/gappa/exp-td/exp-td-accurate2.gappa     |  109 +
 src/crlibm/gappa/exp-td/exp-td-accurate3.gappa     |   46 +
 src/crlibm/gappa/exp-td/exp-td-accurate4.gappa     |   46 +
 src/crlibm/gappa/exp-td/exp-td-proof.sh            |   10 +
 src/crlibm/gappa/log-de/README                     |   28 +
 src/crlibm/gappa/log-de/log-de-acc-index0-E0.gappa |  146 +
 .../gappa/log-de/log-de-acc-index0-E1N.gappa       |  161 +
 .../gappa/log-de/log-de-acc-index1N-E0.gappa       |  166 +
 .../gappa/log-de/log-de-acc-index1N-E1N.gappa      |  161 +
 src/crlibm/gappa/log-de/log-de-index0-E0.gappa     |  196 +
 src/crlibm/gappa/log-de/log-de-index0-E1N.gappa    |   96 +
 src/crlibm/gappa/log-de/log-de-index1N-E0N.gappa   |  121 +
 src/crlibm/gappa/log-td/log-td-E0-logir0.gappa     |  126 +
 src/crlibm/gappa/log-td/log-td-E0.gappa            |  143 +
 .../gappa/log-td/log-td-accurate-E0-logir0.gappa   |  230 +
 src/crlibm/gappa/log-td/log-td-accurate-E0.gappa   |  213 +
 src/crlibm/gappa/log-td/log-td-accurate.gappa      |  217 +
 src/crlibm/gappa/log-td/log-td.gappa               |  156 +
 src/crlibm/gappa/sqrt-proof.sh                     |   10 +
 src/crlibm/gappa/sqrt.sed                          |    8 +
 src/crlibm/gappa/sqrt12.gappa                      |  183 +
 src/crlibm/gappa/sqrt13.gappa                      |  222 +
 src/crlibm/gappa/trigos/SinCosCase3.gappa          |  216 +
 src/crlibm/gappa/trigos/SinZero.gappa              |  190 +
 src/crlibm/gappa/trigos/TanCase2.gappa             |   73 +
 src/crlibm/gappa/trigpi/cospi-accurate.gappa       |  148 +
 src/crlibm/gappa/trigpi/cospi-quick.gappa          |  103 +
 src/crlibm/gappa/trigpi/sinpi-accurate.gappa       |  189 +
 src/crlibm/gappa/trigpi/sinpi-quick.gappa          |  105 +
 src/crlibm/install-sh                              |  534 ++
 src/crlibm/interval.h                              |  238 +
 src/crlibm/log-de.c                                |  480 ++
 src/crlibm/log-de.h                                |  747 ++
 src/crlibm/log-de2.c                               |  280 +
 src/crlibm/log-de2.h                               | 2352 +++++++
 src/crlibm/log-td.c                                | 1158 +++
 src/crlibm/log-td.h                                |  819 +++
 src/crlibm/log.c                                   | 2244 ++++++
 src/crlibm/log.h                                   | 1592 +++++
 src/crlibm/log10-td.c                              |  906 +++
 src/crlibm/log10-td.h                              |  823 +++
 src/crlibm/log1p.c                                 | 1295 ++++
 src/crlibm/log2-td.c                               | 1521 ++++
 src/crlibm/log2-td.h                               |  821 +++
 src/crlibm/log2_accurate.c                         |  330 +
 src/crlibm/log2_accurate.h                         |  261 +
 src/crlibm/log_accurate.c                          |  133 +
 src/crlibm/log_accurate.h                          |  261 +
 src/crlibm/log_fast.c                              |  360 +
 src/crlibm/log_fast.h                              |  440 ++
 src/crlibm/maple/acos-td.mpl                       |  488 ++
 src/crlibm/maple/asin-td.mpl                       |  477 ++
 src/crlibm/maple/atan-itanium.mpl                  |  134 +
 src/crlibm/maple/atan-pentium.mpl                  |  113 +
 src/crlibm/maple/atan.mpl                          |  374 +
 src/crlibm/maple/check-hints-log-td.sh             |   47 +
 src/crlibm/maple/common-procedures.mpl             | 1039 +++
 src/crlibm/maple/csh.mpl                           |  446 ++
 src/crlibm/maple/double-extended.mpl               |  151 +
 src/crlibm/maple/exp-td.mpl                        |  237 +
 src/crlibm/maple/expm1.mpl                         |  257 +
 src/crlibm/maple/gal.mpl                           |   72 +
 src/crlibm/maple/log-de.mpl                        |  359 +
 src/crlibm/maple/log-de.patterson.mpl              |  305 +
 src/crlibm/maple/log-de2.mpl                       |  140 +
 src/crlibm/maple/log-itanium.mpl                   |  164 +
 src/crlibm/maple/log-td.mpl                        |  316 +
 src/crlibm/maple/log.mpl                           |  380 +
 src/crlibm/maple/log10-td.mpl                      |  345 +
 src/crlibm/maple/log2-td.mpl                       |  334 +
 src/crlibm/maple/pow.mpl                           |  321 +
 src/crlibm/maple/sqrt.mpl                          |   59 +
 src/crlibm/maple/trigo.mpl                         |  728 ++
 src/crlibm/maple/trigpi.mpl                        |   95 +
 src/crlibm/maple/triple-double.mpl                 |   78 +
 src/crlibm/missing                                 |  215 +
 src/crlibm/pow.c                                   | 1396 ++++
 src/crlibm/pow.h                                   | 3101 ++++++++
 src/crlibm/prepare                                 |   20 +
 src/crlibm/rem_pio2_accurate.c                     |  219 +
 src/crlibm/rem_pio2_accurate.h                     |   53 +
 src/crlibm/scs_lib/AUTHORS                         |    3 +
 src/crlibm/scs_lib/COPYING                         |  504 ++
 src/crlibm/scs_lib/ChangeLog                       |   16 +
 src/crlibm/scs_lib/Doxyfile.dev                    |  939 +++
 src/crlibm/scs_lib/Doxyfile.user                   |  939 +++
 src/crlibm/scs_lib/INSTALL                         |  215 +
 src/crlibm/scs_lib/Makefile.am                     |   17 +
 src/crlibm/scs_lib/Makefile.in                     |  608 ++
 src/crlibm/scs_lib/NEWS                            |    0
 src/crlibm/scs_lib/README                          |    9 +
 src/crlibm/scs_lib/README.DEV                      |   38 +
 src/crlibm/scs_lib/TODO                            |    4 +
 src/crlibm/scs_lib/VERSION                         |    1 +
 src/crlibm/scs_lib/addition_scs.c                  |  623 ++
 src/crlibm/scs_lib/division_scs.c                  |  110 +
 src/crlibm/scs_lib/double2scs.c                    |  174 +
 src/crlibm/scs_lib/main.dox                        |  104 +
 src/crlibm/scs_lib/maple/SCSS_procedures.mws       |   74 +
 src/crlibm/scs_lib/maple/calculpoly.mws            |  267 +
 src/crlibm/scs_lib/multiplication_scs.c            |  339 +
 src/crlibm/scs_lib/poly_fct.c                      |  112 +
 src/crlibm/scs_lib/print_scs.c                     |   73 +
 src/crlibm/scs_lib/rand_scs.c                      |   63 +
 src/crlibm/scs_lib/scs.h                           |  353 +
 src/crlibm/scs_lib/scs2double.c                    |  411 ++
 src/crlibm/scs_lib/scs2mpf.c                       |   58 +
 src/crlibm/scs_lib/scs2mpfr.c                      |   61 +
 src/crlibm/scs_lib/scs_private.c                   |   23 +
 src/crlibm/scs_lib/scs_private.h                   |  133 +
 src/crlibm/scs_lib/tests/Makefile.am               |   13 +
 src/crlibm/scs_lib/tests/log.h                     |  502 ++
 src/crlibm/scs_lib/tests/tbx_timing.h              |  102 +
 src/crlibm/scs_lib/tests/test_accuracy.c           |  330 +
 src/crlibm/scs_lib/tests/test_log.c                |  436 ++
 src/crlibm/scs_lib/tests/test_timing.c             |  166 +
 src/crlibm/scs_lib/wrapper_scs.h                   |  486 ++
 src/crlibm/scs_lib/zero_scs.c                      |   52 +
 src/crlibm/trigo_accurate.c                        |  501 ++
 src/crlibm/trigo_accurate.h                        |  331 +
 src/crlibm/trigo_fast.c                            | 1243 ++++
 src/crlibm/trigo_fast.h                            |  639 ++
 src/crlibm/trigpi.c                                | 1169 ++++
 src/crlibm/trigpi.h                                |  556 ++
 src/crlibm/triple-double.c                         |   57 +
 src/crlibm/triple-double.h                         | 1380 ++++
 src/crlibm_function.cc                             |  249 +
 src/mpfr_commons.cc                                |    1 +
 src/mpfr_function_d.cc                             |  119 +-
 src/mpfr_to_string_d.cc                            |    6 +-
 test/ieee1788-constructors.itl                     |   92 +
 263 files changed, 111802 insertions(+), 68 deletions(-)

diff --git a/CITATION b/CITATION
index 8e3375e..1bb8153 100644
--- a/CITATION
+++ b/CITATION
@@ -7,8 +7,8 @@ in publications use:
        author  = {Oliver Heimlich},
        title   = {GNU Octave Interval Package},
        url     = {http://octave.sourceforge.net/interval/},
-       version = {2.0.0},
-       date    = {2016-11-20},
+       version = {2.1.0},
+       date    = {2016-12-28},
      }
 
 See also ‘citation’ for citing Octave as a whole.
diff --git a/DESCRIPTION b/DESCRIPTION
index 146fac2..7d8b038 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Name: interval
-Version: 2.0.0
-Date: 2016-11-20
+Version: 2.1.0
+Date: 2016-12-28
 Author: Oliver Heimlich <oheim at posteo.de>
 Maintainer: Oliver Heimlich <oheim at posteo.de>
 Title: Real-valued interval arithmetic
diff --git a/INDEX b/INDEX
index 15ca625..ba2cf2b 100644
--- a/INDEX
+++ b/INDEX
@@ -199,7 +199,8 @@ Utility function
  @infsup/vertcat
  @infsupdec/decorationpart
  @infsupdec/intervalpart
-API function to the MPFR library
+API function to the MPFR and crlibm libraries
+ crlibm_function
  mpfr_function_d
  mpfr_linspace_d
  mpfr_matrix_mul_d
diff --git a/NEWS b/NEWS
index ec5a9f2..2c38a2f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,26 @@
                       GNU Octave Interval Package
                Summary of important user-visible changes
 
+Version 2.1.0 2016-12-28
+========================
+
+   • The speed of some arithmetic operations has been greatly improved.
+     They have previously been computed by multi-precision arithmetic
+     which simulates binary64 floating-point arithmetic (MPFR library).
+     Now, a specialized correctly rounded mathematical library (crlibm)
+     computes identical results 30–100 times faster.  There is no
+     accuracy drawback, arithmetic operations will compute tight
+     interval enclosures as before.  The following functions benefit
+     from this: acos, asin, atan, cos, cosh, exp, expm1, log, log10,
+     log1p, log2, sin, sinh, tan.
+
+   Bugfixes
+   • Fixed indexing expression in interval constructor for illegal
+     intervals of the form ‘[-inf, -inf]’ or ‘[inf, inf]’
+   • polyval: Fixed unnecessary warnings when evaluated on empty
+     intervals
+   • Fixed compilation errors on FreeBSD 9.3
+
 Version 2.0.0 2016-11-20
 ========================
 
diff --git a/doc/NEWS.texinfo b/doc/NEWS.texinfo
index d717b3a..0fe9f91 100644
--- a/doc/NEWS.texinfo
+++ b/doc/NEWS.texinfo
@@ -14,6 +14,20 @@
 @center GNU Octave Interval Package
 @center Summary of important user-visible changes
 
+ at release{2.1.0, 2016-12-28}
+ at itemize
+ at item
+	The speed of some arithmetic operations has been greatly improved.  They have previously been computed by multi-precision arithmetic which simulates binary64 floating-point arithmetic (MPFR library).  Now, a specialized correctly rounded mathematical library (crlibm) computes identical results 30–100 times faster.  There is no accuracy drawback, arithmetic operations will compute tight interval enclosures as before.  The following functions benefit from this: acos, asin, atan, cos, cosh [...]
+ at end itemize
+
+Bugfixes
+ at itemize
+ at item Fixed indexing expression in interval constructor for illegal intervals of the form @code{[-inf, -inf]} or @code{[inf, inf]}
+ at item polyval: Fixed unnecessary warnings when evaluated on empty intervals
+ at item Fixed compilation errors on FreeBSD 9.3
+ at end itemize
+
+
 @release{2.0.0, 2016-11-20}
 This major release contains fundamental changes to the interval constructors.  After a discussion on the P1788 mailing list, it has been revealed that this interval package didn't implement exceptions from the standard for interval arithmetic correctly: Operations from IEEE Std 1788-2015 which trigger an “exception” shall return a value nonetheless.  Conformance has been improved in this new version, but may break compatibility with previous versions.
 
diff --git a/doc/chapter/preface.texinfo b/doc/chapter/preface.texinfo
index d83d77d..2a27c6b 100644
--- a/doc/chapter/preface.texinfo
+++ b/doc/chapter/preface.texinfo
@@ -31,7 +31,13 @@ The GNU Octave interval package is build upon great third-party software.
 
 @itemize
 @item
-    Correctly rounded arithmetic operations are based on the @uref{http://www.mpfr.org/,GNU MPFR library} by Guillaume Hanrot, Vincent Lefèvre, Patrick Pélissier, Philippe Théveny and Paul Zimmermann.
+    Most correctly rounded arithmetic operations are based on the @uref{http://www.mpfr.org/,GNU MPFR library} by Guillaume Hanrot, Vincent Lefèvre, Patrick Pélissier, Philippe Théveny and Paul Zimmermann.
+
+ at item
+    Several correctly rounded arithmetic operations are based on the @uref{http://lipforge.ens-lyon.fr/www/crlibm/,correctly rounded math library} by Jean-Michel Muller, Florent de Dinechin, Christoph Lauter, David Defour, Catherine Daramy-Loirat, Matthieu Gallet, and Nicolas Gast.
+
+ at item
+    Jiří Rohn has published his comprehensive verification toolbox @uref{http://uivtx.cs.cas.cz/~rohn/matlab/,VERSOFT} as free software on July 26, 2016.  On November 24 he has fully disclosed the source code and several high-level functions could be included in the interval package with minor adjustments, e. g., @funref{@@infsup/chol}, @funref{vereigvec}, and @funref{verlinprog}.  Also, many thanks to Vladik Kreinovich who has helped to clear the licensing issue with VERSOFT.
 
 @item
     A linear system solver @funref{@@infsup/mldivide} and a polynomial evaluation algorithm @funref{@@infsup/polyval} for bare intervals are derived from routines developed for @uref{http://www2.math.uni-wuppertal.de/~xsc/,C-XSC} at University of Wuppertal, Germany.
diff --git a/doc/image/cameleon-start-end.svg.eps b/doc/image/cameleon-start-end.svg.eps
index e47b391..d91fac2 100644
--- a/doc/image/cameleon-start-end.svg.eps
+++ b/doc/image/cameleon-start-end.svg.eps
@@ -1,6 +1,6 @@
 %!PS-Adobe-3.0 EPSF-3.0
 %%Creator: cairo 1.14.0 (http://cairographics.org)
-%%CreationDate: Sun Nov 20 14:47:50 2016
+%%CreationDate: Wed Dec 28 23:34:45 2016
 %%Pages: 1
 %%DocumentData: Clean7Bit
 %%LanguageLevel: 2
diff --git a/doc/image/cameleon-transition.svg.eps b/doc/image/cameleon-transition.svg.eps
index 0173811..5c0f8c0 100644
--- a/doc/image/cameleon-transition.svg.eps
+++ b/doc/image/cameleon-transition.svg.eps
@@ -1,6 +1,6 @@
 %!PS-Adobe-3.0 EPSF-3.0
 %%Creator: cairo 1.14.0 (http://cairographics.org)
-%%CreationDate: Sun Nov 20 14:47:50 2016
+%%CreationDate: Wed Dec 28 23:34:46 2016
 %%Pages: 1
 %%DocumentData: Clean7Bit
 %%LanguageLevel: 2
diff --git a/doc/image/inverse-power.svg.eps b/doc/image/inverse-power.svg.eps
index 9dcae33..ae7e6cb 100644
--- a/doc/image/inverse-power.svg.eps
+++ b/doc/image/inverse-power.svg.eps
@@ -1,6 +1,6 @@
 %!PS-Adobe-3.0 EPSF-3.0
 %%Creator: cairo 1.14.0 (http://cairographics.org)
-%%CreationDate: Sun Nov 20 14:47:50 2016
+%%CreationDate: Wed Dec 28 23:34:46 2016
 %%Pages: 1
 %%DocumentData: Clean7Bit
 %%LanguageLevel: 2
diff --git a/doc/image/octave-interval.ly.pdf b/doc/image/octave-interval.ly.pdf
index 26dec18..afe54dd 100644
Binary files a/doc/image/octave-interval.ly.pdf and b/doc/image/octave-interval.ly.pdf differ
diff --git a/inst/@infsup/acos.m b/inst/@infsup/acos.m
index 8f7bd06..0ef5e8d 100644
--- a/inst/@infsup/acos.m
+++ b/inst/@infsup/acos.m
@@ -45,8 +45,13 @@ persistent domain = infsup (-1, 1);
 x = intersect (x, domain);
 
 ## acos is monotonically decreasing from (-1, pi) to (+1, 0)
-l = mpfr_function_d ('acos', -inf, x.sup);
-u = mpfr_function_d ('acos', +inf, x.inf);
+if (__check_crlibm__ ())
+    l = crlibm_function ('acos', -inf, x.sup);
+    u = crlibm_function ('acos', +inf, x.inf);
+else
+    l = mpfr_function_d ('acos', -inf, x.sup);
+    u = mpfr_function_d ('acos', +inf, x.inf);
+endif
 l(l == 0) = -0;
 
 emptyresult = isempty (x);
diff --git a/inst/@infsup/asin.m b/inst/@infsup/asin.m
index 7c0c71e..7cd25ad 100644
--- a/inst/@infsup/asin.m
+++ b/inst/@infsup/asin.m
@@ -45,8 +45,13 @@ persistent domain = infsup (-1, 1);
 x = intersect (x, domain);
 
 ## asin is monotonically increasing from (-1, -pi/2) to (1, pi/2)
-l = mpfr_function_d ('asin', -inf, x.inf);
-u = mpfr_function_d ('asin', +inf, x.sup);
+if (__check_crlibm__ ())
+    l = crlibm_function ('asin', -inf, x.inf);
+    u = crlibm_function ('asin', +inf, x.sup);
+else
+    l = mpfr_function_d ('asin', -inf, x.inf);
+    u = mpfr_function_d ('asin', +inf, x.sup);
+endif
 l(l == 0) = -0;
 
 emptyresult = isempty (x);
diff --git a/inst/@infsup/atan.m b/inst/@infsup/atan.m
index 1ab2ae6..7aec92c 100644
--- a/inst/@infsup/atan.m
+++ b/inst/@infsup/atan.m
@@ -42,8 +42,13 @@ if (nargin ~= 1)
 endif
 
 ## atan is monotonically increasing
-l = mpfr_function_d ('atan', -inf, x.inf);
-u = mpfr_function_d ('atan', +inf, x.sup);
+if (__check_crlibm__ ())
+    l = crlibm_function ('atan', -inf, x.inf);
+    u = crlibm_function ('atan', +inf, x.sup);
+else
+    l = mpfr_function_d ('atan', -inf, x.inf);
+    u = mpfr_function_d ('atan', +inf, x.sup);
+endif
 l(l == 0) = -0;
 
 emptyresult = isempty (x);
diff --git a/inst/@infsup/cos.m b/inst/@infsup/cos.m
index d238489..bcc1794 100644
--- a/inst/@infsup/cos.m
+++ b/inst/@infsup/cos.m
@@ -53,18 +53,33 @@ l(certainlyfullperiod) = -1;
 u(certainlyfullperiod) = 1;
 
 possiblynotfullperiod = not (certainlyfullperiod);
-l(possiblynotfullperiod) = min (...
-    mpfr_function_d ('cos', -inf, x.inf(possiblynotfullperiod)), ...
-    mpfr_function_d ('cos', -inf, x.sup(possiblynotfullperiod)));
-u(possiblynotfullperiod) = max (...
-    mpfr_function_d ('cos', inf, x.inf(possiblynotfullperiod)), ...
-    mpfr_function_d ('cos', inf, x.sup(possiblynotfullperiod)));
-
-## We use sign (-sin) to know the gradient at the boundaries.
-sinsignl(possiblynotfullperiod) = sign (...
-    -mpfr_function_d ('sin', .5, x.inf(possiblynotfullperiod)));
-sinsignu(possiblynotfullperiod) = sign (...
-    -mpfr_function_d ('sin', .5, x.sup(possiblynotfullperiod)));
+if (__check_crlibm__ ())
+    l(possiblynotfullperiod) = min (...
+        crlibm_function ('cos', -inf, x.inf(possiblynotfullperiod)), ...
+        crlibm_function ('cos', -inf, x.sup(possiblynotfullperiod)));
+    u(possiblynotfullperiod) = max (...
+        crlibm_function ('cos', inf, x.inf(possiblynotfullperiod)), ...
+        crlibm_function ('cos', inf, x.sup(possiblynotfullperiod)));
+
+    ## We use sign (-sin) to know the gradient at the boundaries.
+    sinsignl(possiblynotfullperiod) = sign (...
+        -crlibm_function ('sin', .5, x.inf(possiblynotfullperiod)));
+    sinsignu(possiblynotfullperiod) = sign (...
+        -crlibm_function ('sin', .5, x.sup(possiblynotfullperiod)));
+else
+    l(possiblynotfullperiod) = min (...
+        mpfr_function_d ('cos', -inf, x.inf(possiblynotfullperiod)), ...
+        mpfr_function_d ('cos', -inf, x.sup(possiblynotfullperiod)));
+    u(possiblynotfullperiod) = max (...
+        mpfr_function_d ('cos', inf, x.inf(possiblynotfullperiod)), ...
+        mpfr_function_d ('cos', inf, x.sup(possiblynotfullperiod)));
+
+    ## We use sign (-sin) to know the gradient at the boundaries.
+    sinsignl(possiblynotfullperiod) = sign (...
+        -mpfr_function_d ('sin', .5, x.inf(possiblynotfullperiod)));
+    sinsignu(possiblynotfullperiod) = sign (...
+        -mpfr_function_d ('sin', .5, x.sup(possiblynotfullperiod)));
+endif
 
 ## In case of sign (-sin) == 0, we conservatively use sign (-sin) of nextout.
 sinsignl(sinsignl == 0) = (-1) .* sign (l(sinsignl == 0));
diff --git a/inst/@infsup/cosh.m b/inst/@infsup/cosh.m
index 564b2c5..a9571cb 100644
--- a/inst/@infsup/cosh.m
+++ b/inst/@infsup/cosh.m
@@ -42,8 +42,13 @@ if (nargin ~= 1)
 endif
 
 ## cosh is symmetric and has its global minimum located at (0, 1).
-l = mpfr_function_d ('cosh', -inf, mig (x));
-u = mpfr_function_d ('cosh', +inf, mag (x));
+if (__check_crlibm__ ())
+    l = crlibm_function ('cosh', -inf, mig (x));
+    u = crlibm_function ('cosh', +inf, mag (x));
+else
+    l = mpfr_function_d ('cosh', -inf, mig (x));
+    u = mpfr_function_d ('cosh', +inf, mag (x));
+endif
 
 emptyresult = isempty (x);
 l(emptyresult) = inf;
diff --git a/inst/@infsup/exp.m b/inst/@infsup/exp.m
index 5ee9439..de7d950 100644
--- a/inst/@infsup/exp.m
+++ b/inst/@infsup/exp.m
@@ -42,8 +42,13 @@ if (nargin ~= 1)
 endif
 
 ## exp is monotonically increasing from (-inf, 0) to (inf, inf)
-l = mpfr_function_d ('exp', -inf, x.inf); # this also works for empty intervals
-u = mpfr_function_d ('exp', +inf, x.sup); # ... this does not
+if (__check_crlibm__ ())
+    l = crlibm_function ('exp', -inf, x.inf); # this also works for empty intervals
+    u = crlibm_function ('exp', +inf, x.sup); # ... this does not
+else
+    l = mpfr_function_d ('exp', -inf, x.inf); # this also works for empty intervals
+    u = mpfr_function_d ('exp', +inf, x.sup); # ... this does not
+endif
 
 l(l == 0) = -0;
 u(isempty (x)) = -inf;
diff --git a/inst/@infsup/expm1.m b/inst/@infsup/expm1.m
index 60f3663..9614291 100644
--- a/inst/@infsup/expm1.m
+++ b/inst/@infsup/expm1.m
@@ -42,8 +42,13 @@ if (nargin ~= 1)
 endif
 
 ## expm1 is monotonically increasing from (-inf, 0) to (inf, inf)
-l = mpfr_function_d ('expm1', -inf, x.inf); # this also works for [Empty]
-u = mpfr_function_d ('expm1', +inf, x.sup); # ... this does not
+if (__check_crlibm__ ())
+    l = crlibm_function ('expm1', -inf, x.inf); # this also works for [Empty]
+    u = crlibm_function ('expm1', +inf, x.sup); # ... this does not
+else
+    l = mpfr_function_d ('expm1', -inf, x.inf); # this also works for [Empty]
+    u = mpfr_function_d ('expm1', +inf, x.sup); # ... this does not
+endif
 
 l(l == 0) = -0;
 u(isempty (x)) = -inf;
diff --git a/inst/@infsup/infsup.m b/inst/@infsup/infsup.m
index a7f1038..d61bf50 100644
--- a/inst/@infsup/infsup.m
+++ b/inst/@infsup/infsup.m
@@ -794,7 +794,7 @@ illegal_inf_idx = not (isfinite (x.inf (x.inf == x.sup)));
 if (any (illegal_inf_idx(:)))
     warning ("interval:UndefinedOperation", ...
              "illegal interval boundaries: infimum = supremum = +/- infinity");
-    isnai(illegal_inf_idx) = true;
+    isnai(find (x.inf == x.sup)(illegal_inf_idx)) = true;
 endif
 
 ## Illegal boundaries make illegal intervals,
@@ -1293,3 +1293,6 @@ endfunction
 %!warning
 %! [~, ~, ~, isnai] = infsup ("1 2 xxx 4");
 %! assert (isnai, [false, false, true, false]);
+%!warning
+%! [~, ~, ~, isnai] = infsup ("[-inf, inf] [inf, inf]");
+%! assert (isnai, [false, true]);
diff --git a/inst/@infsup/log.m b/inst/@infsup/log.m
index d4bf449..57ab516 100644
--- a/inst/@infsup/log.m
+++ b/inst/@infsup/log.m
@@ -46,8 +46,13 @@ endif
 x = intersect (x, infsup (0, inf));
 
 ## log is monotonically increasing from (0, -inf) to (inf, inf)
-l = mpfr_function_d ('log', -inf, x.inf); # this works for empty intervals
-u = mpfr_function_d ('log', +inf, x.sup); # ... this does not
+if (__check_crlibm__ ())
+    l = crlibm_function ('log', -inf, x.inf); # this works for empty intervals
+    u = crlibm_function ('log', +inf, x.sup); # ... this does not
+else
+    l = mpfr_function_d ('log', -inf, x.inf); # this works for empty intervals
+    u = mpfr_function_d ('log', +inf, x.sup); # ... this does not
+endif
 
 l(x.sup == 0) = inf;
 l(l == 0) = -0;
diff --git a/inst/@infsup/log10.m b/inst/@infsup/log10.m
index c2a2ab5..5bbee03 100644
--- a/inst/@infsup/log10.m
+++ b/inst/@infsup/log10.m
@@ -46,8 +46,13 @@ endif
 x = intersect (x, infsup (0, inf));
 
 ## log10 is monotonically increasing from (0, -inf) to (inf, inf)
-l = mpfr_function_d ('log10', -inf, x.inf); # this works for empty intervals
-u = mpfr_function_d ('log10', +inf, x.sup); # ... this does not
+if (__check_crlibm__ ())
+    l = crlibm_function ('log10', -inf, x.inf); # this works for empty intervals
+    u = crlibm_function ('log10', +inf, x.sup); # ... this does not
+else
+    l = mpfr_function_d ('log10', -inf, x.inf); # this works for empty intervals
+    u = mpfr_function_d ('log10', +inf, x.sup); # ... this does not
+endif
 
 l(x.sup == 0) = inf;
 l(l == 0) = -0;
diff --git a/inst/@infsup/log1p.m b/inst/@infsup/log1p.m
index f278f28..bbf47f1 100644
--- a/inst/@infsup/log1p.m
+++ b/inst/@infsup/log1p.m
@@ -46,8 +46,13 @@ endif
 x = intersect (x, infsup (-1, inf));
 
 ## log is monotonically increasing from (-1, -inf) to (inf, inf)
-l = mpfr_function_d ('log1p', -inf, x.inf); # this works for empty intervals
-u = mpfr_function_d ('log1p', +inf, x.sup); # ... this does not
+if (__check_crlibm__ ())
+    l = crlibm_function ('log1p', -inf, x.inf); # this works for empty intervals
+    u = crlibm_function ('log1p', +inf, x.sup); # ... this does not
+else
+    l = mpfr_function_d ('log1p', -inf, x.inf); # this works for empty intervals
+    u = mpfr_function_d ('log1p', +inf, x.sup); # ... this does not
+endif
 
 l(x.sup == -1) = inf;
 l(l == 0) = -0;
diff --git a/inst/@infsup/log2.m b/inst/@infsup/log2.m
index 59e553a..2a43161 100644
--- a/inst/@infsup/log2.m
+++ b/inst/@infsup/log2.m
@@ -46,8 +46,13 @@ endif
 x = intersect (x, infsup (0, inf));
 
 ## log2 is monotonically increasing from (0, -inf) to (inf, inf)
-l = mpfr_function_d ('log2', -inf, x.inf); # this works for empty intervals
-u = mpfr_function_d ('log2', +inf, x.sup); # ... this does not
+if (__check_crlibm__ ())
+    l = crlibm_function ('log2', -inf, x.inf); # this works for empty intervals
+    u = crlibm_function ('log2', +inf, x.sup); # ... this does not
+else
+    l = mpfr_function_d ('log2', -inf, x.inf); # this works for empty intervals
+    u = mpfr_function_d ('log2', +inf, x.sup); # ... this does not
+endif
 
 l(x.sup == 0) = inf;
 l(l == 0) = -0;
diff --git a/inst/@infsup/polyval.m b/inst/@infsup/polyval.m
index 9e2d809..7132911 100644
--- a/inst/@infsup/polyval.m
+++ b/inst/@infsup/polyval.m
@@ -123,6 +123,10 @@ y = zeros (n, kMax);
 for k = 1 : kMax
     lastresult = result;
 
+    if (isempty (result))
+        break
+    endif
+
     ## Iterative refinement
     ## Store middle of residual as the next correction of y
     y(:, k) = mid (yy);
diff --git a/inst/@infsup/sin.m b/inst/@infsup/sin.m
index 91ecff8..ecd5a8b 100644
--- a/inst/@infsup/sin.m
+++ b/inst/@infsup/sin.m
@@ -53,18 +53,33 @@ l(certainlyfullperiod) = -1;
 u(certainlyfullperiod) = 1;
 
 possiblynotfullperiod = not (certainlyfullperiod);
-l(possiblynotfullperiod) = min (...
-    mpfr_function_d ('sin', -inf, x.inf(possiblynotfullperiod)), ...
-    mpfr_function_d ('sin', -inf, x.sup(possiblynotfullperiod)));
-u(possiblynotfullperiod) = max (...
-    mpfr_function_d ('sin', inf, x.inf(possiblynotfullperiod)), ...
-    mpfr_function_d ('sin', inf, x.sup(possiblynotfullperiod)));
-
-## We use sign (cos) to know the gradient at the boundaries.
-cossignl(possiblynotfullperiod) = sign (...
-    mpfr_function_d ('cos', .5, x.inf(possiblynotfullperiod)));
-cossignu(possiblynotfullperiod) = sign (...
-    mpfr_function_d ('cos', .5, x.sup(possiblynotfullperiod)));
+if (__check_crlibm__ ())
+    l(possiblynotfullperiod) = min (...
+        crlibm_function ('sin', -inf, x.inf(possiblynotfullperiod)), ...
+        crlibm_function ('sin', -inf, x.sup(possiblynotfullperiod)));
+    u(possiblynotfullperiod) = max (...
+        crlibm_function ('sin', inf, x.inf(possiblynotfullperiod)), ...
+        crlibm_function ('sin', inf, x.sup(possiblynotfullperiod)));
+
+    ## We use sign (cos) to know the gradient at the boundaries.
+    cossignl(possiblynotfullperiod) = sign (...
+        crlibm_function ('cos', .5, x.inf(possiblynotfullperiod)));
+    cossignu(possiblynotfullperiod) = sign (...
+        crlibm_function ('cos', .5, x.sup(possiblynotfullperiod)));
+else
+    l(possiblynotfullperiod) = min (...
+        mpfr_function_d ('sin', -inf, x.inf(possiblynotfullperiod)), ...
+        mpfr_function_d ('sin', -inf, x.sup(possiblynotfullperiod)));
+    u(possiblynotfullperiod) = max (...
+        mpfr_function_d ('sin', inf, x.inf(possiblynotfullperiod)), ...
+        mpfr_function_d ('sin', inf, x.sup(possiblynotfullperiod)));
+
+    ## We use sign (cos) to know the gradient at the boundaries.
+    cossignl(possiblynotfullperiod) = sign (...
+        mpfr_function_d ('cos', .5, x.inf(possiblynotfullperiod)));
+    cossignu(possiblynotfullperiod) = sign (...
+        mpfr_function_d ('cos', .5, x.sup(possiblynotfullperiod)));
+endif
 
 ## In case of sign (cos) == 0, we conservatively use sign (cos) of nextout.
 cossignl(cossignl == 0) = sign (l(cossignl == 0));
diff --git a/inst/@infsup/sinh.m b/inst/@infsup/sinh.m
index 5a4731f..734db0f 100644
--- a/inst/@infsup/sinh.m
+++ b/inst/@infsup/sinh.m
@@ -41,8 +41,13 @@ if (nargin ~= 1)
     return
 endif
 
-l = mpfr_function_d ('sinh', -inf, x.inf);
-u = mpfr_function_d ('sinh', +inf, x.sup);
+if (__check_crlibm__ ())
+    l = crlibm_function ('sinh', -inf, x.inf);
+    u = crlibm_function ('sinh', +inf, x.sup);
+else
+    l = mpfr_function_d ('sinh', -inf, x.inf);
+    u = mpfr_function_d ('sinh', +inf, x.sup);
+endif
 
 emptyresult = isempty (x);
 l(emptyresult) = inf;
diff --git a/inst/@infsup/tan.m b/inst/@infsup/tan.m
index cdbd421..e5d9777 100644
--- a/inst/@infsup/tan.m
+++ b/inst/@infsup/tan.m
@@ -50,8 +50,13 @@ persistent pi = infsup ("pi");
 certainlyfullperiod = width >= sup (pi);
 
 possiblynotfullperiod = not (certainlyfullperiod);
-l(possiblynotfullperiod) = mpfr_function_d ('tan', -inf, x.inf(possiblynotfullperiod));
-u(possiblynotfullperiod) = mpfr_function_d ('tan', inf, x.sup(possiblynotfullperiod));
+if (__check_crlibm__ ())
+    l(possiblynotfullperiod) = crlibm_function ('tan', -inf, x.inf(possiblynotfullperiod));
+    u(possiblynotfullperiod) = crlibm_function ('tan', inf, x.sup(possiblynotfullperiod));
+else
+    l(possiblynotfullperiod) = mpfr_function_d ('tan', -inf, x.inf(possiblynotfullperiod));
+    u(possiblynotfullperiod) = mpfr_function_d ('tan', inf, x.sup(possiblynotfullperiod));
+endif
 
 singularity = certainlyfullperiod | ...
               l > u | (...
diff --git a/inst/__check_crlibm__.m b/inst/__check_crlibm__.m
new file mode 100644
index 0000000..bdf0168
--- /dev/null
+++ b/inst/__check_crlibm__.m
@@ -0,0 +1,62 @@
+## Copyright 2016 Oliver Heimlich
+##
+## This program 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.
+##
+## This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @documentencoding UTF-8
+## @defun __check_crlibm__ ()
+## Check whether crlibm is available and working.
+## @end defun
+
+## Author: Oliver Heimlich
+## Keywords: interval
+## Created: 2016-12-06
+
+function result = __check_crlibm__ ()
+
+if (exist ("crlibm_function") != 3)
+    ## oct file not in the path
+    result = false;
+endif
+
+persistent use_crlibm = verify_crlibm ();
+
+result = use_crlibm;
+
+endfunction
+
+function works = verify_crlibm ()
+
+arithmetic_test_suite = fullfile (...
+    fileparts (file_in_loadpath ("__check_crlibm__.m")), ...
+    "test", ...
+    "crlibm.tst");
+
+if (exist (arithmetic_test_suite) == 0)
+    ## test suite missing: assume that a package maintainer has removed it to
+    ## save some space after having verified that the test suite passes.
+    works = true;
+    return
+endif
+
+works = test (arithmetic_test_suite, "quiet");
+
+if (!works)
+    warning ("interval:crlibm", ...
+             "crlibm is not working properly, using MPFR as a fallback"); 
+endif
+
+endfunction
+
+%!assert (__check_crlibm__ ());
diff --git a/inst/test/crlibm.mat b/inst/test/crlibm.mat
new file mode 100644
index 0000000..6eaf646
Binary files /dev/null and b/inst/test/crlibm.mat differ
diff --git a/inst/test/crlibm.tst b/inst/test/crlibm.tst
new file mode 100644
index 0000000..823bfae
--- /dev/null
+++ b/inst/test/crlibm.tst
@@ -0,0 +1,98 @@
+## Copyright 2016 Oliver Heimlich
+##
+## This program 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.
+##
+## This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+
+## crlibm.mat has been created from crlibm's /test/*.testdata and is
+## Copyright 2005-2007 F. de Dinechin, Ch. Q. Lauter, and V. Lefevre.
+## Conversion into Octave's binary .mat format has been done by Oliver Heimlich.
+%!shared testdata
+%! # We have to lookup the .mat file to load it.
+%! testdata = load (fullfile (...
+%!   fileparts (file_in_loadpath ("__check_crlibm__.m")), ...
+%!   "test", ...
+%!   "crlibm.mat"));
+
+%!function verify (fname, rnd, data)
+%!  assert (crlibm_function (fname, rnd, data.input), data.output);
+%!endfunction
+
+%!test verify ("acos", -inf, testdata.acos_rd);
+%!test verify ("acos", +inf, testdata.acos_ru);
+%!test verify ("acos",  0.5, testdata.acos_rn);
+%!test verify ("acos",  0,   testdata.acos_rz);
+
+%!test verify ("asin", -inf, testdata.asin_rd);
+%!test verify ("asin", +inf, testdata.asin_ru);
+%!test verify ("asin",  0.5, testdata.asin_rn);
+%!test verify ("asin",  0,   testdata.asin_rz);
+
+%!test verify ("atan", -inf, testdata.atan_rd);
+%!test verify ("atan", +inf, testdata.atan_ru);
+%!test verify ("atan",  0.5, testdata.atan_rn);
+%!test verify ("atan",  0,   testdata.atan_rz);
+
+%!test verify ("cos", -inf, testdata.cos_rd);
+%!test verify ("cos", +inf, testdata.cos_ru);
+%!test verify ("cos",  0.5, testdata.cos_rn);
+%!test verify ("cos",  0,   testdata.cos_rz);
+
+%!test verify ("cosh", -inf, testdata.cosh_rd);
+%!test verify ("cosh", +inf, testdata.cosh_ru);
+%!test verify ("cosh",  0.5, testdata.cosh_rn);
+%!test verify ("cosh",  0,   testdata.cosh_rz);
+
+%!test verify ("exp", -inf, testdata.exp_rd);
+%!test verify ("exp", +inf, testdata.exp_ru);
+%!test verify ("exp",  0.5, testdata.exp_rn);
+%!test verify ("exp",  0,   testdata.exp_rz);
+
+%!test verify ("expm1", -inf, testdata.expm1_rd);
+%!test verify ("expm1", +inf, testdata.expm1_ru);
+%!test verify ("expm1",  0.5, testdata.expm1_rn);
+%!test verify ("expm1",  0,   testdata.expm1_rz);
+
+%!test verify ("log", -inf, testdata.log_rd);
+%!test verify ("log", +inf, testdata.log_ru);
+%!test verify ("log",  0.5, testdata.log_rn);
+%!test verify ("log",  0,   testdata.log_rz);
+
+%!test verify ("log10", -inf, testdata.log10_rd);
+%!test verify ("log10", +inf, testdata.log10_ru);
+%!test verify ("log10",  0.5, testdata.log10_rn);
+%!test verify ("log10",  0,   testdata.log10_rz);
+
+%!test verify ("log1p", -inf, testdata.log1p_rd);
+%!test verify ("log1p", +inf, testdata.log1p_ru);
+%!test verify ("log1p",  0.5, testdata.log1p_rn);
+%!test verify ("log1p",  0,   testdata.log1p_rz);
+
+%!test verify ("log2", -inf, testdata.log2_rd);
+%!test verify ("log2", +inf, testdata.log2_ru);
+%!test verify ("log2",  0.5, testdata.log2_rn);
+%!test verify ("log2",  0,   testdata.log2_rz);
+
+%!test verify ("sin", -inf, testdata.sin_rd);
+%!test verify ("sin", +inf, testdata.sin_ru);
+%!test verify ("sin",  0.5, testdata.sin_rn);
+%!test verify ("sin",  0,   testdata.sin_rz);
+
+%!test verify ("sinh", -inf, testdata.sinh_rd);
+%!test verify ("sinh", +inf, testdata.sinh_ru);
+%!test verify ("sinh",  0.5, testdata.sinh_rn);
+%!test verify ("sinh",  0,   testdata.sinh_rz);
+
+%!test verify ("tan", -inf, testdata.tan_rd);
+%!test verify ("tan", +inf, testdata.tan_ru);
+%!test verify ("tan",  0.5, testdata.tan_rn);
+%!test verify ("tan",  0,   testdata.tan_rz);
diff --git a/inst/test/crlibm_function.cc-tst b/inst/test/crlibm_function.cc-tst
new file mode 100644
index 0000000..9d55021
--- /dev/null
+++ b/inst/test/crlibm_function.cc-tst
@@ -0,0 +1,7 @@
+## DO NOT EDIT!  Generated automatically from src/crlibm_function.cc
+%!test
+%!  for f = {"acos", "asin", "atan", "cos", "cosh", "exp", "expm1", "log", "log10", "log1p", "log2", "sin", "sinh", "tan"}
+%!    for rnd = {+inf, -inf, 0, 0.5}
+%!      assert (crlibm_function (f{:}, rnd{:}, 0.5), mpfr_function_d (f{:}, rnd{:}, 0.5));
+%!    endfor
+%!  endfor
diff --git a/inst/test/ieee1788-constructors.tst b/inst/test/ieee1788-constructors.tst
new file mode 100644
index 0000000..cebcaf0
--- /dev/null
+++ b/inst/test/ieee1788-constructors.tst
@@ -0,0 +1,170 @@
+## DO NOT EDIT!  Generated automatically from test/ieee1788-constructors.itl
+## by the Interval Testing Framework for IEEE 1788.
+## https://github.com/nehmeier/ITF1788/tree/92558f7e942665a78f2e883dbe7af52320100fba
+##
+## 
+## Test Cases for interval constructors from IEEE Std 1788-2015
+## 
+## Copyright 2016 Oliver Heimlich
+## 
+## This program 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.
+## 
+## This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+## 
+##
+%!#Test library imports
+
+%!#Arithmetic library imports
+pkg load interval
+
+%!#Preamble
+
+try; error ("__FILE__"); catch
+    test (lasterror.stack.file, "quiet", stdout);
+end_try_catch;
+
+%!function assert_warn (observed_value, expected_value)
+%!    if (not (isequal (observed_value, expected_value)))
+%!        observed_expression = regexprep (argn(1, :), '\s+$', '');
+%!        expected_expression = regexprep (argn(2, :), '\s+$', '');
+%!        observed_as_char = disp (observed_value)(1 : end - 1);
+%!        expected_as_char = disp(expected_value)(1 : end - 1);
+%!        warning ([observed_expression, " != ", expected_expression, ...
+%!                 "\n         ", observed_as_char, " != ", expected_as_char]);
+%!    endif
+%!endfunction
+
+## IEEE1788.a
+%!# According to the examples in Section 7.4.2, unbounded intervals can be constructed with non-common inputs.
+%!test
+%! assert (isequal (infsup (-inf, inf), infsup (-inf, inf)));
+
+## IEEE1788.b
+%!# Examples from Sections 9.7.1 and 9.8
+%!test
+%! assert (isequal (infsup ("[1.2345]"), infsup (1.234499999999999931e+00, 1.234500000000000153e+00)));
+%!test
+%! assert (isequal (infsup ("[1,+infinity]"), infsup (1.0, inf)));
+%!test
+%! assert (isequal (infsupdec ("[1,1e3]_com"), infsupdec (1.0, 1000.0, "com")));
+%! assert (isequal (decorationpart (infsupdec ("[1,1e3]_com")){1}, decorationpart (infsupdec (1.0, 1000.0, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("[1,1E3]_COM"), infsupdec (1.0, 1000.0, "com")));
+%! assert (isequal (decorationpart (infsupdec ("[1,1E3]_COM")){1}, decorationpart (infsupdec (1.0, 1000.0, "com")){1}));
+
+## IEEE1788.c
+%!# Examples from Table 9.4
+%!test
+%! assert (isequal (infsup ("[1.e-3, 1.1e-3]"), infsup (9.999999999999998040e-04, 1.100000000000000066e-03)));
+%!test
+%! assert (isequal (infsup ("[-0x1.3p-1, 2/3]"), infsup (-5.937500000000000000e-01, 6.666666666666667407e-01)));
+%!test
+%! assert (isequal (infsup ("[3.56]"), infsup (3.559999999999999609e+00, 3.560000000000000053e+00)));
+%!test
+%! assert (isequal (infsup ("3.56?1"), infsup (3.549999999999999822e+00, 3.570000000000000284e+00)));
+%!test
+%! assert (isequal (infsup ("3.56?1e2"), infsup (355.0, 357.0)));
+%!test
+%! assert (isequal (infsup ("3.560?2"), infsup (3.557999999999999829e+00, 3.562000000000000277e+00)));
+%!test
+%! assert (isequal (infsup ("3.56?"), infsup (3.554999999999999716e+00, 3.565000000000000391e+00)));
+%!test
+%! assert (isequal (infsup ("3.560?2u"), infsup (3.559999999999999609e+00, 3.562000000000000277e+00)));
+%!test
+%! assert (isequal (infsup ("-10?"), infsup (-10.5, -9.5)));
+%!test
+%! assert (isequal (infsup ("-10?u"), infsup (-10.0, -9.5)));
+%!test
+%! assert (isequal (infsup ("-10?12"), infsup (-22.0, 2.0)));
+
+## IEEE1788.d
+%!# Examples from Section 10.5.1
+%!test
+%! assert (isequal (infsup ("[1.234e5,Inf]"), infsup (123400.0, inf)));
+%!test
+%! assert (isequal (infsup ("3.1416?1"), infsup (3.141499999999999737e+00, 3.141700000000000159e+00)));
+%!test
+%! assert (isequal (infsup ("[Empty]"), infsup));
+
+## IEEE1788.e
+%!# Example from Section 11.3
+%!test
+%! assert (isequal (infsupdec (2, 1), nai));
+
+## IEEE1788.e
+%!# Examples from Table 12.1
+%!test
+%! assert (isequal (infsupdec ("[ ]"), infsupdec (empty, "trv")));
+%! assert (isequal (decorationpart (infsupdec ("[ ]")){1}, decorationpart (infsupdec (empty, "trv")){1}));
+%!test
+%! assert (isequal (infsupdec ("[entire]"), infsupdec (-inf, inf, "dac")));
+%! assert (isequal (decorationpart (infsupdec ("[entire]")){1}, decorationpart (infsupdec (-inf, inf, "dac")){1}));
+%!test
+%! assert (isequal (infsupdec ("[1.e-3, 1.1e-3]"), infsupdec (9.999999999999998040e-04, 1.100000000000000066e-03, "com")));
+%! assert (isequal (decorationpart (infsupdec ("[1.e-3, 1.1e-3]")){1}, decorationpart (infsupdec (9.999999999999998040e-04, 1.100000000000000066e-03, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("[-Inf, 2/3]"), infsupdec (-inf, 6.666666666666667407e-01, "dac")));
+%! assert (isequal (decorationpart (infsupdec ("[-Inf, 2/3]")){1}, decorationpart (infsupdec (-inf, 6.666666666666667407e-01, "dac")){1}));
+%!test
+%! assert (isequal (infsupdec ("[0x1.3p-1,]"), infsupdec (5.937500000000000000e-01, inf, "dac")));
+%! assert (isequal (decorationpart (infsupdec ("[0x1.3p-1,]")){1}, decorationpart (infsupdec (5.937500000000000000e-01, inf, "dac")){1}));
+%!test
+%! assert (isequal (infsupdec ("[,]"), infsupdec (entire, "dac")));
+%! assert (isequal (decorationpart (infsupdec ("[,]")){1}, decorationpart (infsupdec (entire, "dac")){1}));
+%!test
+%! assert (isequal (infsupdec ("3.56?1"), infsupdec (3.549999999999999822e+00, 3.570000000000000284e+00, "com")));
+%! assert (isequal (decorationpart (infsupdec ("3.56?1")){1}, decorationpart (infsupdec (3.549999999999999822e+00, 3.570000000000000284e+00, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("3.56?1e2"), infsupdec (355.0, 357.0, "com")));
+%! assert (isequal (decorationpart (infsupdec ("3.56?1e2")){1}, decorationpart (infsupdec (355.0, 357.0, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("3.560?2"), infsupdec (3.557999999999999829e+00, 3.562000000000000277e+00, "com")));
+%! assert (isequal (decorationpart (infsupdec ("3.560?2")){1}, decorationpart (infsupdec (3.557999999999999829e+00, 3.562000000000000277e+00, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("3.56?"), infsupdec (3.554999999999999716e+00, 3.565000000000000391e+00, "com")));
+%! assert (isequal (decorationpart (infsupdec ("3.56?")){1}, decorationpart (infsupdec (3.554999999999999716e+00, 3.565000000000000391e+00, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("3.560?2u"), infsupdec (3.559999999999999609e+00, 3.562000000000000277e+00, "com")));
+%! assert (isequal (decorationpart (infsupdec ("3.560?2u")){1}, decorationpart (infsupdec (3.559999999999999609e+00, 3.562000000000000277e+00, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("-10?"), infsupdec (-10.5, -9.5, "com")));
+%! assert (isequal (decorationpart (infsupdec ("-10?")){1}, decorationpart (infsupdec (-10.5, -9.5, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("-10?u"), infsupdec (-10.0, -9.5, "com")));
+%! assert (isequal (decorationpart (infsupdec ("-10?u")){1}, decorationpart (infsupdec (-10.0, -9.5, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("-10?12"), infsupdec (-22.0, 2.0, "com")));
+%! assert (isequal (decorationpart (infsupdec ("-10?12")){1}, decorationpart (infsupdec (-22.0, 2.0, "com")){1}));
+%!test
+%! assert (isequal (infsupdec ("-10??u"), infsupdec (-10.0, inf, "dac")));
+%! assert (isequal (decorationpart (infsupdec ("-10??u")){1}, decorationpart (infsupdec (-10.0, inf, "dac")){1}));
+%!test
+%! assert (isequal (infsupdec ("-10??"), infsupdec (-inf, inf, "dac")));
+%! assert (isequal (decorationpart (infsupdec ("-10??")){1}, decorationpart (infsupdec (-inf, inf, "dac")){1}));
+%!test
+%! assert (isequal (infsupdec ("[nai]"), nai));
+%!test
+%! assert (isequal (infsupdec ("3.56?1_def"), infsupdec (3.549999999999999822e+00, 3.570000000000000284e+00, "def")));
+%! assert (isequal (decorationpart (infsupdec ("3.56?1_def")){1}, decorationpart (infsupdec (3.549999999999999822e+00, 3.570000000000000284e+00, "def")){1}));
+
+## IEEE1788.f
+%!# Examples from Section 12.11.3
+%!test
+%! assert (isequal (infsup ("[]"), infsup));
+%!test
+%! assert (isequal (infsup ("[empty]"), infsup));
+%!test
+%! assert (isequal (infsup ("[ empty ]"), infsup));
+%!test
+%! assert (isequal (infsup ("[,]"), infsup (-inf, inf)));
+%!test
+%! assert (isequal (infsup ("[ entire ]"), infsup (-inf, inf)));
diff --git a/inst/test/mpfr_function_d.cc-tst b/inst/test/mpfr_function_d.cc-tst
index 53b00e4..6cd1827 100644
--- a/inst/test/mpfr_function_d.cc-tst
+++ b/inst/test/mpfr_function_d.cc-tst
@@ -3,3 +3,71 @@
 %!assert (mpfr_function_d ('plus', -inf, 1, eps / 2), 1);
 %!assert (mpfr_function_d ('plus', +inf, 1, eps / 2), 1 + eps);
 %!error mpfr_function_d ('Krauskefarben', 0, 47, 11);
+%!# Cross-check unit tests from crlibm against the MPFR library.
+%!# We simulate binary64 floating-point arithmetic in MPFR
+%!# with mpfr_function_d and results shall be identical.
+%!#
+%!shared testdata
+%! testdata = load (fullfile (...
+%!   fileparts (file_in_loadpath ("__check_crlibm__.m")), ...
+%!   "test", ...
+%!   "crlibm.mat"));
+%!function verify (fname, rnd, data)
+%!  assert (mpfr_function_d (fname, rnd, data.input), data.output);
+%!endfunction
+%!test verify ("acos", -inf, testdata.acos_rd);
+%!test verify ("acos", +inf, testdata.acos_ru);
+%!test verify ("acos",  0.5, testdata.acos_rn);
+%!test verify ("acos",  0,   testdata.acos_rz);
+%!test verify ("asin", -inf, testdata.asin_rd);
+%!test verify ("asin", +inf, testdata.asin_ru);
+%!test verify ("asin",  0.5, testdata.asin_rn);
+%!test verify ("asin",  0,   testdata.asin_rz);
+%!test verify ("atan", -inf, testdata.atan_rd);
+%!test verify ("atan", +inf, testdata.atan_ru);
+%!test verify ("atan",  0.5, testdata.atan_rn);
+%!test verify ("atan",  0,   testdata.atan_rz);
+%!test verify ("cos", -inf, testdata.cos_rd);
+%!test verify ("cos", +inf, testdata.cos_ru);
+%!test verify ("cos",  0.5, testdata.cos_rn);
+%!test verify ("cos",  0,   testdata.cos_rz);
+%!test verify ("cosh", -inf, testdata.cosh_rd);
+%!test verify ("cosh", +inf, testdata.cosh_ru);
+%!test verify ("cosh",  0.5, testdata.cosh_rn);
+%!test verify ("cosh",  0,   testdata.cosh_rz);
+%!test verify ("exp", -inf, testdata.exp_rd);
+%!test verify ("exp", +inf, testdata.exp_ru);
+%!test verify ("exp",  0.5, testdata.exp_rn);
+%!test verify ("exp",  0,   testdata.exp_rz);
+%!test verify ("expm1", -inf, testdata.expm1_rd);
+%!test verify ("expm1", +inf, testdata.expm1_ru);
+%!test verify ("expm1",  0.5, testdata.expm1_rn);
+%!test verify ("expm1",  0,   testdata.expm1_rz);
+%!test verify ("log", -inf, testdata.log_rd);
+%!test verify ("log", +inf, testdata.log_ru);
+%!test verify ("log",  0.5, testdata.log_rn);
+%!test verify ("log",  0,   testdata.log_rz);
+%!test verify ("log10", -inf, testdata.log10_rd);
+%!test verify ("log10", +inf, testdata.log10_ru);
+%!test verify ("log10",  0.5, testdata.log10_rn);
+%!test verify ("log10",  0,   testdata.log10_rz);
+%!test verify ("log1p", -inf, testdata.log1p_rd);
+%!test verify ("log1p", +inf, testdata.log1p_ru);
+%!test verify ("log1p",  0.5, testdata.log1p_rn);
+%!test verify ("log1p",  0,   testdata.log1p_rz);
+%!test verify ("log2", -inf, testdata.log2_rd);
+%!test verify ("log2", +inf, testdata.log2_ru);
+%!test verify ("log2",  0.5, testdata.log2_rn);
+%!test verify ("log2",  0,   testdata.log2_rz);
+%!test verify ("sin", -inf, testdata.sin_rd);
+%!test verify ("sin", +inf, testdata.sin_ru);
+%!test verify ("sin",  0.5, testdata.sin_rn);
+%!test verify ("sin",  0,   testdata.sin_rz);
+%!test verify ("sinh", -inf, testdata.sinh_rd);
+%!test verify ("sinh", +inf, testdata.sinh_ru);
+%!test verify ("sinh",  0.5, testdata.sinh_rn);
+%!test verify ("sinh",  0,   testdata.sinh_rz);
+%!test verify ("tan", -inf, testdata.tan_rd);
+%!test verify ("tan", +inf, testdata.tan_ru);
+%!test verify ("tan",  0.5, testdata.tan_rn);
+%!test verify ("tan",  0,   testdata.tan_rz);
diff --git a/src/Makefile b/src/Makefile
index 585d9da..4f36196 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -4,7 +4,8 @@
 ## See the file COPYING for copying conditions.
 
 SHELL          = /bin/sh
-OBJ            = mpfr_function_d.oct \
+OBJ            = crlibm_function.oct \
+                 mpfr_function_d.oct \
                  mpfr_linspace_d.oct \
                  mpfr_matrix_mul_d.oct \
                  mpfr_matrix_sqr_d.oct \
@@ -19,6 +20,25 @@ CFLAG_OPENMP   =$(findstring -fopenmp,$(shell $(MKOCTFILE) -p XTRA_CFLAGS))
 
 all: $(OBJ)
 
+## crlibm api oct-file
+crlibm_function.oct: crlibm_function.o crlibm/crlibm_private.o
+	$(MKOCTFILE)  -o $@  $< crlibm/*.o crlibm/scs_lib/*.o
+crlibm_function.o: crlibm_function.cc
+	$(MKOCTFILE)  --compile -o $@  $<
+
+## bundled crlibm library
+##
+## Note to redistributors:
+## If you can't compile this library for a particular platform
+## or `__check_crlibm__` throws a warning in Octave, you can safely
+## omit the crlibm library from a redistributed binary package,
+## (you must keep __check_crlibm__.m).
+## However, please inform the package maintainer of the error.
+crlibm/crlibm_private.o: crlibm/crlibm_config.h
+	$(MAKE) -C crlibm CFLAGS+="$(shell $(MKOCTFILE) -p CPICFLAG) -Wno-div-by-zero -Wno-unused-variable -Wno-unused-but-set-variable"
+crlibm/crlibm_config.h:
+	(cd crlibm && ./configure --disable-dependency-tracking --enable-sse2)
+
 ## GNU MPFR api oct-files
 mpfr_matrix_mul_d.oct mpfr_matrix_sqr_d.oct : mpfr_%.oct: mpfr_%.cc mpfr_commons.cc
 	$(MKOCTFILE)  -o $@ $(LDFLAGS_MPFR) $(CFLAG_OPENMP) $<
@@ -36,6 +56,7 @@ __setround__.oct: __setround__.cc
 	$(MKOCTFILE)  -o $@  $<
 
 clean:
+	$(MAKE) -C crlibm $@
 	$(RM) *.oct *.o
 
 .PHONY: all clean
diff --git a/src/crlibm/AUTHORS b/src/crlibm/AUTHORS
new file mode 100644
index 0000000..2c841d3
--- /dev/null
+++ b/src/crlibm/AUTHORS
@@ -0,0 +1,2 @@
+David Defour, Catherine Daramy, Florent de Dinechin, Matthieu Gallet,
+Nicolas Gast, Christoph Lauter, Jean-Michel Muller
diff --git a/src/crlibm/CMakeLists.txt b/src/crlibm/CMakeLists.txt
new file mode 100644
index 0000000..7731be8
--- /dev/null
+++ b/src/crlibm/CMakeLists.txt
@@ -0,0 +1,154 @@
+PROJECT(CRLIBM C)
+MESSAGE("Trying to build crlibm on a " ${CMAKE_SYSTEM_PROCESSOR} " under " ${CMAKE_SYSTEM_NAME} ", compiler is "${CMAKE_C_COMPILER})
+
+ADD_LIBRARY(crlibm SHARED
+	crlibm.h crlibm_private.h crlibm_private.c triple-double.h
+	exp-td.h exp-td.c exp-td-standalone.c
+	expm1-standalone.c exp_accurate.h exp_accurate.c 
+	expm1.h expm1.c 
+	log-td.c log-td.h 
+	log1p.c 
+	log10-td.h log10-td.c 
+	log2-td.h  log2-td.c 
+	rem_pio2_accurate.h rem_pio2_accurate.c 
+	trigo_fast.c trigo_fast.h trigo_accurate.c trigo_accurate.h 
+	asin-td.h asin-td.c 
+	acos-td.h acos-td.c 
+	atan_fast.c atan_fast.h atan_accurate.h atan_accurate.c 
+	csh_fast.h csh_fast.c 
+	scs_lib/scs_private.c scs_lib/addition_scs.c
+	scs_lib/division_scs.c scs_lib/print_scs.c
+	scs_lib/double2scs.c scs_lib/zero_scs.c
+	scs_lib/multiplication_scs.c scs_lib/scs2double.c
+	scs_lib/tests/tbx_timing.h
+)
+
+ADD_DEFINITIONS(-DSCS_NB_WORDS=8 -DSCS_NB_BITS=30)
+
+
+ADD_SUBDIRECTORY(tests)
+
+ENABLE_TESTING()
+
+ADD_TEST(exp tests/blind_test tests/exp.testdata)
+ADD_TEST(log tests/blind_test tests/log.testdata)
+ADD_TEST(sin tests/blind_test tests/sin.testdata)
+
+ADD_TEST(cos tests/blind_test tests/cos.testdata)
+ADD_TEST(tan tests/blind_test tests/tan.testdata)
+ADD_TEST(atan tests/blind_test tests/atan.testdata)
+ADD_TEST(sinh tests/blind_test tests/sinh.testdata)
+ADD_TEST(cosh tests/blind_test tests/cosh.testdata)
+
+
+
+# Define all the variables that were defined by the configure scripts
+# We define them by -D flags, not by config.h
+
+# First check the host processor
+
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES i*86|k6|k7|pentium*|athlon*)
+  ADD_DEFINITIONS(-DCRLIBM_TYPECPU_X86)
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES i*86|k6|k7|pentium*|athlon*)
+
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES alpha)
+  ADD_DEFINITIONS(-DCRLIBM_TYPECPU_ALPHA)
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES alpha)
+
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc*)
+  ADD_DEFINITIONS(-DCRLIBM_TYPECPU_POWERPC)
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc*)
+
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES sparc)
+  ADD_DEFINITIONS(-DCRLIBM_TYPECPU_SPARC)
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES sparc)
+
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES x86_64|amd64)
+  ADD_DEFINITIONS(-DCRLIBM_TYPECPU_AMD64)
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES x86_64|amd64)
+
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES ia64)
+  ADD_DEFINITIONS(-DCRLIBM_TYPECPU_ITANIUM)
+ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES ia64)
+
+
+FIND_PATH(INTTYPES_H
+	  inttypes.h
+	  /usr/include/ /usr/local/include/
+	  DOC "C99 file that defines int32_t, int64_t, etc"
+)
+
+IF(INTTYPES_H)
+  ADD_DEFINITIONS(-DHAVE_INTTYPES_H)
+ENDIF(INTTYPES_H)
+
+
+# Now look for libraries
+
+#   MPFR
+
+FIND_PATH(MPFR_H
+	  mpfr.h
+	  /usr/include/ /usr/local/include/
+	  DOC "Path of mpfr.h, the include file for GNU MPFR library, useful only for testing and developing crlibm"
+)
+
+FIND_LIBRARY(MPFR_LIB 
+             NAMES mpfr 
+             PATH /usr/lib/ /usr/local/lib/  
+             DOC "Directory of the GNU MPFR library, useful for testing and developing crlibm")
+
+# for compatibility with configure
+IF(MPFR_H AND MPFR_LIB)
+  ADD_DEFINITIONS(-DHAVE_MPFR_H)
+  INCLUDE_DIRECTORIES(${MPFR_H})   # add include files
+  LINK_DIRECTORIES(${MPFR_LIB})    # add link dir and link flag
+  SET(LIBMPFR mpfr)
+  SET(LIBGMP gmp)         # variables used in tests/CMakeList.txt
+ENDIF(MPFR_H AND MPFR_LIB)
+
+
+# IBM's Libultim
+
+FIND_PATH(IBM_H
+	  MathLib.h
+	  /usr/include/ /usr/local/include/
+	  DOC "Path of Mathlib.h, the include file for IBM's libultim, for comparison purpose"
+)
+
+FIND_LIBRARY(IBM_LIB 
+             NAMES ultim 
+             PATH /usr/lib/ /usr/local/lib/  
+             DOC "Directory of IBM's libultim, for comparison purpose")
+
+# for compatibility with configure
+IF(IBM_H AND IBM_LIB)
+  ADD_DEFINITIONS(-DHAVE_MATHLIB_H)
+  INCLUDE_DIRECTORIES(${IBM_H})   # add include files
+  LINK_DIRECTORIES(${IBM_LIB})    # add link dir and link flag
+  SET(LIBIBM ultim)
+ENDIF(IBM_H AND IBM_LIB)
+
+  
+# Sun's libmcr
+
+FIND_PATH(MCR_H
+	  mcr.h
+	  /usr/include/ /usr/local/include/
+	  DOC "Path of mcr.h, the include file for Sun's libmcr, for comparison purpose"
+)
+
+FIND_LIBRARY(MCR_LIB 
+             NAMES mcr 
+             PATH /usr/lib/ /usr/local/lib/  
+             DOC "Directory of Sun's libmcr, for comparison purpose")
+
+# for compatibility with configure
+IF(MCR_H AND MCR_LIB)
+  ADD_DEFINITIONS(-DHAVE_MCR_H)
+  INCLUDE_DIRECTORIES(${MCR_H})   # add include files
+  LINK_DIRECTORIES(${MCR_LIB})    # add link dir and link flag
+  SET(LIBMCR mcr)
+ENDIF(MCR_H AND MCR_LIB)
+
+  
diff --git a/src/crlibm/COPYING b/src/crlibm/COPYING
new file mode 100644
index 0000000..60549be
--- /dev/null
+++ b/src/crlibm/COPYING
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+

+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+

+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+

+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+

+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+

+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program 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 2 of the License, or
+    (at your option) any later version.
+
+    This program 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 this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/src/crlibm/COPYING.LIB b/src/crlibm/COPYING.LIB
new file mode 100644
index 0000000..f3f1b3b
--- /dev/null
+++ b/src/crlibm/COPYING.LIB
@@ -0,0 +1,504 @@
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/src/crlibm/ChangeLog b/src/crlibm/ChangeLog
new file mode 100644
index 0000000..8dda0cc
--- /dev/null
+++ b/src/crlibm/ChangeLog
@@ -0,0 +1,125 @@
+Summary of changes between version 1.0beta1 and version 0.18beta1
+==========================================================
+<Christoph Lauter>
+        Large performance improvement in asin and acos, now in asincos.c
+        Added asinpi and acospi
+Summary of changes between version 0.18beta1 and version 0.17beta1
+==========================================================
+<Florent de Dinechin> 
+	Added atanpi
+
+Summary of changes between version 0.17beta1 and version 0.14beta1
+==========================================================
+<Florent de Dinechin> 
+	Added sinpi, cospi, tanpi
+<Christoph Lauter>
+        Added power, currently unproven
+	
+Summary of changes between version 0.14beta1 and version 0.13beta1
+==========================================================
+<Christoph Lauter>
+	Added log1p
+	Added tests/computemd5list.sh
+<Florent de Dinechin> 
+	Documentation updates, added more worst cases
+<Alex Bernier and Florent de Dinechin>
+	Interval functions for exp and log (in the CVS, not yet in the release)
+
+Summary of changes between version 0.13beta1 (never released) and version 0.11beta1
+==========================================================
+<Christoph Lauter>
+	Added expm1, acos
+	Corrected small possible bug in asin 
+
+Summary of changes between version 0.11beta1 and version 0.10beta
+==========================================================
+<Christoph Lauter>
+	Added asin
+	More Gappa
+<Florent de Dinechin>
+        Correction of a serious bug (found by Paul Zimmermann) 
+  	  in the computation of rounding constants. 
+	  (Fortunately the bug was in the proof, the code was OK)
+	More Gappa proofs
+	
+Summary of changes between version 0.10beta and version 0.8
+==========================================================
+<Christoph Lauter>
+	Added log2 and log10 using triple double (log2-td.*, log10-td.*)
+	Triple-double versions of exp and log (exp-td.*, log-td.*)
+<Florent de Dinechin>
+	log-de, using double-extended, much faster on IA32 and IA64
+	Cleaning up, autotoolization of the new functions
+	Proofs using the Gappa tool
+	
+Summary of changes between version 0.8 and version 0.8beta4
+==========================================================
+<David Defour>
+	Cleaning up and fixes to improve portability
+<Florent de Dinechin>
+	Finished proofs of trigonometric functions
+	Some cleaning up and documentation improvement
+	Fixed bug for large arguments to sinh and cosh
+	Added crlibm.spec (to build RPMs)
+	
+Summary of changes between version 0.8beta4 and version 0.8beta3
+==========================================================
+       
+<Florent de Dinechin>
+        Added crlibm_generate_test_vectors
+	Added test vectors to all functions, including some 
+	  of Lefevre/Muller worst cases
+	Cleant up the accurate trig functions, now in trigo.c
+	Cleant up cosh and sinh
+	Added Gappa input file to assist the proof of the trig functions
+<Patrice Pelissier>
+	Added AMD64 architecture to autoconf stuff
+	Improved timings on x86
+
+
+Summary of changes between version 0.8beta3 and version 0.8beta2
+==========================================================
+       
+<Florent de Dinechin>
+        Added crlibm_blindtest and automatic testsuite
+	Consequently corrected quite a few bugs in extreme cases
+	Cleant up cosh and sinh
+
+Summary of changes between version 0.8beta2 and version 0.8beta
+==========================================================
+       
+<David Defour and Florent de Dinechin>
+	Rewritten faster trigonometric functions
+<Florent de Dinechin>
+        Added crlibm_blindtest and automatic testsuite 
+        Added crlibm_exit()
+	crlibm_init() now returns the old processor status flag
+	Proof for the trigonometric functions in progress
+<Philippe Defert>
+	Added crlibm.spec file to build rpms  to the CVS
+	
+Summary of changes between version 0.8beta and version 0.2:
+==========================================================
+
+<Catherine Daramy & Florent de Dinechin>
+	Added functions : sin cos tan
+
+<Nicolas Gast>
+	Added function atan 
+	Added function atan specialized for pentium (atan-pentium.c)
+
+<Matthieu Gallet>
+	Added functions sinh cosh
+
+<Florent de Dinechin>
+	Changed Maple files from .mw and .mws to .mpl
+	Added FMA support in crlibm_private.h
+	Added polish to some of the proofs
+	Improved performance tests for tighter timing, 
+	Fairer speed comparison to mpfr: We now compare to mpfr with
+	 53-bit mantissa, although this doesnot provide correct rounding
+	 if the result is a denormal (double rounding). Previously we
+	 compared to 150-bit mpfr.
+
+Version 0.2 : exp and log
+
diff --git a/src/crlibm/INSTALL b/src/crlibm/INSTALL
new file mode 100644
index 0000000..2099840
--- /dev/null
+++ b/src/crlibm/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+   The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
+
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
diff --git a/src/crlibm/Makefile.am b/src/crlibm/Makefile.am
new file mode 100644
index 0000000..32d56ab
--- /dev/null
+++ b/src/crlibm/Makefile.am
@@ -0,0 +1,134 @@
+## Process this file with automake to produce Makefile.in
+
+lib_LIBRARIES = libcrlibm.a
+
+# shared libraries need libtool. We'll do it later.
+#lib_LTLIBRARIES = libcrlibm.la
+
+
+# Note that at the moment, asking for intervals disables double-extended
+if USE_HARDWARE_DE
+libcrlibm_a_SOURCES =  \
+	crlibm.h crlibm_private.h crlibm_private.c double-extended.h\
+	triple-double.h triple-double.c\
+	exp-td.h exp-td.c exp-td-standalone.c expm1-standalone.c  \
+	expm1.h expm1.c \
+	log-de.c log-de.h \
+	log1p.c \
+	log10-td.h log10-td.c \
+	log2-td.h  log2-td.c \
+	rem_pio2_accurate.h rem_pio2_accurate.c \
+	trigo_fast.c trigo_fast.h trigo_accurate.c trigo_accurate.h \
+	trigpi.c trigpi.h \
+	asincos.h asincos.c \
+	pow.h pow.c\
+	atan_fast.c atan_fast.h atan_accurate.h atan_accurate.c \
+	csh_fast.h csh_fast.c
+else 
+libcrlibm_a_SOURCES =  \
+	crlibm.h crlibm_private.h crlibm_private.c \
+	triple-double.h triple-double.c\
+	exp-td.h exp-td.c exp-td-standalone.c expm1-standalone.c  \
+	expm1.h expm1.c \
+	log.c log.h \
+	log1p.c \
+	rem_pio2_accurate.h rem_pio2_accurate.c \
+	trigo_fast.c trigo_fast.h trigo_accurate.c trigo_accurate.h \
+	trigpi.c trigpi.h \
+	asincos.h asincos.c \
+	pow.h pow.c\
+	atan_fast.c atan_fast.h atan_accurate.h atan_accurate.c \
+	csh_fast.h csh_fast.c 
+endif
+
+
+# add all the scs_lib useful functions
+libcrlibm_a_LIBADD = scs_lib/scs_private.o scs_lib/addition_scs.o  \
+	scs_lib/division_scs.o scs_lib/print_scs.o\
+	scs_lib/double2scs.o scs_lib/zero_scs.o\
+	scs_lib/multiplication_scs.o scs_lib/scs2double.o
+
+include_HEADERS = crlibm.h
+
+SUBDIRS = scs_lib .
+
+# Add your compiler here. Default is assumed to be gcc.
+if COMPILER_ICC
+# mp means maintain precision. Should be useless with std=c99, this is an ICC bug
+AM_CFLAGS =  -std=c99 -mp -Qoption,cpp,--extended_float_types -IPF_fp_speculationsafe
+else # default assumed to be gcc
+if USE_SSE2
+AM_CFLAGS = -std=c99 -Wall -msse2 -mfpmath=sse 
+else
+AM_CFLAGS = -std=c99 -Wall -O3
+endif
+endif
+
+tripledoubleprocedures.pdf: docs/latex/tripledoubleprocedures.tex
+	cd docs/latex; \
+	pdflatex tripledoubleprocedures; bibtex tripledoubleprocedures; \
+	pdflatex tripledoubleprocedures; pdflatex tripledoubleprocedures;\
+	mv tripledoubleprocedures.pdf ..
+
+crlibm.pdf: docs/latex/crlibm.tex
+	cd docs/latex; pdflatex crlibm; bibtex crlibm; pdflatex crlibm; pdflatex crlibm;\
+	mv crlibm.pdf .. 
+
+doc: crlibm.pdf tripledoubleprocedures.pdf
+
+EXTRA_DIST = VERSION TODO\
+	maple/common-procedures.mpl \
+	maple/double-extended.mpl maple/triple-double.mpl\
+	maple/exp-td.mpl maple/csh.mpl \
+	maple/log-td.mpl  maple/log-de.mpl \
+	maple/log2-td.mpl maple/log10-td.mpl \
+	maple/trigo.mpl maple/atan.mpl maple/atan-pentium.mpl \
+	maple/asin-td.mpl maple/acos-td.mpl \
+	maple/sqrt.mpl \
+	maple/expm1.mpl \
+	maple/gal.mpl \
+	maple/pow.mpl \
+	maple/atan-itanium.mpl \
+	gappa/trigos/SinCosCase3.gappa gappa/trigos/TanCase2.gappa \
+	gappa/trigos/TanCase2.gappa \
+	gappa/trigos/SinCosCase3.gappa gappa/trigos/TanCase2.gappa \
+	gappa/sqrt12.gappa gappa/sqrt13.gappa gappa/sqrt-proof.sh gappa/sqrt.sed \
+	gappa/log-de/log-de-acc-index0-E0.gappa    gappa/log-de/log-de-index0-E0.gappa \
+	gappa/log-de/log-de-acc-index0-E1N.gappa   gappa/log-de/log-de-index0-E1N.gappa \
+	gappa/log-de/log-de-acc-index1N-E0.gappa   gappa/log-de/log-de-index1N-E0N.gappa \
+	gappa/log-de/log-de-acc-index1N-E1N.gappa  gappa/log-de/README \
+	gappa/log-td/log-td.gappa             gappa/log-td/log-td-E0.gappa \
+	gappa/log-td/log-td-E0-logir0.gappa   gappa/log-td/log-td-accurate.gappa \
+	gappa/log-td/log-td-accurate-E0.gappa gappa/log-td/log-td-accurate-E0-logir0.gappa \
+	gappa/exp-td/exp-td-accurate1.gappa gappa/exp-td/exp-td-accurate2.gappa \
+	gappa/exp-td/exp-td-accurate3.gappa gappa/exp-td/exp-td-accurate4.gappa \
+	gappa/exp-td/exp-td-proof.sh \
+	gappa/trigpi/cospi-accurate.gappa  gappa/trigpi/cospi-quick.gappa \
+	gappa/trigpi/sinpi-accurate.gappa  gappa/trigpi/sinpi-quick.gappa \
+	gappa/asin/asinAccuR0.gappa gappa/asin/asinAccuR1.gappa  \
+	gappa/asin/asinAccuR2.gappa gappa/asin/asinAccuR3.gappa \
+	gappa/asin/asinAccuR4.gappa gappa/asin/asinAccuR5.gappa \
+	gappa/asin/asinAccuR6.gappa gappa/asin/asinAccuR7.gappa \
+	gappa/asin/asinAccuR8.gappa gappa/asin/asinAccuR9.gappa \
+	gappa/asin/asinQuickR0.gappa gappa/asin/asinQuickR1.gappa \
+	gappa/asin/asinQuickR2.gappa gappa/asin/asinQuickR3.gappa \
+	gappa/asin/asinQuickR4.gappa gappa/asin/asinQuickR5.gappa \
+	gappa/asin/asinQuickR6.gappa gappa/asin/asinQuickR7.gappa \
+	gappa/asin/asinQuickR8.gappa gappa/asin/asinQuickR9.gappa \
+	docs/latex/crlibm.tex \
+	docs/latex/0_intro.tex docs/latex/0_getting-started.tex\
+	docs/latex/1_common.tex docs/latex/sqrt.tex \
+	docs/latex/exp.tex docs/latex/expm1.tex \
+	docs/latex/log.tex docs/latex/log1p.tex docs/latex/log2.tex docs/latex/log10.tex\
+	docs/latex/asin.tex docs/latex/acos.tex docs/latex/atan.tex \
+	docs/latex/csh.tex docs/latex/trigo.tex docs/latex/trigpi.tex \
+	docs/latex/pow.tex \
+	docs/latex/fig_scs docs/latex/fig_exp\
+	docs/latex/elem-fun.bib\
+	docs/latex/tripledoubleprocedures.tex \
+	scs_lib/tests/tbx_timing.h \
+	tests/testperfs.sh\
+	triple-double.h double-extended.h \
+	log-de.c log-de.h log-td.c log-td.h\
+	atan-pentium.c atan-itanium.c 
+ 
diff --git a/src/crlibm/Makefile.in b/src/crlibm/Makefile.in
new file mode 100644
index 0000000..68065eb
--- /dev/null
+++ b/src/crlibm/Makefile.in
@@ -0,0 +1,1062 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(srcdir)/crlibm_config.h.in $(include_HEADERS) COPYING \
+	COPYING.LIB TODO compile config.guess config.sub install-sh \
+	missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = crlibm_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
+LIBRARIES = $(lib_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_ at AM_V@)
+am__v_AR_ = $(am__v_AR_ at AM_DEFAULT_V@)
+am__v_AR_0 = @echo "  AR      " $@;
+am__v_AR_1 = 
+libcrlibm_a_AR = $(AR) $(ARFLAGS)
+libcrlibm_a_DEPENDENCIES = scs_lib/scs_private.o \
+	scs_lib/addition_scs.o scs_lib/division_scs.o \
+	scs_lib/print_scs.o scs_lib/double2scs.o scs_lib/zero_scs.o \
+	scs_lib/multiplication_scs.o scs_lib/scs2double.o
+am__libcrlibm_a_SOURCES_DIST = crlibm.h crlibm_private.h \
+	crlibm_private.c triple-double.h triple-double.c exp-td.h \
+	exp-td.c exp-td-standalone.c expm1-standalone.c expm1.h \
+	expm1.c log.c log.h log1p.c rem_pio2_accurate.h \
+	rem_pio2_accurate.c trigo_fast.c trigo_fast.h trigo_accurate.c \
+	trigo_accurate.h trigpi.c trigpi.h asincos.h asincos.c pow.h \
+	pow.c atan_fast.c atan_fast.h atan_accurate.h atan_accurate.c \
+	csh_fast.h csh_fast.c double-extended.h log-de.c log-de.h \
+	log10-td.h log10-td.c log2-td.h log2-td.c
+ at USE_HARDWARE_DE_FALSE@am_libcrlibm_a_OBJECTS =  \
+ at USE_HARDWARE_DE_FALSE@	crlibm_private.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	triple-double.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	exp-td.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	exp-td-standalone.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	expm1-standalone.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	expm1.$(OBJEXT) log.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	log1p.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	rem_pio2_accurate.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	trigo_fast.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	trigo_accurate.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	trigpi.$(OBJEXT) asincos.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	pow.$(OBJEXT) atan_fast.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	atan_accurate.$(OBJEXT) \
+ at USE_HARDWARE_DE_FALSE@	csh_fast.$(OBJEXT)
+ at USE_HARDWARE_DE_TRUE@am_libcrlibm_a_OBJECTS =  \
+ at USE_HARDWARE_DE_TRUE@	crlibm_private.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	triple-double.$(OBJEXT) exp-td.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	exp-td-standalone.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	expm1-standalone.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	expm1.$(OBJEXT) log-de.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	log1p.$(OBJEXT) log10-td.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	log2-td.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	rem_pio2_accurate.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	trigo_fast.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	trigo_accurate.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	trigpi.$(OBJEXT) asincos.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	pow.$(OBJEXT) atan_fast.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	atan_accurate.$(OBJEXT) \
+ at USE_HARDWARE_DE_TRUE@	csh_fast.$(OBJEXT)
+libcrlibm_a_OBJECTS = $(am_libcrlibm_a_OBJECTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. at am__isrc@
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(libcrlibm_a_SOURCES)
+DIST_SOURCES = $(am__libcrlibm_a_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(include_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+	$(LISP)crlibm_config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ISODATE = @ISODATE@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+lib_LIBRARIES = libcrlibm.a
+ at USE_HARDWARE_DE_FALSE@libcrlibm_a_SOURCES = \
+ at USE_HARDWARE_DE_FALSE@	crlibm.h crlibm_private.h crlibm_private.c \
+ at USE_HARDWARE_DE_FALSE@	triple-double.h triple-double.c\
+ at USE_HARDWARE_DE_FALSE@	exp-td.h exp-td.c exp-td-standalone.c expm1-standalone.c  \
+ at USE_HARDWARE_DE_FALSE@	expm1.h expm1.c \
+ at USE_HARDWARE_DE_FALSE@	log.c log.h \
+ at USE_HARDWARE_DE_FALSE@	log1p.c \
+ at USE_HARDWARE_DE_FALSE@	rem_pio2_accurate.h rem_pio2_accurate.c \
+ at USE_HARDWARE_DE_FALSE@	trigo_fast.c trigo_fast.h trigo_accurate.c trigo_accurate.h \
+ at USE_HARDWARE_DE_FALSE@	trigpi.c trigpi.h \
+ at USE_HARDWARE_DE_FALSE@	asincos.h asincos.c \
+ at USE_HARDWARE_DE_FALSE@	pow.h pow.c\
+ at USE_HARDWARE_DE_FALSE@	atan_fast.c atan_fast.h atan_accurate.h atan_accurate.c \
+ at USE_HARDWARE_DE_FALSE@	csh_fast.h csh_fast.c 
+
+
+# shared libraries need libtool. We'll do it later.
+#lib_LTLIBRARIES = libcrlibm.la
+
+# Note that at the moment, asking for intervals disables double-extended
+ at USE_HARDWARE_DE_TRUE@libcrlibm_a_SOURCES = \
+ at USE_HARDWARE_DE_TRUE@	crlibm.h crlibm_private.h crlibm_private.c double-extended.h\
+ at USE_HARDWARE_DE_TRUE@	triple-double.h triple-double.c\
+ at USE_HARDWARE_DE_TRUE@	exp-td.h exp-td.c exp-td-standalone.c expm1-standalone.c  \
+ at USE_HARDWARE_DE_TRUE@	expm1.h expm1.c \
+ at USE_HARDWARE_DE_TRUE@	log-de.c log-de.h \
+ at USE_HARDWARE_DE_TRUE@	log1p.c \
+ at USE_HARDWARE_DE_TRUE@	log10-td.h log10-td.c \
+ at USE_HARDWARE_DE_TRUE@	log2-td.h  log2-td.c \
+ at USE_HARDWARE_DE_TRUE@	rem_pio2_accurate.h rem_pio2_accurate.c \
+ at USE_HARDWARE_DE_TRUE@	trigo_fast.c trigo_fast.h trigo_accurate.c trigo_accurate.h \
+ at USE_HARDWARE_DE_TRUE@	trigpi.c trigpi.h \
+ at USE_HARDWARE_DE_TRUE@	asincos.h asincos.c \
+ at USE_HARDWARE_DE_TRUE@	pow.h pow.c\
+ at USE_HARDWARE_DE_TRUE@	atan_fast.c atan_fast.h atan_accurate.h atan_accurate.c \
+ at USE_HARDWARE_DE_TRUE@	csh_fast.h csh_fast.c
+
+
+# add all the scs_lib useful functions
+libcrlibm_a_LIBADD = scs_lib/scs_private.o scs_lib/addition_scs.o  \
+	scs_lib/division_scs.o scs_lib/print_scs.o\
+	scs_lib/double2scs.o scs_lib/zero_scs.o\
+	scs_lib/multiplication_scs.o scs_lib/scs2double.o
+
+include_HEADERS = crlibm.h
+SUBDIRS = scs_lib .
+ at COMPILER_ICC_FALSE@@USE_SSE2_FALSE at AM_CFLAGS = -std=c99 -Wall -O3
+ at COMPILER_ICC_FALSE@@USE_SSE2_TRUE at AM_CFLAGS = -std=c99 -Wall -msse2 -mfpmath=sse 
+
+# Add your compiler here. Default is assumed to be gcc.
+# mp means maintain precision. Should be useless with std=c99, this is an ICC bug
+ at COMPILER_ICC_TRUE@AM_CFLAGS = -std=c99 -mp -Qoption,cpp,--extended_float_types -IPF_fp_speculationsafe
+EXTRA_DIST = VERSION TODO\
+	maple/common-procedures.mpl \
+	maple/double-extended.mpl maple/triple-double.mpl\
+	maple/exp-td.mpl maple/csh.mpl \
+	maple/log-td.mpl  maple/log-de.mpl \
+	maple/log2-td.mpl maple/log10-td.mpl \
+	maple/trigo.mpl maple/atan.mpl maple/atan-pentium.mpl \
+	maple/asin-td.mpl maple/acos-td.mpl \
+	maple/sqrt.mpl \
+	maple/expm1.mpl \
+	maple/gal.mpl \
+	maple/pow.mpl \
+	maple/atan-itanium.mpl \
+	gappa/trigos/SinCosCase3.gappa gappa/trigos/TanCase2.gappa \
+	gappa/trigos/TanCase2.gappa \
+	gappa/trigos/SinCosCase3.gappa gappa/trigos/TanCase2.gappa \
+	gappa/sqrt12.gappa gappa/sqrt13.gappa gappa/sqrt-proof.sh gappa/sqrt.sed \
+	gappa/log-de/log-de-acc-index0-E0.gappa    gappa/log-de/log-de-index0-E0.gappa \
+	gappa/log-de/log-de-acc-index0-E1N.gappa   gappa/log-de/log-de-index0-E1N.gappa \
+	gappa/log-de/log-de-acc-index1N-E0.gappa   gappa/log-de/log-de-index1N-E0N.gappa \
+	gappa/log-de/log-de-acc-index1N-E1N.gappa  gappa/log-de/README \
+	gappa/log-td/log-td.gappa             gappa/log-td/log-td-E0.gappa \
+	gappa/log-td/log-td-E0-logir0.gappa   gappa/log-td/log-td-accurate.gappa \
+	gappa/log-td/log-td-accurate-E0.gappa gappa/log-td/log-td-accurate-E0-logir0.gappa \
+	gappa/exp-td/exp-td-accurate1.gappa gappa/exp-td/exp-td-accurate2.gappa \
+	gappa/exp-td/exp-td-accurate3.gappa gappa/exp-td/exp-td-accurate4.gappa \
+	gappa/exp-td/exp-td-proof.sh \
+	gappa/trigpi/cospi-accurate.gappa  gappa/trigpi/cospi-quick.gappa \
+	gappa/trigpi/sinpi-accurate.gappa  gappa/trigpi/sinpi-quick.gappa \
+	gappa/asin/asinAccuR0.gappa gappa/asin/asinAccuR1.gappa  \
+	gappa/asin/asinAccuR2.gappa gappa/asin/asinAccuR3.gappa \
+	gappa/asin/asinAccuR4.gappa gappa/asin/asinAccuR5.gappa \
+	gappa/asin/asinAccuR6.gappa gappa/asin/asinAccuR7.gappa \
+	gappa/asin/asinAccuR8.gappa gappa/asin/asinAccuR9.gappa \
+	gappa/asin/asinQuickR0.gappa gappa/asin/asinQuickR1.gappa \
+	gappa/asin/asinQuickR2.gappa gappa/asin/asinQuickR3.gappa \
+	gappa/asin/asinQuickR4.gappa gappa/asin/asinQuickR5.gappa \
+	gappa/asin/asinQuickR6.gappa gappa/asin/asinQuickR7.gappa \
+	gappa/asin/asinQuickR8.gappa gappa/asin/asinQuickR9.gappa \
+	docs/latex/crlibm.tex \
+	docs/latex/0_intro.tex docs/latex/0_getting-started.tex\
+	docs/latex/1_common.tex docs/latex/sqrt.tex \
+	docs/latex/exp.tex docs/latex/expm1.tex \
+	docs/latex/log.tex docs/latex/log1p.tex docs/latex/log2.tex docs/latex/log10.tex\
+	docs/latex/asin.tex docs/latex/acos.tex docs/latex/atan.tex \
+	docs/latex/csh.tex docs/latex/trigo.tex docs/latex/trigpi.tex \
+	docs/latex/pow.tex \
+	docs/latex/fig_scs docs/latex/fig_exp\
+	docs/latex/elem-fun.bib\
+	docs/latex/tripledoubleprocedures.tex \
+	scs_lib/tests/tbx_timing.h \
+	tests/testperfs.sh\
+	triple-double.h double-extended.h \
+	log-de.c log-de.h log-td.c log-td.h\
+	atan-pentium.c atan-itanium.c 
+
+all: crlibm_config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu --ignore-deps Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+crlibm_config.h: stamp-h1
+	@test -f $@ || rm -f stamp-h1
+	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/crlibm_config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status crlibm_config.h
+$(srcdir)/crlibm_config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f crlibm_config.h stamp-h1
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  if test -f $$p; then \
+	    $(am__strip_dir) \
+	    echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
+	    ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
+	  else :; fi; \
+	done
+
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir)
+
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+
+libcrlibm.a: $(libcrlibm_a_OBJECTS) $(libcrlibm_a_DEPENDENCIES) $(EXTRA_libcrlibm_a_DEPENDENCIES) 
+	$(AM_V_at)-rm -f libcrlibm.a
+	$(AM_V_AR)$(libcrlibm_a_AR) libcrlibm.a $(libcrlibm_a_OBJECTS) $(libcrlibm_a_LIBADD)
+	$(AM_V_at)$(RANLIB) libcrlibm.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+.c.o:
+	$(AM_V_CC)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+	$(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__post_remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__post_remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__post_remove_distdir)
+
+dist-tarZ: distdir
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__post_remove_distdir)
+
+dist-shar: distdir
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__post_remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__post_remove_distdir)
+
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	    --srcdir=.. --prefix="$$dc_install_base" \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__post_remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LIBRARIES) $(HEADERS) crlibm_config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-libLIBRARIES
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS uninstall-libLIBRARIES
+
+.MAKE: $(am__recursive_targets) all install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+	am--refresh check check-am clean clean-cscope clean-generic \
+	clean-libLIBRARIES cscope cscopelist-am ctags ctags-am dist \
+	dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+	dist-xz dist-zip distcheck distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-tags distcleancheck \
+	distdir distuninstallcheck dvi dvi-am html html-am info \
+	info-am install install-am install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-includeHEADERS \
+	install-info install-info-am install-libLIBRARIES install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-includeHEADERS uninstall-libLIBRARIES
+
+
+tripledoubleprocedures.pdf: docs/latex/tripledoubleprocedures.tex
+	cd docs/latex; \
+	pdflatex tripledoubleprocedures; bibtex tripledoubleprocedures; \
+	pdflatex tripledoubleprocedures; pdflatex tripledoubleprocedures;\
+	mv tripledoubleprocedures.pdf ..
+
+crlibm.pdf: docs/latex/crlibm.tex
+	cd docs/latex; pdflatex crlibm; bibtex crlibm; pdflatex crlibm; pdflatex crlibm;\
+	mv crlibm.pdf .. 
+
+doc: crlibm.pdf tripledoubleprocedures.pdf
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/crlibm/NEWS b/src/crlibm/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/src/crlibm/README b/src/crlibm/README
new file mode 100644
index 0000000..b7c7e3c
--- /dev/null
+++ b/src/crlibm/README
@@ -0,0 +1,31 @@
+cr-libm, a portable, efficient, correctly rounded mathematical library.
+
+To compile: 
+./configure; make;
+
+(for options see ./configure --help)
+
+To run the selftest:
+make check;
+
+
+
+Beta release note: 
+
+This version contains one state-of-the-art implementation. The log
+comes in two versions, log-td (portable) and log-de (optimised for
+processors with double-extended hardware). The ./configure should
+enable the one that is best for your system, except on Itanium: see
+below. 
+
+There is no known bug, but several shortcomings are listed in
+the TODO file.
+
+
+Note for Itanium systems: Out-of-the box it should compile and
+selftest on Linux under both gcc and icc (feedback on HPUX is
+welcome). However, optimised versions of log and atan are
+disabled. They currently require icc 8.1 or later. See the beginning
+of log-de.c and atan-itanium.c for instructions on how to enable them.
+
+
diff --git a/src/crlibm/README.DEV b/src/crlibm/README.DEV
new file mode 100644
index 0000000..996440c
--- /dev/null
+++ b/src/crlibm/README.DEV
@@ -0,0 +1,23 @@
+
+To compile crlibm after a cvs checkout, type
+
+./prepare
+make
+
+or, if you want to perform accuracy tests against the MPFR library,
+
+./prepare --enable-mpfr --with-gmp=/usr/local
+make
+
+(if necessary replace /usr/local/ with the actual location of the MPFR
+source)
+
+The prepare script requires to be invoked only once. After that, use:
+./configure 
+
+The prepare script ends with a call to ./configure, and the options to
+prepare are the options of configure. For a list of these options, type
+ 
+./configure --help
+
+
diff --git a/src/crlibm/TODO b/src/crlibm/TODO
new file mode 100644
index 0000000..d29b5cb
--- /dev/null
+++ b/src/crlibm/TODO
@@ -0,0 +1,66 @@
+TODO before 1.0 final release
+
+
+Serious bugs
+------------
+No known serious bug left so far. Exception raising should be improved.
+
+New functions
+-------------
+Document the cases on which power is guaranteed correctly rounded values.
+Possibly write 2^x and 10^x (in harmonious combination with power)
+
+Proof stuff
+-----------
+Update chapter asin and write chapter acos. 
+   Add the scripts generating the polynomials.
+Write Gappa proofs for log2-td, log10-td, expm1, log1p
+Check all the existing .gappa against last version of Gappa
+ + set the paths right (where there are paths). 
+Write proper proofs of the DE integer rounding tests, or remove DE altogether.
+
+
+Cleaning up stuff
+-----------------
+Check .mpl with underscored variables (some versions of Maple don't like them)
+Purge obsolete .mpl
+Ensure compilation on icc9 and SunStudio11
+Solution: check recent icc first. Then add FMADE macros everywhere FMA intended
+add make timings
+
+Autotest stuff
+--------------
+Add worst cases for all which are currently written TODO
+A lot of the  Lefevre worst cases are still missing
+You never have enough test cases. In particular asin and acos
+More cases around the various boundaries would be welcome.
+
+Optim stuff
+-----------
+Remove remaining SCS: in atan, in trigo.
+Replace the current test for non-IEEE subnormal (on x86) in the code
+    with a test taking into account that x86-64 is OK
+Minor improvements to atanpi as mentionned in the doc. 
+Fuse atan-pentium and atan-itanium into atan-de, and add in atanpi. 
+Or maybe remove all the DE stuff altogether for cleaning up.
+
+===========================================================================
+
+TODO some day for a later release
+
+New functions
+-------------
+Write  inverse hyperbolic functions
+
+Optimisation stuff
+------------------
+Write TD versions of: trigo
+Write DE versions of: most functions
+
+
+Use technique in paper by Karp and Markstein for sqrt12 and sqrt13
+
+
+Interval stuff
+--------------
+Write interval functions for each CR function
\ No newline at end of file
diff --git a/src/crlibm/VERSION b/src/crlibm/VERSION
new file mode 100644
index 0000000..6f4d86b
--- /dev/null
+++ b/src/crlibm/VERSION
@@ -0,0 +1 @@
+1.0beta5
\ No newline at end of file
diff --git a/src/crlibm/aclocal.m4 b/src/crlibm/aclocal.m4
new file mode 100644
index 0000000..9905a29
--- /dev/null
+++ b/src/crlibm/aclocal.m4
@@ -0,0 +1,1149 @@
+# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.14'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.14.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.14.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
+      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                    [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Older Autoconf quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES([CC])],
+		  [m4_define([AC_PROG_CC],
+			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES([CXX])],
+		  [m4_define([AC_PROG_CXX],
+			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES([OBJC])],
+		  [m4_define([AC_PROG_OBJC],
+			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+		  [_AM_DEPENDENCIES([OBJCXX])],
+		  [m4_define([AC_PROG_OBJCXX],
+			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+  fi
+fi
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
+else
+  am_missing_run=
+  AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+  [whether $CC understands -c and -o together],
+  [am_cv_prog_cc_c_o],
+  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$[*]" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$[*]" != "X $srcdir/configure conftest.file" \
+	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment])
+     fi
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
+
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      AM_RUN_LOG([$am__untar <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
+  rm -rf conftest.dir
+
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/src/crlibm/acos-td.c b/src/crlibm/acos-td.c
new file mode 100644
index 0000000..3c85a88
--- /dev/null
+++ b/src/crlibm/acos-td.c
@@ -0,0 +1,1195 @@
+/*
+ * Correctly rounded arccosine
+ *
+ * Author : Christoph Lauter (ENS Lyon)
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "acos-td.h"
+
+#define AVOID_FMA 1
+
+void acos_accurate_lower(double *acosh, double *acosm, double *acosl, double x, double xSqh, double xSql, double sign) {
+  double highPoly;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l;
+  double tt1h, tt1l;
+  double t8h, t8m, t8l, t9h, t9m, t9l, t10h, t10m, t10l, t11h, t11m, t11l, t12h, t12m, t12l;
+  double tt8h, tt8m, tt8l, tt9h, tt9m, tt9l, tt10h, tt10m, tt10l, tt11h, tt11m, tt11l, tt12h, tt12m, tt12l;
+  double xCubeh, xCubem, xCubel, tt13h, tt13m, tt13l, t13h, t13m, t13l, polyh, polym, polyl;
+  double tt11hover, tt11mover, tt11lover;
+  double zw1h, zw1m, zw1l, acoshover, acosmover, acoslover;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  /* Evaluate the polynomial of degree 37
+     Its coefficients start at tbl[0]
+
+     p(x) = x + x * x^2 * (c3 + x^2 * (c5 + ...
+
+     We receive x^2 as xSqh + xSql = x * x (exactly)
+     in argument
+
+     |x| <= 0.185 = 2^(-2.43)
+
+     Compute monomials 27 to 37 in double precision
+     monomials 13 to 25 in double-double and
+     1 to 11 in triple-double precision in a 
+     modified Horner form
+
+  */
+
+  /* Double computations */
+  
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(tbl[33],xSqh,tbl[32]),xSqh,tbl[31]),xSqh,tbl[30]),xSqh,tbl[29]),xSqh,tbl[28]);		 
+#else
+  highPoly = tbl[28] + xSqh * (tbl[29] + xSqh * (tbl[30] + xSqh * (tbl[31] + xSqh * (tbl[32] + xSqh * tbl[33]))));
+#endif
+
+  /* Double-double computations */
+
+  Mul12(&tt1h,&tt1l,xSqh,highPoly);
+  Add22(&t1h,&t1l,tbl[27],0,tt1h,tt1l);
+
+  MulAdd22(&t2h,&t2l,tbl[25],tbl[26],xSqh,xSql,t1h,t1l);
+  MulAdd22(&t3h,&t3l,tbl[23],tbl[24],xSqh,xSql,t2h,t2l);
+  MulAdd22(&t4h,&t4l,tbl[21],tbl[22],xSqh,xSql,t3h,t3l);
+  MulAdd22(&t5h,&t5l,tbl[19],tbl[20],xSqh,xSql,t4h,t4l);
+  MulAdd22(&t6h,&t6l,tbl[17],tbl[18],xSqh,xSql,t5h,t5l);
+  MulAdd22(&t7h,&t7l,tbl[15],tbl[16],xSqh,xSql,t6h,t6l);
+
+  /* Triple-double computations */
+
+  Mul23(&tt8h,&tt8m,&tt8l,xSqh,xSql,t7h,t7l);                             /* 149 - 48/53 */
+  Add33(&t8h,&t8m,&t8l,tbl[12],tbl[13],tbl[14],tt8h,tt8m,tt8l);           /* 145 - 43/53 */
+  Mul233(&tt9h,&tt9m,&tt9l,xSqh,xSql,t8h,t8m,t8l);                        /* 139 - 39/53 */
+  Add33(&t9h,&t9m,&t9l,tbl[9],tbl[10],tbl[11],tt9h,tt9m,tt9l);            /* 136 - 34/53 */
+  Mul233(&tt10h,&tt10m,&tt10l,xSqh,xSql,t9h,t9m,t9l);                     /* 130 - 30/53 */
+  Add33(&t10h,&t10m,&t10l,tbl[6],tbl[7],tbl[8],tt10h,tt10m,tt10l);        /* 127 - 25/53 */
+  Mul233(&tt11hover,&tt11mover,&tt11lover,xSqh,xSql,t10h,t10m,t10l);      /* 121 - 21/53 */
+
+  Renormalize3(&tt11h,&tt11m,&tt11l,tt11hover,tt11mover,tt11lover);       /* infty - 52/53 */
+
+  Add33(&t11h,&t11m,&t11l,tbl[3],tbl[4],tbl[5],tt11h,tt11m,tt11l);        /* 149 - 47/53 */
+  Mul233(&tt12h,&tt12m,&tt12l,xSqh,xSql,t11h,t11m,t11l);                  /* 143 - 43/53 */
+  Add33(&t12h,&t12m,&t12l,tbl[0],tbl[1],tbl[2],tt12h,tt12m,tt12l);        /* 140 - 38/53 */
+
+  Mul123(&xCubeh,&xCubem,&xCubel,x,xSqh,xSql);                            /* 154 - 47/53 */
+ 
+  Mul33(&tt13h,&tt13m,&tt13l,xCubeh,xCubem,xCubel,t12h,t12m,t12l);        /* 136 - 34/53 */
+  Add133(&t13h,&t13m,&t13l,x,tt13h,tt13m,tt13l);                          /* 138 - 32/53 */
+
+  Renormalize3(&polyh,&polym,&polyl,t13h,t13m,t13l);                      /* infty - 52/53 */
+  
+  /* Reconstruction: 
+
+     - Multiply by the inverted sign
+     - Add Pi/2 in triple-double
+     - Renormalize
+
+  */
+
+  zw1h = -sign * polyh;
+  zw1m = -sign * polym;
+  zw1l = -sign * polyl;
+
+  Add33(&acoshover,&acosmover,&acoslover,PIHALFH,PIHALFM,PIHALFL,zw1h,zw1m,zw1l);
+  
+  Renormalize3(acosh,acosm,acosl,acoshover,acosmover,acoslover);
+
+}
+
+
+
+void  acos_accurate_middle(double *acosh, double *acosm, double *acosl, double z, int i, double sign) {
+  double highPoly;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l, t8h, t8l, t9h, t9l;
+  double t10h, t10m, t10l, t11h, t11m, t11l, t12h, t12m, t12l, t13h, t13m, t13l, t14h, t14m, t14l;
+  double t15h, t15m, t15l, t16h, t16m, t16l;
+  double tt1h, tt1l;
+  double tt10h, tt10m, tt10l, tt11h, tt11m, tt11l, tt12h, tt12m, tt12l;
+  double tt13h, tt13m, tt13l, tt14h, tt14m, tt14l, tt15h, tt15m, tt15l, tt16h, tt16m, tt16l;
+  double polyh, polym, polyl, tt13hover, tt13mover, tt13lover;
+  double zw1h, zw1m, zw1l, acoshover, acosmover, acoslover;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  /* Evaluate the polynomial of degree 35
+     Its coefficients start at tbl[i+1] 
+     Evaluate degrees 35 to 20 in double precision,
+     degrees 20 to 7 in double-double precision and
+     finally degrees 6 to 1 in triple-double. 
+     The constant coefficient is a double-double, the 
+     computations are nevertheless in triple-double 
+  */
+
+  /* Double computations */
+  
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+             tbl[i+58] ,z,tbl[i+57]),z,tbl[i+56]),z,tbl[i+55]),z,tbl[i+54]),z,
+             tbl[i+53]),z,tbl[i+52]),z,tbl[i+51]),z,tbl[i+50]),z,tbl[i+49]),z,
+             tbl[i+48]),z,tbl[i+47]),z,tbl[i+46]),z,tbl[i+45]),z,tbl[i+44]),z,
+	     tbl[i+43]),z,tbl[i+42]),z,tbl[i+41]),z,tbl[i+40]),z,tbl[i+39]);
+								 
+#else
+  highPoly = tbl[i+39] + z * (tbl[i+40] + z * (tbl[i+41] + z * (tbl[i+42] + z * (
+             tbl[i+43] + z * (tbl[i+44] + z * (tbl[i+45] + z * (tbl[i+46] + z * (
+             tbl[i+47] + z * (tbl[i+48] + z * (tbl[i+49] + z * (tbl[i+50] + z * (
+             tbl[i+51] + z * (tbl[i+52] + z * (tbl[i+53] + z * (tbl[i+54] + z * (
+             tbl[i+55] + z * (tbl[i+56] + z * (tbl[i+57] + z * tbl[i+58]))))))))))))))))));
+#endif
+
+  
+  /* Double-double computations */
+  
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+37],tbl[i+38],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+35],tbl[i+36],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+33],tbl[i+34],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+31],tbl[i+32],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+29],tbl[i+30],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+27],tbl[i+28],z,t5h,t5l);
+  MulAdd212(&t7h,&t7l,tbl[i+25],tbl[i+26],z,t6h,t6l);
+  MulAdd212(&t8h,&t8l,tbl[i+23],tbl[i+24],z,t7h,t7l);
+  MulAdd212(&t9h,&t9l,tbl[i+21],tbl[i+22],z,t8h,t8l);
+
+  /* Triple-double computations */
+
+  Mul123(&tt10h,&tt10m,&tt10l,z,t9h,t9l);                                          /* 154 - 47/53 */
+  Add33(&t10h,&t10m,&t10l,tbl[i+18],tbl[i+19],tbl[i+20],tt10h,tt10m,tt10l);        /* 144 - 42/53 */
+  Mul133(&tt11h,&tt11m,&tt11l,z,t10h,t10m,t10l);                                   /* 142 - 38/53 */
+  Add33(&t11h,&t11m,&t11l,tbl[i+15],tbl[i+16],tbl[i+17],tt11h,tt11m,tt11l);        /* 136 - 33/53 */
+  Mul133(&tt12h,&tt12m,&tt12l,z,t11h,t11m,t11l);                                   /* 133 - 28/53 */
+  Add33(&t12h,&t12m,&t12l,tbl[i+12],tbl[i+13],tbl[i+14],tt12h,tt12m,tt12l);        /* 125 - 23/53 */
+  Mul133(&tt13hover,&tt13mover,&tt13lover,z,t12h,t12m,t12l);                       /* 123 - 18/53 */
+
+  Renormalize3(&tt13h,&tt13m,&tt13l,tt13hover,tt13mover,tt13lover);                /* infty - 52/53 */
+
+  Add33(&t13h,&t13m,&t13l,tbl[i+9],tbl[i+10],tbl[i+11],tt13h,tt13m,tt13l);         /* 149 - 47/53 */
+  Mul133(&tt14h,&tt14m,&tt14l,z,t13h,t13m,t13l);                                   /* 147 - 42/53 */
+  Add33(&t14h,&t14m,&t14l,tbl[i+6],tbl[i+7],tbl[i+8],tt14h,tt14m,tt14l);           /* 139 - 37/53 */
+  Mul133(&tt15h,&tt15m,&tt15l,z,t14h,t14m,t14l);                                   /* 137 - 32/53 */
+  Add33(&t15h,&t15m,&t15l,tbl[i+3],tbl[i+4],tbl[i+5],tt15h,tt15m,tt15l);           /* 129 - 28/53 */
+  Mul133(&tt16h,&tt16m,&tt16l,z,t15h,t15m,t15l);                                   /* 128 - 23/53 */
+  Add233(&t16h,&t16m,&t16l,tbl[i+1],tbl[i+2],tt16h,tt16m,tt16l);                   /* 126 - 19/53 */
+
+  Renormalize3(&polyh,&polym,&polyl,t16h,t16m,t16l);                               /* infty - 52/53 */
+
+  /* Reconstruction: 
+
+     - Multiply by the inverted sign
+     - Add Pi/2 in triple-double
+     - Renormalize
+
+  */
+
+  zw1h = -sign * polyh;
+  zw1m = -sign * polym;
+  zw1l = -sign * polyl;
+
+  Add33(&acoshover,&acosmover,&acoslover,PIHALFH,PIHALFM,PIHALFL,zw1h,zw1m,zw1l);
+  
+  Renormalize3(acosh,acosm,acosl,acoshover,acosmover,acoslover);
+
+}
+
+
+void acos_accurate_higher(double *acosh, double *acosm, double *acosl, double z, double sign) {
+  double highPoly;
+  double tt1h, tt1l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l, t8h, t8l;
+  double tt10h, tt10m, tt10l, tt11h, tt11m, tt11l, tt12h, tt12m, tt12l, tt13h, tt13m, tt13l;
+  double tt14h, tt14m, tt14l, tt15h, tt15m, tt15l, tt16h, tt16m, tt16l, tt17h, tt17m, tt17l;
+  double t9h, t9l, t10h, t10m, t10l, t11h, t11m, t11l, t12h, t12m, t12l, t13h, t13m, t13l;
+  double t14h, t14m, t14l, t15h, t15m, t15l, t16h, t16m, t16l, t17h, t17m, t17l;
+  double tt18h, tt18m, tt18l, polyh, polym, polyl;
+  double sqrtzh, sqrtzm, sqrtzl, twoZ, pTimesSh, pTimesSm, pTimesSl;
+  double allh, allm, alll;
+  double tt13hover, tt13mover, tt13lover, tt16hover, tt16mover, tt16lover;
+  double polyhover, polymover, polylover;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  /* We evaluate acos(x) with x > 0 as 
+
+     acos(x) = -1 * f(z) * sqrt(2*z) 
+
+     with z = 1 - x and
+
+     f(z) = (asin(z) - Pi/2) / sqrt(2*z)
+
+     f(z) is approximated by p(z)
+
+     The polynomial p(z) is of degree 29
+     Its coefficients start at tbl[TBLIDX10] 
+     Coefficients for degrees 29 to 18 are in double precision,
+     for degrees 17 to 9 in double-double precision and
+     finally for degrees 8 to 1 in triple-double. 
+     The constant coefficient (-1) is not stored in the table, 
+     the computations are nevertheless in triple-double 
+     We evaluate the monomials in the precision in which
+     the correspondant coefficients are stored
+     The coefficients' values decrease very quickly 
+     so even with |z| < 2^-2.18 we can compute degree 18 
+     already in double precision
+
+     Compute than sqrt(2*z) as a triple-double
+     multiply in triple-double.
+
+  */
+
+  /* Double computations */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+             tbl[TBLIDX10+53] ,z,tbl[TBLIDX10+52]),z,tbl[TBLIDX10+51]),z,
+             tbl[TBLIDX10+50]),z,tbl[TBLIDX10+49]),z,tbl[TBLIDX10+48]),z,
+             tbl[TBLIDX10+47]),z,tbl[TBLIDX10+46]),z,tbl[TBLIDX10+45]),z,
+             tbl[TBLIDX10+44]),z,tbl[TBLIDX10+43]),z,tbl[TBLIDX10+42]);						 
+#else
+  highPoly = tbl[TBLIDX10+42] + z * (tbl[TBLIDX10+43] + z * (tbl[TBLIDX10+44] + z * (
+             tbl[TBLIDX10+45] + z * (tbl[TBLIDX10+46] + z * (tbl[TBLIDX10+47] + z * (
+             tbl[TBLIDX10+48] + z * (tbl[TBLIDX10+49] + z * (tbl[TBLIDX10+50] + z * (
+             tbl[TBLIDX10+51] + z * (tbl[TBLIDX10+52] + z *  tbl[TBLIDX10+53]))))))))));
+#endif
+  
+  /* Double-double computations */
+
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[TBLIDX10+40],tbl[TBLIDX10+41],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[TBLIDX10+38],tbl[TBLIDX10+39],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[TBLIDX10+36],tbl[TBLIDX10+37],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[TBLIDX10+34],tbl[TBLIDX10+35],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[TBLIDX10+32],tbl[TBLIDX10+33],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[TBLIDX10+30],tbl[TBLIDX10+31],z,t5h,t5l);
+  MulAdd212(&t7h,&t7l,tbl[TBLIDX10+28],tbl[TBLIDX10+29],z,t6h,t6l);
+  MulAdd212(&t8h,&t8l,tbl[TBLIDX10+26],tbl[TBLIDX10+27],z,t7h,t7l);
+  MulAdd212(&t9h,&t9l,tbl[TBLIDX10+24],tbl[TBLIDX10+25],z,t8h,t8l);
+
+  /* Triple-double computations */
+
+  Mul123(&tt10h,&tt10m,&tt10l,z,t9h,t9l);                                                         /* 154 - 47/53 */
+  Add33(&t10h,&t10m,&t10l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tbl[TBLIDX10+23],tt10h,tt10m,tt10l);  /* 144 - 42/53 */
+  Mul133(&tt11h,&tt11m,&tt11l,z,t10h,t10m,t10l);                                                  /* 142 - 37/53 */
+  Add33(&t11h,&t11m,&t11l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],tbl[TBLIDX10+20],tt11h,tt11m,tt11l);  /* 134 - 32/53 */
+  Mul133(&tt12h,&tt12m,&tt12l,z,t11h,t11m,t11l);                                                  /* 132 - 27/53 */
+  Add33(&t12h,&t12m,&t12l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],tbl[TBLIDX10+17],tt12h,tt12m,tt12l);  /* 124 - 22/53 */
+  Mul133(&tt13hover,&tt13mover,&tt13lover,z,t12h,t12m,t12l);                                      /* 122 - 17/53 */
+
+  Renormalize3(&tt13h,&tt13m,&tt13l,tt13hover,tt13mover,tt13lover);                               /* infty - 52/53 */
+
+  Add33(&t13h,&t13m,&t13l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],tbl[TBLIDX10+14],tt13h,tt13m,tt13l);  /* 149 - 47/53 */
+  Mul133(&tt14h,&tt14m,&tt14l,z,t13h,t13m,t13l);                                                  /* 147 - 42/53 */
+  Add33(&t14h,&t14m,&t14l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],tbl[TBLIDX10+11],tt14h,tt14m,tt14l);   /* 139 - 37/53 */
+  Mul133(&tt15h,&tt15m,&tt15l,z,t14h,t14m,t14l);                                                  /* 137 - 32/53 */
+  Add33(&t15h,&t15m,&t15l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],tbl[TBLIDX10+8],tt15h,tt15m,tt15l);     /* 129 - 27/53 */
+  Mul133(&tt16hover,&tt16mover,&tt16lover,z,t15h,t15m,t15l);                                      /* 127 - 22/53 */
+
+  Renormalize3(&tt16h,&tt16m,&tt16l,tt16hover,tt16mover,tt16lover);                               /* infty - 52/53 */
+
+  Add33(&t16h,&t16m,&t16l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],tbl[TBLIDX10+5],tt16h,tt16m,tt16l);     /* 149 - 47/53 */
+  Mul133(&tt17h,&tt17m,&tt17l,z,t16h,t16m,t16l);                                                  /* 147 - 42/53 */
+  Add33(&t17h,&t17m,&t17l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],tbl[TBLIDX10+2],tt17h,tt17m,tt17l);     /* 139 - 37/53 */
+  Mul133(&tt18h,&tt18m,&tt18l,z,t17h,t17m,t17l);                                                  /* 137 - 32/53 */
+  Add133(&polyhover,&polymover,&polylover,-1,tt18h,tt18m,tt18l);                                  /* 136 - 30/53 */
+
+  Renormalize3(&polyh,&polym,&polyl,polyhover,polymover,polylover);                               /* infty - 52/53 */
+
+  /* Compute sqrt(2*z) as a triple-double */
+
+  twoZ = 2 * z;
+  Sqrt13(&sqrtzh,&sqrtzm,&sqrtzl,twoZ);                                                           /* 146 - 52/53 */
+
+  /* Multiply p(z) by sqrt(2*z) */
+
+  Mul33(&pTimesSh,&pTimesSm,&pTimesSl,polyh,polym,polyl,sqrtzh,sqrtzm,sqrtzl);                    /* 139 - 48/53 */
+
+  /* Reconstruction: 
+
+     If the sign of x in acos(x) was positive:
+      - Multiply pTimesSh + pTimesSm + pTimesSl approx f(x) * sqrt(2 * z) by -1 
+      - Renormalize
+      - Return
+
+     Otherwise:
+      - Add Pi in triple-double to pTimesSh + pTimesSm + pTimesSl approx f(x) * sqrt(2 * z) 
+      - Renormalize
+      - Return
+
+  */
+
+  if (sign > 0) {
+
+    allh = -1.0 * pTimesSh;    
+    allm = -1.0 * pTimesSm;    
+    alll = -1.0 * pTimesSl;                                                                       /* 139 - 48/53 */
+
+  } else {
+
+    Add33(&allh,&allm,&alll,PIH,PIM,PIL,pTimesSh,pTimesSm,pTimesSl);                              /* 130 - 43/53 */
+
+  }
+
+  Renormalize3(acosh,acosm,acosl,allh,allm,alll);                                                 /* infty - 52/53 */
+
+}
+
+
+double acos_rn(double x) {
+  db_number xdb;
+  double sign, z, acosh, acosm, acosl;
+  int i;
+  double xSqh, xSql;
+  double tt1h, tt1l;
+  double tt6h, tt6l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l;
+  double t7h, t7l, t8h, t8l, polyh, polyl, twoZ, sqrtzh, sqrtzl;
+  double pTimesSh, pTimesSl, highPoly, xCubeh, xCubel;
+  double tmp1, tmp2, tmp3, tmp4, tmp5;
+  double zw1h, zw1l;
+
+  /*
+#if CRLIBM_REQUIRES_ROUNDING_MODE_CHANGE
+  SAVE_STATE_AND_SET_RNDOUBLE 
+#endif
+  */
+
+  /* Transform the argument into integer */
+  xdb.d = x;
+
+  /* Special case handling */
+
+  /* Exact algebraic case x = 1, acos(1) = 0 */
+
+  if (x == 1.0) return 0.0;
+
+  /* Strip off the sign of argument x */
+  if (xdb.i[HI] & 0x80000000) sign = -1; else sign = 1;
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* acos is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if ((xdb.i[HI] > 0x3ff00000) || ((xdb.i[HI] == 0x3ff00000) && (xdb.i[LO] != 0x00000000))) {
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* If |x| < 2^(-120) we have
+     
+     round(acos(x)) = round(pi/2)
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < 0x38700000) {
+    return PIHALFDOUBLERN;
+  }
+
+  /* Recast x */
+  x = xdb.d;
+
+  /* Find correspondant interval and compute index to the table
+     We start by filtering the two special cases around 0 and 1
+  */
+
+  if (xdb.i[HI] < BOUND1) {
+    /* Special interval 0..BOUND1 
+       The polynomial has no even monomials
+       We must prove extra accuracy in the interval 0..sin(2^(-18))
+    */
+
+    /* Quick phase starts */
+
+    /* Compute square of x for both quick and accurate phases */
+    Mul12(&xSqh,&xSql,x,x);
+
+    tmp4 = tbl[3];
+    tmp5 = tbl[4];
+    t4h = tmp4;
+    t4l = tmp5;
+    if (xdb.i[HI] > EXTRABOUND) {
+      /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(FMA(tbl[23],xSqh,tbl[21]),xSqh,tbl[19]),xSqh,tbl[17]),xSqh,tbl[15]);
+#else
+      highPoly = tbl[15] + xSqh * (tbl[17] + xSqh * (tbl[19] + xSqh * (tbl[21] + xSqh * tbl[23])));
+#endif
+
+      /* Double-double precision evaluation */
+      Mul12(&tt1h,&tt1l,xSqh,highPoly);
+      Add22(&t1h,&t1l,tbl[12],tbl[13],tt1h,tt1l);
+      
+      MulAdd212(&t2h,&t2l,tbl[9],tbl[10],xSqh,t1h,t1l);
+      MulAdd212(&t3h,&t3l,tbl[6],tbl[7],xSqh,t2h,t2l);
+      MulAdd22(&t4h,&t4l,tmp4,tmp5,xSqh,xSql,t3h,t3l);
+    }
+
+    MulAdd22(&t5h,&t5l,tbl[0],tbl[1],xSqh,xSql,t4h,t4l);
+
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt6h,&tt6l,xCubeh,xCubel,t5h,t5l);
+    
+    Add12(tmp1,tmp2,x,tt6h);
+    tmp3 = tmp2 + tt6l;
+    Add12(polyh,polyl,tmp1,tmp3);
+
+    /* Reconstruction:
+
+       - Multiply by the inverted sign
+       - Add Pi/2 in double-double precision 
+
+    */
+
+    zw1h = -sign * polyh;
+    zw1l = -sign * polyl;
+
+    Add22(&acosh,&acosm,PIHALFH,PIHALFM,zw1h,zw1l);
+
+    /* Rounding test 
+       The RN rounding constant is at tbl[34]
+    */
+    if(acosh == (acosh + (acosm * tbl[34]))) 
+      return acosh;
+
+    /* Launch accurate phase */
+
+    acos_accurate_lower(&acosh,&acosm,&acosl,x,xSqh,xSql,sign);
+
+    ReturnRoundToNearest3(acosh,acosm,acosl); 
+  }
+
+  if (xdb.i[HI] >= BOUND9) {
+    /* Special interval BOUND9..1
+       We use an asymptotic development of arcsin in sqrt(1 - x)
+    */
+
+    /* Argument reduction for quick and accurate phase
+       z = 1 - x
+       The operation is exact as per Sterbenz' lemma
+    */
+
+    z = 1 - x;
+
+    /* Quick phase starts */
+
+    /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	       tbl[TBLIDX10+42] ,z,tbl[TBLIDX10+40]),z,tbl[TBLIDX10+38]),z,
+               tbl[TBLIDX10+36]),z,tbl[TBLIDX10+34]),z,tbl[TBLIDX10+32]),z,
+               tbl[TBLIDX10+30]),z,tbl[TBLIDX10+28]),z,tbl[TBLIDX10+26]),z,
+               tbl[TBLIDX10+24]);
+#else
+    highPoly = tbl[TBLIDX10+24] + z * (tbl[TBLIDX10+26] + z * (tbl[TBLIDX10+28] + z * (
+	       tbl[TBLIDX10+30] + z * (tbl[TBLIDX10+32] + z * (tbl[TBLIDX10+34] + z * (
+	       tbl[TBLIDX10+36] + z * (tbl[TBLIDX10+38] + z * (tbl[TBLIDX10+40] + z * 
+               tbl[TBLIDX10+42]))))))));
+#endif
+    
+    /* Double-double precision evaluation */
+    Mul12(&tt1h,&tt1l,z,highPoly);
+    Add22(&t1h,&t1l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tt1h,tt1l);
+
+    MulAdd212(&t2h,&t2l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],z,t1h,t1l);
+    MulAdd212(&t3h,&t3l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],z,t2h,t2l);
+    MulAdd212(&t4h,&t4l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],z,t3h,t3l);
+    MulAdd212(&t5h,&t5l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],z,t4h,t4l);
+    MulAdd212(&t6h,&t6l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],z,t5h,t5l);
+    MulAdd212(&t7h,&t7l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],z,t6h,t6l);
+    MulAdd212(&t8h,&t8l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],z,t7h,t7l);
+    MulAdd212(&polyh,&polyl,-1,0,z,t8h,t8l);
+
+    /* Compute sqrt(2*z) as a double-double */
+
+    twoZ = 2 * z;
+    sqrt12(&sqrtzh,&sqrtzl,twoZ);                                                         
+
+    /* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+    Mul22(&pTimesSh,&pTimesSl,polyh,polyl,sqrtzh,sqrtzl);                    
+
+
+    /* Reconstruction: 
+
+     If the sign of x in acos(x) was positive:
+      - Multiply pTimesSh + pTimesSl approx f(x) * sqrt(2 * z) by -1 
+      - Return
+
+     Otherwise:
+      - Add Pi in triple-double to pTimesSh + pTimesSl approx f(x) * sqrt(2 * z) 
+      - Return
+
+    */
+
+    if (sign > 0) {
+      
+      acosh = -1.0 * pTimesSh;
+      acosm = -1.0 * pTimesSl;
+      
+    } else {
+      
+      Add22(&acosh,&acosm,PIH,PIM,pTimesSh,pTimesSl);
+
+    }
+
+    /* Rounding test 
+       The RN rounding constant is at tbl[TBLIDX10+54]
+    */
+    
+    if(acosh == (acosh + (acosm * tbl[TBLIDX10+54]))) 
+      return acosh;
+
+    /* Launch accurate phase */
+
+    acos_accurate_higher(&acosh,&acosm,&acosl,z,sign);
+
+    ReturnRoundToNearest3(acosh,acosm,acosl); 
+  }
+  
+  /* General 8 main intervals 
+     We can already suppose that BOUND1 <= x <= BOUND9
+  */
+  
+  if (xdb.i[HI] < BOUND5) {
+    if (xdb.i[HI] < BOUND3) {
+      if (xdb.i[HI] < BOUND2) i = TBLIDX2; else i = TBLIDX3;
+    } else {
+      if (xdb.i[HI] < BOUND4) i = TBLIDX4; else i = TBLIDX5;
+    }
+  } else {
+    if (xdb.i[HI] < BOUND7) {
+      if (xdb.i[HI] < BOUND6) i = TBLIDX6; else i = TBLIDX7;
+    } else {
+      if (xdb.i[HI] < BOUND8) i = TBLIDX8; else i = TBLIDX9;
+    }
+  }
+
+  /* Argument reduction 
+     i points to the interval midpoint value in the table
+  */
+  z = x - tbl[i];
+
+  /* Quick phase starts */
+
+  /* Double precision evaluation */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	     tbl[i+35] ,z,tbl[i+33]),z,tbl[i+31]),z,tbl[i+29]),z,
+             tbl[i+27]),z,tbl[i+25]),z,tbl[i+23]),z,tbl[i+21]);
+#else
+  highPoly = tbl[i+21] + z * (tbl[i+23] + z * (tbl[i+25] + z * (
+             tbl[i+27] + z * (tbl[i+29] + z * (tbl[i+31] + z * ( 
+             tbl[i+33] + z *  tbl[i+35]))))));
+#endif
+
+  /* Double-double precision evaluation */
+    
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+18],tbl[i+19],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+15],tbl[i+16],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+12],tbl[i+13],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+9],tbl[i+10],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+6],tbl[i+7],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+3],tbl[i+4],z,t5h,t5l);
+  MulAdd212(&polyh,&polyl,tbl[i+1],tbl[i+2],z,t6h,t6l);
+
+  /* Reconstruction:
+     
+     - Multiply by the inverted sign
+     - Add Pi/2 in double-double precision 
+
+  */
+
+  zw1h = -sign * polyh;
+  zw1l = -sign * polyl;
+  
+  Add22(&acosh,&acosm,PIHALFH,PIHALFM,zw1h,zw1l);
+
+  /* Rounding test 
+     The RN rounding constant is at tbl[i+59]
+  */
+  if(acosh == (acosh + (acosm * tbl[i+59]))) 
+    return acosh;
+
+  /* Launch accurate phase */
+
+  acos_accurate_middle(&acosh,&acosm,&acosl,z,i,sign);
+
+  ReturnRoundToNearest3(acosh,acosm,acosl); 
+}
+
+double acos_ru(double x) {
+  db_number xdb;
+  double sign, z, acosh, acosm, acosl;
+  int i;
+  double xSqh, xSql;
+  double tt1h, tt1l;
+  double tt6h, tt6l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l;
+  double t7h, t7l, t8h, t8l, polyh, polyl, twoZ, sqrtzh, sqrtzl;
+  double pTimesSh, pTimesSl, highPoly, xCubeh, xCubel;
+  double tmp1, tmp2, tmp3, tmp4, tmp5;
+  double zw1h, zw1l;
+
+  /* Transform the argument into integer */
+  xdb.d = x;
+
+  /* Special case handling */
+
+  /* Exact algebraic case x = 1, acos(1) = 0 */
+
+  if (x == 1.0) return 0.0;
+
+  /* Strip off the sign of argument x */
+  if (xdb.i[HI] & 0x80000000) sign = -1; else sign = 1;
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* acos is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if ((xdb.i[HI] > 0x3ff00000) || ((xdb.i[HI] == 0x3ff00000) && (xdb.i[LO] != 0x00000000))) {
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* If |x| < 2^(-120) we have
+     
+     round(acos(x)) = round(pi/2)
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < 0x38700000) {
+    return PIHALFDOUBLERU;
+  }
+
+  /* Recast x */
+  x = xdb.d;
+
+  /* Find correspondant interval and compute index to the table
+     We start by filtering the two special cases around 0 and 1
+  */
+
+  if (xdb.i[HI] < BOUND1) {
+    /* Special interval 0..BOUND1 
+       The polynomial has no even monomials
+       We must prove extra accuracy in the interval 0..sin(2^(-18))
+    */
+
+    /* Quick phase starts */
+
+    /* Compute square of x for both quick and accurate phases */
+    Mul12(&xSqh,&xSql,x,x);
+
+    tmp4 = tbl[3];
+    tmp5 = tbl[4];
+    t4h = tmp4;
+    t4l = tmp5;
+    if (xdb.i[HI] > EXTRABOUND) {
+      /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(FMA(tbl[23],xSqh,tbl[21]),xSqh,tbl[19]),xSqh,tbl[17]),xSqh,tbl[15]);
+#else
+      highPoly = tbl[15] + xSqh * (tbl[17] + xSqh * (tbl[19] + xSqh * (tbl[21] + xSqh * tbl[23])));
+#endif
+
+      /* Double-double precision evaluation */
+      Mul12(&tt1h,&tt1l,xSqh,highPoly);
+      Add22(&t1h,&t1l,tbl[12],tbl[13],tt1h,tt1l);
+      
+      MulAdd212(&t2h,&t2l,tbl[9],tbl[10],xSqh,t1h,t1l);
+      MulAdd212(&t3h,&t3l,tbl[6],tbl[7],xSqh,t2h,t2l);
+      MulAdd22(&t4h,&t4l,tmp4,tmp5,xSqh,xSql,t3h,t3l);
+    }
+
+    MulAdd22(&t5h,&t5l,tbl[0],tbl[1],xSqh,xSql,t4h,t4l);
+
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt6h,&tt6l,xCubeh,xCubel,t5h,t5l);
+    
+    Add12(tmp1,tmp2,x,tt6h);
+    tmp3 = tmp2 + tt6l;
+    Add12(polyh,polyl,tmp1,tmp3);
+
+    /* Reconstruction:
+
+       - Multiply by the inverted sign
+       - Add Pi/2 in double-double precision 
+
+    */
+
+    zw1h = -sign * polyh;
+    zw1l = -sign * polyl;
+
+    Add22(&acosh,&acosm,PIHALFH,PIHALFM,zw1h,zw1l);
+
+    /* Rounding test 
+       The RU rounding constant is at tbl[35]
+    */
+    TEST_AND_RETURN_RU(acosh, acosm, tbl[35]);
+
+    /* Launch accurate phase */
+
+    acos_accurate_lower(&acosh,&acosm,&acosl,x,xSqh,xSql,sign);
+
+    ReturnRoundUpwards3(acosh,acosm,acosl); 
+  }
+
+  if (xdb.i[HI] >= BOUND9) {
+    /* Special interval BOUND9..1
+       We use an asymptotic development of arcsin in sqrt(1 - x)
+    */
+
+    /* Argument reduction for quick and accurate phase
+       z = 1 - x
+       The operation is exact as per Sterbenz' lemma
+    */
+
+    z = 1 - x;
+
+    /* Quick phase starts */
+
+    /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	       tbl[TBLIDX10+42] ,z,tbl[TBLIDX10+40]),z,tbl[TBLIDX10+38]),z,
+               tbl[TBLIDX10+36]),z,tbl[TBLIDX10+34]),z,tbl[TBLIDX10+32]),z,
+               tbl[TBLIDX10+30]),z,tbl[TBLIDX10+28]),z,tbl[TBLIDX10+26]),z,
+               tbl[TBLIDX10+24]);
+#else
+    highPoly = tbl[TBLIDX10+24] + z * (tbl[TBLIDX10+26] + z * (tbl[TBLIDX10+28] + z * (
+	       tbl[TBLIDX10+30] + z * (tbl[TBLIDX10+32] + z * (tbl[TBLIDX10+34] + z * (
+	       tbl[TBLIDX10+36] + z * (tbl[TBLIDX10+38] + z * (tbl[TBLIDX10+40] + z * 
+               tbl[TBLIDX10+42]))))))));
+#endif
+    
+    /* Double-double precision evaluation */
+    Mul12(&tt1h,&tt1l,z,highPoly);
+    Add22(&t1h,&t1l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tt1h,tt1l);
+
+    MulAdd212(&t2h,&t2l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],z,t1h,t1l);
+    MulAdd212(&t3h,&t3l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],z,t2h,t2l);
+    MulAdd212(&t4h,&t4l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],z,t3h,t3l);
+    MulAdd212(&t5h,&t5l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],z,t4h,t4l);
+    MulAdd212(&t6h,&t6l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],z,t5h,t5l);
+    MulAdd212(&t7h,&t7l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],z,t6h,t6l);
+    MulAdd212(&t8h,&t8l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],z,t7h,t7l);
+    MulAdd212(&polyh,&polyl,-1,0,z,t8h,t8l);
+
+    /* Compute sqrt(2*z) as a double-double */
+
+    twoZ = 2 * z;
+    sqrt12(&sqrtzh,&sqrtzl,twoZ);                                                         
+
+    /* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+    Mul22(&pTimesSh,&pTimesSl,polyh,polyl,sqrtzh,sqrtzl);                    
+
+
+    /* Reconstruction: 
+
+     If the sign of x in acos(x) was positive:
+      - Multiply pTimesSh + pTimesSl approx f(x) * sqrt(2 * z) by -1 
+      - Return
+
+     Otherwise:
+      - Add Pi in triple-double to pTimesSh + pTimesSl approx f(x) * sqrt(2 * z) 
+      - Return
+
+    */
+
+    if (sign > 0) {
+      
+      acosh = -1.0 * pTimesSh;
+      acosm = -1.0 * pTimesSl;
+      
+    } else {
+      
+      Add22(&acosh,&acosm,PIH,PIM,pTimesSh,pTimesSl);
+
+    }
+
+    /* Rounding test 
+       The RU rounding constant is at tbl[TBLIDX10+55]
+    */
+    TEST_AND_RETURN_RU(acosh, acosm, tbl[TBLIDX10+55]);
+
+    /* Launch accurate phase */
+
+    acos_accurate_higher(&acosh,&acosm,&acosl,z,sign);
+
+    ReturnRoundUpwards3(acosh,acosm,acosl); 
+  }
+  
+  /* General 8 main intervals 
+     We can already suppose that BOUND1 <= x <= BOUND9
+  */
+  
+  if (xdb.i[HI] < BOUND5) {
+    if (xdb.i[HI] < BOUND3) {
+      if (xdb.i[HI] < BOUND2) i = TBLIDX2; else i = TBLIDX3;
+    } else {
+      if (xdb.i[HI] < BOUND4) i = TBLIDX4; else i = TBLIDX5;
+    }
+  } else {
+    if (xdb.i[HI] < BOUND7) {
+      if (xdb.i[HI] < BOUND6) i = TBLIDX6; else i = TBLIDX7;
+    } else {
+      if (xdb.i[HI] < BOUND8) i = TBLIDX8; else i = TBLIDX9;
+    }
+  }
+
+  /* Argument reduction 
+     i points to the interval midpoint value in the table
+  */
+  z = x - tbl[i];
+
+  /* Quick phase starts */
+
+  /* Double precision evaluation */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	     tbl[i+35] ,z,tbl[i+33]),z,tbl[i+31]),z,tbl[i+29]),z,
+             tbl[i+27]),z,tbl[i+25]),z,tbl[i+23]),z,tbl[i+21]);
+#else
+  highPoly = tbl[i+21] + z * (tbl[i+23] + z * (tbl[i+25] + z * (
+             tbl[i+27] + z * (tbl[i+29] + z * (tbl[i+31] + z * ( 
+             tbl[i+33] + z *  tbl[i+35]))))));
+#endif
+
+  /* Double-double precision evaluation */
+    
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+18],tbl[i+19],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+15],tbl[i+16],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+12],tbl[i+13],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+9],tbl[i+10],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+6],tbl[i+7],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+3],tbl[i+4],z,t5h,t5l);
+  MulAdd212(&polyh,&polyl,tbl[i+1],tbl[i+2],z,t6h,t6l);
+
+  /* Reconstruction:
+     
+     - Multiply by the inverted sign
+     - Add Pi/2 in double-double precision 
+
+  */
+
+  zw1h = -sign * polyh;
+  zw1l = -sign * polyl;
+  
+  Add22(&acosh,&acosm,PIHALFH,PIHALFM,zw1h,zw1l);
+
+  /* Rounding test 
+     The RU rounding constant is at tbl[i+60]
+  */
+  TEST_AND_RETURN_RU(acosh, acosm, tbl[i+60]);
+
+  /* Launch accurate phase */
+
+  acos_accurate_middle(&acosh,&acosm,&acosl,z,i,sign);
+
+  ReturnRoundUpwards3(acosh,acosm,acosl); 
+}
+
+
+
+double acos_rd(double x) {
+  db_number xdb;
+  double sign, z, acosh, acosm, acosl;
+  int i;
+  double xSqh, xSql;
+  double tt1h, tt1l;
+  double tt6h, tt6l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l;
+  double t7h, t7l, t8h, t8l, polyh, polyl, twoZ, sqrtzh, sqrtzl;
+  double pTimesSh, pTimesSl, highPoly, xCubeh, xCubel;
+  double tmp1, tmp2, tmp3, tmp4, tmp5;
+  double zw1h, zw1l;
+
+  /* Transform the argument into integer */
+  xdb.d = x;
+
+  /* Special case handling */
+
+  /* Exact algebraic case x = 1, acos(1) = 0 */
+
+  if (x == 1.0) return 0.0;
+
+  /* Strip off the sign of argument x */
+  if (xdb.i[HI] & 0x80000000) sign = -1; else sign = 1;
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* acos is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if ((xdb.i[HI] > 0x3ff00000) || ((xdb.i[HI] == 0x3ff00000) && (xdb.i[LO] != 0x00000000))) {
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* If |x| < 2^(-120) we have
+     
+     round(acos(x)) = round(pi/2)
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < 0x38700000) {
+    return PIHALFDOUBLERD;
+  }
+
+  /* Recast x */
+  x = xdb.d;
+
+  /* Find correspondant interval and compute index to the table
+     We start by filtering the two special cases around 0 and 1
+  */
+
+  if (xdb.i[HI] < BOUND1) {
+    /* Special interval 0..BOUND1 
+       The polynomial has no even monomials
+       We must prove extra accuracy in the interval 0..sin(2^(-18))
+    */
+
+    /* Quick phase starts */
+
+    /* Compute square of x for both quick and accurate phases */
+    Mul12(&xSqh,&xSql,x,x);
+
+    tmp4 = tbl[3];
+    tmp5 = tbl[4];
+    t4h = tmp4;
+    t4l = tmp5;
+    if (xdb.i[HI] > EXTRABOUND) {
+      /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(FMA(tbl[23],xSqh,tbl[21]),xSqh,tbl[19]),xSqh,tbl[17]),xSqh,tbl[15]);
+#else
+      highPoly = tbl[15] + xSqh * (tbl[17] + xSqh * (tbl[19] + xSqh * (tbl[21] + xSqh * tbl[23])));
+#endif
+
+      /* Double-double precision evaluation */
+      Mul12(&tt1h,&tt1l,xSqh,highPoly);
+      Add22(&t1h,&t1l,tbl[12],tbl[13],tt1h,tt1l);
+      
+      MulAdd212(&t2h,&t2l,tbl[9],tbl[10],xSqh,t1h,t1l);
+      MulAdd212(&t3h,&t3l,tbl[6],tbl[7],xSqh,t2h,t2l);
+      MulAdd22(&t4h,&t4l,tmp4,tmp5,xSqh,xSql,t3h,t3l);
+    }
+
+    MulAdd22(&t5h,&t5l,tbl[0],tbl[1],xSqh,xSql,t4h,t4l);
+
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt6h,&tt6l,xCubeh,xCubel,t5h,t5l);
+    
+    Add12(tmp1,tmp2,x,tt6h);
+    tmp3 = tmp2 + tt6l;
+    Add12(polyh,polyl,tmp1,tmp3);
+
+    /* Reconstruction:
+
+       - Multiply by the inverted sign
+       - Add Pi/2 in double-double precision 
+
+    */
+
+    zw1h = -sign * polyh;
+    zw1l = -sign * polyl;
+
+    Add22(&acosh,&acosm,PIHALFH,PIHALFM,zw1h,zw1l);
+
+    /* Rounding test 
+       The RD rounding constant is at tbl[35]
+    */
+    TEST_AND_RETURN_RD(acosh, acosm, tbl[35]);
+
+    /* Launch accurate phase */
+
+    acos_accurate_lower(&acosh,&acosm,&acosl,x,xSqh,xSql,sign);
+
+    ReturnRoundDownwards3(acosh,acosm,acosl); 
+  }
+
+  if (xdb.i[HI] >= BOUND9) {
+    /* Special interval BOUND9..1
+       We use an asymptotic development of arcsin in sqrt(1 - x)
+    */
+
+    /* Argument reduction for quick and accurate phase
+       z = 1 - x
+       The operation is exact as per Sterbenz' lemma
+    */
+
+    z = 1 - x;
+
+    /* Quick phase starts */
+
+    /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	       tbl[TBLIDX10+42] ,z,tbl[TBLIDX10+40]),z,tbl[TBLIDX10+38]),z,
+               tbl[TBLIDX10+36]),z,tbl[TBLIDX10+34]),z,tbl[TBLIDX10+32]),z,
+               tbl[TBLIDX10+30]),z,tbl[TBLIDX10+28]),z,tbl[TBLIDX10+26]),z,
+               tbl[TBLIDX10+24]);
+#else
+    highPoly = tbl[TBLIDX10+24] + z * (tbl[TBLIDX10+26] + z * (tbl[TBLIDX10+28] + z * (
+	       tbl[TBLIDX10+30] + z * (tbl[TBLIDX10+32] + z * (tbl[TBLIDX10+34] + z * (
+	       tbl[TBLIDX10+36] + z * (tbl[TBLIDX10+38] + z * (tbl[TBLIDX10+40] + z * 
+               tbl[TBLIDX10+42]))))))));
+#endif
+    
+    /* Double-double precision evaluation */
+    Mul12(&tt1h,&tt1l,z,highPoly);
+    Add22(&t1h,&t1l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tt1h,tt1l);
+
+    MulAdd212(&t2h,&t2l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],z,t1h,t1l);
+    MulAdd212(&t3h,&t3l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],z,t2h,t2l);
+    MulAdd212(&t4h,&t4l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],z,t3h,t3l);
+    MulAdd212(&t5h,&t5l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],z,t4h,t4l);
+    MulAdd212(&t6h,&t6l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],z,t5h,t5l);
+    MulAdd212(&t7h,&t7l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],z,t6h,t6l);
+    MulAdd212(&t8h,&t8l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],z,t7h,t7l);
+    MulAdd212(&polyh,&polyl,-1,0,z,t8h,t8l);
+
+    /* Compute sqrt(2*z) as a double-double */
+
+    twoZ = 2 * z;
+    sqrt12(&sqrtzh,&sqrtzl,twoZ);                                                         
+
+    /* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+    Mul22(&pTimesSh,&pTimesSl,polyh,polyl,sqrtzh,sqrtzl);                    
+
+
+    /* Reconstruction: 
+
+     If the sign of x in acos(x) was positive:
+      - Multiply pTimesSh + pTimesSl approx f(x) * sqrt(2 * z) by -1 
+      - Return
+
+     Otherwise:
+      - Add Pi in triple-double to pTimesSh + pTimesSl approx f(x) * sqrt(2 * z) 
+      - Return
+
+    */
+
+    if (sign > 0) {
+      
+      acosh = -1.0 * pTimesSh;
+      acosm = -1.0 * pTimesSl;
+      
+    } else {
+      
+      Add22(&acosh,&acosm,PIH,PIM,pTimesSh,pTimesSl);
+
+    }
+
+    /* Rounding test 
+       The RD rounding constant is at tbl[TBLIDX10+55]
+    */
+    TEST_AND_RETURN_RD(acosh, acosm, tbl[TBLIDX10+55]);
+
+    /* Launch accurate phase */
+
+    acos_accurate_higher(&acosh,&acosm,&acosl,z,sign);
+
+    ReturnRoundDownwards3(acosh,acosm,acosl); 
+  }
+  
+  /* General 8 main intervals 
+     We can already suppose that BOUND1 <= x <= BOUND9
+  */
+  
+  if (xdb.i[HI] < BOUND5) {
+    if (xdb.i[HI] < BOUND3) {
+      if (xdb.i[HI] < BOUND2) i = TBLIDX2; else i = TBLIDX3;
+    } else {
+      if (xdb.i[HI] < BOUND4) i = TBLIDX4; else i = TBLIDX5;
+    }
+  } else {
+    if (xdb.i[HI] < BOUND7) {
+      if (xdb.i[HI] < BOUND6) i = TBLIDX6; else i = TBLIDX7;
+    } else {
+      if (xdb.i[HI] < BOUND8) i = TBLIDX8; else i = TBLIDX9;
+    }
+  }
+
+  /* Argument reduction 
+     i points to the interval midpoint value in the table
+  */
+  z = x - tbl[i];
+
+  /* Quick phase starts */
+
+  /* Double precision evaluation */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	     tbl[i+35] ,z,tbl[i+33]),z,tbl[i+31]),z,tbl[i+29]),z,
+             tbl[i+27]),z,tbl[i+25]),z,tbl[i+23]),z,tbl[i+21]);
+#else
+  highPoly = tbl[i+21] + z * (tbl[i+23] + z * (tbl[i+25] + z * (
+             tbl[i+27] + z * (tbl[i+29] + z * (tbl[i+31] + z * ( 
+             tbl[i+33] + z *  tbl[i+35]))))));
+#endif
+
+  /* Double-double precision evaluation */
+    
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+18],tbl[i+19],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+15],tbl[i+16],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+12],tbl[i+13],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+9],tbl[i+10],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+6],tbl[i+7],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+3],tbl[i+4],z,t5h,t5l);
+  MulAdd212(&polyh,&polyl,tbl[i+1],tbl[i+2],z,t6h,t6l);
+
+  /* Reconstruction:
+     
+     - Multiply by the inverted sign
+     - Add Pi/2 in double-double precision 
+
+  */
+
+  zw1h = -sign * polyh;
+  zw1l = -sign * polyl;
+  
+  Add22(&acosh,&acosm,PIHALFH,PIHALFM,zw1h,zw1l);
+
+  /* Rounding test 
+     The RD rounding constant is at tbl[i+60]
+  */
+  TEST_AND_RETURN_RD(acosh, acosm, tbl[i+60]);
+
+  /* Launch accurate phase */
+
+  acos_accurate_middle(&acosh,&acosm,&acosl,z,i,sign);
+
+  ReturnRoundDownwards3(acosh,acosm,acosl); 
+}
+
diff --git a/src/crlibm/acos-td.h b/src/crlibm/acos-td.h
new file mode 100644
index 0000000..4b82677
--- /dev/null
+++ b/src/crlibm/acos-td.h
@@ -0,0 +1,629 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/* File generated by maple/acos-td.mpl */
+
+/* High order words of interval bounds (low order word is 0) */
+#define BOUND1 0x3FC7AE14
+#define BOUND2 0x3FD32E91
+#define BOUND3 0x3FD9CA24
+#define BOUND4 0x3FDF90B3
+#define BOUND5 0x3FE23ADC
+#define BOUND6 0x3FE4781D
+#define BOUND7 0x3FE647BB
+#define BOUND8 0x3FE7BC81
+#define BOUND9 0x3FE8F5C2
+#define EXTRABOUND 0x3F500000
+
+
+/* Pi/2 as a triple-double*/
+#define PIHALFH 1.57079632679489655799898173427209258079528808593750e+00
+#define PIHALFM 6.12323399573676603586882014729198302312846062338790e-17
+#define PIHALFL -1.49738490485916983294350817710599200835275047616952e-33
+
+
+/* Pi as a triple-double*/
+#define PIH 3.14159265358979311599796346854418516159057617187500e+00
+#define PIM 1.22464679914735320717376402945839660462569212467758e-16
+#define PIL -2.99476980971833966588701635421198401670550095233904e-33
+#define PIHALFDOUBLERN 1.57079632679489655799898173427209258079528808593750e+00
+#define PIHALFDOUBLERU 1.57079632679489678004358665930340066552162170410156e+00
+#define PIHALFDOUBLERD 1.57079632679489655799898173427209258079528808593750e+00
+
+
+/* Indices to the following table */
+#define TBLIDX2 36
+#define TBLIDX3 97
+#define TBLIDX4 158
+#define TBLIDX5 219
+#define TBLIDX6 280
+#define TBLIDX7 341
+#define TBLIDX8 402
+#define TBLIDX9 463
+#define TBLIDX10 524
+
+
+/* Table with midpoints and polynomial coefficients */
+static const double tbl[580] = {
+1.66666666666666657414808128123695496469736099243164e-01, 	/* 0, accPolyLowC3h, quickPolyLowC3h */
+9.25185853854297065661561206416060845590588197735272e-18, 	/* 1, accPolyLowC3m, quickPolyLowC3l */
+5.13580782192052290146917464639635163327575367072527e-34, 	/* 2, accPolyLowC3l */
+7.49999999999999972244424384371086489409208297729492e-02, 	/* 3, accPolyLowC5h, quickPolyLowC5h */
+2.77555756156289150513347472120591902572823540679419e-18, 	/* 4, accPolyLowC5m, quickPolyLowC5l */
+-1.43929408167863119589461549455410834291155585333144e-34, 	/* 5, accPolyLowC5l */
+4.46428571428571438484134148438897682353854179382324e-02, 	/* 6, accPolyLowC7h, quickPolyLowC7h */
+-9.91270557701064540788749549275225920938048550224136e-19, 	/* 7, accPolyLowC7m, quickPolyLowC7l */
+3.33748090721822991762574824757600091731436462508019e-35, 	/* 8, accPolyLowC7l */
+3.03819444444444440589503386718206456862390041351318e-02, 	/* 9, accPolyLowC9h, quickPolyLowC9h */
+3.85494105812324030564107341625454073114449944250081e-19, 	/* 10, accPolyLowC9m, quickPolyLowC9l */
+-1.43865090242821346711405668429425189868490718470116e-36, 	/* 11, accPolyLowC9l */
+2.23721590909090918553037141691675060428678989410400e-02, 	/* 12, accPolyLowC11h, quickPolyLowC11h */
+-9.46212831143868745925658651601400487408631908148174e-19, 	/* 13, accPolyLowC11m, quickPolyLowC11l */
+2.71756033709005426155900473576766627205226477546134e-36, 	/* 14, accPolyLowC11l */
+1.73527644230769238775646812200648128055036067962646e-02, 	/* 15, accPolyLowC13h, quickPolyLowC13h */
+-8.00631194349979385750725428497500824341216859291999e-19, 	/* 16, accPolyLowC13m */
+1.39648437500000006938893903907228377647697925567627e-02, 	/* 17, accPolyLowC15h, quickPolyLowC15h */
+-6.96640576418186252434826298980545123112053091491650e-19, 	/* 18, accPolyLowC15m */
+1.15518008961397068007359578700743441004306077957153e-02, 	/* 19, accPolyLowC17h, quickPolyLowC17h */
+-4.10583074045422929898575008733550170923265860856307e-19, 	/* 20, accPolyLowC17m */
+9.76160952919401074534544449079476180486381053924561e-03, 	/* 21, accPolyLowC19h, quickPolyLowC19h */
+3.58257464358998522024321439568214748872569190564464e-19, 	/* 22, accPolyLowC19m */
+8.39033580962353364718353532225592061877250671386719e-03, 	/* 23, accPolyLowC21h, quickPolyLowC21h */
+7.09494992486164270601178799400238696830257336508353e-20, 	/* 24, accPolyLowC21m */
+7.31252587309846099200560942676929698791354894638062e-03, 	/* 25, accPolyLowC23h */
+3.10147942381298802750887889395221073583507364742961e-19, 	/* 26, accPolyLowC23m */
+6.44721034012319445943850482194648066069930791854858e-03, 	/* 27, accPolyLowC25h */
+5.74003646399263555560876781669321644585579633712769e-03, 	/* 28, accPolyLowC27h */
+5.15334845775329911110596015078044729307293891906738e-03, 	/* 29, accPolyLowC29h */
+4.65922376559379288613049752143524528946727514266968e-03, 	/* 30, accPolyLowC31h */
+4.25648267385331235956869022629689425230026245117188e-03, 	/* 31, accPolyLowC33h */
+3.70384206863821549560178425508638611063361167907715e-03, 	/* 32, accPolyLowC35h */
+4.76149788232017000255691385746104060672223567962646e-03, 	/* 33, accPolyLowC37h */
+1.01858540186370637827710736169938902993812548606460e+00, 	/* 34, RN rounding constant quick poly low*/
+9.99456520626465193846360776661410034560333454445527e-19, 	/* 35, RD rounding constant quick poly low*/
+2.42358565330489938993707710324088111519813537597656e-01, 	/* 36, midpoint in interval 2*/
+2.44796158322043572175275016888917889446020126342773e-01, 	/* 37, accPolyMid2C0h, quickPolyMid2C0h */
+-7.80764437719474476036120943295127199090063761923808e-18, 	/* 38, accPolyMid2C0m, quickPolyMid2C0l */
+1.03072939530366736171629327145637944340705871582031e+00, 	/* 39, accPolyMid2C1h, quickPolyMid2C1h */
+-8.85738929015520959086405013050480695702241994387953e-17, 	/* 40, accPolyMid2C1m, quickPolyMid2C1l */
+-3.43332793693232296155057781643135490790330671255580e-33, 	/* 41, accPolyMid2C1l */
+1.32697384480218755209435244069027248769998550415039e-01, 	/* 42, accPolyMid2C2h, quickPolyMid2C2h */
+-3.05519908299053827321743308736081906443885446585898e-18, 	/* 43, accPolyMid2C2m, quickPolyMid2C2l */
+1.84968471282800310046349200266639560111473343387153e-34, 	/* 44, accPolyMid2C2l */
+2.16675601140875473404889817174989730119705200195312e-01, 	/* 45, accPolyMid2C3h, quickPolyMid2C3h */
+-1.09855192148394476119822843562855651270724326884774e-18, 	/* 46, accPolyMid2C3m, quickPolyMid2C3l */
+1.30965185306611444030805369954695892224998714815939e-35, 	/* 47, accPolyMid2C3l */
+1.16730419643667523987851097899692831560969352722168e-01, 	/* 48, accPolyMid2C4h, quickPolyMid2C4h */
+4.87619704882669077472238320833491156897798846867617e-18, 	/* 49, accPolyMid2C4m, quickPolyMid2C4l */
+2.44421677078199513698242322477237313066476585423275e-34, 	/* 50, accPolyMid2C4l */
+1.45667026718228842518954024853883311152458190917969e-01, 	/* 51, accPolyMid2C5h, quickPolyMid2C5h */
+5.36594969153474426628449995112694156468179831261122e-19, 	/* 52, accPolyMid2C5m, quickPolyMid2C5l */
+8.48516201835513020738766305454795330663195678132569e-36, 	/* 53, accPolyMid2C5l */
+1.22401266966440255834491779296513414010405540466309e-01, 	/* 54, accPolyMid2C6h, quickPolyMid2C6h */
+-2.20822551943355103564859204431825679093840107651564e-19, 	/* 55, accPolyMid2C6m, quickPolyMid2C6l */
+-8.07441439403117291580512089023909180599052269668925e-36, 	/* 56, accPolyMid2C6l */
+1.41642750696223979067767118067422416061162948608398e-01, 	/* 57, accPolyMid2C7h, quickPolyMid2C7h */
+8.52401858052517523392878261510621535534995050169401e-18, 	/* 58, accPolyMid2C7m, quickPolyMid2C7l */
+1.42861418735328621343327881731966044753789901733398e-01, 	/* 59, accPolyMid2C8h, quickPolyMid2C8h */
+-1.33006668328318919665132697553096363383321713310227e-17, 	/* 60, accPolyMid2C8m */
+1.63718343060216098283632391030550934374332427978516e-01, 	/* 61, accPolyMid2C9h, quickPolyMid2C9h */
+6.13394557799256408251130704849071363459255390907063e-18, 	/* 62, accPolyMid2C9m */
+1.79592723769284340340490757625957485288381576538086e-01, 	/* 63, accPolyMid2C10h, quickPolyMid2C10h */
+-1.30198260064097970981442998070110461849845662150849e-17, 	/* 64, accPolyMid2C10m */
+2.07951828711086583734157784419949166476726531982422e-01, 	/* 65, accPolyMid2C11h, quickPolyMid2C11h */
+-1.26159975996932877835486818675875580593424383227469e-17, 	/* 66, accPolyMid2C11m */
+2.38247271379822073145149374795437324792146682739258e-01, 	/* 67, accPolyMid2C12h, quickPolyMid2C12h */
+6.62361216505959744828122635016705548667940611263800e-18, 	/* 68, accPolyMid2C12m */
+2.79893913215572998076652311283396556973457336425781e-01, 	/* 69, accPolyMid2C13h, quickPolyMid2C13h */
+-2.24149827195062967543013296493616902343167004009288e-17, 	/* 70, accPolyMid2C13m */
+3.28958991769599307097848850389709696173667907714844e-01, 	/* 71, accPolyMid2C14h, quickPolyMid2C14h */
+-1.05211249452308945191032281708802957418482198191124e-17, 	/* 72, accPolyMid2C14m */
+3.91766249806127564436764032507198862731456756591797e-01, 	/* 73, accPolyMid2C15h */
+-2.02194096713130520849748106020797136930683180643846e-17, 	/* 74, accPolyMid2C15m */
+4.68246642053942785377529389734263531863689422607422e-01, 	/* 75, accPolyMid2C16h */
+5.64148787932559847568825261987512931227684020996094e-01, 	/* 76, accPolyMid2C17h */
+6.82488400757435664800709673727396875619888305664062e-01, 	/* 77, accPolyMid2C18h */
+8.30182127559316640486031246837228536605834960937500e-01, 	/* 78, accPolyMid2C19h */
+1.01367533043020308092252435017144307494163513183594e+00, 	/* 79, accPolyMid2C20h */
+1.24281078928695176699648072826676070690155029296875e+00, 	/* 80, accPolyMid2C21h */
+1.52877587404435177909078902303008362650871276855469e+00, 	/* 81, accPolyMid2C22h */
+1.88667637664635656769007709954166784882545471191406e+00, 	/* 82, accPolyMid2C23h */
+2.33494551765288571587575461308006197214126586914062e+00, 	/* 83, accPolyMid2C24h */
+2.89749244536000327698843648249749094247817993164062e+00, 	/* 84, accPolyMid2C25h */
+3.60426450740106130155027130967937409877777099609375e+00, 	/* 85, accPolyMid2C26h */
+4.49361107526955017021919047692790627479553222656250e+00, 	/* 86, accPolyMid2C27h */
+5.61406255377128715622347954194992780685424804687500e+00, 	/* 87, accPolyMid2C28h */
+7.02754870503224271516273802262730896472930908203125e+00, 	/* 88, accPolyMid2C29h */
+8.81280667340759649164283473510295152664184570312500e+00, 	/* 89, accPolyMid2C30h */
+1.10704407960507111852166417520493268966674804687500e+01, 	/* 90, accPolyMid2C31h */
+1.39282518419665830577969245496205985546112060546875e+01, 	/* 91, accPolyMid2C32h */
+1.75308292529565719064521545078605413436889648437500e+01, 	/* 92, accPolyMid2C33h */
+2.21169075633838900785121950320899486541748046875000e+01, 	/* 93, accPolyMid2C34h */
+2.93386309556562245859367976663634181022644042968750e+01, 	/* 94, accPolyMid2C35h */
+1.01683357072532350635299322879618933637376890680614e+00, 	/* 95, RN rounding constant quick poly middle 2*/
+9.05249299973766985475925981961240072045593429326050e-19, 	/* 96, RD rounding constant quick poly middle 2*/
+3.51339936256424290039745983449392952024936676025391e-01, 	/* 97, midpoint in interval 3*/
+3.59001896704258527392994437832385301589965820312500e-01, 	/* 98, accPolyMid3C0h, quickPolyMid3C0h */
+7.25234535377983806008993135801969933842904099082037e-20, 	/* 99, accPolyMid3C0m, quickPolyMid3C0l */
+1.06809311097735548656828541425056755542755126953125e+00, 	/* 100, accPolyMid3C1h, quickPolyMid3C1h */
+8.06569140638077604165107730077659782400969546746483e-17, 	/* 101, accPolyMid3C1m, quickPolyMid3C1l */
+-5.04406564603486171676187418521136112402329884904383e-33, 	/* 102, accPolyMid3C1l */
+2.14054747447713134000935042422497645020484924316406e-01, 	/* 103, accPolyMid3C2h, quickPolyMid3C2h */
+9.76056255097027764696827253384241478483311533093656e-18, 	/* 104, accPolyMid3C2m, quickPolyMid3C2l */
+-7.76857615284538540734861101748988881714638362963881e-35, 	/* 105, accPolyMid3C2l */
+2.88880884175958529969108212753781117498874664306641e-01, 	/* 106, accPolyMid3C3h, quickPolyMid3C3h */
+2.22181200821645624650165429361546283225838059740631e-17, 	/* 107, accPolyMid3C3m, quickPolyMid3C3l */
+-1.14368045348414878337189405350442917783836545775590e-33, 	/* 108, accPolyMid3C3l */
+2.26134851489718013972662902233423665165901184082031e-01, 	/* 109, accPolyMid3C4h, quickPolyMid3C4h */
+-8.04753534970505104224953947907869405284151781535028e-18, 	/* 110, accPolyMid3C4m, quickPolyMid3C4l */
+4.22557384286705919324956002465313457843707737945963e-34, 	/* 111, accPolyMid3C4l */
+2.75196923580072527748541233449941501021385192871094e-01, 	/* 112, accPolyMid3C5h, quickPolyMid3C5h */
+-1.17338666986909136966078634618924264888220762222419e-18, 	/* 113, accPolyMid3C5m, quickPolyMid3C5l */
+-4.68757737099062213529607300203132104484914350463871e-35, 	/* 114, accPolyMid3C5l */
+3.03044495521890500100425924756564199924468994140625e-01, 	/* 115, accPolyMid3C6h, quickPolyMid3C6h */
+-2.27411416594910816511289518687103845115091724313899e-17, 	/* 116, accPolyMid3C6m, quickPolyMid3C6l */
+2.34762544350785348445971766662785127027332739123595e-34, 	/* 117, accPolyMid3C6l */
+3.77749573081396394780284708758699707686901092529297e-01, 	/* 118, accPolyMid3C7h, quickPolyMid3C7h */
+7.89247891096042648893247867692397394548591651092283e-18, 	/* 119, accPolyMid3C7m, quickPolyMid3C7l */
+4.68287147615184806692667507377336733043193817138672e-01, 	/* 120, accPolyMid3C8h, quickPolyMid3C8h */
+1.75668374099909928545987828472120658936175220036884e-17, 	/* 121, accPolyMid3C8m */
+6.06111063535901939403061078337486833333969116210938e-01, 	/* 122, accPolyMid3C9h, quickPolyMid3C9h */
+1.72730090011832304135009947489517024111046794620020e-17, 	/* 123, accPolyMid3C9m */
+7.92895790821915635859795656870119273662567138671875e-01, 	/* 124, accPolyMid3C10h, quickPolyMid3C10h */
+4.98295614974968378037947765656866085023078681863398e-17, 	/* 125, accPolyMid3C10m */
+1.05810730062141522545005045685684308409690856933594e+00, 	/* 126, accPolyMid3C11h, quickPolyMid3C11h */
+8.05577049603995800072512132781137905047707942749781e-17, 	/* 127, accPolyMid3C11m */
+1.42745521004660447239587028889218345284461975097656e+00, 	/* 128, accPolyMid3C12h, quickPolyMid3C12h */
+-4.55985728468522936328504707804310204497673421624067e-17, 	/* 129, accPolyMid3C12m */
+1.94854789175488596342233904579188674688339233398438e+00, 	/* 130, accPolyMid3C13h, quickPolyMid3C13h */
+3.84783704422594121999348237839996274693704597202448e-17, 	/* 131, accPolyMid3C13m */
+2.68312408725385909136207374103832989931106567382812e+00, 	/* 132, accPolyMid3C14h, quickPolyMid3C14h */
+-3.56068007836116005017028996147996121343986693197868e-17, 	/* 133, accPolyMid3C14m */
+3.72473732217660824517224682494997978210449218750000e+00, 	/* 134, accPolyMid3C15h */
+-5.87298986037438700709055565377465605786708153319628e-17, 	/* 135, accPolyMid3C15m */
+5.20573944915823361156981263775378465652465820312500e+00, 	/* 136, accPolyMid3C16h */
+7.31989734855592644180433126166462898254394531250000e+00, 	/* 137, accPolyMid3C17h */
+1.03473141302088169624084912356920540332794189453125e+01, 	/* 138, accPolyMid3C18h */
+1.46964937699531184023271634941920638084411621093750e+01, 	/* 139, accPolyMid3C19h */
+2.09624579630017748854697856586426496505737304687500e+01, 	/* 140, accPolyMid3C20h */
+3.00147629377676423700904706493020057678222656250000e+01, 	/* 141, accPolyMid3C21h */
+4.31254748908798717366153141483664512634277343750000e+01, 	/* 142, accPolyMid3C22h */
+6.21591110441626426563743734732270240783691406250000e+01, 	/* 143, accPolyMid3C23h */
+8.98523523311889533715657307766377925872802734375000e+01, 	/* 144, accPolyMid3C24h */
+1.30228138287161243624723283573985099792480468750000e+02, 	/* 145, accPolyMid3C25h */
+1.89208159704443204418566892854869365692138671875000e+02, 	/* 146, accPolyMid3C26h */
+2.75520543663640125942038139328360557556152343750000e+02, 	/* 147, accPolyMid3C27h */
+4.02045721388318213485035812482237815856933593750000e+02, 	/* 148, accPolyMid3C28h */
+5.87814144421144646912580356001853942871093750000000e+02, 	/* 149, accPolyMid3C29h */
+8.60974558223577218996069859713315963745117187500000e+02, 	/* 150, accPolyMid3C30h */
+1.26323081508058703548158518970012664794921875000000e+03, 	/* 151, accPolyMid3C31h */
+1.85633061099108476810215506702661514282226562500000e+03, 	/* 152, accPolyMid3C32h */
+2.72831792235129523760406300425529479980468750000000e+03, 	/* 153, accPolyMid3C33h */
+4.02017366871190233723609708249568939208984375000000e+03, 	/* 154, accPolyMid3C34h */
+6.26169941241203287063399329781532287597656250000000e+03, 	/* 155, accPolyMid3C35h */
+1.01852226987326804088489911214053254620571040933433e+00, 	/* 156, RN rounding constant quick poly middle 3*/
+9.96061507703610851328544443284249848383807032724405e-19, 	/* 157, RD rounding constant quick poly middle 3*/
+4.48084712028450460330475380033021792769432067871094e-01, 	/* 158, midpoint in interval 4*/
+4.64621784296265272207193675058078952133655548095703e-01, 	/* 159, accPolyMid4C0h, quickPolyMid4C0h */
+5.46463478154141631687941857567549378870836612391668e-19, 	/* 160, accPolyMid4C0m, quickPolyMid4C0l */
+1.11857936563137916330390453367726877331733703613281e+00, 	/* 161, accPolyMid4C1h, quickPolyMid4C1h */
+-7.52084787570938032181667127523977366268049041253541e-17, 	/* 162, accPolyMid4C1m, quickPolyMid4C1l */
+-2.09600667283052949148765250630641631769479132030207e-33, 	/* 163, accPolyMid4C1l */
+3.13567137932624417917537584798992611467838287353516e-01, 	/* 164, accPolyMid4C2h, quickPolyMid4C2h */
+-4.41710443385272069717070263863657699262849649693148e-18, 	/* 165, accPolyMid4C2m, quickPolyMid4C2l */
+-1.66857777421172326251970639278136259133415308172276e-34, 	/* 166, accPolyMid4C2l */
+4.09066962553200574870260197712923400104045867919922e-01, 	/* 167, accPolyMid4C3h, quickPolyMid4C3h */
+-1.77243968292023797220078441566237340174840093946990e-17, 	/* 168, accPolyMid4C3m, quickPolyMid4C3l */
+1.04993340346633219191766382762445818927028795922212e-33, 	/* 169, accPolyMid4C3l */
+4.17460970109683637829789404349867254495620727539062e-01, 	/* 170, accPolyMid4C4h, quickPolyMid4C4h */
+1.39418041407988360348752433713233257018150500547568e-17, 	/* 171, accPolyMid4C4m, quickPolyMid4C4l */
+1.44515287253394191526867297316859284672731580248765e-33, 	/* 172, accPolyMid4C4l */
+5.57995436127318722441259524202905595302581787109375e-01, 	/* 173, accPolyMid4C5h, quickPolyMid4C5h */
+4.36037702989507667583407786816694605825360677277616e-17, 	/* 174, accPolyMid4C5m, quickPolyMid4C5l */
+-1.19172250052693786129959971158569652849573416545361e-33, 	/* 175, accPolyMid4C5l */
+7.47841169204912281642805282899644225835800170898438e-01, 	/* 176, accPolyMid4C6h, quickPolyMid4C6h */
+-6.76313448015089834151929838334258544557222273487418e-18, 	/* 177, accPolyMid4C6m, quickPolyMid4C6l */
+-3.47721914174083040302762713955940912153154957518196e-34, 	/* 178, accPolyMid4C6l */
+1.07444730844797153856973181973444297909736633300781e+00, 	/* 179, accPolyMid4C7h, quickPolyMid4C7h */
+7.55340134261966180374112563614849022138812950329448e-17, 	/* 180, accPolyMid4C7m, quickPolyMid4C7l */
+1.58041645549890685806815326941432431340217590332031e+00, 	/* 181, accPolyMid4C8h, quickPolyMid4C8h */
+4.80894355381610072868748091065730787867334028863435e-17, 	/* 182, accPolyMid4C8m */
+2.39169226022640657447482226416468620300292968750000e+00, 	/* 183, accPolyMid4C9h, quickPolyMid4C9h */
+1.26753183127964275508490032426937968441812593935712e-16, 	/* 184, accPolyMid4C9m */
+3.68572936227336489523054297023918479681015014648438e+00, 	/* 185, accPolyMid4C10h, quickPolyMid4C10h */
+-1.41660589025860946857878120315437315934718409357086e-16, 	/* 186, accPolyMid4C10m */
+5.77285150262833735013145997072570025920867919921875e+00, 	/* 187, accPolyMid4C11h, quickPolyMid4C11h */
+-2.16740363176565772841534018366824459554498708631527e-16, 	/* 188, accPolyMid4C11m */
+9.15766592727227646264509530737996101379394531250000e+00, 	/* 189, accPolyMid4C12h, quickPolyMid4C12h */
+4.37180613264180824186691777532090455983551321485214e-16, 	/* 190, accPolyMid4C12m */
+1.46862422532599090629901184001937508583068847656250e+01, 	/* 191, accPolyMid4C13h, quickPolyMid4C13h */
+7.89614550363306335166404831558856161121412865593061e-16, 	/* 192, accPolyMid4C13m */
+2.37692237950290667924946319544687867164611816406250e+01, 	/* 193, accPolyMid4C14h, quickPolyMid4C14h */
+-3.50255834101571646092598176937562449597971181913456e-16, 	/* 194, accPolyMid4C14m */
+3.87753699929054533868111320771276950836181640625000e+01, 	/* 195, accPolyMid4C15h */
+5.67060321723933067329766411373458413340348986762113e-16, 	/* 196, accPolyMid4C15m */
+6.36909499334141528947839105967432260513305664062500e+01, 	/* 197, accPolyMid4C16h */
+1.05248620915111246176820714026689529418945312500000e+02, 	/* 198, accPolyMid4C17h */
+1.74851057791898000459696049802005290985107421875000e+02, 	/* 199, accPolyMid4C18h */
+2.91864013611726591079786885529756546020507812500000e+02, 	/* 200, accPolyMid4C19h */
+4.89259682748188197365379892289638519287109375000000e+02, 	/* 201, accPolyMid4C20h */
+8.23309003242859603233227971941232681274414062500000e+02, 	/* 202, accPolyMid4C21h */
+1.39025484827954846878128591924905776977539062500000e+03, 	/* 203, accPolyMid4C22h */
+2.35504246227568182803224772214889526367187500000000e+03, 	/* 204, accPolyMid4C23h */
+4.00090205201026492431992664933204650878906250000000e+03, 	/* 205, accPolyMid4C24h */
+6.81504309301592911651823669672012329101562500000000e+03, 	/* 206, accPolyMid4C25h */
+1.16369648030766729789320379495620727539062500000000e+04, 	/* 207, accPolyMid4C26h */
+1.99154708390699779556598514318466186523437500000000e+04, 	/* 208, accPolyMid4C27h */
+3.41546126991757555515505373477935791015625000000000e+04, 	/* 209, accPolyMid4C28h */
+5.86883344113872444722801446914672851562500000000000e+04, 	/* 210, accPolyMid4C29h */
+1.01027682393336552195250988006591796875000000000000e+05, 	/* 211, accPolyMid4C30h */
+1.74209975080082920612767338752746582031250000000000e+05, 	/* 212, accPolyMid4C31h */
+3.00874278784890950191766023635864257812500000000000e+05, 	/* 213, accPolyMid4C32h */
+5.19633023773909430019557476043701171875000000000000e+05, 	/* 214, accPolyMid4C33h */
+8.99866392232198733836412429809570312500000000000000e+05, 	/* 215, accPolyMid4C34h */
+1.65235977806337876245379447937011718750000000000000e+06, 	/* 216, accPolyMid4C35h */
+1.01865623563637326825520446919499828081810155036594e+00, 	/* 217, RN rounding constant quick poly middle 4*/
+1.00326570788492020170486150590740535840759810902416e-18, 	/* 218, RD rounding constant quick poly middle 4*/
+5.31445860862679642089290155126946046948432922363281e-01, 	/* 219, midpoint in interval 5*/
+5.60306504963744567149319664167705923318862915039062e-01, 	/* 220, accPolyMid5C0h, quickPolyMid5C0h */
+-1.08630439217163180480513733763948654678554607776160e-20, 	/* 221, accPolyMid5C0m, quickPolyMid5C0l */
+1.18050895658762322604218297783518210053443908691406e+00, 	/* 222, accPolyMid5C1h, quickPolyMid5C1h */
+-3.44936676454714048889716658635127499762917269870727e-17, 	/* 223, accPolyMid5C1m, quickPolyMid5C1l */
+-2.49069456197248953275668118371299181194287558355700e-33, 	/* 224, accPolyMid5C1l */
+4.37156452058995781406736114149680361151695251464844e-01, 	/* 225, accPolyMid5C2h, quickPolyMid5C2h */
+4.12350542001181384975859432610288269290340424486530e-18, 	/* 226, accPolyMid5C2m, quickPolyMid5C2l */
+2.73553164822567581206451159459555826955342358406517e-34, 	/* 227, accPolyMid5C2l */
+5.97961581435785594074161508615361526608467102050781e-01, 	/* 228, accPolyMid5C3h, quickPolyMid5C3h */
+1.15786235462823532242451850040378867919657187923266e-17, 	/* 229, accPolyMid5C3m, quickPolyMid5C3l */
+6.70476163820618923333949946465040969013104876616743e-34, 	/* 230, accPolyMid5C3l */
+7.56654591443305823972309553937520831823348999023438e-01, 	/* 231, accPolyMid5C4h, quickPolyMid5C4h */
+5.63361768523770903650379304980880430544181403662856e-18, 	/* 232, accPolyMid5C4m, quickPolyMid5C4l */
+3.52518369310847108975654467573884198459173315811765e-35, 	/* 233, accPolyMid5C4l */
+1.15954888868330963092034835426602512598037719726562e+00, 	/* 234, accPolyMid5C5h, quickPolyMid5C5h */
+-2.13088606479945404910718732635657047999226786224539e-17, 	/* 235, accPolyMid5C5m, quickPolyMid5C5l */
+1.01155988751211667735165829625236622533486662424891e-33, 	/* 236, accPolyMid5C5l */
+1.85057068266552660062984614341985434293746948242188e+00, 	/* 237, accPolyMid5C6h, quickPolyMid5C6h */
+-4.13756595773451122099466439202037064387337671566669e-18, 	/* 238, accPolyMid5C6m, quickPolyMid5C6l */
+3.02843501360506226132120912500822054694900989592884e-34, 	/* 239, accPolyMid5C6l */
+3.11563743870884257702869035711046308279037475585938e+00, 	/* 240, accPolyMid5C7h, quickPolyMid5C7h */
+-5.06302300821373603583774676357699499992045551579126e-17, 	/* 241, accPolyMid5C7m, quickPolyMid5C7l */
+5.40761322601296168244289219728671014308929443359375e+00, 	/* 242, accPolyMid5C8h, quickPolyMid5C8h */
+2.97487923575735998744301300115136435889001285861472e-16, 	/* 243, accPolyMid5C8m */
+9.62995354897343425193412258522585034370422363281250e+00, 	/* 244, accPolyMid5C9h, quickPolyMid5C9h */
+4.55607422255092503960684830342258039056296500032145e-16, 	/* 245, accPolyMid5C9m */
+1.74836661195630966858516330830752849578857421875000e+01, 	/* 246, accPolyMid5C10h, quickPolyMid5C10h */
+1.43590320985440421817158000882140332196152266840822e-15, 	/* 247, accPolyMid5C10m */
+3.22483723360128990975681517738848924636840820312500e+01, 	/* 248, accPolyMid5C11h, quickPolyMid5C11h */
+-3.34403568343416729924334128939506733422536740966968e-15, 	/* 249, accPolyMid5C11m */
+6.02553715792408368656651873607188463211059570312500e+01, 	/* 250, accPolyMid5C12h, quickPolyMid5C12h */
+3.10919444878682139369989784864394611534570535618660e-15, 	/* 251, accPolyMid5C12m */
+1.13813051318643047693512926343828439712524414062500e+02, 	/* 252, accPolyMid5C13h, quickPolyMid5C13h */
+-1.71698317353737059559128975443274184793142084909379e-15, 	/* 253, accPolyMid5C13m */
+2.16961936728312849709254805929958820343017578125000e+02, 	/* 254, accPolyMid5C14h, quickPolyMid5C14h */
+8.27079867974059458294192504441253562124411295719550e-15, 	/* 255, accPolyMid5C14m */
+4.16880179488225451223115669563412666320800781250000e+02, 	/* 256, accPolyMid5C15h */
+-2.58735460985196142054738964992050729251298751831811e-14, 	/* 257, accPolyMid5C15m */
+8.06537874996876666955358814448118209838867187500000e+02, 	/* 258, accPolyMid5C16h */
+1.56984649251497876321082003414630889892578125000000e+03, 	/* 259, accPolyMid5C17h */
+3.07188686658870074097649194300174713134765625000000e+03, 	/* 260, accPolyMid5C18h */
+6.03970064736507720226654782891273498535156250000000e+03, 	/* 261, accPolyMid5C19h */
+1.19254227020427806564839556813240051269531250000000e+04, 	/* 262, accPolyMid5C20h */
+2.36373073951149926870130002498626708984375000000000e+04, 	/* 263, accPolyMid5C21h */
+4.70144622759458434302359819412231445312500000000000e+04, 	/* 264, accPolyMid5C22h */
+9.38077422737224260345101356506347656250000000000000e+04, 	/* 265, accPolyMid5C23h */
+1.87716130978103727102279663085937500000000000000000e+05, 	/* 266, accPolyMid5C24h */
+3.76631599838992522563785314559936523437500000000000e+05, 	/* 267, accPolyMid5C25h */
+7.57518066926909843459725379943847656250000000000000e+05, 	/* 268, accPolyMid5C26h */
+1.52703698454281571321189403533935546875000000000000e+06, 	/* 269, accPolyMid5C27h */
+3.08471154002460883930325508117675781250000000000000e+06, 	/* 270, accPolyMid5C28h */
+6.24343584097426943480968475341796875000000000000000e+06, 	/* 271, accPolyMid5C29h */
+1.26595813738393746316432952880859375000000000000000e+07, 	/* 272, accPolyMid5C30h */
+2.57133891378295645117759704589843750000000000000000e+07, 	/* 273, accPolyMid5C31h */
+5.23093272367429584264755249023437500000000000000000e+07, 	/* 274, accPolyMid5C32h */
+1.06415184183835312724113464355468750000000000000000e+08, 	/* 275, accPolyMid5C33h */
+2.17067016530691206455230712890625000000000000000000e+08, 	/* 276, accPolyMid5C34h */
+4.69394759797544836997985839843750000000000000000000e+08, 	/* 277, accPolyMid5C35h */
+1.01546394178491537056416717033435295842436071964172e+00, 	/* 278, RN rounding constant quick poly middle 5*/
+8.45008379631082379626014328492746516799371469048044e-19, 	/* 279, RD rounding constant quick poly middle 5*/
+6.04673624038476131836716831458033993840217590332031e-01, 	/* 280, midpoint in interval 6*/
+6.49356027282211423212743284238968044519424438476562e-01, 	/* 281, accPolyMid6C0h, quickPolyMid6C0h */
+-1.25840412187919035681267493345871686399113240956856e-20, 	/* 282, accPolyMid6C0m, quickPolyMid6C0l */
+1.25553477869155938329015498311491683125495910644531e+00, 	/* 283, accPolyMid6C1h, quickPolyMid6C1h */
+5.00523898265236280615595780032763663310079252366513e-17, 	/* 284, accPolyMid6C1m, quickPolyMid6C1l */
+2.70452092654099855316456962656407597917508288905533e-33, 	/* 285, accPolyMid6C1l */
+5.98380278107774499218862729321699589490890502929688e-01, 	/* 286, accPolyMid6C2h, quickPolyMid6C2h */
+3.73915919375620074681511372815883902051293891666555e-18, 	/* 287, accPolyMid6C2m, quickPolyMid6C2l */
+1.02836809807342008154037540277599096854529496615931e-34, 	/* 288, accPolyMid6C2l */
+9.00232892880871604646131345361936837434768676757812e-01, 	/* 289, accPolyMid6C3h, quickPolyMid6C3h */
+-1.70995008965645412422671790545314082452432030961170e-17, 	/* 290, accPolyMid6C3m, quickPolyMid6C3l */
+1.26596066229657064182610642365044212709535948254084e-33, 	/* 291, accPolyMid6C3l */
+1.38703629702026587366958665370475500822067260742188e+00, 	/* 292, accPolyMid6C4h, quickPolyMid6C4h */
+3.98819447215487913236315415179165676291502931117595e-17, 	/* 293, accPolyMid6C4m, quickPolyMid6C4l */
+-6.55797179513908183565792353381331895988112885430413e-34, 	/* 294, accPolyMid6C4l */
+2.48954277308397298185127510805614292621612548828125e+00, 	/* 295, accPolyMid6C5h, quickPolyMid6C5h */
+9.74092851599686234698415065747156883706428073441651e-17, 	/* 296, accPolyMid6C5m, quickPolyMid6C5l */
+1.56743989943601791748641837689163542493404742470630e-33, 	/* 297, accPolyMid6C5l */
+4.72562522409656082800211152061820030212402343750000e+00, 	/* 298, accPolyMid6C6h, quickPolyMid6C6h */
+6.88679830761278595465306080986277758416307765996557e-18, 	/* 299, accPolyMid6C6m, quickPolyMid6C6l */
+-9.47395090301458455484031652124848364407920780715874e-35, 	/* 300, accPolyMid6C6l */
+9.41432957016690785678747488418594002723693847656250e+00, 	/* 301, accPolyMid6C7h, quickPolyMid6C7h */
+8.62157085484702984705473460305131094967840256568931e-16, 	/* 302, accPolyMid6C7m, quickPolyMid6C7l */
+1.93709907584273430813937011407688260078430175781250e+01, 	/* 303, accPolyMid6C8h, quickPolyMid6C8h */
+-1.40839418808440953673043657798045432960211596437085e-16, 	/* 304, accPolyMid6C8m */
+4.08734031574560177091370860580354928970336914062500e+01, 	/* 305, accPolyMid6C9h, quickPolyMid6C9h */
+-2.98667469102598629922297846034715799734023919430673e-16, 	/* 306, accPolyMid6C9m */
+8.79464044588732321017232607118785381317138671875000e+01, 	/* 307, accPolyMid6C10h, quickPolyMid6C10h */
+3.61512961738881992095483091045503569454095245351219e-16, 	/* 308, accPolyMid6C10m */
+1.92241339189846911494896630756556987762451171875000e+02, 	/* 309, accPolyMid6C11h, quickPolyMid6C11h */
+6.61037281166591217605498682969545683054486597679533e-15, 	/* 310, accPolyMid6C11m */
+4.25700873706194784062972757965326309204101562500000e+02, 	/* 311, accPolyMid6C12h, quickPolyMid6C12h */
+-6.48144847243744916328196408044704617877580310816854e-15, 	/* 312, accPolyMid6C12m */
+9.52958531675870517574367113411426544189453125000000e+02, 	/* 313, accPolyMid6C13h, quickPolyMid6C13h */
+-3.41559781098088121115265032630996540232080319228480e-15, 	/* 314, accPolyMid6C13m */
+2.15300037043921429358306340873241424560546875000000e+03, 	/* 315, accPolyMid6C14h, quickPolyMid6C14h */
+-4.69254271757335955512545725611899433103182087412275e-14, 	/* 316, accPolyMid6C14m */
+4.90290875724837587767979130148887634277343750000000e+03, 	/* 317, accPolyMid6C15h */
+-4.54544125910656089453646656943432828883091406657613e-13, 	/* 318, accPolyMid6C15m */
+1.12422266608999743766617029905319213867187500000000e+04, 	/* 319, accPolyMid6C16h */
+2.59341556033402121101971715688705444335937500000000e+04, 	/* 320, accPolyMid6C17h */
+6.01463753209276546840555965900421142578125000000000e+04, 	/* 321, accPolyMid6C18h */
+1.40155647347781836288049817085266113281250000000000e+05, 	/* 322, accPolyMid6C19h */
+3.27990517748617625329643487930297851562500000000000e+05, 	/* 323, accPolyMid6C20h */
+7.70511269948243047110736370086669921875000000000000e+05, 	/* 324, accPolyMid6C21h */
+1.81638100581354671157896518707275390625000000000000e+06, 	/* 325, accPolyMid6C22h */
+4.29545835214607417583465576171875000000000000000000e+06, 	/* 326, accPolyMid6C23h */
+1.01875211922164466232061386108398437500000000000000e+07, 	/* 327, accPolyMid6C24h */
+2.42259292905952110886573791503906250000000000000000e+07, 	/* 328, accPolyMid6C25h */
+5.77502706188629567623138427734375000000000000000000e+07, 	/* 329, accPolyMid6C26h */
+1.37977551882563471794128417968750000000000000000000e+08, 	/* 330, accPolyMid6C27h */
+3.30348046445899784564971923828125000000000000000000e+08, 	/* 331, accPolyMid6C28h */
+7.92463843911740779876708984375000000000000000000000e+08, 	/* 332, accPolyMid6C29h */
+1.90447027047677397727966308593750000000000000000000e+09, 	/* 333, accPolyMid6C30h */
+4.58479383261657714843750000000000000000000000000000e+09, 	/* 334, accPolyMid6C31h */
+1.10545369624155406951904296875000000000000000000000e+10, 	/* 335, accPolyMid6C32h */
+2.66385731955786666870117187500000000000000000000000e+10, 	/* 336, accPolyMid6C33h */
+6.43976383194783477783203125000000000000000000000000e+10, 	/* 337, accPolyMid6C34h */
+1.66775070729799957275390625000000000000000000000000e+11, 	/* 338, accPolyMid6C35h */
+1.02865713098129091896393402230525290748739350993607e+00, 	/* 339, RN rounding constant quick poly middle 6*/
+1.54107813388901044122294580378974284123051351850249e-18, 	/* 340, RD rounding constant quick poly middle 6*/
+6.67959213256959061233430929860332980751991271972656e-01, 	/* 341, midpoint in interval 7*/
+7.31463137281961883751080222282325848937034606933594e-01, 	/* 342, accPolyMid7C0h, quickPolyMid7C0h */
+8.54719742452471207894475172794621662948903828511743e-18, 	/* 343, accPolyMid7C0m, quickPolyMid7C0l */
+1.34372862717732943771409281907835975289344787597656e+00, 	/* 344, accPolyMid7C1h, quickPolyMid7C1h */
+-9.37080278359462608557638680730489336344772507156678e-17, 	/* 345, accPolyMid7C1m, quickPolyMid7C1l */
+-3.73014429525577422762683976038701673929582903516469e-33, 	/* 346, accPolyMid7C1l */
+8.10316454021746457314634426438715308904647827148438e-01, 	/* 347, accPolyMid7C2h, quickPolyMid7C2h */
+2.83724520944754281479328686665519600224801269794297e-17, 	/* 348, accPolyMid7C2m, quickPolyMid7C2l */
+5.82045706927347254178829289360700371297572159541923e-34, 	/* 349, accPolyMid7C2l */
+1.38167386397960734178980146680260077118873596191406e+00, 	/* 350, accPolyMid7C3h, quickPolyMid7C3h */
+2.02013329353188582679931981349209152232167295906717e-17, 	/* 351, accPolyMid7C3m, quickPolyMid7C3l */
+6.40114855650846168897999343294667085370954557070054e-34, 	/* 352, accPolyMid7C3l */
+2.57070122683855739609271040535531938076019287109375e+00, 	/* 353, accPolyMid7C4h, quickPolyMid7C4h */
+-1.97101208773651620042078427599655545421327570922328e-16, 	/* 354, accPolyMid7C4m, quickPolyMid7C4l */
+-5.16498810795509657208158829628186048443297866770160e-33, 	/* 355, accPolyMid7C4l */
+5.46327133150128840810566543950699269771575927734375e+00, 	/* 356, accPolyMid7C5h, quickPolyMid7C5h */
+4.46002282634806142830756936399426613343260291679165e-17, 	/* 357, accPolyMid7C5m, quickPolyMid7C5l */
+1.00630542800586945033209683978834296850153546719007e-33, 	/* 358, accPolyMid7C5l */
+1.23592045140328163910226066946052014827728271484375e+01, 	/* 359, accPolyMid7C6h, quickPolyMid7C6h */
+-6.31168277706663387163074158423931222709606927382536e-16, 	/* 360, accPolyMid7C6m, quickPolyMid7C6l */
+-2.86577343636081880556771704346742846876298657614067e-32, 	/* 361, accPolyMid7C6l */
+2.92955857889283457495821494376286864280700683593750e+01, 	/* 362, accPolyMid7C7h, quickPolyMid7C7h */
+1.68044477586948138119056363287999050823887212287311e-15, 	/* 363, accPolyMid7C7m, quickPolyMid7C7l */
+7.17613428086569200559097225777804851531982421875000e+01, 	/* 364, accPolyMid7C8h, quickPolyMid7C8h */
+6.23119826880857970524569208326049427014155061843592e-15, 	/* 365, accPolyMid7C8m */
+1.80247733513940403327069361694157123565673828125000e+02, 	/* 366, accPolyMid7C9h, quickPolyMid7C9h */
+5.02375884230076452151557056132473497202104361844532e-15, 	/* 367, accPolyMid7C9m */
+4.61706463186508131002483423799276351928710937500000e+02, 	/* 368, accPolyMid7C10h, quickPolyMid7C10h */
+1.87384815286128587607402694756722954854896712184598e-14, 	/* 369, accPolyMid7C10m */
+1.20148795335111071835854090750217437744140625000000e+03, 	/* 370, accPolyMid7C11h, quickPolyMid7C11h */
+2.60459063066423653270039910766913797650205005668189e-14, 	/* 371, accPolyMid7C11m */
+3.16745162323707290852325968444347381591796875000000e+03, 	/* 372, accPolyMid7C12h, quickPolyMid7C12h */
+-2.76092355337723539107271551080313829589234133482512e-14, 	/* 373, accPolyMid7C12m */
+8.44145526317249823478050529956817626953125000000000e+03, 	/* 374, accPolyMid7C13h, quickPolyMid7C13h */
+-2.33235416338613018856460888065680920494017469568604e-13, 	/* 375, accPolyMid7C13m */
+2.27054147369064739905297756195068359375000000000000e+04, 	/* 376, accPolyMid7C14h, quickPolyMid7C14h */
+-3.76196185348520617410321355221587231933578349130087e-13, 	/* 377, accPolyMid7C14m */
+6.15579784849813586333766579627990722656250000000000e+04, 	/* 378, accPolyMid7C15h */
+-5.34885488214934542022410271185570626302323293810304e-13, 	/* 379, accPolyMid7C15m */
+1.68046954551722796168178319931030273437500000000000e+05, 	/* 380, accPolyMid7C16h */
+4.61530358172978565562516450881958007812500000000000e+05, 	/* 381, accPolyMid7C17h */
+1.27435135728149255737662315368652343750000000000000e+06, 	/* 382, accPolyMid7C18h */
+3.53543876571432314813137054443359375000000000000000e+06, 	/* 383, accPolyMid7C19h */
+9.85027146846828423440456390380859375000000000000000e+06, 	/* 384, accPolyMid7C20h */
+2.75499693650120757520198822021484375000000000000000e+07, 	/* 385, accPolyMid7C21h */
+7.73223713417402952909469604492187500000000000000000e+07, 	/* 386, accPolyMid7C22h */
+2.17703077316092193126678466796875000000000000000000e+08, 	/* 387, accPolyMid7C23h */
+6.14725288059689402580261230468750000000000000000000e+08, 	/* 388, accPolyMid7C24h */
+1.74040800223112154006958007812500000000000000000000e+09, 	/* 389, accPolyMid7C25h */
+4.93950269498267459869384765625000000000000000000000e+09, 	/* 390, accPolyMid7C26h */
+1.40506579253189964294433593750000000000000000000000e+10, 	/* 391, accPolyMid7C27h */
+4.00515555251962203979492187500000000000000000000000e+10, 	/* 392, accPolyMid7C28h */
+1.14389701296316925048828125000000000000000000000000e+11, 	/* 393, accPolyMid7C29h */
+3.27296809500310974121093750000000000000000000000000e+11, 	/* 394, accPolyMid7C30h */
+9.38089913584087280273437500000000000000000000000000e+11, 	/* 395, accPolyMid7C31h */
+2.69293079636161279296875000000000000000000000000000e+12, 	/* 396, accPolyMid7C32h */
+7.72833097677600292968750000000000000000000000000000e+12, 	/* 397, accPolyMid7C33h */
+2.22444558194129648437500000000000000000000000000000e+13, 	/* 398, accPolyMid7C34h */
+6.82401753565838359375000000000000000000000000000000e+13, 	/* 399, accPolyMid7C35h */
+1.01768360014066378266267100775040494087129736780625e+00, 	/* 400, RN rounding constant quick poly middle 7*/
+9.50960845417677113226513686606015976666256457529322e-19, 	/* 401, RD rounding constant quick poly middle 7*/
+7.19008445739778290217714129539672285318374633789062e-01, 	/* 402, midpoint in interval 8*/
+8.02374569969830475635319544380763545632362365722656e-01, 	/* 403, accPolyMid8C0h, quickPolyMid8C0h */
+-5.57232596267891548198947769768214754835408022265973e-18, 	/* 404, accPolyMid8C0m, quickPolyMid8C0l */
+1.43884615807450622071428369963541626930236816406250e+00, 	/* 405, accPolyMid8C1h, quickPolyMid8C1h */
+3.59501817700961691698905527113737832717163932379732e-17, 	/* 406, accPolyMid8C1m, quickPolyMid8C1l */
+1.42139791223330171535988185118707169939451756100115e-33, 	/* 407, accPolyMid8C1l */
+1.07089546798848767039658014255110174417495727539062e+00, 	/* 408, accPolyMid8C2h, quickPolyMid8C2h */
+7.12234409493595206110752393915421282220770659974638e-18, 	/* 409, accPolyMid8C2m, quickPolyMid8C2l */
+4.88803415361541961399074298884647415525574790319603e-34, 	/* 410, accPolyMid8C2l */
+2.09054748952818103546746897336561232805252075195312e+00, 	/* 411, accPolyMid8C3h, quickPolyMid8C3h */
+-4.76201670474478458619338404030121517580491201111076e-17, 	/* 412, accPolyMid8C3m, quickPolyMid8C3l */
+9.85965711757934088944524691800382507878970211803297e-34, 	/* 413, accPolyMid8C3l */
+4.62886640680389760404978005681186914443969726562500e+00, 	/* 414, accPolyMid8C4h, quickPolyMid8C4h */
+-6.26076461255283992652654162871089011104493903198467e-17, 	/* 415, accPolyMid8C4m, quickPolyMid8C4l */
+-3.79525038577018957662309046851941714013728344004132e-33, 	/* 416, accPolyMid8C4l */
+1.15940096700862280698629547259770333766937255859375e+01, 	/* 417, accPolyMid8C5h, quickPolyMid8C5h */
+5.00344758332442110044971487490682364429618307708619e-16, 	/* 418, accPolyMid8C5m, quickPolyMid8C5l */
+5.05400641998677592107699970650218041381398322944134e-33, 	/* 419, accPolyMid8C5l */
+3.09983076631741454320945194922387599945068359375000e+01, 	/* 420, accPolyMid8C6h, quickPolyMid8C6h */
+-1.68695534318490565671111852385917462817518447859219e-16, 	/* 421, accPolyMid8C6m, quickPolyMid8C6l */
+6.85050661529605157727571454320758800953682098824324e-34, 	/* 422, accPolyMid8C6l */
+8.67969690247392975379625568166375160217285156250000e+01, 	/* 423, accPolyMid8C7h, quickPolyMid8C7h */
+-5.77909319686569076564604963233208513019264259552576e-15, 	/* 424, accPolyMid8C7m, quickPolyMid8C7l */
+2.51207737556061232453430420719087123870849609375000e+02, 	/* 425, accPolyMid8C8h, quickPolyMid8C8h */
+-2.34229223147066395573123458231502220325151528840246e-15, 	/* 426, accPolyMid8C8m */
+7.45516108151238086065859533846378326416015625000000e+02, 	/* 427, accPolyMid8C9h, quickPolyMid8C9h */
+5.42429462463291658149197032428663192617240449908134e-15, 	/* 428, accPolyMid8C9m */
+2.25637900900536169501719996333122253417968750000000e+03, 	/* 429, accPolyMid8C10h, quickPolyMid8C10h */
+1.04118075698860813774916020354956791986217497225642e-13, 	/* 430, accPolyMid8C10m */
+6.93796098101582811068510636687278747558593750000000e+03, 	/* 431, accPolyMid8C11h, quickPolyMid8C11h */
+8.59862281333229161222916847764065622815798321104674e-15, 	/* 432, accPolyMid8C11m */
+2.16119867410615115659311413764953613281250000000000e+04, 	/* 433, accPolyMid8C12h, quickPolyMid8C12h */
+1.06661614083783310365636876324959361083581990681246e-13, 	/* 434, accPolyMid8C12m */
+6.80579130650992592563852667808532714843750000000000e+04, 	/* 435, accPolyMid8C13h, quickPolyMid8C13h */
+6.62014084472278982961475227363418833651659278771717e-12, 	/* 436, accPolyMid8C13m */
+2.16307061102022911654785275459289550781250000000000e+05, 	/* 437, accPolyMid8C14h, quickPolyMid8C14h */
+-2.44881501957370731470213892899278376432195547529602e-12, 	/* 438, accPolyMid8C14m */
+6.92960027312710066325962543487548828125000000000000e+05, 	/* 439, accPolyMid8C15h */
+-5.66500973206806599245652257405055779448943553688878e-11, 	/* 440, accPolyMid8C15m */
+2.23531716476973146200180053710937500000000000000000e+06, 	/* 441, accPolyMid8C16h */
+7.25429400587130710482597351074218750000000000000000e+06, 	/* 442, accPolyMid8C17h */
+2.36685600768156014382839202880859375000000000000000e+07, 	/* 443, accPolyMid8C18h */
+7.75916356685774326324462890625000000000000000000000e+07, 	/* 444, accPolyMid8C19h */
+2.55452232123835593461990356445312500000000000000000e+08, 	/* 445, accPolyMid8C20h */
+8.44254469674954175949096679687500000000000000000000e+08, 	/* 446, accPolyMid8C21h */
+2.79994093996573638916015625000000000000000000000000e+09, 	/* 447, accPolyMid8C22h */
+9.31537507532041358947753906250000000000000000000000e+09, 	/* 448, accPolyMid8C23h */
+3.10820362568210334777832031250000000000000000000000e+10, 	/* 449, accPolyMid8C24h */
+1.03985438377022964477539062500000000000000000000000e+11, 	/* 450, accPolyMid8C25h */
+3.48737110205060913085937500000000000000000000000000e+11, 	/* 451, accPolyMid8C26h */
+1.17221005601944750976562500000000000000000000000000e+12, 	/* 452, accPolyMid8C27h */
+3.94841085036352832031250000000000000000000000000000e+12, 	/* 453, accPolyMid8C28h */
+1.33255264873973789062500000000000000000000000000000e+13, 	/* 454, accPolyMid8C29h */
+4.50540615593679062500000000000000000000000000000000e+13, 	/* 455, accPolyMid8C30h */
+1.52590744626434593750000000000000000000000000000000e+14, 	/* 456, accPolyMid8C31h */
+5.17610884067860062500000000000000000000000000000000e+14, 	/* 457, accPolyMid8C32h */
+1.75591888512180650000000000000000000000000000000000e+15, 	/* 458, accPolyMid8C33h */
+5.97247050283681300000000000000000000000000000000000e+15, 	/* 459, accPolyMid8C34h */
+2.15157732956128240000000000000000000000000000000000e+16, 	/* 460, accPolyMid8C35h */
+1.01164858801777814945850739843488049838102483351729e+00, 	/* 461, RN rounding constant quick poly middle 8*/
+6.36522991537283605877265237263241827159525525595558e-19, 	/* 462, RD rounding constant quick poly middle 8*/
+7.60880231857352207214262307388707995414733886718750e-01, 	/* 463, midpoint in interval 9*/
+8.64668552766275078091950945236021652817726135253906e-01, 	/* 464, accPolyMid9C0h, quickPolyMid9C0h */
+2.22107768610709483983000348580034922276618040094248e-19, 	/* 465, accPolyMid9C0m, quickPolyMid9C0l */
+1.54108768708640897493467036838410422205924987792969e+00, 	/* 466, accPolyMid9C1h, quickPolyMid9C1h */
+3.32820103504311843280112118328828427349507594590859e-17, 	/* 467, accPolyMid9C1m, quickPolyMid9C1l */
+1.00469319336666835386896691703426687648516206509999e-33, 	/* 468, accPolyMid9C1l */
+1.39241392226891269601196654548402875661849975585938e+00, 	/* 469, accPolyMid9C2h, quickPolyMid9C2h */
+-7.78438411380474954824767774215038405507043967534661e-17, 	/* 470, accPolyMid9C2m, quickPolyMid9C2l */
+-2.75498989204243544757760916231818015864525586405625e-34, 	/* 471, accPolyMid9C2l */
+3.12616775988369477445871780219022184610366821289062e+00, 	/* 472, accPolyMid9C3h, quickPolyMid9C3h */
+-1.83136634474213254639590598215495010130375003296228e-16, 	/* 473, accPolyMid9C3m, quickPolyMid9C3l */
+-1.37039877493057234685308732075670776376976824689825e-33, 	/* 474, accPolyMid9C3l */
+8.16374541867330982825023966142907738685607910156250e+00, 	/* 475, accPolyMid9C4h, quickPolyMid9C4h */
+6.61331422381139448266729896007647878117248843327786e-16, 	/* 476, accPolyMid9C4m, quickPolyMid9C4l */
+-2.34411228408683938039171677313602417735464237635307e-32, 	/* 477, accPolyMid9C4l */
+2.39942774487262227012251969426870346069335937500000e+01, 	/* 478, accPolyMid9C5h, quickPolyMid9C5h */
+3.56709659583669727593018389598696746405922754956722e-16, 	/* 479, accPolyMid9C5m, quickPolyMid9C5l */
+1.92887188784617492937549821774446261489627075560113e-32, 	/* 480, accPolyMid9C5l */
+7.53789452793380974071624223142862319946289062500000e+01, 	/* 481, accPolyMid9C6h, quickPolyMid9C6h */
+-4.89236491033052363530754653203901634957086880239885e-15, 	/* 482, accPolyMid9C6m, quickPolyMid9C6l */
+1.86966182047363315238712995890702987106854589421809e-31, 	/* 483, accPolyMid9C6l */
+2.47970017761763045882617007009685039520263671875000e+02, 	/* 484, accPolyMid9C7h, quickPolyMid9C7h */
+-5.49773113276874172897358146458574130047619382341550e-15, 	/* 485, accPolyMid9C7m, quickPolyMid9C7l */
+8.43239639560233626980334520339965820312500000000000e+02, 	/* 486, accPolyMid9C8h, quickPolyMid9C8h */
+4.61444619149467756136937751706191309842186761003280e-14, 	/* 487, accPolyMid9C8m */
+2.94042238989191673681489191949367523193359375000000e+03, 	/* 488, accPolyMid9C9h, quickPolyMid9C9h */
+-6.26529947434876144165574723786618699307871677151027e-14, 	/* 489, accPolyMid9C9m */
+1.04570596262470262445276603102684020996093750000000e+04, 	/* 490, accPolyMid9C10h, quickPolyMid9C10h */
+4.33811913399171164864172764349193352065910816994787e-13, 	/* 491, accPolyMid9C10m */
+3.77816423278584625222720205783843994140625000000000e+04, 	/* 492, accPolyMid9C11h, quickPolyMid9C11h */
+-4.21825155017599752908316500880066660420734253600372e-14, 	/* 493, accPolyMid9C11m */
+1.38292932619114842964336276054382324218750000000000e+05, 	/* 494, accPolyMid9C12h, quickPolyMid9C12h */
+-2.02223055949190022685968858135129700521678830504868e-12, 	/* 495, accPolyMid9C12m */
+5.11733514125351735856384038925170898437500000000000e+05, 	/* 496, accPolyMid9C13h, quickPolyMid9C13h */
+-2.25025523408315347550056625257165819446736332309911e-11, 	/* 497, accPolyMid9C13m */
+1.91116705355792236514389514923095703125000000000000e+06, 	/* 498, accPolyMid9C14h, quickPolyMid9C14h */
+-6.92308947161053801527502899602797403061371639410027e-11, 	/* 499, accPolyMid9C14m */
+7.19450694938360899686813354492187500000000000000000e+06, 	/* 500, accPolyMid9C15h */
+-3.25836107774239441972945896739397887709177581427866e-10, 	/* 501, accPolyMid9C15m */
+2.72708481033120900392532348632812500000000000000000e+07, 	/* 502, accPolyMid9C16h */
+1.03997450389555335044860839843750000000000000000000e+08, 	/* 503, accPolyMid9C17h */
+3.98720516462098360061645507812500000000000000000000e+08, 	/* 504, accPolyMid9C18h */
+1.53596677859462237358093261718750000000000000000000e+09, 	/* 505, accPolyMid9C19h */
+5.94220454070446586608886718750000000000000000000000e+09, 	/* 506, accPolyMid9C20h */
+2.30771902569618682861328125000000000000000000000000e+10, 	/* 507, accPolyMid9C21h */
+8.99354036055935974121093750000000000000000000000000e+10, 	/* 508, accPolyMid9C22h */
+3.51604905808161804199218750000000000000000000000000e+11, 	/* 509, accPolyMid9C23h */
+1.37859673609756665039062500000000000000000000000000e+12, 	/* 510, accPolyMid9C24h */
+5.41968316905909179687500000000000000000000000000000e+12, 	/* 511, accPolyMid9C25h */
+2.13586334787060429687500000000000000000000000000000e+13, 	/* 512, accPolyMid9C26h */
+8.43635735241271562500000000000000000000000000000000e+13, 	/* 513, accPolyMid9C27h */
+3.33923015327480937500000000000000000000000000000000e+14, 	/* 514, accPolyMid9C28h */
+1.32429009755987925000000000000000000000000000000000e+15, 	/* 515, accPolyMid9C29h */
+5.26147664189654100000000000000000000000000000000000e+15, 	/* 516, accPolyMid9C30h */
+2.09399836831170720000000000000000000000000000000000e+16, 	/* 517, accPolyMid9C31h */
+8.34692893106752000000000000000000000000000000000000e+16, 	/* 518, accPolyMid9C32h */
+3.32762568376608000000000000000000000000000000000000e+17, 	/* 519, accPolyMid9C33h */
+1.33003631888338841600000000000000000000000000000000e+18, 	/* 520, accPolyMid9C34h */
+5.62235923730283212800000000000000000000000000000000e+18, 	/* 521, accPolyMid9C35h */
+1.01058279621692383521501837291497341253743085794782e+00, 	/* 522, RN rounding constant quick poly middle 9*/
+5.78284088727747938003347592934948079832502681677348e-19, 	/* 523, RD rounding constant quick poly middle 9*/
+-8.33333333333333287074040640618477482348680496215820e-02, 	/* 524, accPolyHighC1h, quickPolyHighC1h */
+-4.62592926927148532830780603208030422795294098867636e-18, 	/* 525, accPolyHighC1m, quickPolyHighC1l */
+-2.56790659251636222413745757067544746896901530409675e-34, 	/* 526, accPolyHighC1l */
+-1.87499999999999993061106096092771622352302074432373e-02, 	/* 527, accPolyHighC2h, quickPolyHighC2h */
+-6.93889390390722876283368680301479756432058851698546e-19, 	/* 528, accPolyHighC2m, quickPolyHighC2l */
+3.85185989241340205035888971870941307651344283492079e-35, 	/* 529, accPolyHighC2l */
+-5.58035714285714298105167685548622102942317724227905e-03, 	/* 530, accPolyHighC3h, quickPolyHighC3h */
+1.23908819712629071293959090145008148963025205053831e-19, 	/* 531, accPolyHighC3m, quickPolyHighC3l */
+6.87827508933260239532125196237951282993345739214379e-36, 	/* 532, accPolyHighC3l */
+-1.89887152777777775368439616698879035538993775844574e-03, 	/* 533, accPolyHighC4h, quickPolyHighC4h */
+-2.40933816107889860849364897504182511872549009826894e-20, 	/* 534, accPolyHighC4m, quickPolyHighC4l */
+-1.31413379554614650822698366533512762375439292005686e-36, 	/* 535, accPolyHighC4l */
+-6.99129971590909120478241067786484563839621841907501e-04, 	/* 536, accPolyHighC5h, quickPolyHighC5h */
+2.95691501586955672658426997372092637662516651210484e-20, 	/* 537, accPolyHighC5m, quickPolyHighC5l */
+1.93248831638054158509225332576516713663708940033800e-36, 	/* 538, accPolyHighC5l */
+-2.71136944110576935586948144063512700085993856191635e-04, 	/* 539, accPolyHighC6h, quickPolyHighC6h */
+1.25100250671414776773311485375106982275955017737813e-20, 	/* 540, accPolyHighC6m, quickPolyHighC6l */
+-2.41797324682937785630481140742729367728409168219340e-37, 	/* 541, accPolyHighC6l */
+-1.09100341796875005421010862427522170037264004349709e-04, 	/* 542, accPolyHighC7h, quickPolyHighC7h */
+5.42101086231091719294416952538483743258993211884145e-21, 	/* 543, accPolyHighC7m, quickPolyHighC7l */
+9.55338141209871258458343868890229946241110412925982e-38, 	/* 544, accPolyHighC7l */
+-4.51242222505457229141112573955751940957270562648773e-05, 	/* 545, accPolyHighC8h, quickPolyHighC8h */
+-3.18882990973711044045301474516264873522265001897356e-21, 	/* 546, accPolyHighC8m, quickPolyHighC8l */
+1.26912673390128847048400261536391292203355395300755e-37, 	/* 547, accPolyHighC8l */
+-1.90656436117071843741425929419364138084347359836102e-05, 	/* 548, accPolyHighC9h, quickPolyHighC9h */
+-1.06993691223935686411543055030763865855410413408366e-21, 	/* 549, accPolyHighC9m, quickPolyHighC9l */
+-8.19368731407892096011823940271412425317976158112288e-06, 	/* 550, accPolyHighC10h, quickPolyHighC10h */
+-4.03323388732262270981356256138402986149007425086112e-22, 	/* 551, accPolyHighC10m */
+-3.57056927421818625395413641931963155684570665471256e-06, 	/* 552, accPolyHighC11h, quickPolyHighC11h */
+1.64796270839759047485693620137778762426170587507193e-22, 	/* 553, accPolyHighC11m */
+-1.57402595505118377679448869038703051614902506116778e-06, 	/* 554, accPolyHighC12h, quickPolyHighC12h */
+1.03140748281100284102117735554826521589797225638379e-22, 	/* 555, accPolyHighC12m */
+-7.00688192241446386609332076800260580284884781576693e-07, 	/* 556, accPolyHighC13h, quickPolyHighC13h */
+1.64297063257073230214010320767916245637133227760945e-23, 	/* 557, accPolyHighC13m */
+-3.14533061665020903893046425037205438002274604514241e-07, 	/* 558, accPolyHighC14h, quickPolyHighC14h */
+-1.57714454767442613704253788250439912924415496806915e-23, 	/* 559, accPolyHighC14m */
+-1.42216292935838748302118661470672122959513217210770e-07, 	/* 560, accPolyHighC15h, quickPolyHighC15h */
+3.70163506723718792079998292841186813204562291235770e-24, 	/* 561, accPolyHighC15m */
+-6.47111067734723877623606537110023673164960200665519e-08, 	/* 562, accPolyHighC16h, quickPolyHighC16h */
+1.96959302136511249382763415085950224265202199251341e-24, 	/* 563, accPolyHighC16m */
+-2.96094098107419582578099602043070204260288846853655e-08, 	/* 564, accPolyHighC17h, quickPolyHighC17h */
+-1.33210241793138800698071276025711826265682121011801e-25, 	/* 565, accPolyHighC17m */
+-1.36154377785683810553931313304908135020099280154682e-08, 	/* 566, accPolyHighC18h, quickPolyHighC18h */
+-6.28864412480332248702787563995712794007175716615166e-09, 	/* 567, accPolyHighC19h */
+-2.91615151940413698643198065114674061293342788303562e-09, 	/* 568, accPolyHighC20h */
+-1.35724329813454494662594037565671659106847357634251e-09, 	/* 569, accPolyHighC21h */
+-6.33321170158103043923636695899503229467697451582353e-10, 	/* 570, accPolyHighC22h */
+-2.98137047522453658533318439889463723202478462326326e-10, 	/* 571, accPolyHighC23h */
+-1.35174910337425390381481209427921852395115820399951e-10, 	/* 572, accPolyHighC24h */
+-7.57694791124210735879864558660150546803846438592700e-11, 	/* 573, accPolyHighC25h */
+-1.19244777215077355372683280351504137017926154840097e-11, 	/* 574, accPolyHighC26h */
+-4.08879979855917754145740023360966995669141255120849e-11, 	/* 575, accPolyHighC27h */
+1.75342081019476863949528641668112755730435381451571e-11, 	/* 576, accPolyHighC28h */
+-1.60530246587119583502980643958298338953849526689055e-11, 	/* 577, accPolyHighC29h */
+1.00010073610227913567190400341090722191910177379040e+00, 	/* 578, RN rounding constant quick poly high*/
+5.59129439367752644847269214347219849204178767344215e-21, 	/* 579, RD rounding constant quick poly high*/
+};
+
diff --git a/src/crlibm/asin-td.c b/src/crlibm/asin-td.c
new file mode 100644
index 0000000..d1d4465
--- /dev/null
+++ b/src/crlibm/asin-td.c
@@ -0,0 +1,1297 @@
+/*
+ * Correctly rounded arcsine
+ *
+ * Author : Christoph Lauter (ENS Lyon)
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "asin-td.h"
+
+#define AVOID_FMA 1
+
+void asin_accurate_lower(double *asinh, double *asinm, double *asinl, double x, double xSqh, double xSql, double sign) {
+  double highPoly;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l;
+  double tt1h, tt1l;
+  double t8h, t8m, t8l, t9h, t9m, t9l, t10h, t10m, t10l, t11h, t11m, t11l, t12h, t12m, t12l;
+  double tt8h, tt8m, tt8l, tt9h, tt9m, tt9l, tt10h, tt10m, tt10l, tt11h, tt11m, tt11l, tt12h, tt12m, tt12l;
+  double xCubeh, xCubem, xCubel, tt13h, tt13m, tt13l, t13h, t13m, t13l, polyh, polym, polyl;
+  double tt11hover, tt11mover, tt11lover;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  /* Evaluate the polynomial of degree 37
+     Its coefficients start at tbl[0]
+
+     p(x) = x + x * x^2 * (c3 + x^2 * (c5 + ...
+
+     We receive x^2 as xSqh + xSql = x * x (exactly)
+     in argument
+
+     |x| <= 0.185 = 2^(-2.43)
+
+     Compute monomials 27 to 37 in double precision
+     monomials 13 to 25 in double-double and
+     1 to 11 in triple-double precision in a 
+     modified Horner form
+
+  */
+
+  /* Double computations */
+  
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(tbl[33],xSqh,tbl[32]),xSqh,tbl[31]),xSqh,tbl[30]),xSqh,tbl[29]),xSqh,tbl[28]);		 
+#else
+  highPoly = tbl[28] + xSqh * (tbl[29] + xSqh * (tbl[30] + xSqh * (tbl[31] + xSqh * (tbl[32] + xSqh * tbl[33]))));
+#endif
+
+  /* Double-double computations */
+
+  Mul12(&tt1h,&tt1l,xSqh,highPoly);
+  Add22(&t1h,&t1l,tbl[27],0,tt1h,tt1l);
+
+  MulAdd22(&t2h,&t2l,tbl[25],tbl[26],xSqh,xSql,t1h,t1l);
+  MulAdd22(&t3h,&t3l,tbl[23],tbl[24],xSqh,xSql,t2h,t2l);
+  MulAdd22(&t4h,&t4l,tbl[21],tbl[22],xSqh,xSql,t3h,t3l);
+  MulAdd22(&t5h,&t5l,tbl[19],tbl[20],xSqh,xSql,t4h,t4l);
+  MulAdd22(&t6h,&t6l,tbl[17],tbl[18],xSqh,xSql,t5h,t5l);
+  MulAdd22(&t7h,&t7l,tbl[15],tbl[16],xSqh,xSql,t6h,t6l);
+
+  /* Triple-double computations */
+
+  Mul23(&tt8h,&tt8m,&tt8l,xSqh,xSql,t7h,t7l);                             /* 149 - 48/53 */
+  Add33(&t8h,&t8m,&t8l,tbl[12],tbl[13],tbl[14],tt8h,tt8m,tt8l);           /* 145 - 43/53 */
+  Mul233(&tt9h,&tt9m,&tt9l,xSqh,xSql,t8h,t8m,t8l);                        /* 139 - 39/53 */
+  Add33(&t9h,&t9m,&t9l,tbl[9],tbl[10],tbl[11],tt9h,tt9m,tt9l);            /* 136 - 34/53 */
+  Mul233(&tt10h,&tt10m,&tt10l,xSqh,xSql,t9h,t9m,t9l);                     /* 130 - 30/53 */
+  Add33(&t10h,&t10m,&t10l,tbl[6],tbl[7],tbl[8],tt10h,tt10m,tt10l);        /* 127 - 25/53 */
+  Mul233(&tt11hover,&tt11mover,&tt11lover,xSqh,xSql,t10h,t10m,t10l);      /* 121 - 21/53 */
+
+  Renormalize3(&tt11h,&tt11m,&tt11l,tt11hover,tt11mover,tt11lover);       /* infty - 52/53 */
+
+  Add33(&t11h,&t11m,&t11l,tbl[3],tbl[4],tbl[5],tt11h,tt11m,tt11l);        /* 149 - 47/53 */
+  Mul233(&tt12h,&tt12m,&tt12l,xSqh,xSql,t11h,t11m,t11l);                  /* 143 - 43/53 */
+  Add33(&t12h,&t12m,&t12l,tbl[0],tbl[1],tbl[2],tt12h,tt12m,tt12l);        /* 140 - 38/53 */
+
+  Mul123(&xCubeh,&xCubem,&xCubel,x,xSqh,xSql);                            /* 154 - 47/53 */
+ 
+  Mul33(&tt13h,&tt13m,&tt13l,xCubeh,xCubem,xCubel,t12h,t12m,t12l);        /* 136 - 34/53 */
+  Add133(&t13h,&t13m,&t13l,x,tt13h,tt13m,tt13l);                          /* 138 - 32/53 */
+
+  Renormalize3(&polyh,&polym,&polyl,t13h,t13m,t13l);                      /* infty - 52/53 */
+  *asinh = sign * polyh;
+  *asinm = sign * polym;
+  *asinl = sign * polyl;
+}
+
+
+void  asin_accurate_middle(double *asinh, double *asinm, double *asinl, double z, int i, double sign) {
+  double highPoly;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l, t8h, t8l, t9h, t9l;
+  double t10h, t10m, t10l, t11h, t11m, t11l, t12h, t12m, t12l, t13h, t13m, t13l, t14h, t14m, t14l;
+  double t15h, t15m, t15l, t16h, t16m, t16l;
+  double tt1h, tt1l;
+  double tt10h, tt10m, tt10l, tt11h, tt11m, tt11l, tt12h, tt12m, tt12l;
+  double tt13h, tt13m, tt13l, tt14h, tt14m, tt14l, tt15h, tt15m, tt15l, tt16h, tt16m, tt16l;
+  double polyh, polym, polyl, tt13hover, tt13mover, tt13lover;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  /* Evaluate the polynomial of degree 35
+     Its coefficients start at tbl[i+1] 
+     Evaluate degrees 35 to 20 in double precision,
+     degrees 20 to 7 in double-double precision and
+     finally degrees 6 to 1 in triple-double. 
+     The constant coefficient is a double-double, the 
+     computations are nevertheless in triple-double 
+  */
+
+  /* Double computations */
+  
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+             tbl[i+58] ,z,tbl[i+57]),z,tbl[i+56]),z,tbl[i+55]),z,tbl[i+54]),z,
+             tbl[i+53]),z,tbl[i+52]),z,tbl[i+51]),z,tbl[i+50]),z,tbl[i+49]),z,
+             tbl[i+48]),z,tbl[i+47]),z,tbl[i+46]),z,tbl[i+45]),z,tbl[i+44]),z,
+	     tbl[i+43]),z,tbl[i+42]),z,tbl[i+41]),z,tbl[i+40]),z,tbl[i+39]);
+								 
+#else
+  highPoly = tbl[i+39] + z * (tbl[i+40] + z * (tbl[i+41] + z * (tbl[i+42] + z * (
+             tbl[i+43] + z * (tbl[i+44] + z * (tbl[i+45] + z * (tbl[i+46] + z * (
+             tbl[i+47] + z * (tbl[i+48] + z * (tbl[i+49] + z * (tbl[i+50] + z * (
+             tbl[i+51] + z * (tbl[i+52] + z * (tbl[i+53] + z * (tbl[i+54] + z * (
+             tbl[i+55] + z * (tbl[i+56] + z * (tbl[i+57] + z * tbl[i+58]))))))))))))))))));
+#endif
+
+  
+  /* Double-double computations */
+  
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+37],tbl[i+38],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+35],tbl[i+36],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+33],tbl[i+34],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+31],tbl[i+32],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+29],tbl[i+30],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+27],tbl[i+28],z,t5h,t5l);
+  MulAdd212(&t7h,&t7l,tbl[i+25],tbl[i+26],z,t6h,t6l);
+  MulAdd212(&t8h,&t8l,tbl[i+23],tbl[i+24],z,t7h,t7l);
+  MulAdd212(&t9h,&t9l,tbl[i+21],tbl[i+22],z,t8h,t8l);
+
+  /* Triple-double computations */
+
+  Mul123(&tt10h,&tt10m,&tt10l,z,t9h,t9l);                                          /* 154 - 47/53 */
+  Add33(&t10h,&t10m,&t10l,tbl[i+18],tbl[i+19],tbl[i+20],tt10h,tt10m,tt10l);        /* 144 - 42/53 */
+  Mul133(&tt11h,&tt11m,&tt11l,z,t10h,t10m,t10l);                                   /* 142 - 38/53 */
+  Add33(&t11h,&t11m,&t11l,tbl[i+15],tbl[i+16],tbl[i+17],tt11h,tt11m,tt11l);        /* 136 - 33/53 */
+  Mul133(&tt12h,&tt12m,&tt12l,z,t11h,t11m,t11l);                                   /* 133 - 28/53 */
+  Add33(&t12h,&t12m,&t12l,tbl[i+12],tbl[i+13],tbl[i+14],tt12h,tt12m,tt12l);        /* 125 - 23/53 */
+  Mul133(&tt13hover,&tt13mover,&tt13lover,z,t12h,t12m,t12l);                       /* 123 - 18/53 */
+
+  Renormalize3(&tt13h,&tt13m,&tt13l,tt13hover,tt13mover,tt13lover);                /* infty - 52/53 */
+
+  Add33(&t13h,&t13m,&t13l,tbl[i+9],tbl[i+10],tbl[i+11],tt13h,tt13m,tt13l);         /* 149 - 47/53 */
+  Mul133(&tt14h,&tt14m,&tt14l,z,t13h,t13m,t13l);                                   /* 147 - 42/53 */
+  Add33(&t14h,&t14m,&t14l,tbl[i+6],tbl[i+7],tbl[i+8],tt14h,tt14m,tt14l);           /* 139 - 37/53 */
+  Mul133(&tt15h,&tt15m,&tt15l,z,t14h,t14m,t14l);                                   /* 137 - 32/53 */
+  Add33(&t15h,&t15m,&t15l,tbl[i+3],tbl[i+4],tbl[i+5],tt15h,tt15m,tt15l);           /* 129 - 28/53 */
+  Mul133(&tt16h,&tt16m,&tt16l,z,t15h,t15m,t15l);                                   /* 128 - 23/53 */
+  Add233(&t16h,&t16m,&t16l,tbl[i+1],tbl[i+2],tt16h,tt16m,tt16l);                   /* 126 - 19/53 */
+
+  Renormalize3(&polyh,&polym,&polyl,t16h,t16m,t16l);                               /* infty - 52/53 */
+  *asinh = sign * polyh;
+  *asinm = sign * polym;
+  *asinl = sign * polyl;
+}
+
+
+void asin_accurate_higher(double *asinh, double *asinm, double *asinl, double z, double sign) {
+  double highPoly;
+  double tt1h, tt1l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l, t8h, t8l;
+  double tt10h, tt10m, tt10l, tt11h, tt11m, tt11l, tt12h, tt12m, tt12l, tt13h, tt13m, tt13l;
+  double tt14h, tt14m, tt14l, tt15h, tt15m, tt15l, tt16h, tt16m, tt16l, tt17h, tt17m, tt17l;
+  double t9h, t9l, t10h, t10m, t10l, t11h, t11m, t11l, t12h, t12m, t12l, t13h, t13m, t13l;
+  double t14h, t14m, t14l, t15h, t15m, t15l, t16h, t16m, t16l, t17h, t17m, t17l;
+  double tt18h, tt18m, tt18l, polyh, polym, polyl;
+  double sqrtzh, sqrtzm, sqrtzl, twoZ, pTimesSh, pTimesSm, pTimesSl;
+  double allhover, allmover, alllover, allh, allm, alll;
+  double tt13hover, tt13mover, tt13lover, tt16hover, tt16mover, tt16lover;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  /* We evaluate asin(x) as 
+
+     asin(x) = f(z) * sqrt(2*z) + Pi/2
+
+     with z = 1 - x and
+
+     f(z) = (asin(z) - Pi/2) / sqrt(2*z)
+
+     f(z) is approximated by p(z)
+
+     The polynomial p(z) is of degree 29
+     Its coefficients start at tbl[TBLIDX10] 
+     Coefficients for degrees 29 to 18 are in double precision,
+     for degrees 17 to 9 in double-double precision and
+     finally for degrees 8 to 1 in triple-double. 
+     The constant coefficient (-1) is not stored in the table, 
+     the computations are nevertheless in triple-double 
+     We evaluate the monomials in the precision in which
+     the correspondant coefficients are stored
+     The coefficients' values decrease very quickly 
+     so even with |z| < 2^-2.18 we can compute degree 18 
+     already in double precision
+
+     Compute than sqrt(2*z) as a triple-double
+     multiply in triple-double and add Pi/2
+     We will cancel no bit in the addition since
+     f(z) < 0.5 * Pi/2
+
+  */
+
+  /* Double computations */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+             tbl[TBLIDX10+53] ,z,tbl[TBLIDX10+52]),z,tbl[TBLIDX10+51]),z,
+             tbl[TBLIDX10+50]),z,tbl[TBLIDX10+49]),z,tbl[TBLIDX10+48]),z,
+             tbl[TBLIDX10+47]),z,tbl[TBLIDX10+46]),z,tbl[TBLIDX10+45]),z,
+             tbl[TBLIDX10+44]),z,tbl[TBLIDX10+43]),z,tbl[TBLIDX10+42]);						 
+#else
+  highPoly = tbl[TBLIDX10+42] + z * (tbl[TBLIDX10+43] + z * (tbl[TBLIDX10+44] + z * (
+             tbl[TBLIDX10+45] + z * (tbl[TBLIDX10+46] + z * (tbl[TBLIDX10+47] + z * (
+             tbl[TBLIDX10+48] + z * (tbl[TBLIDX10+49] + z * (tbl[TBLIDX10+50] + z * (
+             tbl[TBLIDX10+51] + z * (tbl[TBLIDX10+52] + z *  tbl[TBLIDX10+53]))))))))));
+#endif
+  
+  /* Double-double computations */
+
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[TBLIDX10+40],tbl[TBLIDX10+41],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[TBLIDX10+38],tbl[TBLIDX10+39],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[TBLIDX10+36],tbl[TBLIDX10+37],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[TBLIDX10+34],tbl[TBLIDX10+35],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[TBLIDX10+32],tbl[TBLIDX10+33],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[TBLIDX10+30],tbl[TBLIDX10+31],z,t5h,t5l);
+  MulAdd212(&t7h,&t7l,tbl[TBLIDX10+28],tbl[TBLIDX10+29],z,t6h,t6l);
+  MulAdd212(&t8h,&t8l,tbl[TBLIDX10+26],tbl[TBLIDX10+27],z,t7h,t7l);
+  MulAdd212(&t9h,&t9l,tbl[TBLIDX10+24],tbl[TBLIDX10+25],z,t8h,t8l);
+
+  /* Triple-double computations */
+
+  Mul123(&tt10h,&tt10m,&tt10l,z,t9h,t9l);                                                         /* 154 - 47/53 */
+  Add33(&t10h,&t10m,&t10l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tbl[TBLIDX10+23],tt10h,tt10m,tt10l);  /* 144 - 42/53 */
+  Mul133(&tt11h,&tt11m,&tt11l,z,t10h,t10m,t10l);                                                  /* 142 - 37/53 */
+  Add33(&t11h,&t11m,&t11l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],tbl[TBLIDX10+20],tt11h,tt11m,tt11l);  /* 134 - 32/53 */
+  Mul133(&tt12h,&tt12m,&tt12l,z,t11h,t11m,t11l);                                                  /* 132 - 27/53 */
+  Add33(&t12h,&t12m,&t12l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],tbl[TBLIDX10+17],tt12h,tt12m,tt12l);  /* 124 - 22/53 */
+  Mul133(&tt13hover,&tt13mover,&tt13lover,z,t12h,t12m,t12l);                                      /* 122 - 17/53 */
+
+  Renormalize3(&tt13h,&tt13m,&tt13l,tt13hover,tt13mover,tt13lover);                               /* infty - 52/53 */
+
+  Add33(&t13h,&t13m,&t13l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],tbl[TBLIDX10+14],tt13h,tt13m,tt13l);  /* 149 - 47/53 */
+  Mul133(&tt14h,&tt14m,&tt14l,z,t13h,t13m,t13l);                                                  /* 147 - 42/53 */
+  Add33(&t14h,&t14m,&t14l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],tbl[TBLIDX10+11],tt14h,tt14m,tt14l);   /* 139 - 37/53 */
+  Mul133(&tt15h,&tt15m,&tt15l,z,t14h,t14m,t14l);                                                  /* 137 - 32/53 */
+  Add33(&t15h,&t15m,&t15l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],tbl[TBLIDX10+8],tt15h,tt15m,tt15l);     /* 129 - 27/53 */
+  Mul133(&tt16hover,&tt16mover,&tt16lover,z,t15h,t15m,t15l);                                      /* 127 - 22/53 */
+
+  Renormalize3(&tt16h,&tt16m,&tt16l,tt16hover,tt16mover,tt16lover);                               /* infty - 52/53 */
+
+  Add33(&t16h,&t16m,&t16l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],tbl[TBLIDX10+5],tt16h,tt16m,tt16l);     /* 149 - 47/53 */
+  Mul133(&tt17h,&tt17m,&tt17l,z,t16h,t16m,t16l);                                                  /* 147 - 42/53 */
+  Add33(&t17h,&t17m,&t17l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],tbl[TBLIDX10+2],tt17h,tt17m,tt17l);     /* 139 - 37/53 */
+  Mul133(&tt18h,&tt18m,&tt18l,z,t17h,t17m,t17l);                                                  /* 137 - 32/53 */
+  Add133(&polyh,&polym,&polyl,-1,tt18h,tt18m,tt18l);                                              /* 136 - 30/53 */
+
+  /* Compute sqrt(2*z) as a triple-double */
+
+  twoZ = 2 * z;
+  Sqrt13(&sqrtzh,&sqrtzm,&sqrtzl,twoZ);                                                           /* 146 - 52/53 */
+
+  /* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+  Mul33(&pTimesSh,&pTimesSm,&pTimesSl,polyh,polym,polyl,sqrtzh,sqrtzm,sqrtzl);                    /* 128 - 26/53 */
+  Add33(&allhover,&allmover,&alllover,PIHALFH,PIHALFM,PIHALFL,pTimesSh,pTimesSm,pTimesSl);        /* 126 - 21/53 */
+
+  /* Renormalize and multiply by sign */
+  Renormalize3(&allh,&allm,&alll,allhover,allmover,alllover);                                     /* infty - 52/53 */
+  *asinh = sign * allh;
+  *asinm = sign * allm;
+  *asinl = sign * alll;
+}
+
+
+
+
+
+
+
+
+double asin_rn(double x) {
+  db_number xdb;
+  double sign, z, asinh, asinm, asinl;
+  int i;
+  double xSqh, xSql;
+  double tt1h, tt1l;
+  double tt6h, tt6l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l;
+  double t7h, t7l, t8h, t8l, polyh, polyl, twoZ, sqrtzh, sqrtzl;
+  double pTimesSh, pTimesSl, allh, alll, highPoly, xCubeh, xCubel;
+  double tmp1, tmp2, tmp3, tmp4, tmp5;
+
+  /* Transform the argument into integer */
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Strip off the sign of argument x */
+  if (xdb.i[HI] & 0x80000000) sign = -1; else sign = 1;
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if ((xdb.i[HI] > 0x3ff00000) || ((xdb.i[HI] == 0x3ff00000) && (xdb.i[LO] != 0x00000000))) {
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* If |x| < 2^(-28) we have
+     
+     arcsin(x) = x * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-55) 
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < 0x3e300000) {
+    return x;
+  }
+
+  /* Recast x */
+  x = xdb.d;
+
+  /* Find correspondant interval and compute index to the table
+     We start by filtering the two special cases around 0 and 1
+  */
+
+  if (xdb.i[HI] < BOUND1) {
+    /* Special interval 0..BOUND1 
+       The polynomial has no even monomials
+       We must prove extra accuracy in the interval 0..sin(2^(-18))
+    */
+
+    /* Quick phase starts */
+
+    /* Compute square of x for both quick and accurate phases */
+    Mul12(&xSqh,&xSql,x,x);
+
+    tmp4 = tbl[3];
+    tmp5 = tbl[4];
+    t4h = tmp4;
+    t4l = tmp5;
+    if (xdb.i[HI] > EXTRABOUND) {
+      /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(FMA(tbl[23],xSqh,tbl[21]),xSqh,tbl[19]),xSqh,tbl[17]),xSqh,tbl[15]);
+#else
+      highPoly = tbl[15] + xSqh * (tbl[17] + xSqh * (tbl[19] + xSqh * (tbl[21] + xSqh * tbl[23])));
+#endif
+
+      /* Double-double precision evaluation */
+      Mul12(&tt1h,&tt1l,xSqh,highPoly);
+      Add22(&t1h,&t1l,tbl[12],tbl[13],tt1h,tt1l);
+      
+      MulAdd212(&t2h,&t2l,tbl[9],tbl[10],xSqh,t1h,t1l);
+      MulAdd212(&t3h,&t3l,tbl[6],tbl[7],xSqh,t2h,t2l);
+      MulAdd22(&t4h,&t4l,tmp4,tmp5,xSqh,xSql,t3h,t3l);
+    }
+
+    MulAdd22(&t5h,&t5l,tbl[0],tbl[1],xSqh,xSql,t4h,t4l);
+
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt6h,&tt6l,xCubeh,xCubel,t5h,t5l);
+    
+    Add12(tmp1,tmp2,x,tt6h);
+    tmp3 = tmp2 + tt6l;
+    Add12(polyh,polyl,tmp1,tmp3);
+
+    /* Multiply by sign */
+    asinh = sign * polyh;
+    asinm = sign * polyl;
+
+    /* Rounding test (on polyh+polyl, equivalently to asinh+asinm)
+       The RN rounding constant is at tbl[34]
+    */
+    if(polyh == (polyh + (polyl * tbl[34]))) 
+      return asinh;
+
+    /* Launch accurate phase */
+
+    asin_accurate_lower(&asinh,&asinm,&asinl,x,xSqh,xSql,sign);
+
+    ReturnRoundToNearest3(asinh,asinm,asinl); 
+  }
+
+  if (xdb.i[HI] >= BOUND9) {
+    /* Special interval BOUND9..1
+       We use an asymptotic development of arcsin in sqrt(1 - x)
+    */
+
+    /* Argument reduction for quick and accurate phase
+       z = 1 - x
+       The operation is exact as per Sterbenz' lemma
+    */
+
+    z = 1 - x;
+
+    /* Quick phase starts */
+
+    /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	       tbl[TBLIDX10+42] ,z,tbl[TBLIDX10+40]),z,tbl[TBLIDX10+38]),z,
+               tbl[TBLIDX10+36]),z,tbl[TBLIDX10+34]),z,tbl[TBLIDX10+32]),z,
+               tbl[TBLIDX10+30]),z,tbl[TBLIDX10+28]),z,tbl[TBLIDX10+26]),z,
+               tbl[TBLIDX10+24]);
+#else
+    highPoly = tbl[TBLIDX10+24] + z * (tbl[TBLIDX10+26] + z * (tbl[TBLIDX10+28] + z * (
+	       tbl[TBLIDX10+30] + z * (tbl[TBLIDX10+32] + z * (tbl[TBLIDX10+34] + z * (
+	       tbl[TBLIDX10+36] + z * (tbl[TBLIDX10+38] + z * (tbl[TBLIDX10+40] + z * 
+               tbl[TBLIDX10+42]))))))));
+#endif
+    
+    /* Double-double precision evaluation */
+    Mul12(&tt1h,&tt1l,z,highPoly);
+    Add22(&t1h,&t1l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tt1h,tt1l);
+
+    MulAdd212(&t2h,&t2l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],z,t1h,t1l);
+    MulAdd212(&t3h,&t3l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],z,t2h,t2l);
+    MulAdd212(&t4h,&t4l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],z,t3h,t3l);
+    MulAdd212(&t5h,&t5l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],z,t4h,t4l);
+    MulAdd212(&t6h,&t6l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],z,t5h,t5l);
+    MulAdd212(&t7h,&t7l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],z,t6h,t6l);
+    MulAdd212(&t8h,&t8l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],z,t7h,t7l);
+    MulAdd212(&polyh,&polyl,-1,0,z,t8h,t8l);
+
+    /* Compute sqrt(2*z) as a double-double */
+
+    twoZ = 2 * z;
+    sqrt12(&sqrtzh,&sqrtzl,twoZ);                                                         
+
+    /* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+    Mul22(&pTimesSh,&pTimesSl,polyh,polyl,sqrtzh,sqrtzl);                    
+    Add22(&allh,&alll,PIHALFH,PIHALFM,pTimesSh,pTimesSl);       
+
+    /* Multiply by sign */
+    asinh = sign * allh;
+    asinm = sign * alll;
+
+    /* Rounding test 
+       The RN rounding constant is at tbl[TBLIDX10+54]
+    */
+
+    if(allh == (allh + (alll * tbl[TBLIDX10+54]))) 
+      return asinh;
+
+    /* Launch accurate phase */
+
+    asin_accurate_higher(&asinh,&asinm,&asinl,z,sign);
+
+    ReturnRoundToNearest3(asinh,asinm,asinl); 
+  }
+  
+  /* General 8 main intervals 
+     We can already suppose that BOUND1 <= x <= BOUND9
+  */
+  
+  if (xdb.i[HI] < BOUND5) {
+    if (xdb.i[HI] < BOUND3) {
+      if (xdb.i[HI] < BOUND2) i = TBLIDX2; else i = TBLIDX3;
+    } else {
+      if (xdb.i[HI] < BOUND4) i = TBLIDX4; else i = TBLIDX5;
+    }
+  } else {
+    if (xdb.i[HI] < BOUND7) {
+      if (xdb.i[HI] < BOUND6) i = TBLIDX6; else i = TBLIDX7;
+    } else {
+      if (xdb.i[HI] < BOUND8) i = TBLIDX8; else i = TBLIDX9;
+    }
+  }
+
+  /* Argument reduction 
+     i points to the interval midpoint value in the table
+  */
+  z = x - tbl[i];
+
+  /* Quick phase starts */
+
+  /* Double precision evaluation */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	     tbl[i+35] ,z,tbl[i+33]),z,tbl[i+31]),z,tbl[i+29]),z,
+             tbl[i+27]),z,tbl[i+25]),z,tbl[i+23]),z,tbl[i+21]);
+#else
+  highPoly = tbl[i+21] + z * (tbl[i+23] + z * (tbl[i+25] + z * (
+             tbl[i+27] + z * (tbl[i+29] + z * (tbl[i+31] + z * ( 
+             tbl[i+33] + z *  tbl[i+35]))))));
+#endif
+
+  /* Double-double precision evaluation */
+    
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+18],tbl[i+19],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+15],tbl[i+16],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+12],tbl[i+13],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+9],tbl[i+10],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+6],tbl[i+7],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+3],tbl[i+4],z,t5h,t5l);
+  MulAdd212(&polyh,&polyl,tbl[i+1],tbl[i+2],z,t6h,t6l);
+
+  /* Multiply by sign */
+  asinh = sign * polyh;
+  asinm = sign * polyl;
+
+  /* Rounding test 
+     The RN rounding constant is at tbl[i+59]
+  */
+    if(polyh == (polyh + (polyl * tbl[i+59]))) 
+      return asinh;
+
+  /* Launch accurate phase */
+
+  asin_accurate_middle(&asinh,&asinm,&asinl,z,i,sign);
+
+  ReturnRoundToNearest3(asinh,asinm,asinl); 
+}
+
+
+
+
+
+
+double asin_ru(double x) {
+  db_number xdb;
+  double sign, z, asinh, asinm, asinl;
+  int i;
+  double xSqh, xSql;
+  double tt1h, tt1l;
+  double tt6h, tt6l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l;
+  double t7h, t7l, t8h, t8l, polyh, polyl, twoZ, sqrtzh, sqrtzl;
+  double pTimesSh, pTimesSl, allh, alll, highPoly, xCubeh, xCubel;
+  double tmp1, tmp2, tmp3, tmp4, tmp5;
+
+  /* Transform the argument into integer */
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Strip off the sign of argument x */
+  if (xdb.i[HI] & 0x80000000) sign = -1; else sign = 1;
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if ((xdb.i[HI] > 0x3ff00000) || ((xdb.i[HI] == 0x3ff00000) && (xdb.i[LO] != 0x00000000))) {
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* If |x| < 2^(-28) we have
+     
+     arcsin(x) = x * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-55) 
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < 0x3e300000) {
+    /* If x == 0 then we got the algebraic result arcsin(0) = 0
+       If x < 0 then the truncation rest is negative but less than 
+       1 ulp; we round upwards by returning x
+    */
+    if (x <= 0) return x;
+    /* Otherwise the rest is positive, less than 1 ulp and the
+       image is not algebraic 
+       We return x + 1ulp
+    */
+    xdb.l++;
+    return xdb.d;
+  }
+
+  /* Recast x */
+  x = xdb.d;
+
+  /* Find correspondant interval and compute index to the table
+     We start by filtering the two special cases around 0 and 1
+  */
+
+  if (xdb.i[HI] < BOUND1) {
+    /* Special interval 0..BOUND1 
+       The polynomial has no even monomials
+       We must prove extra accuracy in the interval 0..sin(2^(-18))
+    */
+
+    /* Quick phase starts */
+
+    /* Compute square of x for both quick and accurate phases */
+    Mul12(&xSqh,&xSql,x,x);
+
+    tmp4 = tbl[3];
+    tmp5 = tbl[4];
+    t4h = tmp4;
+    t4l = tmp5;
+    if (xdb.i[HI] > EXTRABOUND) {
+      /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(FMA(tbl[23],xSqh,tbl[21]),xSqh,tbl[19]),xSqh,tbl[17]),xSqh,tbl[15]);
+#else
+      highPoly = tbl[15] + xSqh * (tbl[17] + xSqh * (tbl[19] + xSqh * (tbl[21] + xSqh * tbl[23])));
+#endif
+
+      /* Double-double precision evaluation */
+      Mul12(&tt1h,&tt1l,xSqh,highPoly);
+      Add22(&t1h,&t1l,tbl[12],tbl[13],tt1h,tt1l);
+      
+      MulAdd212(&t2h,&t2l,tbl[9],tbl[10],xSqh,t1h,t1l);
+      MulAdd212(&t3h,&t3l,tbl[6],tbl[7],xSqh,t2h,t2l);
+      MulAdd22(&t4h,&t4l,tmp4,tmp5,xSqh,xSql,t3h,t3l);
+    }
+
+    MulAdd22(&t5h,&t5l,tbl[0],tbl[1],xSqh,xSql,t4h,t4l);
+
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt6h,&tt6l,xCubeh,xCubel,t5h,t5l);
+    
+    Add12(tmp1,tmp2,x,tt6h);
+    tmp3 = tmp2 + tt6l;
+    Add12(polyh,polyl,tmp1,tmp3);
+
+    /* Multiply by sign */
+    asinh = sign * polyh;
+    asinm = sign * polyl;
+
+    /* Rounding test 
+       The RU rounding constant is at tbl[35]
+    */
+    TEST_AND_RETURN_RU(asinh, asinm, tbl[35]);
+
+    /* Launch accurate phase */
+
+    asin_accurate_lower(&asinh,&asinm,&asinl,x,xSqh,xSql,sign);
+
+    ReturnRoundUpwards3(asinh,asinm,asinl); 
+  }
+
+  if (xdb.i[HI] > BOUND9) {
+    /* Special interval BOUND9..1
+       We use an asymptotic development of arcsin in sqrt(1 - x)
+    */
+
+    /* Argument reduction for quick and accurate phase
+       z = 1 - x
+       The operation is exact as per Sterbenz' lemma
+    */
+
+    z = 1 - x;
+
+    /* Quick phase starts */
+
+    /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	       tbl[TBLIDX10+42] ,z,tbl[TBLIDX10+40]),z,tbl[TBLIDX10+38]),z,
+               tbl[TBLIDX10+36]),z,tbl[TBLIDX10+34]),z,tbl[TBLIDX10+32]),z,
+               tbl[TBLIDX10+30]),z,tbl[TBLIDX10+28]),z,tbl[TBLIDX10+26]),z,
+               tbl[TBLIDX10+24]);
+#else
+    highPoly = tbl[TBLIDX10+24] + z * (tbl[TBLIDX10+26] + z * (tbl[TBLIDX10+28] + z * (
+	       tbl[TBLIDX10+30] + z * (tbl[TBLIDX10+32] + z * (tbl[TBLIDX10+34] + z * (
+	       tbl[TBLIDX10+36] + z * (tbl[TBLIDX10+38] + z * (tbl[TBLIDX10+40] + z * 
+               tbl[TBLIDX10+42]))))))));
+#endif
+    
+    /* Double-double precision evaluation */
+    Mul12(&tt1h,&tt1l,z,highPoly);
+    Add22(&t1h,&t1l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tt1h,tt1l);
+
+    MulAdd212(&t2h,&t2l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],z,t1h,t1l);
+    MulAdd212(&t3h,&t3l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],z,t2h,t2l);
+    MulAdd212(&t4h,&t4l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],z,t3h,t3l);
+    MulAdd212(&t5h,&t5l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],z,t4h,t4l);
+    MulAdd212(&t6h,&t6l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],z,t5h,t5l);
+    MulAdd212(&t7h,&t7l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],z,t6h,t6l);
+    MulAdd212(&t8h,&t8l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],z,t7h,t7l);
+    MulAdd212(&polyh,&polyl,-1,0,z,t8h,t8l);
+
+    /* Compute sqrt(2*z) as a double-double */
+
+    twoZ = 2 * z;
+    sqrt12(&sqrtzh,&sqrtzl,twoZ);                                                         
+
+    /* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+    Mul22(&pTimesSh,&pTimesSl,polyh,polyl,sqrtzh,sqrtzl);                    
+    Add22(&allh,&alll,PIHALFH,PIHALFM,pTimesSh,pTimesSl);       
+
+    /* Multiply by sign */
+    asinh = sign * allh;
+    asinm = sign * alll;
+
+    /* Rounding test 
+       The RU rounding constant is at tbl[TBLIDX10+55]
+    */
+    TEST_AND_RETURN_RU(asinh, asinm, tbl[TBLIDX10+55]);
+
+    /* Launch accurate phase */
+
+    asin_accurate_higher(&asinh,&asinm,&asinl,z,sign);
+
+    ReturnRoundUpwards3(asinh,asinm,asinl); 
+  }
+  
+  /* General 8 main intervals 
+     We can already suppose that BOUND1 <= x <= BOUND9
+  */
+  
+  if (xdb.i[HI] < BOUND5) {
+    if (xdb.i[HI] < BOUND3) {
+      if (xdb.i[HI] < BOUND2) i = TBLIDX2; else i = TBLIDX3;
+    } else {
+      if (xdb.i[HI] < BOUND4) i = TBLIDX4; else i = TBLIDX5;
+    }
+  } else {
+    if (xdb.i[HI] < BOUND7) {
+      if (xdb.i[HI] < BOUND6) i = TBLIDX6; else i = TBLIDX7;
+    } else {
+      if (xdb.i[HI] < BOUND8) i = TBLIDX8; else i = TBLIDX9;
+    }
+  }
+
+  /* Argument reduction 
+     i points to the interval midpoint value in the table
+  */
+  z = x - tbl[i];
+
+  /* Quick phase starts */
+
+  /* Double precision evaluation */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	     tbl[i+35] ,z,tbl[i+33]),z,tbl[i+31]),z,tbl[i+29]),z,
+             tbl[i+27]),z,tbl[i+25]),z,tbl[i+23]),z,tbl[i+21]);
+#else
+  highPoly = tbl[i+21] + z * (tbl[i+23] + z * (tbl[i+25] + z * (
+             tbl[i+27] + z * (tbl[i+29] + z * (tbl[i+31] + z * ( 
+             tbl[i+33] + z *  tbl[i+35]))))));
+#endif
+
+  /* Double-double precision evaluation */
+    
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+18],tbl[i+19],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+15],tbl[i+16],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+12],tbl[i+13],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+9],tbl[i+10],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+6],tbl[i+7],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+3],tbl[i+4],z,t5h,t5l);
+  MulAdd212(&polyh,&polyl,tbl[i+1],tbl[i+2],z,t6h,t6l);
+
+  /* Multiply by sign */
+  asinh = sign * polyh;
+  asinm = sign * polyl;
+
+  /* Rounding test 
+     The RU rounding constant is at tbl[i+60]
+  */
+  TEST_AND_RETURN_RU(asinh, asinm, tbl[i+60]);
+
+  /* Launch accurate phase */
+
+  asin_accurate_middle(&asinh,&asinm,&asinl,z,i,sign);
+
+  ReturnRoundUpwards3(asinh,asinm,asinl); 
+}
+
+double asin_rd(double x) {
+  db_number xdb;
+  double sign, z, asinh, asinm, asinl;
+  int i;
+  double xSqh, xSql;
+  double tt1h, tt1l;
+  double tt6h, tt6l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l;
+  double t7h, t7l, t8h, t8l, polyh, polyl, twoZ, sqrtzh, sqrtzl;
+  double pTimesSh, pTimesSl, allh, alll, highPoly, xCubeh, xCubel;
+  double tmp1, tmp2, tmp3, tmp4, tmp5;
+
+  /* Transform the argument into integer */
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Strip off the sign of argument x */
+  if (xdb.i[HI] & 0x80000000) sign = -1; else sign = 1;
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if ((xdb.i[HI] > 0x3ff00000) || ((xdb.i[HI] == 0x3ff00000) && (xdb.i[LO] != 0x00000000))) {
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* If |x| < 2^(-28) we have
+     
+     arcsin(x) = x * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-55) 
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < 0x3e300000) {
+    /* If x == 0 then we got the algebraic result arcsin(0) = 0
+       If x > 0 then the truncation rest is positive but less than 
+       1 ulp; we round downwards by returning x
+    */
+    if (x >= 0) return x;
+    /* Otherwise the rest is negative, less than 1 ulp and the
+       image is not algebraic 
+       We return x - 1ulp
+       We stripped off the sign, so we add 1 ulp to -x (in xdb.d) and multiply by -1
+    */
+    xdb.l++;
+    return -1 * xdb.d;
+  }
+
+  /* Recast x */
+  x = xdb.d;
+
+  /* Find correspondant interval and compute index to the table
+     We start by filtering the two special cases around 0 and 1
+  */
+
+  if (xdb.i[HI] < BOUND1) {
+    /* Special interval 0..BOUND1 
+       The polynomial has no even monomials
+       We must prove extra accuracy in the interval 0..sin(2^(-18))
+    */
+
+    /* Quick phase starts */
+
+    /* Compute square of x for both quick and accurate phases */
+    Mul12(&xSqh,&xSql,x,x);
+
+    tmp4 = tbl[3];
+    tmp5 = tbl[4];
+    t4h = tmp4;
+    t4l = tmp5;
+    if (xdb.i[HI] > EXTRABOUND) {
+      /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(FMA(tbl[23],xSqh,tbl[21]),xSqh,tbl[19]),xSqh,tbl[17]),xSqh,tbl[15]);
+#else
+      highPoly = tbl[15] + xSqh * (tbl[17] + xSqh * (tbl[19] + xSqh * (tbl[21] + xSqh * tbl[23])));
+#endif
+
+      /* Double-double precision evaluation */
+      Mul12(&tt1h,&tt1l,xSqh,highPoly);
+      Add22(&t1h,&t1l,tbl[12],tbl[13],tt1h,tt1l);
+      
+      MulAdd212(&t2h,&t2l,tbl[9],tbl[10],xSqh,t1h,t1l);
+      MulAdd212(&t3h,&t3l,tbl[6],tbl[7],xSqh,t2h,t2l);
+      MulAdd22(&t4h,&t4l,tmp4,tmp5,xSqh,xSql,t3h,t3l);
+    }
+
+    MulAdd22(&t5h,&t5l,tbl[0],tbl[1],xSqh,xSql,t4h,t4l);
+
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt6h,&tt6l,xCubeh,xCubel,t5h,t5l);
+    
+    Add12(tmp1,tmp2,x,tt6h);
+    tmp3 = tmp2 + tt6l;
+    Add12(polyh,polyl,tmp1,tmp3);
+
+    /* Multiply by sign */
+    asinh = sign * polyh;
+    asinm = sign * polyl;
+
+    /* Rounding test 
+       The RD rounding constant is at tbl[35]
+    */
+    TEST_AND_RETURN_RD(asinh, asinm, tbl[35]);
+
+    /* Launch accurate phase */
+
+    asin_accurate_lower(&asinh,&asinm,&asinl,x,xSqh,xSql,sign);
+
+    ReturnRoundDownwards3(asinh,asinm,asinl); 
+  }
+
+  if (xdb.i[HI] > BOUND9) {
+    /* Special interval BOUND9..1
+       We use an asymptotic development of arcsin in sqrt(1 - x)
+    */
+
+    /* Argument reduction for quick and accurate phase
+       z = 1 - x
+       The operation is exact as per Sterbenz' lemma
+    */
+
+    z = 1 - x;
+
+    /* Quick phase starts */
+
+    /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	       tbl[TBLIDX10+42] ,z,tbl[TBLIDX10+40]),z,tbl[TBLIDX10+38]),z,
+               tbl[TBLIDX10+36]),z,tbl[TBLIDX10+34]),z,tbl[TBLIDX10+32]),z,
+               tbl[TBLIDX10+30]),z,tbl[TBLIDX10+28]),z,tbl[TBLIDX10+26]),z,
+               tbl[TBLIDX10+24]);
+#else
+    highPoly = tbl[TBLIDX10+24] + z * (tbl[TBLIDX10+26] + z * (tbl[TBLIDX10+28] + z * (
+	       tbl[TBLIDX10+30] + z * (tbl[TBLIDX10+32] + z * (tbl[TBLIDX10+34] + z * (
+	       tbl[TBLIDX10+36] + z * (tbl[TBLIDX10+38] + z * (tbl[TBLIDX10+40] + z * 
+               tbl[TBLIDX10+42]))))))));
+#endif
+    
+    /* Double-double precision evaluation */
+    Mul12(&tt1h,&tt1l,z,highPoly);
+    Add22(&t1h,&t1l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tt1h,tt1l);
+
+    MulAdd212(&t2h,&t2l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],z,t1h,t1l);
+    MulAdd212(&t3h,&t3l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],z,t2h,t2l);
+    MulAdd212(&t4h,&t4l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],z,t3h,t3l);
+    MulAdd212(&t5h,&t5l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],z,t4h,t4l);
+    MulAdd212(&t6h,&t6l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],z,t5h,t5l);
+    MulAdd212(&t7h,&t7l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],z,t6h,t6l);
+    MulAdd212(&t8h,&t8l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],z,t7h,t7l);
+    MulAdd212(&polyh,&polyl,-1,0,z,t8h,t8l);
+
+    /* Compute sqrt(2*z) as a double-double */
+
+    twoZ = 2 * z;
+    sqrt12(&sqrtzh,&sqrtzl,twoZ);                                                         
+
+    /* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+    Mul22(&pTimesSh,&pTimesSl,polyh,polyl,sqrtzh,sqrtzl);                    
+    Add22(&allh,&alll,PIHALFH,PIHALFM,pTimesSh,pTimesSl);       
+
+    /* Multiply by sign */
+    asinh = sign * allh;
+    asinm = sign * alll;
+
+    /* Rounding test 
+       The RD rounding constant is at tbl[TBLIDX10+55]
+    */
+    TEST_AND_RETURN_RD(asinh, asinm, tbl[TBLIDX10+55]);
+
+    /* Launch accurate phase */
+
+    asin_accurate_higher(&asinh,&asinm,&asinl,z,sign);
+
+    ReturnRoundDownwards3(asinh,asinm,asinl); 
+  }
+  
+  /* General 8 main intervals 
+     We can already suppose that BOUND1 <= x <= BOUND9
+  */
+  
+  if (xdb.i[HI] < BOUND5) {
+    if (xdb.i[HI] < BOUND3) {
+      if (xdb.i[HI] < BOUND2) i = TBLIDX2; else i = TBLIDX3;
+    } else {
+      if (xdb.i[HI] < BOUND4) i = TBLIDX4; else i = TBLIDX5;
+    }
+  } else {
+    if (xdb.i[HI] < BOUND7) {
+      if (xdb.i[HI] < BOUND6) i = TBLIDX6; else i = TBLIDX7;
+    } else {
+      if (xdb.i[HI] < BOUND8) i = TBLIDX8; else i = TBLIDX9;
+    }
+  }
+
+  /* Argument reduction 
+     i points to the interval midpoint value in the table
+  */
+  z = x - tbl[i];
+
+  /* Quick phase starts */
+
+  /* Double precision evaluation */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	     tbl[i+35] ,z,tbl[i+33]),z,tbl[i+31]),z,tbl[i+29]),z,
+             tbl[i+27]),z,tbl[i+25]),z,tbl[i+23]),z,tbl[i+21]);
+#else
+  highPoly = tbl[i+21] + z * (tbl[i+23] + z * (tbl[i+25] + z * (
+             tbl[i+27] + z * (tbl[i+29] + z * (tbl[i+31] + z * ( 
+             tbl[i+33] + z *  tbl[i+35]))))));
+#endif
+
+  /* Double-double precision evaluation */
+    
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+18],tbl[i+19],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+15],tbl[i+16],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+12],tbl[i+13],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+9],tbl[i+10],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+6],tbl[i+7],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+3],tbl[i+4],z,t5h,t5l);
+  MulAdd212(&polyh,&polyl,tbl[i+1],tbl[i+2],z,t6h,t6l);
+
+  /* Multiply by sign */
+  asinh = sign * polyh;
+  asinm = sign * polyl;
+
+  /* Rounding test 
+     The RD rounding constant is at tbl[i+60]
+  */
+  TEST_AND_RETURN_RD(asinh, asinm, tbl[i+60]);
+
+  /* Launch accurate phase */
+
+  asin_accurate_middle(&asinh,&asinm,&asinl,z,i,sign);
+
+  ReturnRoundDownwards3(asinh,asinm,asinl); 
+}
+
+double asin_rz(double x) {
+  db_number xdb;
+  double sign, z, asinh, asinm, asinl;
+  int i;
+  double xSqh, xSql;
+  double tt1h, tt1l;
+  double tt6h, tt6l;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l;
+  double t7h, t7l, t8h, t8l, polyh, polyl, twoZ, sqrtzh, sqrtzl;
+  double pTimesSh, pTimesSl, allh, alll, highPoly, xCubeh, xCubel;
+  double tmp1, tmp2, tmp3, tmp4, tmp5;
+
+  /* Transform the argument into integer */
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Strip off the sign of argument x */
+  if (xdb.i[HI] & 0x80000000) sign = -1; else sign = 1;
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if ((xdb.i[HI] > 0x3ff00000) || ((xdb.i[HI] == 0x3ff00000) && (xdb.i[LO] != 0x00000000))) {
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* If |x| < 2^(-28) we have
+     
+     arcsin(x) = x * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-55) 
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < 0x3e300000) {
+    /* If x == 0 the result is algebraic and equal to 0
+       If x < 0 the truncation rest is negative and less than 1 ulp, we return x
+       If x > 0 the truncation rest is positive and less than 1 ulp, we return x
+    */
+    return x;
+  }  
+
+  /* Recast x */
+  x = xdb.d;
+
+  /* Find correspondant interval and compute index to the table
+     We start by filtering the two special cases around 0 and 1
+  */
+
+  if (xdb.i[HI] < BOUND1) {
+    /* Special interval 0..BOUND1 
+       The polynomial has no even monomials
+       We must prove extra accuracy in the interval 0..sin(2^(-18))
+    */
+
+    /* Quick phase starts */
+
+    /* Compute square of x for both quick and accurate phases */
+    Mul12(&xSqh,&xSql,x,x);
+
+    tmp4 = tbl[3];
+    tmp5 = tbl[4];
+    t4h = tmp4;
+    t4l = tmp5;
+    if (xdb.i[HI] > EXTRABOUND) {
+      /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(FMA(tbl[23],xSqh,tbl[21]),xSqh,tbl[19]),xSqh,tbl[17]),xSqh,tbl[15]);
+#else
+      highPoly = tbl[15] + xSqh * (tbl[17] + xSqh * (tbl[19] + xSqh * (tbl[21] + xSqh * tbl[23])));
+#endif
+
+      /* Double-double precision evaluation */
+      Mul12(&tt1h,&tt1l,xSqh,highPoly);
+      Add22(&t1h,&t1l,tbl[12],tbl[13],tt1h,tt1l);
+      
+      MulAdd212(&t2h,&t2l,tbl[9],tbl[10],xSqh,t1h,t1l);
+      MulAdd212(&t3h,&t3l,tbl[6],tbl[7],xSqh,t2h,t2l);
+      MulAdd22(&t4h,&t4l,tmp4,tmp5,xSqh,xSql,t3h,t3l);
+    }
+
+    MulAdd22(&t5h,&t5l,tbl[0],tbl[1],xSqh,xSql,t4h,t4l);
+
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt6h,&tt6l,xCubeh,xCubel,t5h,t5l);
+    
+    Add12(tmp1,tmp2,x,tt6h);
+    tmp3 = tmp2 + tt6l;
+    Add12(polyh,polyl,tmp1,tmp3);
+
+    /* Multiply by sign */
+    asinh = sign * polyh;
+    asinm = sign * polyl;
+
+    /* Rounding test 
+       The RZ rounding constant is at tbl[35]
+    */
+    TEST_AND_RETURN_RZ(asinh, asinm, tbl[35]);
+
+    /* Launch accurate phase */
+
+    asin_accurate_lower(&asinh,&asinm,&asinl,x,xSqh,xSql,sign);
+
+    ReturnRoundTowardsZero3(asinh,asinm,asinl); 
+  }
+
+  if (xdb.i[HI] > BOUND9) {
+    /* Special interval BOUND9..1
+       We use an asymptotic development of arcsin in sqrt(1 - x)
+    */
+
+    /* Argument reduction for quick and accurate phase
+       z = 1 - x
+       The operation is exact as per Sterbenz' lemma
+    */
+
+    z = 1 - x;
+
+    /* Quick phase starts */
+
+    /* Double precision evaluation */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	       tbl[TBLIDX10+42] ,z,tbl[TBLIDX10+40]),z,tbl[TBLIDX10+38]),z,
+               tbl[TBLIDX10+36]),z,tbl[TBLIDX10+34]),z,tbl[TBLIDX10+32]),z,
+               tbl[TBLIDX10+30]),z,tbl[TBLIDX10+28]),z,tbl[TBLIDX10+26]),z,
+               tbl[TBLIDX10+24]);
+#else
+    highPoly = tbl[TBLIDX10+24] + z * (tbl[TBLIDX10+26] + z * (tbl[TBLIDX10+28] + z * (
+	       tbl[TBLIDX10+30] + z * (tbl[TBLIDX10+32] + z * (tbl[TBLIDX10+34] + z * (
+	       tbl[TBLIDX10+36] + z * (tbl[TBLIDX10+38] + z * (tbl[TBLIDX10+40] + z * 
+               tbl[TBLIDX10+42]))))))));
+#endif
+    
+    /* Double-double precision evaluation */
+    Mul12(&tt1h,&tt1l,z,highPoly);
+    Add22(&t1h,&t1l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tt1h,tt1l);
+
+    MulAdd212(&t2h,&t2l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],z,t1h,t1l);
+    MulAdd212(&t3h,&t3l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],z,t2h,t2l);
+    MulAdd212(&t4h,&t4l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],z,t3h,t3l);
+    MulAdd212(&t5h,&t5l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],z,t4h,t4l);
+    MulAdd212(&t6h,&t6l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],z,t5h,t5l);
+    MulAdd212(&t7h,&t7l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],z,t6h,t6l);
+    MulAdd212(&t8h,&t8l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],z,t7h,t7l);
+    MulAdd212(&polyh,&polyl,-1,0,z,t8h,t8l);
+
+    /* Compute sqrt(2*z) as a double-double */
+
+    twoZ = 2 * z;
+    sqrt12(&sqrtzh,&sqrtzl,twoZ);                                                         
+
+    /* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+    Mul22(&pTimesSh,&pTimesSl,polyh,polyl,sqrtzh,sqrtzl);                    
+    Add22(&allh,&alll,PIHALFH,PIHALFM,pTimesSh,pTimesSl);       
+
+    /* Multiply by sign */
+    asinh = sign * allh;
+    asinm = sign * alll;
+
+    /* Rounding test 
+       The RZ rounding constant is at tbl[TBLIDX10+55]
+    */
+    TEST_AND_RETURN_RZ(asinh, asinm, tbl[TBLIDX10+55]);
+
+    /* Launch accurate phase */
+
+    asin_accurate_higher(&asinh,&asinm,&asinl,z,sign);
+
+    ReturnRoundTowardsZero3(asinh,asinm,asinl); 
+  }
+  
+  /* General 8 main intervals 
+     We can already suppose that BOUND1 <= x <= BOUND9
+  */
+  
+  if (xdb.i[HI] < BOUND5) {
+    if (xdb.i[HI] < BOUND3) {
+      if (xdb.i[HI] < BOUND2) i = TBLIDX2; else i = TBLIDX3;
+    } else {
+      if (xdb.i[HI] < BOUND4) i = TBLIDX4; else i = TBLIDX5;
+    }
+  } else {
+    if (xdb.i[HI] < BOUND7) {
+      if (xdb.i[HI] < BOUND6) i = TBLIDX6; else i = TBLIDX7;
+    } else {
+      if (xdb.i[HI] < BOUND8) i = TBLIDX8; else i = TBLIDX9;
+    }
+  }
+
+  /* Argument reduction 
+     i points to the interval midpoint value in the table
+  */
+  z = x - tbl[i];
+
+  /* Quick phase starts */
+
+  /* Double precision evaluation */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(FMA(FMA(FMA(
+	     tbl[i+35] ,z,tbl[i+33]),z,tbl[i+31]),z,tbl[i+29]),z,
+             tbl[i+27]),z,tbl[i+25]),z,tbl[i+23]),z,tbl[i+21]);
+#else
+  highPoly = tbl[i+21] + z * (tbl[i+23] + z * (tbl[i+25] + z * (
+             tbl[i+27] + z * (tbl[i+29] + z * (tbl[i+31] + z * ( 
+             tbl[i+33] + z *  tbl[i+35]))))));
+#endif
+
+  /* Double-double precision evaluation */
+    
+  Mul12(&tt1h,&tt1l,z,highPoly);
+  Add22(&t1h,&t1l,tbl[i+18],tbl[i+19],tt1h,tt1l);
+
+  MulAdd212(&t2h,&t2l,tbl[i+15],tbl[i+16],z,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[i+12],tbl[i+13],z,t2h,t2l);
+  MulAdd212(&t4h,&t4l,tbl[i+9],tbl[i+10],z,t3h,t3l);
+  MulAdd212(&t5h,&t5l,tbl[i+6],tbl[i+7],z,t4h,t4l);
+  MulAdd212(&t6h,&t6l,tbl[i+3],tbl[i+4],z,t5h,t5l);
+  MulAdd212(&polyh,&polyl,tbl[i+1],tbl[i+2],z,t6h,t6l);
+
+  /* Multiply by sign */
+  asinh = sign * polyh;
+  asinm = sign * polyl;
+
+  /* Rounding test 
+     The RZ rounding constant is at tbl[i+60]
+  */
+  TEST_AND_RETURN_RZ(asinh, asinm, tbl[i+60]);
+
+  /* Launch accurate phase */
+
+  asin_accurate_middle(&asinh,&asinm,&asinl,z,i,sign);
+
+  ReturnRoundTowardsZero3(asinh,asinm,asinl); 
+}
+
+
+
+
+
+
+
+
+
diff --git a/src/crlibm/asin-td.h b/src/crlibm/asin-td.h
new file mode 100644
index 0000000..627c0a0
--- /dev/null
+++ b/src/crlibm/asin-td.h
@@ -0,0 +1,620 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/* File generated by maple/asin-td.mpl */
+
+/* High order words of interval bounds (low order word is 0) */
+#define BOUND1 0x3FC7AE14
+#define BOUND2 0x3FD32E91
+#define BOUND3 0x3FD9CA24
+#define BOUND4 0x3FDF90B3
+#define BOUND5 0x3FE23ADC
+#define BOUND6 0x3FE4781D
+#define BOUND7 0x3FE647BB
+#define BOUND8 0x3FE7BC81
+#define BOUND9 0x3FE8F5C2
+#define EXTRABOUND 0x3F500000
+
+
+/* Pi/2 as a triple-double*/
+#define PIHALFH 1.57079632679489655799898173427209258079528808593750e+00
+#define PIHALFM 6.12323399573676603586882014729198302312846062338790e-17
+#define PIHALFL -1.49738490485916983294350817710599200835275047616952e-33
+
+
+/* Indices to the following table */
+#define TBLIDX2 36
+#define TBLIDX3 97
+#define TBLIDX4 158
+#define TBLIDX5 219
+#define TBLIDX6 280
+#define TBLIDX7 341
+#define TBLIDX8 402
+#define TBLIDX9 463
+#define TBLIDX10 524
+
+
+/* Table with midpoints and polynomial coefficients */
+static const double tbl[580] = {
+1.66666666666666657414808128123695496469736099243164e-01, 	/* 0, accPolyLowC3h, quickPolyLowC3h */
+9.25185853854297065661561206416060845590588197735272e-18, 	/* 1, accPolyLowC3m, quickPolyLowC3l */
+5.13580782192052290146917464639635163327575367072527e-34, 	/* 2, accPolyLowC3l */
+7.49999999999999972244424384371086489409208297729492e-02, 	/* 3, accPolyLowC5h, quickPolyLowC5h */
+2.77555756156289150513347472120591902572823540679419e-18, 	/* 4, accPolyLowC5m, quickPolyLowC5l */
+-1.43929408167863119589461549455410834291155585333144e-34, 	/* 5, accPolyLowC5l */
+4.46428571428571438484134148438897682353854179382324e-02, 	/* 6, accPolyLowC7h, quickPolyLowC7h */
+-9.91270557701064540788749549275225920938048550224136e-19, 	/* 7, accPolyLowC7m, quickPolyLowC7l */
+3.33748090721822991762574824757600091731436462508019e-35, 	/* 8, accPolyLowC7l */
+3.03819444444444440589503386718206456862390041351318e-02, 	/* 9, accPolyLowC9h, quickPolyLowC9h */
+3.85494105812324030564107341625454073114449944250081e-19, 	/* 10, accPolyLowC9m, quickPolyLowC9l */
+-1.43865090242821346711405668429425189868490718470116e-36, 	/* 11, accPolyLowC9l */
+2.23721590909090918553037141691675060428678989410400e-02, 	/* 12, accPolyLowC11h, quickPolyLowC11h */
+-9.46212831143868745925658651601400487408631908148174e-19, 	/* 13, accPolyLowC11m, quickPolyLowC11l */
+2.71756033709005426155900473576766627205226477546134e-36, 	/* 14, accPolyLowC11l */
+1.73527644230769238775646812200648128055036067962646e-02, 	/* 15, accPolyLowC13h, quickPolyLowC13h */
+-8.00631194349979385750725428497500824341216859291999e-19, 	/* 16, accPolyLowC13m */
+1.39648437500000006938893903907228377647697925567627e-02, 	/* 17, accPolyLowC15h, quickPolyLowC15h */
+-6.96640576418186252434826298980545123112053091491650e-19, 	/* 18, accPolyLowC15m */
+1.15518008961397068007359578700743441004306077957153e-02, 	/* 19, accPolyLowC17h, quickPolyLowC17h */
+-4.10583074045422929898575008733550170923265860856307e-19, 	/* 20, accPolyLowC17m */
+9.76160952919401074534544449079476180486381053924561e-03, 	/* 21, accPolyLowC19h, quickPolyLowC19h */
+3.58257464358998522024321439568214748872569190564464e-19, 	/* 22, accPolyLowC19m */
+8.39033580962353364718353532225592061877250671386719e-03, 	/* 23, accPolyLowC21h, quickPolyLowC21h */
+7.09494992486164270601178799400238696830257336508353e-20, 	/* 24, accPolyLowC21m */
+7.31252587309846099200560942676929698791354894638062e-03, 	/* 25, accPolyLowC23h */
+3.10147942381298802750887889395221073583507364742961e-19, 	/* 26, accPolyLowC23m */
+6.44721034012319445943850482194648066069930791854858e-03, 	/* 27, accPolyLowC25h */
+5.74003646399263555560876781669321644585579633712769e-03, 	/* 28, accPolyLowC27h */
+5.15334845775329911110596015078044729307293891906738e-03, 	/* 29, accPolyLowC29h */
+4.65922376559379288613049752143524528946727514266968e-03, 	/* 30, accPolyLowC31h */
+4.25648267385331235956869022629689425230026245117188e-03, 	/* 31, accPolyLowC33h */
+3.70384206863821549560178425508638611063361167907715e-03, 	/* 32, accPolyLowC35h */
+4.76149788232017000255691385746104060672223567962646e-03, 	/* 33, accPolyLowC37h */
+1.01829039548491739886060258868383243680000305175781e+00, 	/* 34, RN rounding constant quick poly low*/
+9.99456520626465193846360776661410034560333454445527e-19, 	/* 35, RD rounding constant quick poly low*/
+2.42358565330489938993707710324088111519813537597656e-01, 	/* 36, midpoint in interval 2*/
+2.44796158322043572175275016888917889446020126342773e-01, 	/* 37, accPolyMid2C0h, quickPolyMid2C0h */
+-7.80764437719474476036120943295127199090063761923808e-18, 	/* 38, accPolyMid2C0m, quickPolyMid2C0l */
+1.03072939530366736171629327145637944340705871582031e+00, 	/* 39, accPolyMid2C1h, quickPolyMid2C1h */
+-8.85738929015520959086405013050480695702241994387953e-17, 	/* 40, accPolyMid2C1m, quickPolyMid2C1l */
+-3.43332793693232296155057781643135490790330671255580e-33, 	/* 41, accPolyMid2C1l */
+1.32697384480218755209435244069027248769998550415039e-01, 	/* 42, accPolyMid2C2h, quickPolyMid2C2h */
+-3.05519908299053827321743308736081906443885446585898e-18, 	/* 43, accPolyMid2C2m, quickPolyMid2C2l */
+1.84968471282800310046349200266639560111473343387153e-34, 	/* 44, accPolyMid2C2l */
+2.16675601140875473404889817174989730119705200195312e-01, 	/* 45, accPolyMid2C3h, quickPolyMid2C3h */
+-1.09855192148394476119822843562855651270724326884774e-18, 	/* 46, accPolyMid2C3m, quickPolyMid2C3l */
+1.30965185306611444030805369954695892224998714815939e-35, 	/* 47, accPolyMid2C3l */
+1.16730419643667523987851097899692831560969352722168e-01, 	/* 48, accPolyMid2C4h, quickPolyMid2C4h */
+4.87619704882669077472238320833491156897798846867617e-18, 	/* 49, accPolyMid2C4m, quickPolyMid2C4l */
+2.44421677078199513698242322477237313066476585423275e-34, 	/* 50, accPolyMid2C4l */
+1.45667026718228842518954024853883311152458190917969e-01, 	/* 51, accPolyMid2C5h, quickPolyMid2C5h */
+5.36594969153474426628449995112694156468179831261122e-19, 	/* 52, accPolyMid2C5m, quickPolyMid2C5l */
+8.48516201835513020738766305454795330663195678132569e-36, 	/* 53, accPolyMid2C5l */
+1.22401266966440255834491779296513414010405540466309e-01, 	/* 54, accPolyMid2C6h, quickPolyMid2C6h */
+-2.20822551943355103564859204431825679093840107651564e-19, 	/* 55, accPolyMid2C6m, quickPolyMid2C6l */
+-8.07441439403117291580512089023909180599052269668925e-36, 	/* 56, accPolyMid2C6l */
+1.41642750696223979067767118067422416061162948608398e-01, 	/* 57, accPolyMid2C7h, quickPolyMid2C7h */
+8.52401858052517523392878261510621535534995050169401e-18, 	/* 58, accPolyMid2C7m, quickPolyMid2C7l */
+1.42861418735328621343327881731966044753789901733398e-01, 	/* 59, accPolyMid2C8h, quickPolyMid2C8h */
+-1.33006668328318919665132697553096363383321713310227e-17, 	/* 60, accPolyMid2C8m */
+1.63718343060216098283632391030550934374332427978516e-01, 	/* 61, accPolyMid2C9h, quickPolyMid2C9h */
+6.13394557799256408251130704849071363459255390907063e-18, 	/* 62, accPolyMid2C9m */
+1.79592723769284340340490757625957485288381576538086e-01, 	/* 63, accPolyMid2C10h, quickPolyMid2C10h */
+-1.30198260064097970981442998070110461849845662150849e-17, 	/* 64, accPolyMid2C10m */
+2.07951828711086583734157784419949166476726531982422e-01, 	/* 65, accPolyMid2C11h, quickPolyMid2C11h */
+-1.26159975996932877835486818675875580593424383227469e-17, 	/* 66, accPolyMid2C11m */
+2.38247271379822073145149374795437324792146682739258e-01, 	/* 67, accPolyMid2C12h, quickPolyMid2C12h */
+6.62361216505959744828122635016705548667940611263800e-18, 	/* 68, accPolyMid2C12m */
+2.79893913215572998076652311283396556973457336425781e-01, 	/* 69, accPolyMid2C13h, quickPolyMid2C13h */
+-2.24149827195062967543013296493616902343167004009288e-17, 	/* 70, accPolyMid2C13m */
+3.28958991769599307097848850389709696173667907714844e-01, 	/* 71, accPolyMid2C14h, quickPolyMid2C14h */
+-1.05211249452308945191032281708802957418482198191124e-17, 	/* 72, accPolyMid2C14m */
+3.91766249806127564436764032507198862731456756591797e-01, 	/* 73, accPolyMid2C15h */
+-2.02194096713130520849748106020797136930683180643846e-17, 	/* 74, accPolyMid2C15m */
+4.68246642053942785377529389734263531863689422607422e-01, 	/* 75, accPolyMid2C16h */
+5.64148787932559847568825261987512931227684020996094e-01, 	/* 76, accPolyMid2C17h */
+6.82488400757435664800709673727396875619888305664062e-01, 	/* 77, accPolyMid2C18h */
+8.30182127559316640486031246837228536605834960937500e-01, 	/* 78, accPolyMid2C19h */
+1.01367533043020308092252435017144307494163513183594e+00, 	/* 79, accPolyMid2C20h */
+1.24281078928695176699648072826676070690155029296875e+00, 	/* 80, accPolyMid2C21h */
+1.52877587404435177909078902303008362650871276855469e+00, 	/* 81, accPolyMid2C22h */
+1.88667637664635656769007709954166784882545471191406e+00, 	/* 82, accPolyMid2C23h */
+2.33494551765288571587575461308006197214126586914062e+00, 	/* 83, accPolyMid2C24h */
+2.89749244536000327698843648249749094247817993164062e+00, 	/* 84, accPolyMid2C25h */
+3.60426450740106130155027130967937409877777099609375e+00, 	/* 85, accPolyMid2C26h */
+4.49361107526955017021919047692790627479553222656250e+00, 	/* 86, accPolyMid2C27h */
+5.61406255377128715622347954194992780685424804687500e+00, 	/* 87, accPolyMid2C28h */
+7.02754870503224271516273802262730896472930908203125e+00, 	/* 88, accPolyMid2C29h */
+8.81280667340759649164283473510295152664184570312500e+00, 	/* 89, accPolyMid2C30h */
+1.10704407960507111852166417520493268966674804687500e+01, 	/* 90, accPolyMid2C31h */
+1.39282518419665830577969245496205985546112060546875e+01, 	/* 91, accPolyMid2C32h */
+1.75308292529565719064521545078605413436889648437500e+01, 	/* 92, accPolyMid2C33h */
+2.21169075633838900785121950320899486541748046875000e+01, 	/* 93, accPolyMid2C34h */
+2.93386309556562245859367976663634181022644042968750e+01, 	/* 94, accPolyMid2C35h */
+1.01656637119000103908206256164703518152236938476562e+00, 	/* 95, RN rounding constant quick poly middle 2*/
+9.05249299973766985475925981961240072045593429326050e-19, 	/* 96, RD rounding constant quick poly middle 2*/
+3.51339936256424290039745983449392952024936676025391e-01, 	/* 97, midpoint in interval 3*/
+3.59001896704258527392994437832385301589965820312500e-01, 	/* 98, accPolyMid3C0h, quickPolyMid3C0h */
+7.25234535377983806008993135801969933842904099082037e-20, 	/* 99, accPolyMid3C0m, quickPolyMid3C0l */
+1.06809311097735548656828541425056755542755126953125e+00, 	/* 100, accPolyMid3C1h, quickPolyMid3C1h */
+8.06569140638077604165107730077659782400969546746483e-17, 	/* 101, accPolyMid3C1m, quickPolyMid3C1l */
+-5.04406564603486171676187418521136112402329884904383e-33, 	/* 102, accPolyMid3C1l */
+2.14054747447713134000935042422497645020484924316406e-01, 	/* 103, accPolyMid3C2h, quickPolyMid3C2h */
+9.76056255097027764696827253384241478483311533093656e-18, 	/* 104, accPolyMid3C2m, quickPolyMid3C2l */
+-7.76857615284538540734861101748988881714638362963881e-35, 	/* 105, accPolyMid3C2l */
+2.88880884175958529969108212753781117498874664306641e-01, 	/* 106, accPolyMid3C3h, quickPolyMid3C3h */
+2.22181200821645624650165429361546283225838059740631e-17, 	/* 107, accPolyMid3C3m, quickPolyMid3C3l */
+-1.14368045348414878337189405350442917783836545775590e-33, 	/* 108, accPolyMid3C3l */
+2.26134851489718013972662902233423665165901184082031e-01, 	/* 109, accPolyMid3C4h, quickPolyMid3C4h */
+-8.04753534970505104224953947907869405284151781535028e-18, 	/* 110, accPolyMid3C4m, quickPolyMid3C4l */
+4.22557384286705919324956002465313457843707737945963e-34, 	/* 111, accPolyMid3C4l */
+2.75196923580072527748541233449941501021385192871094e-01, 	/* 112, accPolyMid3C5h, quickPolyMid3C5h */
+-1.17338666986909136966078634618924264888220762222419e-18, 	/* 113, accPolyMid3C5m, quickPolyMid3C5l */
+-4.68757737099062213529607300203132104484914350463871e-35, 	/* 114, accPolyMid3C5l */
+3.03044495521890500100425924756564199924468994140625e-01, 	/* 115, accPolyMid3C6h, quickPolyMid3C6h */
+-2.27411416594910816511289518687103845115091724313899e-17, 	/* 116, accPolyMid3C6m, quickPolyMid3C6l */
+2.34762544350785348445971766662785127027332739123595e-34, 	/* 117, accPolyMid3C6l */
+3.77749573081396394780284708758699707686901092529297e-01, 	/* 118, accPolyMid3C7h, quickPolyMid3C7h */
+7.89247891096042648893247867692397394548591651092283e-18, 	/* 119, accPolyMid3C7m, quickPolyMid3C7l */
+4.68287147615184806692667507377336733043193817138672e-01, 	/* 120, accPolyMid3C8h, quickPolyMid3C8h */
+1.75668374099909928545987828472120658936175220036884e-17, 	/* 121, accPolyMid3C8m */
+6.06111063535901939403061078337486833333969116210938e-01, 	/* 122, accPolyMid3C9h, quickPolyMid3C9h */
+1.72730090011832304135009947489517024111046794620020e-17, 	/* 123, accPolyMid3C9m */
+7.92895790821915635859795656870119273662567138671875e-01, 	/* 124, accPolyMid3C10h, quickPolyMid3C10h */
+4.98295614974968378037947765656866085023078681863398e-17, 	/* 125, accPolyMid3C10m */
+1.05810730062141522545005045685684308409690856933594e+00, 	/* 126, accPolyMid3C11h, quickPolyMid3C11h */
+8.05577049603995800072512132781137905047707942749781e-17, 	/* 127, accPolyMid3C11m */
+1.42745521004660447239587028889218345284461975097656e+00, 	/* 128, accPolyMid3C12h, quickPolyMid3C12h */
+-4.55985728468522936328504707804310204497673421624067e-17, 	/* 129, accPolyMid3C12m */
+1.94854789175488596342233904579188674688339233398438e+00, 	/* 130, accPolyMid3C13h, quickPolyMid3C13h */
+3.84783704422594121999348237839996274693704597202448e-17, 	/* 131, accPolyMid3C13m */
+2.68312408725385909136207374103832989931106567382812e+00, 	/* 132, accPolyMid3C14h, quickPolyMid3C14h */
+-3.56068007836116005017028996147996121343986693197868e-17, 	/* 133, accPolyMid3C14m */
+3.72473732217660824517224682494997978210449218750000e+00, 	/* 134, accPolyMid3C15h */
+-5.87298986037438700709055565377465605786708153319628e-17, 	/* 135, accPolyMid3C15m */
+5.20573944915823361156981263775378465652465820312500e+00, 	/* 136, accPolyMid3C16h */
+7.31989734855592644180433126166462898254394531250000e+00, 	/* 137, accPolyMid3C17h */
+1.03473141302088169624084912356920540332794189453125e+01, 	/* 138, accPolyMid3C18h */
+1.46964937699531184023271634941920638084411621093750e+01, 	/* 139, accPolyMid3C19h */
+2.09624579630017748854697856586426496505737304687500e+01, 	/* 140, accPolyMid3C20h */
+3.00147629377676423700904706493020057678222656250000e+01, 	/* 141, accPolyMid3C21h */
+4.31254748908798717366153141483664512634277343750000e+01, 	/* 142, accPolyMid3C22h */
+6.21591110441626426563743734732270240783691406250000e+01, 	/* 143, accPolyMid3C23h */
+8.98523523311889533715657307766377925872802734375000e+01, 	/* 144, accPolyMid3C24h */
+1.30228138287161243624723283573985099792480468750000e+02, 	/* 145, accPolyMid3C25h */
+1.89208159704443204418566892854869365692138671875000e+02, 	/* 146, accPolyMid3C26h */
+2.75520543663640125942038139328360557556152343750000e+02, 	/* 147, accPolyMid3C27h */
+4.02045721388318213485035812482237815856933593750000e+02, 	/* 148, accPolyMid3C28h */
+5.87814144421144646912580356001853942871093750000000e+02, 	/* 149, accPolyMid3C29h */
+8.60974558223577218996069859713315963745117187500000e+02, 	/* 150, accPolyMid3C30h */
+1.26323081508058703548158518970012664794921875000000e+03, 	/* 151, accPolyMid3C31h */
+1.85633061099108476810215506702661514282226562500000e+03, 	/* 152, accPolyMid3C32h */
+2.72831792235129523760406300425529479980468750000000e+03, 	/* 153, accPolyMid3C33h */
+4.02017366871190233723609708249568939208984375000000e+03, 	/* 154, accPolyMid3C34h */
+6.26169941241203287063399329781532287597656250000000e+03, 	/* 155, accPolyMid3C35h */
+1.01822826558956558429258620890323072671890258789062e+00, 	/* 156, RN rounding constant quick poly middle 3*/
+9.96061507703610851328544443284249848383807032724405e-19, 	/* 157, RD rounding constant quick poly middle 3*/
+4.48084712028450460330475380033021792769432067871094e-01, 	/* 158, midpoint in interval 4*/
+4.64621784296265272207193675058078952133655548095703e-01, 	/* 159, accPolyMid4C0h, quickPolyMid4C0h */
+5.46463478154141631687941857567549378870836612391668e-19, 	/* 160, accPolyMid4C0m, quickPolyMid4C0l */
+1.11857936563137916330390453367726877331733703613281e+00, 	/* 161, accPolyMid4C1h, quickPolyMid4C1h */
+-7.52084787570938032181667127523977366268049041253541e-17, 	/* 162, accPolyMid4C1m, quickPolyMid4C1l */
+-2.09600667283052949148765250630641631769479132030207e-33, 	/* 163, accPolyMid4C1l */
+3.13567137932624417917537584798992611467838287353516e-01, 	/* 164, accPolyMid4C2h, quickPolyMid4C2h */
+-4.41710443385272069717070263863657699262849649693148e-18, 	/* 165, accPolyMid4C2m, quickPolyMid4C2l */
+-1.66857777421172326251970639278136259133415308172276e-34, 	/* 166, accPolyMid4C2l */
+4.09066962553200574870260197712923400104045867919922e-01, 	/* 167, accPolyMid4C3h, quickPolyMid4C3h */
+-1.77243968292023797220078441566237340174840093946990e-17, 	/* 168, accPolyMid4C3m, quickPolyMid4C3l */
+1.04993340346633219191766382762445818927028795922212e-33, 	/* 169, accPolyMid4C3l */
+4.17460970109683637829789404349867254495620727539062e-01, 	/* 170, accPolyMid4C4h, quickPolyMid4C4h */
+1.39418041407988360348752433713233257018150500547568e-17, 	/* 171, accPolyMid4C4m, quickPolyMid4C4l */
+1.44515287253394191526867297316859284672731580248765e-33, 	/* 172, accPolyMid4C4l */
+5.57995436127318722441259524202905595302581787109375e-01, 	/* 173, accPolyMid4C5h, quickPolyMid4C5h */
+4.36037702989507667583407786816694605825360677277616e-17, 	/* 174, accPolyMid4C5m, quickPolyMid4C5l */
+-1.19172250052693786129959971158569652849573416545361e-33, 	/* 175, accPolyMid4C5l */
+7.47841169204912281642805282899644225835800170898438e-01, 	/* 176, accPolyMid4C6h, quickPolyMid4C6h */
+-6.76313448015089834151929838334258544557222273487418e-18, 	/* 177, accPolyMid4C6m, quickPolyMid4C6l */
+-3.47721914174083040302762713955940912153154957518196e-34, 	/* 178, accPolyMid4C6l */
+1.07444730844797153856973181973444297909736633300781e+00, 	/* 179, accPolyMid4C7h, quickPolyMid4C7h */
+7.55340134261966180374112563614849022138812950329448e-17, 	/* 180, accPolyMid4C7m, quickPolyMid4C7l */
+1.58041645549890685806815326941432431340217590332031e+00, 	/* 181, accPolyMid4C8h, quickPolyMid4C8h */
+4.80894355381610072868748091065730787867334028863435e-17, 	/* 182, accPolyMid4C8m */
+2.39169226022640657447482226416468620300292968750000e+00, 	/* 183, accPolyMid4C9h, quickPolyMid4C9h */
+1.26753183127964275508490032426937968441812593935712e-16, 	/* 184, accPolyMid4C9m */
+3.68572936227336489523054297023918479681015014648438e+00, 	/* 185, accPolyMid4C10h, quickPolyMid4C10h */
+-1.41660589025860946857878120315437315934718409357086e-16, 	/* 186, accPolyMid4C10m */
+5.77285150262833735013145997072570025920867919921875e+00, 	/* 187, accPolyMid4C11h, quickPolyMid4C11h */
+-2.16740363176565772841534018366824459554498708631527e-16, 	/* 188, accPolyMid4C11m */
+9.15766592727227646264509530737996101379394531250000e+00, 	/* 189, accPolyMid4C12h, quickPolyMid4C12h */
+4.37180613264180824186691777532090455983551321485214e-16, 	/* 190, accPolyMid4C12m */
+1.46862422532599090629901184001937508583068847656250e+01, 	/* 191, accPolyMid4C13h, quickPolyMid4C13h */
+7.89614550363306335166404831558856161121412865593061e-16, 	/* 192, accPolyMid4C13m */
+2.37692237950290667924946319544687867164611816406250e+01, 	/* 193, accPolyMid4C14h, quickPolyMid4C14h */
+-3.50255834101571646092598176937562449597971181913456e-16, 	/* 194, accPolyMid4C14m */
+3.87753699929054533868111320771276950836181640625000e+01, 	/* 195, accPolyMid4C15h */
+5.67060321723933067329766411373458413340348986762113e-16, 	/* 196, accPolyMid4C15m */
+6.36909499334141528947839105967432260513305664062500e+01, 	/* 197, accPolyMid4C16h */
+1.05248620915111246176820714026689529418945312500000e+02, 	/* 198, accPolyMid4C17h */
+1.74851057791898000459696049802005290985107421875000e+02, 	/* 199, accPolyMid4C18h */
+2.91864013611726591079786885529756546020507812500000e+02, 	/* 200, accPolyMid4C19h */
+4.89259682748188197365379892289638519287109375000000e+02, 	/* 201, accPolyMid4C20h */
+8.23309003242859603233227971941232681274414062500000e+02, 	/* 202, accPolyMid4C21h */
+1.39025484827954846878128591924905776977539062500000e+03, 	/* 203, accPolyMid4C22h */
+2.35504246227568182803224772214889526367187500000000e+03, 	/* 204, accPolyMid4C23h */
+4.00090205201026492431992664933204650878906250000000e+03, 	/* 205, accPolyMid4C24h */
+6.81504309301592911651823669672012329101562500000000e+03, 	/* 206, accPolyMid4C25h */
+1.16369648030766729789320379495620727539062500000000e+04, 	/* 207, accPolyMid4C26h */
+1.99154708390699779556598514318466186523437500000000e+04, 	/* 208, accPolyMid4C27h */
+3.41546126991757555515505373477935791015625000000000e+04, 	/* 209, accPolyMid4C28h */
+5.86883344113872444722801446914672851562500000000000e+04, 	/* 210, accPolyMid4C29h */
+1.01027682393336552195250988006591796875000000000000e+05, 	/* 211, accPolyMid4C30h */
+1.74209975080082920612767338752746582031250000000000e+05, 	/* 212, accPolyMid4C31h */
+3.00874278784890950191766023635864257812500000000000e+05, 	/* 213, accPolyMid4C32h */
+5.19633023773909430019557476043701171875000000000000e+05, 	/* 214, accPolyMid4C33h */
+8.99866392232198733836412429809570312500000000000000e+05, 	/* 215, accPolyMid4C34h */
+1.65235977806337876245379447937011718750000000000000e+06, 	/* 216, accPolyMid4C35h */
+1.01836010491198658556299960764590650796890258789062e+00, 	/* 217, RN rounding constant quick poly middle 4*/
+1.00326570788492020170486150590740535840759810902416e-18, 	/* 218, RD rounding constant quick poly middle 4*/
+5.31445860862679642089290155126946046948432922363281e-01, 	/* 219, midpoint in interval 5*/
+5.60306504963744567149319664167705923318862915039062e-01, 	/* 220, accPolyMid5C0h, quickPolyMid5C0h */
+-1.08630439217163180480513733763948654678554607776160e-20, 	/* 221, accPolyMid5C0m, quickPolyMid5C0l */
+1.18050895658762322604218297783518210053443908691406e+00, 	/* 222, accPolyMid5C1h, quickPolyMid5C1h */
+-3.44936676454714048889716658635127499762917269870727e-17, 	/* 223, accPolyMid5C1m, quickPolyMid5C1l */
+-2.49069456197248953275668118371299181194287558355700e-33, 	/* 224, accPolyMid5C1l */
+4.37156452058995781406736114149680361151695251464844e-01, 	/* 225, accPolyMid5C2h, quickPolyMid5C2h */
+4.12350542001181384975859432610288269290340424486530e-18, 	/* 226, accPolyMid5C2m, quickPolyMid5C2l */
+2.73553164822567581206451159459555826955342358406517e-34, 	/* 227, accPolyMid5C2l */
+5.97961581435785594074161508615361526608467102050781e-01, 	/* 228, accPolyMid5C3h, quickPolyMid5C3h */
+1.15786235462823532242451850040378867919657187923266e-17, 	/* 229, accPolyMid5C3m, quickPolyMid5C3l */
+6.70476163820618923333949946465040969013104876616743e-34, 	/* 230, accPolyMid5C3l */
+7.56654591443305823972309553937520831823348999023438e-01, 	/* 231, accPolyMid5C4h, quickPolyMid5C4h */
+5.63361768523770903650379304980880430544181403662856e-18, 	/* 232, accPolyMid5C4m, quickPolyMid5C4l */
+3.52518369310847108975654467573884198459173315811765e-35, 	/* 233, accPolyMid5C4l */
+1.15954888868330963092034835426602512598037719726562e+00, 	/* 234, accPolyMid5C5h, quickPolyMid5C5h */
+-2.13088606479945404910718732635657047999226786224539e-17, 	/* 235, accPolyMid5C5m, quickPolyMid5C5l */
+1.01155988751211667735165829625236622533486662424891e-33, 	/* 236, accPolyMid5C5l */
+1.85057068266552660062984614341985434293746948242188e+00, 	/* 237, accPolyMid5C6h, quickPolyMid5C6h */
+-4.13756595773451122099466439202037064387337671566669e-18, 	/* 238, accPolyMid5C6m, quickPolyMid5C6l */
+3.02843501360506226132120912500822054694900989592884e-34, 	/* 239, accPolyMid5C6l */
+3.11563743870884257702869035711046308279037475585938e+00, 	/* 240, accPolyMid5C7h, quickPolyMid5C7h */
+-5.06302300821373603583774676357699499992045551579126e-17, 	/* 241, accPolyMid5C7m, quickPolyMid5C7l */
+5.40761322601296168244289219728671014308929443359375e+00, 	/* 242, accPolyMid5C8h, quickPolyMid5C8h */
+2.97487923575735998744301300115136435889001285861472e-16, 	/* 243, accPolyMid5C8m */
+9.62995354897343425193412258522585034370422363281250e+00, 	/* 244, accPolyMid5C9h, quickPolyMid5C9h */
+4.55607422255092503960684830342258039056296500032145e-16, 	/* 245, accPolyMid5C9m */
+1.74836661195630966858516330830752849578857421875000e+01, 	/* 246, accPolyMid5C10h, quickPolyMid5C10h */
+1.43590320985440421817158000882140332196152266840822e-15, 	/* 247, accPolyMid5C10m */
+3.22483723360128990975681517738848924636840820312500e+01, 	/* 248, accPolyMid5C11h, quickPolyMid5C11h */
+-3.34403568343416729924334128939506733422536740966968e-15, 	/* 249, accPolyMid5C11m */
+6.02553715792408368656651873607188463211059570312500e+01, 	/* 250, accPolyMid5C12h, quickPolyMid5C12h */
+3.10919444878682139369989784864394611534570535618660e-15, 	/* 251, accPolyMid5C12m */
+1.13813051318643047693512926343828439712524414062500e+02, 	/* 252, accPolyMid5C13h, quickPolyMid5C13h */
+-1.71698317353737059559128975443274184793142084909379e-15, 	/* 253, accPolyMid5C13m */
+2.16961936728312849709254805929958820343017578125000e+02, 	/* 254, accPolyMid5C14h, quickPolyMid5C14h */
+8.27079867974059458294192504441253562124411295719550e-15, 	/* 255, accPolyMid5C14m */
+4.16880179488225451223115669563412666320800781250000e+02, 	/* 256, accPolyMid5C15h */
+-2.58735460985196142054738964992050729251298751831811e-14, 	/* 257, accPolyMid5C15m */
+8.06537874996876666955358814448118209838867187500000e+02, 	/* 258, accPolyMid5C16h */
+1.56984649251497876321082003414630889892578125000000e+03, 	/* 259, accPolyMid5C17h */
+3.07188686658870074097649194300174713134765625000000e+03, 	/* 260, accPolyMid5C18h */
+6.03970064736507720226654782891273498535156250000000e+03, 	/* 261, accPolyMid5C19h */
+1.19254227020427806564839556813240051269531250000000e+04, 	/* 262, accPolyMid5C20h */
+2.36373073951149926870130002498626708984375000000000e+04, 	/* 263, accPolyMid5C21h */
+4.70144622759458434302359819412231445312500000000000e+04, 	/* 264, accPolyMid5C22h */
+9.38077422737224260345101356506347656250000000000000e+04, 	/* 265, accPolyMid5C23h */
+1.87716130978103727102279663085937500000000000000000e+05, 	/* 266, accPolyMid5C24h */
+3.76631599838992522563785314559936523437500000000000e+05, 	/* 267, accPolyMid5C25h */
+7.57518066926909843459725379943847656250000000000000e+05, 	/* 268, accPolyMid5C26h */
+1.52703698454281571321189403533935546875000000000000e+06, 	/* 269, accPolyMid5C27h */
+3.08471154002460883930325508117675781250000000000000e+06, 	/* 270, accPolyMid5C28h */
+6.24343584097426943480968475341796875000000000000000e+06, 	/* 271, accPolyMid5C29h */
+1.26595813738393746316432952880859375000000000000000e+07, 	/* 272, accPolyMid5C30h */
+2.57133891378295645117759704589843750000000000000000e+07, 	/* 273, accPolyMid5C31h */
+5.23093272367429584264755249023437500000000000000000e+07, 	/* 274, accPolyMid5C32h */
+1.06415184183835312724113464355468750000000000000000e+08, 	/* 275, accPolyMid5C33h */
+2.17067016530691206455230712890625000000000000000000e+08, 	/* 276, accPolyMid5C34h */
+4.69394759797544836997985839843750000000000000000000e+08, 	/* 277, accPolyMid5C35h */
+1.01534217846377439187222080363426357507705688476562e+00, 	/* 278, RN rounding constant quick poly middle 5*/
+8.45008379631082379626014328492746516799371469048044e-19, 	/* 279, RD rounding constant quick poly middle 5*/
+6.04673624038476131836716831458033993840217590332031e-01, 	/* 280, midpoint in interval 6*/
+6.49356027282211423212743284238968044519424438476562e-01, 	/* 281, accPolyMid6C0h, quickPolyMid6C0h */
+-1.25840412187919035681267493345871686399113240956856e-20, 	/* 282, accPolyMid6C0m, quickPolyMid6C0l */
+1.25553477869155938329015498311491683125495910644531e+00, 	/* 283, accPolyMid6C1h, quickPolyMid6C1h */
+5.00523898265236280615595780032763663310079252366513e-17, 	/* 284, accPolyMid6C1m, quickPolyMid6C1l */
+2.70452092654099855316456962656407597917508288905533e-33, 	/* 285, accPolyMid6C1l */
+5.98380278107774499218862729321699589490890502929688e-01, 	/* 286, accPolyMid6C2h, quickPolyMid6C2h */
+3.73915919375620074681511372815883902051293891666555e-18, 	/* 287, accPolyMid6C2m, quickPolyMid6C2l */
+1.02836809807342008154037540277599096854529496615931e-34, 	/* 288, accPolyMid6C2l */
+9.00232892880871604646131345361936837434768676757812e-01, 	/* 289, accPolyMid6C3h, quickPolyMid6C3h */
+-1.70995008965645412422671790545314082452432030961170e-17, 	/* 290, accPolyMid6C3m, quickPolyMid6C3l */
+1.26596066229657064182610642365044212709535948254084e-33, 	/* 291, accPolyMid6C3l */
+1.38703629702026587366958665370475500822067260742188e+00, 	/* 292, accPolyMid6C4h, quickPolyMid6C4h */
+3.98819447215487913236315415179165676291502931117595e-17, 	/* 293, accPolyMid6C4m, quickPolyMid6C4l */
+-6.55797179513908183565792353381331895988112885430413e-34, 	/* 294, accPolyMid6C4l */
+2.48954277308397298185127510805614292621612548828125e+00, 	/* 295, accPolyMid6C5h, quickPolyMid6C5h */
+9.74092851599686234698415065747156883706428073441651e-17, 	/* 296, accPolyMid6C5m, quickPolyMid6C5l */
+1.56743989943601791748641837689163542493404742470630e-33, 	/* 297, accPolyMid6C5l */
+4.72562522409656082800211152061820030212402343750000e+00, 	/* 298, accPolyMid6C6h, quickPolyMid6C6h */
+6.88679830761278595465306080986277758416307765996557e-18, 	/* 299, accPolyMid6C6m, quickPolyMid6C6l */
+-9.47395090301458455484031652124848364407920780715874e-35, 	/* 300, accPolyMid6C6l */
+9.41432957016690785678747488418594002723693847656250e+00, 	/* 301, accPolyMid6C7h, quickPolyMid6C7h */
+8.62157085484702984705473460305131094967840256568931e-16, 	/* 302, accPolyMid6C7m, quickPolyMid6C7l */
+1.93709907584273430813937011407688260078430175781250e+01, 	/* 303, accPolyMid6C8h, quickPolyMid6C8h */
+-1.40839418808440953673043657798045432960211596437085e-16, 	/* 304, accPolyMid6C8m */
+4.08734031574560177091370860580354928970336914062500e+01, 	/* 305, accPolyMid6C9h, quickPolyMid6C9h */
+-2.98667469102598629922297846034715799734023919430673e-16, 	/* 306, accPolyMid6C9m */
+8.79464044588732321017232607118785381317138671875000e+01, 	/* 307, accPolyMid6C10h, quickPolyMid6C10h */
+3.61512961738881992095483091045503569454095245351219e-16, 	/* 308, accPolyMid6C10m */
+1.92241339189846911494896630756556987762451171875000e+02, 	/* 309, accPolyMid6C11h, quickPolyMid6C11h */
+6.61037281166591217605498682969545683054486597679533e-15, 	/* 310, accPolyMid6C11m */
+4.25700873706194784062972757965326309204101562500000e+02, 	/* 311, accPolyMid6C12h, quickPolyMid6C12h */
+-6.48144847243744916328196408044704617877580310816854e-15, 	/* 312, accPolyMid6C12m */
+9.52958531675870517574367113411426544189453125000000e+02, 	/* 313, accPolyMid6C13h, quickPolyMid6C13h */
+-3.41559781098088121115265032630996540232080319228480e-15, 	/* 314, accPolyMid6C13m */
+2.15300037043921429358306340873241424560546875000000e+03, 	/* 315, accPolyMid6C14h, quickPolyMid6C14h */
+-4.69254271757335955512545725611899433103182087412275e-14, 	/* 316, accPolyMid6C14m */
+4.90290875724837587767979130148887634277343750000000e+03, 	/* 317, accPolyMid6C15h */
+-4.54544125910656089453646656943432828883091406657613e-13, 	/* 318, accPolyMid6C15m */
+1.12422266608999743766617029905319213867187500000000e+04, 	/* 319, accPolyMid6C16h */
+2.59341556033402121101971715688705444335937500000000e+04, 	/* 320, accPolyMid6C17h */
+6.01463753209276546840555965900421142578125000000000e+04, 	/* 321, accPolyMid6C18h */
+1.40155647347781836288049817085266113281250000000000e+05, 	/* 322, accPolyMid6C19h */
+3.27990517748617625329643487930297851562500000000000e+05, 	/* 323, accPolyMid6C20h */
+7.70511269948243047110736370086669921875000000000000e+05, 	/* 324, accPolyMid6C21h */
+1.81638100581354671157896518707275390625000000000000e+06, 	/* 325, accPolyMid6C22h */
+4.29545835214607417583465576171875000000000000000000e+06, 	/* 326, accPolyMid6C23h */
+1.01875211922164466232061386108398437500000000000000e+07, 	/* 327, accPolyMid6C24h */
+2.42259292905952110886573791503906250000000000000000e+07, 	/* 328, accPolyMid6C25h */
+5.77502706188629567623138427734375000000000000000000e+07, 	/* 329, accPolyMid6C26h */
+1.37977551882563471794128417968750000000000000000000e+08, 	/* 330, accPolyMid6C27h */
+3.30348046445899784564971923828125000000000000000000e+08, 	/* 331, accPolyMid6C28h */
+7.92463843911740779876708984375000000000000000000000e+08, 	/* 332, accPolyMid6C29h */
+1.90447027047677397727966308593750000000000000000000e+09, 	/* 333, accPolyMid6C30h */
+4.58479383261657714843750000000000000000000000000000e+09, 	/* 334, accPolyMid6C31h */
+1.10545369624155406951904296875000000000000000000000e+10, 	/* 335, accPolyMid6C32h */
+2.66385731955786666870117187500000000000000000000000e+10, 	/* 336, accPolyMid6C33h */
+6.43976383194783477783203125000000000000000000000000e+10, 	/* 337, accPolyMid6C34h */
+1.66775070729799957275390625000000000000000000000000e+11, 	/* 338, accPolyMid6C35h */
+1.02820225588634994728920446505071595311164855957031e+00, 	/* 339, RN rounding constant quick poly middle 6*/
+1.54107813388901044122294580378974284123051351850249e-18, 	/* 340, RD rounding constant quick poly middle 6*/
+6.67959213256959061233430929860332980751991271972656e-01, 	/* 341, midpoint in interval 7*/
+7.31463137281961883751080222282325848937034606933594e-01, 	/* 342, accPolyMid7C0h, quickPolyMid7C0h */
+8.54719742452471207894475172794621662948903828511743e-18, 	/* 343, accPolyMid7C0m, quickPolyMid7C0l */
+1.34372862717732943771409281907835975289344787597656e+00, 	/* 344, accPolyMid7C1h, quickPolyMid7C1h */
+-9.37080278359462608557638680730489336344772507156678e-17, 	/* 345, accPolyMid7C1m, quickPolyMid7C1l */
+-3.73014429525577422762683976038701673929582903516469e-33, 	/* 346, accPolyMid7C1l */
+8.10316454021746457314634426438715308904647827148438e-01, 	/* 347, accPolyMid7C2h, quickPolyMid7C2h */
+2.83724520944754281479328686665519600224801269794297e-17, 	/* 348, accPolyMid7C2m, quickPolyMid7C2l */
+5.82045706927347254178829289360700371297572159541923e-34, 	/* 349, accPolyMid7C2l */
+1.38167386397960734178980146680260077118873596191406e+00, 	/* 350, accPolyMid7C3h, quickPolyMid7C3h */
+2.02013329353188582679931981349209152232167295906717e-17, 	/* 351, accPolyMid7C3m, quickPolyMid7C3l */
+6.40114855650846168897999343294667085370954557070054e-34, 	/* 352, accPolyMid7C3l */
+2.57070122683855739609271040535531938076019287109375e+00, 	/* 353, accPolyMid7C4h, quickPolyMid7C4h */
+-1.97101208773651620042078427599655545421327570922328e-16, 	/* 354, accPolyMid7C4m, quickPolyMid7C4l */
+-5.16498810795509657208158829628186048443297866770160e-33, 	/* 355, accPolyMid7C4l */
+5.46327133150128840810566543950699269771575927734375e+00, 	/* 356, accPolyMid7C5h, quickPolyMid7C5h */
+4.46002282634806142830756936399426613343260291679165e-17, 	/* 357, accPolyMid7C5m, quickPolyMid7C5l */
+1.00630542800586945033209683978834296850153546719007e-33, 	/* 358, accPolyMid7C5l */
+1.23592045140328163910226066946052014827728271484375e+01, 	/* 359, accPolyMid7C6h, quickPolyMid7C6h */
+-6.31168277706663387163074158423931222709606927382536e-16, 	/* 360, accPolyMid7C6m, quickPolyMid7C6l */
+-2.86577343636081880556771704346742846876298657614067e-32, 	/* 361, accPolyMid7C6l */
+2.92955857889283457495821494376286864280700683593750e+01, 	/* 362, accPolyMid7C7h, quickPolyMid7C7h */
+1.68044477586948138119056363287999050823887212287311e-15, 	/* 363, accPolyMid7C7m, quickPolyMid7C7l */
+7.17613428086569200559097225777804851531982421875000e+01, 	/* 364, accPolyMid7C8h, quickPolyMid7C8h */
+6.23119826880857970524569208326049427014155061843592e-15, 	/* 365, accPolyMid7C8m */
+1.80247733513940403327069361694157123565673828125000e+02, 	/* 366, accPolyMid7C9h, quickPolyMid7C9h */
+5.02375884230076452151557056132473497202104361844532e-15, 	/* 367, accPolyMid7C9m */
+4.61706463186508131002483423799276351928710937500000e+02, 	/* 368, accPolyMid7C10h, quickPolyMid7C10h */
+1.87384815286128587607402694756722954854896712184598e-14, 	/* 369, accPolyMid7C10m */
+1.20148795335111071835854090750217437744140625000000e+03, 	/* 370, accPolyMid7C11h, quickPolyMid7C11h */
+2.60459063066423653270039910766913797650205005668189e-14, 	/* 371, accPolyMid7C11m */
+3.16745162323707290852325968444347381591796875000000e+03, 	/* 372, accPolyMid7C12h, quickPolyMid7C12h */
+-2.76092355337723539107271551080313829589234133482512e-14, 	/* 373, accPolyMid7C12m */
+8.44145526317249823478050529956817626953125000000000e+03, 	/* 374, accPolyMid7C13h, quickPolyMid7C13h */
+-2.33235416338613018856460888065680920494017469568604e-13, 	/* 375, accPolyMid7C13m */
+2.27054147369064739905297756195068359375000000000000e+04, 	/* 376, accPolyMid7C14h, quickPolyMid7C14h */
+-3.76196185348520617410321355221587231933578349130087e-13, 	/* 377, accPolyMid7C14m */
+6.15579784849813586333766579627990722656250000000000e+04, 	/* 378, accPolyMid7C15h */
+-5.34885488214934542022410271185570626302323293810304e-13, 	/* 379, accPolyMid7C15m */
+1.68046954551722796168178319931030273437500000000000e+05, 	/* 380, accPolyMid7C16h */
+4.61530358172978565562516450881958007812500000000000e+05, 	/* 381, accPolyMid7C17h */
+1.27435135728149255737662315368652343750000000000000e+06, 	/* 382, accPolyMid7C18h */
+3.53543876571432314813137054443359375000000000000000e+06, 	/* 383, accPolyMid7C19h */
+9.85027146846828423440456390380859375000000000000000e+06, 	/* 384, accPolyMid7C20h */
+2.75499693650120757520198822021484375000000000000000e+07, 	/* 385, accPolyMid7C21h */
+7.73223713417402952909469604492187500000000000000000e+07, 	/* 386, accPolyMid7C22h */
+2.17703077316092193126678466796875000000000000000000e+08, 	/* 387, accPolyMid7C23h */
+6.14725288059689402580261230468750000000000000000000e+08, 	/* 388, accPolyMid7C24h */
+1.74040800223112154006958007812500000000000000000000e+09, 	/* 389, accPolyMid7C25h */
+4.93950269498267459869384765625000000000000000000000e+09, 	/* 390, accPolyMid7C26h */
+1.40506579253189964294433593750000000000000000000000e+10, 	/* 391, accPolyMid7C27h */
+4.00515555251962203979492187500000000000000000000000e+10, 	/* 392, accPolyMid7C28h */
+1.14389701296316925048828125000000000000000000000000e+11, 	/* 393, accPolyMid7C29h */
+3.27296809500310974121093750000000000000000000000000e+11, 	/* 394, accPolyMid7C30h */
+9.38089913584087280273437500000000000000000000000000e+11, 	/* 395, accPolyMid7C31h */
+2.69293079636161279296875000000000000000000000000000e+12, 	/* 396, accPolyMid7C32h */
+7.72833097677600292968750000000000000000000000000000e+12, 	/* 397, accPolyMid7C33h */
+2.22444558194129648437500000000000000000000000000000e+13, 	/* 398, accPolyMid7C34h */
+6.82401753565838359375000000000000000000000000000000e+13, 	/* 399, accPolyMid7C35h */
+1.01740290807493916069859096751315519213676452636719e+00, 	/* 400, RN rounding constant quick poly middle 7*/
+9.50960845417677113226513686606015976666256457529322e-19, 	/* 401, RD rounding constant quick poly middle 7*/
+7.19008445739778290217714129539672285318374633789062e-01, 	/* 402, midpoint in interval 8*/
+8.02374569969830475635319544380763545632362365722656e-01, 	/* 403, accPolyMid8C0h, quickPolyMid8C0h */
+-5.57232596267891548198947769768214754835408022265973e-18, 	/* 404, accPolyMid8C0m, quickPolyMid8C0l */
+1.43884615807450622071428369963541626930236816406250e+00, 	/* 405, accPolyMid8C1h, quickPolyMid8C1h */
+3.59501817700961691698905527113737832717163932379732e-17, 	/* 406, accPolyMid8C1m, quickPolyMid8C1l */
+1.42139791223330171535988185118707169939451756100115e-33, 	/* 407, accPolyMid8C1l */
+1.07089546798848767039658014255110174417495727539062e+00, 	/* 408, accPolyMid8C2h, quickPolyMid8C2h */
+7.12234409493595206110752393915421282220770659974638e-18, 	/* 409, accPolyMid8C2m, quickPolyMid8C2l */
+4.88803415361541961399074298884647415525574790319603e-34, 	/* 410, accPolyMid8C2l */
+2.09054748952818103546746897336561232805252075195312e+00, 	/* 411, accPolyMid8C3h, quickPolyMid8C3h */
+-4.76201670474478458619338404030121517580491201111076e-17, 	/* 412, accPolyMid8C3m, quickPolyMid8C3l */
+9.85965711757934088944524691800382507878970211803297e-34, 	/* 413, accPolyMid8C3l */
+4.62886640680389760404978005681186914443969726562500e+00, 	/* 414, accPolyMid8C4h, quickPolyMid8C4h */
+-6.26076461255283992652654162871089011104493903198467e-17, 	/* 415, accPolyMid8C4m, quickPolyMid8C4l */
+-3.79525038577018957662309046851941714013728344004132e-33, 	/* 416, accPolyMid8C4l */
+1.15940096700862280698629547259770333766937255859375e+01, 	/* 417, accPolyMid8C5h, quickPolyMid8C5h */
+5.00344758332442110044971487490682364429618307708619e-16, 	/* 418, accPolyMid8C5m, quickPolyMid8C5l */
+5.05400641998677592107699970650218041381398322944134e-33, 	/* 419, accPolyMid8C5l */
+3.09983076631741454320945194922387599945068359375000e+01, 	/* 420, accPolyMid8C6h, quickPolyMid8C6h */
+-1.68695534318490565671111852385917462817518447859219e-16, 	/* 421, accPolyMid8C6m, quickPolyMid8C6l */
+6.85050661529605157727571454320758800953682098824324e-34, 	/* 422, accPolyMid8C6l */
+8.67969690247392975379625568166375160217285156250000e+01, 	/* 423, accPolyMid8C7h, quickPolyMid8C7h */
+-5.77909319686569076564604963233208513019264259552576e-15, 	/* 424, accPolyMid8C7m, quickPolyMid8C7l */
+2.51207737556061232453430420719087123870849609375000e+02, 	/* 425, accPolyMid8C8h, quickPolyMid8C8h */
+-2.34229223147066395573123458231502220325151528840246e-15, 	/* 426, accPolyMid8C8m */
+7.45516108151238086065859533846378326416015625000000e+02, 	/* 427, accPolyMid8C9h, quickPolyMid8C9h */
+5.42429462463291658149197032428663192617240449908134e-15, 	/* 428, accPolyMid8C9m */
+2.25637900900536169501719996333122253417968750000000e+03, 	/* 429, accPolyMid8C10h, quickPolyMid8C10h */
+1.04118075698860813774916020354956791986217497225642e-13, 	/* 430, accPolyMid8C10m */
+6.93796098101582811068510636687278747558593750000000e+03, 	/* 431, accPolyMid8C11h, quickPolyMid8C11h */
+8.59862281333229161222916847764065622815798321104674e-15, 	/* 432, accPolyMid8C11m */
+2.16119867410615115659311413764953613281250000000000e+04, 	/* 433, accPolyMid8C12h, quickPolyMid8C12h */
+1.06661614083783310365636876324959361083581990681246e-13, 	/* 434, accPolyMid8C12m */
+6.80579130650992592563852667808532714843750000000000e+04, 	/* 435, accPolyMid8C13h, quickPolyMid8C13h */
+6.62014084472278982961475227363418833651659278771717e-12, 	/* 436, accPolyMid8C13m */
+2.16307061102022911654785275459289550781250000000000e+05, 	/* 437, accPolyMid8C14h, quickPolyMid8C14h */
+-2.44881501957370731470213892899278376432195547529602e-12, 	/* 438, accPolyMid8C14m */
+6.92960027312710066325962543487548828125000000000000e+05, 	/* 439, accPolyMid8C15h */
+-5.66500973206806599245652257405055779448943553688878e-11, 	/* 440, accPolyMid8C15m */
+2.23531716476973146200180053710937500000000000000000e+06, 	/* 441, accPolyMid8C16h */
+7.25429400587130710482597351074218750000000000000000e+06, 	/* 442, accPolyMid8C17h */
+2.36685600768156014382839202880859375000000000000000e+07, 	/* 443, accPolyMid8C18h */
+7.75916356685774326324462890625000000000000000000000e+07, 	/* 444, accPolyMid8C19h */
+2.55452232123835593461990356445312500000000000000000e+08, 	/* 445, accPolyMid8C20h */
+8.44254469674954175949096679687500000000000000000000e+08, 	/* 446, accPolyMid8C21h */
+2.79994093996573638916015625000000000000000000000000e+09, 	/* 447, accPolyMid8C22h */
+9.31537507532041358947753906250000000000000000000000e+09, 	/* 448, accPolyMid8C23h */
+3.10820362568210334777832031250000000000000000000000e+10, 	/* 449, accPolyMid8C24h */
+1.03985438377022964477539062500000000000000000000000e+11, 	/* 450, accPolyMid8C25h */
+3.48737110205060913085937500000000000000000000000000e+11, 	/* 451, accPolyMid8C26h */
+1.17221005601944750976562500000000000000000000000000e+12, 	/* 452, accPolyMid8C27h */
+3.94841085036352832031250000000000000000000000000000e+12, 	/* 453, accPolyMid8C28h */
+1.33255264873973789062500000000000000000000000000000e+13, 	/* 454, accPolyMid8C29h */
+4.50540615593679062500000000000000000000000000000000e+13, 	/* 455, accPolyMid8C30h */
+1.52590744626434593750000000000000000000000000000000e+14, 	/* 456, accPolyMid8C31h */
+5.17610884067860062500000000000000000000000000000000e+14, 	/* 457, accPolyMid8C32h */
+1.75591888512180650000000000000000000000000000000000e+15, 	/* 458, accPolyMid8C33h */
+5.97247050283681300000000000000000000000000000000000e+15, 	/* 459, accPolyMid8C34h */
+2.15157732956128240000000000000000000000000000000000e+16, 	/* 460, accPolyMid8C35h */
+1.01155686685228385357504521380178630352020263671875e+00, 	/* 461, RN rounding constant quick poly middle 8*/
+6.36522991537283605877265237263241827159525525595558e-19, 	/* 462, RD rounding constant quick poly middle 8*/
+7.60880231857352207214262307388707995414733886718750e-01, 	/* 463, midpoint in interval 9*/
+8.64668552766275078091950945236021652817726135253906e-01, 	/* 464, accPolyMid9C0h, quickPolyMid9C0h */
+2.22107768610709483983000348580034922276618040094248e-19, 	/* 465, accPolyMid9C0m, quickPolyMid9C0l */
+1.54108768708640897493467036838410422205924987792969e+00, 	/* 466, accPolyMid9C1h, quickPolyMid9C1h */
+3.32820103504311843280112118328828427349507594590859e-17, 	/* 467, accPolyMid9C1m, quickPolyMid9C1l */
+1.00469319336666835386896691703426687648516206509999e-33, 	/* 468, accPolyMid9C1l */
+1.39241392226891269601196654548402875661849975585938e+00, 	/* 469, accPolyMid9C2h, quickPolyMid9C2h */
+-7.78438411380474954824767774215038405507043967534661e-17, 	/* 470, accPolyMid9C2m, quickPolyMid9C2l */
+-2.75498989204243544757760916231818015864525586405625e-34, 	/* 471, accPolyMid9C2l */
+3.12616775988369477445871780219022184610366821289062e+00, 	/* 472, accPolyMid9C3h, quickPolyMid9C3h */
+-1.83136634474213254639590598215495010130375003296228e-16, 	/* 473, accPolyMid9C3m, quickPolyMid9C3l */
+-1.37039877493057234685308732075670776376976824689825e-33, 	/* 474, accPolyMid9C3l */
+8.16374541867330982825023966142907738685607910156250e+00, 	/* 475, accPolyMid9C4h, quickPolyMid9C4h */
+6.61331422381139448266729896007647878117248843327786e-16, 	/* 476, accPolyMid9C4m, quickPolyMid9C4l */
+-2.34411228408683938039171677313602417735464237635307e-32, 	/* 477, accPolyMid9C4l */
+2.39942774487262227012251969426870346069335937500000e+01, 	/* 478, accPolyMid9C5h, quickPolyMid9C5h */
+3.56709659583669727593018389598696746405922754956722e-16, 	/* 479, accPolyMid9C5m, quickPolyMid9C5l */
+1.92887188784617492937549821774446261489627075560113e-32, 	/* 480, accPolyMid9C5l */
+7.53789452793380974071624223142862319946289062500000e+01, 	/* 481, accPolyMid9C6h, quickPolyMid9C6h */
+-4.89236491033052363530754653203901634957086880239885e-15, 	/* 482, accPolyMid9C6m, quickPolyMid9C6l */
+1.86966182047363315238712995890702987106854589421809e-31, 	/* 483, accPolyMid9C6l */
+2.47970017761763045882617007009685039520263671875000e+02, 	/* 484, accPolyMid9C7h, quickPolyMid9C7h */
+-5.49773113276874172897358146458574130047619382341550e-15, 	/* 485, accPolyMid9C7m, quickPolyMid9C7l */
+8.43239639560233626980334520339965820312500000000000e+02, 	/* 486, accPolyMid9C8h, quickPolyMid9C8h */
+4.61444619149467756136937751706191309842186761003280e-14, 	/* 487, accPolyMid9C8m */
+2.94042238989191673681489191949367523193359375000000e+03, 	/* 488, accPolyMid9C9h, quickPolyMid9C9h */
+-6.26529947434876144165574723786618699307871677151027e-14, 	/* 489, accPolyMid9C9m */
+1.04570596262470262445276603102684020996093750000000e+04, 	/* 490, accPolyMid9C10h, quickPolyMid9C10h */
+4.33811913399171164864172764349193352065910816994787e-13, 	/* 491, accPolyMid9C10m */
+3.77816423278584625222720205783843994140625000000000e+04, 	/* 492, accPolyMid9C11h, quickPolyMid9C11h */
+-4.21825155017599752908316500880066660420734253600372e-14, 	/* 493, accPolyMid9C11m */
+1.38292932619114842964336276054382324218750000000000e+05, 	/* 494, accPolyMid9C12h, quickPolyMid9C12h */
+-2.02223055949190022685968858135129700521678830504868e-12, 	/* 495, accPolyMid9C12m */
+5.11733514125351735856384038925170898437500000000000e+05, 	/* 496, accPolyMid9C13h, quickPolyMid9C13h */
+-2.25025523408315347550056625257165819446736332309911e-11, 	/* 497, accPolyMid9C13m */
+1.91116705355792236514389514923095703125000000000000e+06, 	/* 498, accPolyMid9C14h, quickPolyMid9C14h */
+-6.92308947161053801527502899602797403061371639410027e-11, 	/* 499, accPolyMid9C14m */
+7.19450694938360899686813354492187500000000000000000e+06, 	/* 500, accPolyMid9C15h */
+-3.25836107774239441972945896739397887709177581427866e-10, 	/* 501, accPolyMid9C15m */
+2.72708481033120900392532348632812500000000000000000e+07, 	/* 502, accPolyMid9C16h */
+1.03997450389555335044860839843750000000000000000000e+08, 	/* 503, accPolyMid9C17h */
+3.98720516462098360061645507812500000000000000000000e+08, 	/* 504, accPolyMid9C18h */
+1.53596677859462237358093261718750000000000000000000e+09, 	/* 505, accPolyMid9C19h */
+5.94220454070446586608886718750000000000000000000000e+09, 	/* 506, accPolyMid9C20h */
+2.30771902569618682861328125000000000000000000000000e+10, 	/* 507, accPolyMid9C21h */
+8.99354036055935974121093750000000000000000000000000e+10, 	/* 508, accPolyMid9C22h */
+3.51604905808161804199218750000000000000000000000000e+11, 	/* 509, accPolyMid9C23h */
+1.37859673609756665039062500000000000000000000000000e+12, 	/* 510, accPolyMid9C24h */
+5.41968316905909179687500000000000000000000000000000e+12, 	/* 511, accPolyMid9C25h */
+2.13586334787060429687500000000000000000000000000000e+13, 	/* 512, accPolyMid9C26h */
+8.43635735241271562500000000000000000000000000000000e+13, 	/* 513, accPolyMid9C27h */
+3.33923015327480937500000000000000000000000000000000e+14, 	/* 514, accPolyMid9C28h */
+1.32429009755987925000000000000000000000000000000000e+15, 	/* 515, accPolyMid9C29h */
+5.26147664189654100000000000000000000000000000000000e+15, 	/* 516, accPolyMid9C30h */
+2.09399836831170720000000000000000000000000000000000e+16, 	/* 517, accPolyMid9C31h */
+8.34692893106752000000000000000000000000000000000000e+16, 	/* 518, accPolyMid9C32h */
+3.32762568376608000000000000000000000000000000000000e+17, 	/* 519, accPolyMid9C33h */
+1.33003631888338841600000000000000000000000000000000e+18, 	/* 520, accPolyMid9C34h */
+5.62235923730283212800000000000000000000000000000000e+18, 	/* 521, accPolyMid9C35h */
+1.01049946711285376643729705392615869641304016113281e+00, 	/* 522, RN rounding constant quick poly middle 9*/
+5.78284088727747938003347592934948079832502681677348e-19, 	/* 523, RD rounding constant quick poly middle 9*/
+-8.33333333333333287074040640618477482348680496215820e-02, 	/* 524, accPolyHighC1h, quickPolyHighC1h */
+-4.62592926927148532830780603208030422795294098867636e-18, 	/* 525, accPolyHighC1m, quickPolyHighC1l */
+-2.56790659251636222413745757067544746896901530409675e-34, 	/* 526, accPolyHighC1l */
+-1.87499999999999993061106096092771622352302074432373e-02, 	/* 527, accPolyHighC2h, quickPolyHighC2h */
+-6.93889390390722876283368680301479756432058851698546e-19, 	/* 528, accPolyHighC2m, quickPolyHighC2l */
+3.85185989241340205035888971870941307651344283492079e-35, 	/* 529, accPolyHighC2l */
+-5.58035714285714298105167685548622102942317724227905e-03, 	/* 530, accPolyHighC3h, quickPolyHighC3h */
+1.23908819712629071293959090145008148963025205053831e-19, 	/* 531, accPolyHighC3m, quickPolyHighC3l */
+6.87827508933260239532125196237951282993345739214379e-36, 	/* 532, accPolyHighC3l */
+-1.89887152777777775368439616698879035538993775844574e-03, 	/* 533, accPolyHighC4h, quickPolyHighC4h */
+-2.40933816107889860849364897504182511872549009826894e-20, 	/* 534, accPolyHighC4m, quickPolyHighC4l */
+-1.31413379554614650822698366533512762375439292005686e-36, 	/* 535, accPolyHighC4l */
+-6.99129971590909120478241067786484563839621841907501e-04, 	/* 536, accPolyHighC5h, quickPolyHighC5h */
+2.95691501586955672658426997372092637662516651210484e-20, 	/* 537, accPolyHighC5m, quickPolyHighC5l */
+1.93248831638054158509225332576516713663708940033800e-36, 	/* 538, accPolyHighC5l */
+-2.71136944110576935586948144063512700085993856191635e-04, 	/* 539, accPolyHighC6h, quickPolyHighC6h */
+1.25100250671414776773311485375106982275955017737813e-20, 	/* 540, accPolyHighC6m, quickPolyHighC6l */
+-2.41797324682937785630481140742729367728409168219340e-37, 	/* 541, accPolyHighC6l */
+-1.09100341796875005421010862427522170037264004349709e-04, 	/* 542, accPolyHighC7h, quickPolyHighC7h */
+5.42101086231091719294416952538483743258993211884145e-21, 	/* 543, accPolyHighC7m, quickPolyHighC7l */
+9.55338141209871258458343868890229946241110412925982e-38, 	/* 544, accPolyHighC7l */
+-4.51242222505457229141112573955751940957270562648773e-05, 	/* 545, accPolyHighC8h, quickPolyHighC8h */
+-3.18882990973711044045301474516264873522265001897356e-21, 	/* 546, accPolyHighC8m, quickPolyHighC8l */
+1.26912673390128847048400261536391292203355395300755e-37, 	/* 547, accPolyHighC8l */
+-1.90656436117071843741425929419364138084347359836102e-05, 	/* 548, accPolyHighC9h, quickPolyHighC9h */
+-1.06993691223935686411543055030763865855410413408366e-21, 	/* 549, accPolyHighC9m, quickPolyHighC9l */
+-8.19368731407892096011823940271412425317976158112288e-06, 	/* 550, accPolyHighC10h, quickPolyHighC10h */
+-4.03323388732262270981356256138402986149007425086112e-22, 	/* 551, accPolyHighC10m */
+-3.57056927421818625395413641931963155684570665471256e-06, 	/* 552, accPolyHighC11h, quickPolyHighC11h */
+1.64796270839759047485693620137778762426170587507193e-22, 	/* 553, accPolyHighC11m */
+-1.57402595505118377679448869038703051614902506116778e-06, 	/* 554, accPolyHighC12h, quickPolyHighC12h */
+1.03140748281100284102117735554826521589797225638379e-22, 	/* 555, accPolyHighC12m */
+-7.00688192241446386609332076800260580284884781576693e-07, 	/* 556, accPolyHighC13h, quickPolyHighC13h */
+1.64297063257073230214010320767916245637133227760945e-23, 	/* 557, accPolyHighC13m */
+-3.14533061665020903893046425037205438002274604514241e-07, 	/* 558, accPolyHighC14h, quickPolyHighC14h */
+-1.57714454767442613704253788250439912924415496806915e-23, 	/* 559, accPolyHighC14m */
+-1.42216292935838748302118661470672122959513217210770e-07, 	/* 560, accPolyHighC15h, quickPolyHighC15h */
+3.70163506723718792079998292841186813204562291235770e-24, 	/* 561, accPolyHighC15m */
+-6.47111067734723877623606537110023673164960200665519e-08, 	/* 562, accPolyHighC16h, quickPolyHighC16h */
+1.96959302136511249382763415085950224265202199251341e-24, 	/* 563, accPolyHighC16m */
+-2.96094098107419582578099602043070204260288846853655e-08, 	/* 564, accPolyHighC17h, quickPolyHighC17h */
+-1.33210241793138800698071276025711826265682121011801e-25, 	/* 565, accPolyHighC17m */
+-1.36154377785683810553931313304908135020099280154682e-08, 	/* 566, accPolyHighC18h, quickPolyHighC18h */
+-6.28864412480332248702787563995712794007175716615166e-09, 	/* 567, accPolyHighC19h */
+-2.91615151940413698643198065114674061293342788303562e-09, 	/* 568, accPolyHighC20h */
+-1.35724329813454494662594037565671659106847357634251e-09, 	/* 569, accPolyHighC21h */
+-6.33321170158103043923636695899503229467697451582353e-10, 	/* 570, accPolyHighC22h */
+-2.98137047522453658533318439889463723202478462326326e-10, 	/* 571, accPolyHighC23h */
+-1.35174910337425390381481209427921852395115820399951e-10, 	/* 572, accPolyHighC24h */
+-7.57694791124210735879864558660150546803846438592700e-11, 	/* 573, accPolyHighC25h */
+-1.19244777215077355372683280351504137017926154840097e-11, 	/* 574, accPolyHighC26h */
+-4.08879979855917754145740023360966995669141255120849e-11, 	/* 575, accPolyHighC27h */
+1.75342081019476863949528641668112755730435381451571e-11, 	/* 576, accPolyHighC28h */
+-1.60530246587119583502980643958298338953849526689055e-11, 	/* 577, accPolyHighC29h */
+1.00010072995346011026640553609468042850494384765625e+00, 	/* 578, RN rounding constant quick poly high*/
+5.59129439367752644847269214347219849204178767344215e-21, 	/* 579, RD rounding constant quick poly high*/
+};
+
diff --git a/src/crlibm/asincos.c b/src/crlibm/asincos.c
new file mode 100644
index 0000000..57519a9
--- /dev/null
+++ b/src/crlibm/asincos.c
@@ -0,0 +1,4488 @@
+/*
+ * Correctly rounded arcsine and arccosine
+ *
+ * Copyright (c) 2007 Christoph Lauter (ENS Lyon), 
+ *                    with Sylvain Chevillard (ENS Lyon) for the polynomials
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "asincos.h"
+
+static inline void p0_quick(double *p_resh, double *p_resm, double x, int32_t xhi) {
+double p_x_0_pow2h, p_x_0_pow2m;
+
+
+
+
+
+double p_t_1_0h;
+double p_t_2_0h;
+double p_t_3_0h;
+double p_t_4_0h;
+double p_t_5_0h;
+double p_t_6_0h;
+double p_t_7_0h;
+double p_t_8_0h;
+double p_t_9_0h;
+double p_t_10_0h;
+double p_t_11_0h;
+double p_t_12_0h;
+double p_t_13_0h;
+double p_t_14_0h;
+double p_t_15_0h;
+double p_t_16_0h;
+double p_t_17_0h, p_t_17_0m;
+double p_t_18_0h, p_t_18_0m;
+double p_t_19_0h, p_t_19_0m;
+double p_t_20_0h, p_t_20_0m;
+
+ if (xhi < EXTRABOUND2) {
+   
+   double t1, t2, t3;
+
+   t2 = p0_quick_coeff_3h * x;
+   t1 = x * x;
+   t3 = t1 * t2;
+   
+   Add12(*p_resh,*p_resm,x,t3);
+   
+
+   return;
+ } 
+
+Mul12(&p_x_0_pow2h,&p_x_0_pow2m,x,x);
+
+p_t_15_0h = p0_quick_coeff_5h;
+if (xhi > EXTRABOUND) {
+
+p_t_1_0h = p0_quick_coeff_19h;
+p_t_2_0h = p_t_1_0h * p_x_0_pow2h;
+p_t_3_0h = p0_quick_coeff_17h + p_t_2_0h;
+p_t_4_0h = p_t_3_0h * p_x_0_pow2h;
+p_t_5_0h = p0_quick_coeff_15h + p_t_4_0h;
+p_t_6_0h = p_t_5_0h * p_x_0_pow2h;
+p_t_7_0h = p0_quick_coeff_13h + p_t_6_0h;
+p_t_8_0h = p_t_7_0h * p_x_0_pow2h;
+p_t_9_0h = p0_quick_coeff_11h + p_t_8_0h;
+p_t_10_0h = p_t_9_0h * p_x_0_pow2h;
+p_t_11_0h = p0_quick_coeff_9h + p_t_10_0h;
+p_t_12_0h = p_t_11_0h * p_x_0_pow2h;
+p_t_13_0h = p0_quick_coeff_7h + p_t_12_0h;
+p_t_14_0h = p_t_13_0h * p_x_0_pow2h;
+p_t_15_0h = p_t_15_0h + p_t_14_0h;
+}
+
+p_t_16_0h = p_t_15_0h * p_x_0_pow2h;
+Add12(p_t_17_0h,p_t_17_0m,p0_quick_coeff_3h,p_t_16_0h);
+
+ Mul122(&p_t_18_0h,&p_t_18_0m,x,p_x_0_pow2h,p_x_0_pow2m);
+ Mul22(&p_t_19_0h,&p_t_19_0m,p_t_17_0h,p_t_17_0m,p_t_18_0h,p_t_18_0m);
+
+ Add122(&p_t_20_0h,&p_t_20_0m,x,p_t_19_0h,p_t_19_0m);
+
+*p_resh = p_t_20_0h; *p_resm = p_t_20_0m;
+
+
+}
+
+static inline void p_quick(double *p_resh, double *p_resm, double x, int index) {
+  
+
+double p_t_1_0h;
+double p_t_2_0h;
+double p_t_3_0h;
+double p_t_4_0h;
+double p_t_5_0h;
+double p_t_6_0h;
+double p_t_7_0h;
+double p_t_8_0h;
+double p_t_9_0h;
+double p_t_10_0h;
+double p_t_11_0h;
+double p_t_12_0h;
+double p_t_13_0h;
+double p_t_14_0h;
+double p_t_15_0h;
+double p_t_16_0h;
+double p_t_17_0h;
+double p_t_18_0h;
+double p_t_19_0h;
+double p_t_20_0h;
+double p_t_21_0h, p_t_21_0m;
+double p_t_22_0h, p_t_22_0m;
+double p_t_23_0h, p_t_23_0m;
+ 
+p_t_1_0h = p_quick_coeff_12h;
+p_t_2_0h = p_t_1_0h * x;
+p_t_3_0h = p_quick_coeff_11h + p_t_2_0h;
+p_t_4_0h = p_t_3_0h * x;
+p_t_5_0h = p_quick_coeff_10h + p_t_4_0h;
+p_t_6_0h = p_t_5_0h * x;
+p_t_7_0h = p_quick_coeff_9h + p_t_6_0h;
+p_t_8_0h = p_t_7_0h * x;
+p_t_9_0h = p_quick_coeff_8h + p_t_8_0h;
+p_t_10_0h = p_t_9_0h * x;
+p_t_11_0h = p_quick_coeff_7h + p_t_10_0h;
+p_t_12_0h = p_t_11_0h * x;
+p_t_13_0h = p_quick_coeff_6h + p_t_12_0h;
+p_t_14_0h = p_t_13_0h * x;
+p_t_15_0h = p_quick_coeff_5h + p_t_14_0h;
+p_t_16_0h = p_t_15_0h * x;
+p_t_17_0h = p_quick_coeff_4h + p_t_16_0h;
+p_t_18_0h = p_t_17_0h * x;
+p_t_19_0h = p_quick_coeff_3h + p_t_18_0h;
+p_t_20_0h = p_t_19_0h * x;
+Add12(p_t_21_0h,p_t_21_0m,p_quick_coeff_2h,p_t_20_0h);
+MulAdd212(&p_t_22_0h,&p_t_22_0m,p_quick_coeff_1h,p_quick_coeff_1m,x,p_t_21_0h,p_t_21_0m);
+MulAdd212(&p_t_23_0h,&p_t_23_0m,p_quick_coeff_0h,p_quick_coeff_0m,x,p_t_22_0h,p_t_22_0m);
+*p_resh = p_t_23_0h; *p_resm = p_t_23_0m;
+
+}
+
+
+
+static inline void p9_quick(double *p_resh, double *p_resm, double x) {
+
+
+
+
+double p_t_1_0h;
+double p_t_2_0h;
+double p_t_3_0h;
+double p_t_4_0h;
+double p_t_5_0h;
+double p_t_6_0h;
+double p_t_7_0h;
+double p_t_8_0h;
+double p_t_9_0h;
+double p_t_10_0h;
+double p_t_11_0h;
+double p_t_12_0h;
+double p_t_13_0h;
+double p_t_14_0h;
+double p_t_15_0h;
+double p_t_16_0h;
+double p_t_17_0h;
+double p_t_18_0h;
+double p_t_19_0h;
+double p_t_20_0h;
+double p_t_21_0h, p_t_21_0m;
+double p_t_22_0h, p_t_22_0m;
+double p_t_23_0h, p_t_23_0m;
+ 
+
+
+p_t_1_0h = p9_quick_coeff_11h;
+p_t_2_0h = p_t_1_0h * x;
+p_t_3_0h = p9_quick_coeff_10h + p_t_2_0h;
+p_t_4_0h = p_t_3_0h * x;
+p_t_5_0h = p9_quick_coeff_9h + p_t_4_0h;
+p_t_6_0h = p_t_5_0h * x;
+p_t_7_0h = p9_quick_coeff_8h + p_t_6_0h;
+p_t_8_0h = p_t_7_0h * x;
+p_t_9_0h = p9_quick_coeff_7h + p_t_8_0h;
+p_t_10_0h = p_t_9_0h * x;
+p_t_11_0h = p9_quick_coeff_6h + p_t_10_0h;
+p_t_12_0h = p_t_11_0h * x;
+p_t_13_0h = p9_quick_coeff_5h + p_t_12_0h;
+p_t_14_0h = p_t_13_0h * x;
+p_t_15_0h = p9_quick_coeff_4h + p_t_14_0h;
+p_t_16_0h = p_t_15_0h * x;
+p_t_17_0h = p9_quick_coeff_3h + p_t_16_0h;
+p_t_18_0h = p_t_17_0h * x;
+p_t_19_0h = p9_quick_coeff_2h + p_t_18_0h;
+p_t_20_0h = p_t_19_0h * x;
+Add12(p_t_21_0h,p_t_21_0m,p9_quick_coeff_1h,p_t_20_0h);
+Mul122(&p_t_22_0h,&p_t_22_0m,x,p_t_21_0h,p_t_21_0m);
+Add122(&p_t_23_0h,&p_t_23_0m,p9_quick_coeff_0h,p_t_22_0h,p_t_22_0m);
+*p_resh = p_t_23_0h; *p_resm = p_t_23_0m;
+
+
+}
+
+
+
+static void p0_accu(double *p_resh, double *p_resm, double *p_resl, double x) {
+double p_x_0_pow2h, p_x_0_pow2m;
+
+
+Mul12(&p_x_0_pow2h,&p_x_0_pow2m,x,x);
+
+
+double p_t_1_0h;
+double p_t_2_0h;
+double p_t_3_0h;
+double p_t_4_0h;
+double p_t_5_0h;
+double p_t_6_0h;
+double p_t_7_0h, p_t_7_0m;
+double p_t_8_0h, p_t_8_0m;
+double p_t_9_0h, p_t_9_0m;
+double p_t_10_0h, p_t_10_0m;
+double p_t_11_0h, p_t_11_0m;
+double p_t_12_0h, p_t_12_0m;
+double p_t_13_0h, p_t_13_0m;
+double p_t_14_0h, p_t_14_0m;
+double p_t_15_0h, p_t_15_0m;
+double p_t_16_0h, p_t_16_0m;
+double p_t_17_0h, p_t_17_0m;
+double p_t_18_0h, p_t_18_0m;
+double p_t_19_0h, p_t_19_0m;
+double p_t_20_0h, p_t_20_0m;
+double p_t_21_0h, p_t_21_0m;
+double p_t_22_0h, p_t_22_0m;
+double p_t_23_0h, p_t_23_0m;
+double p_t_24_0h, p_t_24_0m;
+double p_t_25_0h, p_t_25_0m;
+double p_t_26_0h, p_t_26_0m;
+double p_t_27_0h, p_t_27_0m;
+double p_t_28_0h, p_t_28_0m, p_t_28_0l;
+double p_t_29_0h, p_t_29_0m, p_t_29_0l;
+double p_t_30_0h, p_t_30_0m, p_t_30_0l;
+double p_t_31_0h, p_t_31_0m, p_t_31_0l;
+double p_t_32_0h, p_t_32_0m, p_t_32_0l;
+double p_t_33_0h, p_t_33_0m, p_t_33_0l;
+double p_t_34_0h, p_t_34_0m, p_t_34_0l;
+double p_t_35_0h, p_t_35_0m, p_t_35_0l;
+ 
+
+
+p_t_1_0h = p0_accu_coeff_37h;
+p_t_2_0h = p_t_1_0h * p_x_0_pow2h;
+p_t_3_0h = p0_accu_coeff_35h + p_t_2_0h;
+p_t_4_0h = p_t_3_0h * p_x_0_pow2h;
+p_t_5_0h = p0_accu_coeff_33h + p_t_4_0h;
+p_t_6_0h = p_t_5_0h * p_x_0_pow2h;
+Add12(p_t_7_0h,p_t_7_0m,p0_accu_coeff_31h,p_t_6_0h);
+Mul22(&p_t_8_0h,&p_t_8_0m,p_t_7_0h,p_t_7_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add122(&p_t_9_0h,&p_t_9_0m,p0_accu_coeff_29h,p_t_8_0h,p_t_8_0m);
+Mul22(&p_t_10_0h,&p_t_10_0m,p_t_9_0h,p_t_9_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add122(&p_t_11_0h,&p_t_11_0m,p0_accu_coeff_27h,p_t_10_0h,p_t_10_0m);
+Mul22(&p_t_12_0h,&p_t_12_0m,p_t_11_0h,p_t_11_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add122(&p_t_13_0h,&p_t_13_0m,p0_accu_coeff_25h,p_t_12_0h,p_t_12_0m);
+Mul22(&p_t_14_0h,&p_t_14_0m,p_t_13_0h,p_t_13_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add122(&p_t_15_0h,&p_t_15_0m,p0_accu_coeff_23h,p_t_14_0h,p_t_14_0m);
+Mul22(&p_t_16_0h,&p_t_16_0m,p_t_15_0h,p_t_15_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add122(&p_t_17_0h,&p_t_17_0m,p0_accu_coeff_21h,p_t_16_0h,p_t_16_0m);
+Mul22(&p_t_18_0h,&p_t_18_0m,p_t_17_0h,p_t_17_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add122(&p_t_19_0h,&p_t_19_0m,p0_accu_coeff_19h,p_t_18_0h,p_t_18_0m);
+Mul22(&p_t_20_0h,&p_t_20_0m,p_t_19_0h,p_t_19_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add122(&p_t_21_0h,&p_t_21_0m,p0_accu_coeff_17h,p_t_20_0h,p_t_20_0m);
+Mul22(&p_t_22_0h,&p_t_22_0m,p_t_21_0h,p_t_21_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add122(&p_t_23_0h,&p_t_23_0m,p0_accu_coeff_15h,p_t_22_0h,p_t_22_0m);
+MulAdd22(&p_t_24_0h,&p_t_24_0m,p0_accu_coeff_13h,p0_accu_coeff_13m,p_x_0_pow2h,p_x_0_pow2m,p_t_23_0h,p_t_23_0m);
+MulAdd22(&p_t_25_0h,&p_t_25_0m,p0_accu_coeff_11h,p0_accu_coeff_11m,p_x_0_pow2h,p_x_0_pow2m,p_t_24_0h,p_t_24_0m);
+MulAdd22(&p_t_26_0h,&p_t_26_0m,p0_accu_coeff_9h,p0_accu_coeff_9m,p_x_0_pow2h,p_x_0_pow2m,p_t_25_0h,p_t_25_0m);
+Mul22(&p_t_27_0h,&p_t_27_0m,p_t_26_0h,p_t_26_0m,p_x_0_pow2h,p_x_0_pow2m);
+Add23(&p_t_28_0h,&p_t_28_0m,&p_t_28_0l,p0_accu_coeff_7h,p0_accu_coeff_7m,p_t_27_0h,p_t_27_0m);
+Mul233(&p_t_29_0h,&p_t_29_0m,&p_t_29_0l,p_x_0_pow2h,p_x_0_pow2m,p_t_28_0h,p_t_28_0m,p_t_28_0l);
+Add233(&p_t_30_0h,&p_t_30_0m,&p_t_30_0l,p0_accu_coeff_5h,p0_accu_coeff_5m,p_t_29_0h,p_t_29_0m,p_t_29_0l);
+Mul233(&p_t_31_0h,&p_t_31_0m,&p_t_31_0l,p_x_0_pow2h,p_x_0_pow2m,p_t_30_0h,p_t_30_0m,p_t_30_0l);
+Add233(&p_t_32_0h,&p_t_32_0m,&p_t_32_0l,p0_accu_coeff_3h,p0_accu_coeff_3m,p_t_31_0h,p_t_31_0m,p_t_31_0l);
+Mul233(&p_t_33_0h,&p_t_33_0m,&p_t_33_0l,p_x_0_pow2h,p_x_0_pow2m,p_t_32_0h,p_t_32_0m,p_t_32_0l);
+Add133(&p_t_34_0h,&p_t_34_0m,&p_t_34_0l,p0_accu_coeff_1h,p_t_33_0h,p_t_33_0m,p_t_33_0l);
+Mul133(&p_t_35_0h,&p_t_35_0m,&p_t_35_0l,x,p_t_34_0h,p_t_34_0m,p_t_34_0l);
+Renormalize3(p_resh,p_resm,p_resl,p_t_35_0h,p_t_35_0m,p_t_35_0l);
+
+
+}
+
+
+static void p_accu(double *p_resh, double *p_resm, double *p_resl, double x, int index) {
+  
+
+double p_t_1_0h;
+double p_t_2_0h;
+double p_t_3_0h;
+double p_t_4_0h;
+double p_t_5_0h;
+double p_t_6_0h;
+double p_t_7_0h;
+double p_t_8_0h;
+double p_t_9_0h;
+double p_t_10_0h;
+double p_t_11_0h;
+double p_t_12_0h;
+double p_t_13_0h;
+double p_t_14_0h;
+double p_t_15_0h;
+double p_t_16_0h;
+double p_t_17_0h, p_t_17_0m;
+double p_t_18_0h, p_t_18_0m;
+double p_t_19_0h, p_t_19_0m;
+double p_t_20_0h, p_t_20_0m;
+double p_t_21_0h, p_t_21_0m;
+double p_t_22_0h, p_t_22_0m;
+double p_t_23_0h, p_t_23_0m;
+double p_t_24_0h, p_t_24_0m;
+double p_t_25_0h, p_t_25_0m;
+double p_t_26_0h, p_t_26_0m;
+double p_t_27_0h, p_t_27_0m;
+double p_t_28_0h, p_t_28_0m;
+double p_t_29_0h, p_t_29_0m;
+double p_t_30_0h, p_t_30_0m;
+double p_t_31_0h, p_t_31_0m;
+double p_t_32_0h, p_t_32_0m;
+double p_t_33_0h, p_t_33_0m;
+double p_t_34_0h, p_t_34_0m;
+double p_t_35_0h, p_t_35_0m, p_t_35_0l;
+double p_t_36_0h, p_t_36_0m, p_t_36_0l;
+double p_t_37_0h, p_t_37_0m, p_t_37_0l;
+double p_t_38_0h, p_t_38_0m, p_t_38_0l;
+double p_t_39_0h, p_t_39_0m, p_t_39_0l;
+ 
+
+
+p_t_1_0h = p_accu_coeff_22h;
+p_t_2_0h = p_t_1_0h * x;
+p_t_3_0h = p_accu_coeff_21h + p_t_2_0h;
+p_t_4_0h = p_t_3_0h * x;
+p_t_5_0h = p_accu_coeff_20h + p_t_4_0h;
+p_t_6_0h = p_t_5_0h * x;
+p_t_7_0h = p_accu_coeff_19h + p_t_6_0h;
+p_t_8_0h = p_t_7_0h * x;
+p_t_9_0h = p_accu_coeff_18h + p_t_8_0h;
+p_t_10_0h = p_t_9_0h * x;
+p_t_11_0h = p_accu_coeff_17h + p_t_10_0h;
+p_t_12_0h = p_t_11_0h * x;
+p_t_13_0h = p_accu_coeff_16h + p_t_12_0h;
+p_t_14_0h = p_t_13_0h * x;
+p_t_15_0h = p_accu_coeff_15h + p_t_14_0h;
+p_t_16_0h = p_t_15_0h * x;
+Add12(p_t_17_0h,p_t_17_0m,p_accu_coeff_14h,p_t_16_0h);
+Mul122(&p_t_18_0h,&p_t_18_0m,x,p_t_17_0h,p_t_17_0m);
+Add122(&p_t_19_0h,&p_t_19_0m,p_accu_coeff_13h,p_t_18_0h,p_t_18_0m);
+Mul122(&p_t_20_0h,&p_t_20_0m,x,p_t_19_0h,p_t_19_0m);
+Add122(&p_t_21_0h,&p_t_21_0m,p_accu_coeff_12h,p_t_20_0h,p_t_20_0m);
+Mul122(&p_t_22_0h,&p_t_22_0m,x,p_t_21_0h,p_t_21_0m);
+Add122(&p_t_23_0h,&p_t_23_0m,p_accu_coeff_11h,p_t_22_0h,p_t_22_0m);
+Mul122(&p_t_24_0h,&p_t_24_0m,x,p_t_23_0h,p_t_23_0m);
+Add122(&p_t_25_0h,&p_t_25_0m,p_accu_coeff_10h,p_t_24_0h,p_t_24_0m);
+Mul122(&p_t_26_0h,&p_t_26_0m,x,p_t_25_0h,p_t_25_0m);
+Add122(&p_t_27_0h,&p_t_27_0m,p_accu_coeff_9h,p_t_26_0h,p_t_26_0m);
+MulAdd212(&p_t_28_0h,&p_t_28_0m,p_accu_coeff_8h,p_accu_coeff_8m,x,p_t_27_0h,p_t_27_0m);
+MulAdd212(&p_t_29_0h,&p_t_29_0m,p_accu_coeff_7h,p_accu_coeff_7m,x,p_t_28_0h,p_t_28_0m);
+MulAdd212(&p_t_30_0h,&p_t_30_0m,p_accu_coeff_6h,p_accu_coeff_6m,x,p_t_29_0h,p_t_29_0m);
+MulAdd212(&p_t_31_0h,&p_t_31_0m,p_accu_coeff_5h,p_accu_coeff_5m,x,p_t_30_0h,p_t_30_0m);
+MulAdd212(&p_t_32_0h,&p_t_32_0m,p_accu_coeff_4h,p_accu_coeff_4m,x,p_t_31_0h,p_t_31_0m);
+MulAdd212(&p_t_33_0h,&p_t_33_0m,p_accu_coeff_3h,p_accu_coeff_3m,x,p_t_32_0h,p_t_32_0m);
+Mul122(&p_t_34_0h,&p_t_34_0m,x,p_t_33_0h,p_t_33_0m);
+Add23(&p_t_35_0h,&p_t_35_0m,&p_t_35_0l,p_accu_coeff_2h,p_accu_coeff_2m,p_t_34_0h,p_t_34_0m);
+Mul133(&p_t_36_0h,&p_t_36_0m,&p_t_36_0l,x,p_t_35_0h,p_t_35_0m,p_t_35_0l);
+Add233(&p_t_37_0h,&p_t_37_0m,&p_t_37_0l,p_accu_coeff_1h,p_accu_coeff_1m,p_t_36_0h,p_t_36_0m,p_t_36_0l);
+Mul133(&p_t_38_0h,&p_t_38_0m,&p_t_38_0l,x,p_t_37_0h,p_t_37_0m,p_t_37_0l);
+Add233(&p_t_39_0h,&p_t_39_0m,&p_t_39_0l,p_accu_coeff_0h,p_accu_coeff_0m,p_t_38_0h,p_t_38_0m,p_t_38_0l);
+Renormalize3(p_resh,p_resm,p_resl,p_t_39_0h,p_t_39_0m,p_t_39_0l);
+
+
+}
+
+
+static void p9_accu(double *p_resh, double *p_resm, double *p_resl, double x) {
+
+
+
+
+double p_t_1_0h;
+double p_t_2_0h;
+double p_t_3_0h;
+double p_t_4_0h;
+double p_t_5_0h;
+double p_t_6_0h;
+double p_t_7_0h;
+double p_t_8_0h;
+double p_t_9_0h;
+double p_t_10_0h;
+double p_t_11_0h;
+double p_t_12_0h;
+double p_t_13_0h;
+double p_t_14_0h;
+double p_t_15_0h;
+double p_t_16_0h;
+double p_t_17_0h, p_t_17_0m;
+double p_t_18_0h, p_t_18_0m;
+double p_t_19_0h, p_t_19_0m;
+double p_t_20_0h, p_t_20_0m;
+double p_t_21_0h, p_t_21_0m;
+double p_t_22_0h, p_t_22_0m;
+double p_t_23_0h, p_t_23_0m;
+double p_t_24_0h, p_t_24_0m;
+double p_t_25_0h, p_t_25_0m;
+double p_t_26_0h, p_t_26_0m;
+double p_t_27_0h, p_t_27_0m;
+double p_t_28_0h, p_t_28_0m;
+double p_t_29_0h, p_t_29_0m;
+double p_t_30_0h, p_t_30_0m;
+double p_t_31_0h, p_t_31_0m;
+double p_t_32_0h, p_t_32_0m;
+double p_t_33_0h, p_t_33_0m, p_t_33_0l;
+double p_t_34_0h, p_t_34_0m, p_t_34_0l;
+double p_t_35_0h, p_t_35_0m, p_t_35_0l;
+ 
+
+
+p_t_1_0h = p9_accu_coeff_20h;
+p_t_2_0h = p_t_1_0h * x;
+p_t_3_0h = p9_accu_coeff_19h + p_t_2_0h;
+p_t_4_0h = p_t_3_0h * x;
+p_t_5_0h = p9_accu_coeff_18h + p_t_4_0h;
+p_t_6_0h = p_t_5_0h * x;
+p_t_7_0h = p9_accu_coeff_17h + p_t_6_0h;
+p_t_8_0h = p_t_7_0h * x;
+p_t_9_0h = p9_accu_coeff_16h + p_t_8_0h;
+p_t_10_0h = p_t_9_0h * x;
+p_t_11_0h = p9_accu_coeff_15h + p_t_10_0h;
+p_t_12_0h = p_t_11_0h * x;
+p_t_13_0h = p9_accu_coeff_14h + p_t_12_0h;
+p_t_14_0h = p_t_13_0h * x;
+p_t_15_0h = p9_accu_coeff_13h + p_t_14_0h;
+p_t_16_0h = p_t_15_0h * x;
+Add12(p_t_17_0h,p_t_17_0m,p9_accu_coeff_12h,p_t_16_0h);
+Mul122(&p_t_18_0h,&p_t_18_0m,x,p_t_17_0h,p_t_17_0m);
+Add122(&p_t_19_0h,&p_t_19_0m,p9_accu_coeff_11h,p_t_18_0h,p_t_18_0m);
+Mul122(&p_t_20_0h,&p_t_20_0m,x,p_t_19_0h,p_t_19_0m);
+Add122(&p_t_21_0h,&p_t_21_0m,p9_accu_coeff_10h,p_t_20_0h,p_t_20_0m);
+Mul122(&p_t_22_0h,&p_t_22_0m,x,p_t_21_0h,p_t_21_0m);
+Add122(&p_t_23_0h,&p_t_23_0m,p9_accu_coeff_9h,p_t_22_0h,p_t_22_0m);
+Mul122(&p_t_24_0h,&p_t_24_0m,x,p_t_23_0h,p_t_23_0m);
+Add122(&p_t_25_0h,&p_t_25_0m,p9_accu_coeff_8h,p_t_24_0h,p_t_24_0m);
+MulAdd212(&p_t_26_0h,&p_t_26_0m,p9_accu_coeff_7h,p9_accu_coeff_7m,x,p_t_25_0h,p_t_25_0m);
+MulAdd212(&p_t_27_0h,&p_t_27_0m,p9_accu_coeff_6h,p9_accu_coeff_6m,x,p_t_26_0h,p_t_26_0m);
+MulAdd212(&p_t_28_0h,&p_t_28_0m,p9_accu_coeff_5h,p9_accu_coeff_5m,x,p_t_27_0h,p_t_27_0m);
+MulAdd212(&p_t_29_0h,&p_t_29_0m,p9_accu_coeff_4h,p9_accu_coeff_4m,x,p_t_28_0h,p_t_28_0m);
+MulAdd212(&p_t_30_0h,&p_t_30_0m,p9_accu_coeff_3h,p9_accu_coeff_3m,x,p_t_29_0h,p_t_29_0m);
+MulAdd212(&p_t_31_0h,&p_t_31_0m,p9_accu_coeff_2h,p9_accu_coeff_2m,x,p_t_30_0h,p_t_30_0m);
+Mul122(&p_t_32_0h,&p_t_32_0m,x,p_t_31_0h,p_t_31_0m);
+Add23(&p_t_33_0h,&p_t_33_0m,&p_t_33_0l,p9_accu_coeff_1h,p9_accu_coeff_1m,p_t_32_0h,p_t_32_0m);
+Mul133(&p_t_34_0h,&p_t_34_0m,&p_t_34_0l,x,p_t_33_0h,p_t_33_0m,p_t_33_0l);
+Add233(&p_t_35_0h,&p_t_35_0m,&p_t_35_0l,p9_accu_coeff_0h,p9_accu_coeff_0m,p_t_34_0h,p_t_34_0m,p_t_34_0l);
+Renormalize3(p_resh,p_resm,p_resl,p_t_35_0h,p_t_35_0m,p_t_35_0l);
+
+
+}
+
+
+
+
+double asin_rn(double x) {
+  db_number xdb, zdb;
+  double sign, z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinhover, asinmover, asinlover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double asin;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-28) we have
+     
+     arcsin(x) = x * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-55) 
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < ASINSIMPLEBOUND) {
+    return x;
+  }
+
+  /* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return PIHALFH;
+    }
+    if (x == -1.0) {
+      return - PIHALFH;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Rounding test */
+
+    if(asinh == (asinh + (asinm * RNROUNDCST))) 
+      return asinh;
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Final rounding */
+
+    RoundToNearest3(&asin,asinh,asinm,asinl);
+
+    return asin;
+  } 
+
+  /* Strip off the sign of argument x */
+  sign = 1.0;
+  if (x < 0.0) sign = -sign;
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+    p9h = -p9h;
+    p9m = -p9m;
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    Add22(&asinh,&asinm,PIHALFH,PIHALFM,t1h,t1m);
+
+    /* Rounding test */
+
+    if(asinh == (asinh + (asinm * RNROUNDCST))) 
+      return sign * asinh;
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+    p9h = -p9h;
+    p9m = -p9m;
+    p9l = -p9l;
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+    Add33(&asinhover,&asinmover,&asinlover,PIHALFH,PIHALFM,PIHALFL,t1h,t1m,t1l);
+
+    Renormalize3(&asinh,&asinm,&asinl,asinhover,asinmover,asinlover);
+
+    /* Final rounding */    
+
+    RoundToNearest3(&asin,asinh,asinm,asinl);
+
+    return sign * asin;
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+
+  /* Rounding test */
+  
+  if(asinh == (asinh + (asinm * RNROUNDCST))) 
+    return sign * asinh;
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+  
+  /* Final rounding */
+  
+  RoundToNearest3(&asin,asinh,asinm,asinl);
+  
+  return sign * asin;
+  
+}
+
+
+double asin_ru(double x) {
+  db_number xdb, zdb;
+  double sign, z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinhover, asinmover, asinlover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-28) we have
+     
+     arcsin(x) = x * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-55) 
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < ASINSIMPLEBOUND) {
+    /* If x == 0 then we got the algebraic result arcsin(0) = 0
+       If x < 0 then the truncation rest is negative but less than 
+       1 ulp; we round upwards by returning x
+    */
+    if (x <= 0.0) return x;
+    /* Otherwise the rest is positive, less than 1 ulp and the
+       image is not algebraic 
+       We return x + 1ulp
+    */
+    xdb.l++;
+    return xdb.d;
+  }
+
+  /* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return PIHALFRU;
+    }
+    if (x == -1.0) {
+      return - PIHALFH;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RU(asinh, asinm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Final rounding */
+
+    ReturnRoundUpwards3(asinh,asinm,asinl);
+
+  } 
+
+  /* Strip off the sign of argument x */
+  sign = 1.0;
+  if (x < 0.0) sign = -sign;
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+    p9h = -p9h;
+    p9m = -p9m;
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    Add22(&asinh,&asinm,PIHALFH,PIHALFM,t1h,t1m);
+
+    /* Rounding test */
+
+    asinh *= sign;
+    asinm *= sign;
+
+    TEST_AND_RETURN_RU(asinh, asinm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+    p9h = -p9h;
+    p9m = -p9m;
+    p9l = -p9l;
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+    Add33(&asinhover,&asinmover,&asinlover,PIHALFH,PIHALFM,PIHALFL,t1h,t1m,t1l);
+
+    Renormalize3(&asinh,&asinm,&asinl,asinhover,asinmover,asinlover);
+
+    /* Final rounding */    
+
+    asinh *= sign;
+    asinm *= sign;
+    asinl *= sign;
+
+    ReturnRoundUpwards3(asinh,asinm,asinl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+
+  /* Rounding test */
+
+  asinh *= sign;
+  asinm *= sign;
+  
+  TEST_AND_RETURN_RU(asinh, asinm, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  if (x == ASINBADCASEX) return ASINBADCASEYRU;
+
+  p_accu(&asinh, &asinm, &asinl, z, index);
+  
+  /* Final rounding */
+
+  asinh *= sign;
+  asinm *= sign;
+  asinl *= sign;
+  
+  ReturnRoundUpwards3(asinh,asinm,asinl);
+
+}
+
+double asin_rd(double x) {
+  db_number xdb, zdb;
+  double sign, z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinhover, asinmover, asinlover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-28) we have
+     
+     arcsin(x) = x * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-55) 
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < ASINSIMPLEBOUND) {
+    /* If x == 0 then we got the algebraic result arcsin(0) = 0
+       If x > 0 then the truncation rest is positive but less than 
+       1 ulp; we round downwards by returning x
+    */
+    if (x >= 0) return x;
+    /* Otherwise the rest is negative, less than 1 ulp and the
+       image is not algebraic 
+       We return x - 1ulp
+       We stripped off the sign, so we add 1 ulp to -x (in xdb.d) and multiply by -1
+    */
+    xdb.l++;
+    return -1 * xdb.d;
+  }
+
+  /* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return PIHALFH;
+    }
+    if (x == -1.0) {
+      return - PIHALFRU;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RD(asinh, asinm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Final rounding */
+
+    ReturnRoundDownwards3(asinh,asinm,asinl);
+
+  } 
+
+  /* Strip off the sign of argument x */
+  sign = 1.0;
+  if (x < 0.0) sign = -sign;
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+    p9h = -p9h;
+    p9m = -p9m;
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    Add22(&asinh,&asinm,PIHALFH,PIHALFM,t1h,t1m);
+
+    /* Rounding test */
+
+    asinh *= sign;
+    asinm *= sign;
+
+    TEST_AND_RETURN_RD(asinh, asinm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+    p9h = -p9h;
+    p9m = -p9m;
+    p9l = -p9l;
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+    Add33(&asinhover,&asinmover,&asinlover,PIHALFH,PIHALFM,PIHALFL,t1h,t1m,t1l);
+
+    Renormalize3(&asinh,&asinm,&asinl,asinhover,asinmover,asinlover);
+
+    /* Final rounding */    
+
+    asinh *= sign;
+    asinm *= sign;
+    asinl *= sign;
+
+    ReturnRoundDownwards3(asinh,asinm,asinl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+
+  /* Rounding test */
+
+  asinh *= sign;
+  asinm *= sign;
+  
+  TEST_AND_RETURN_RD(asinh, asinm, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  if (x == ASINBADCASEX) return ASINBADCASEYRD;
+
+  p_accu(&asinh, &asinm, &asinl, z, index);
+  
+  /* Final rounding */
+
+  asinh *= sign;
+  asinm *= sign;
+  asinl *= sign;
+  
+  ReturnRoundDownwards3(asinh,asinm,asinl);
+
+}
+
+double asin_rz(double x) {
+  db_number xdb, zdb;
+  double sign, z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinhover, asinmover, asinlover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-28) we have
+     
+     arcsin(x) = x * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-55) 
+          
+     So we can decide the rounding without any computation 
+  */
+  if (xdb.i[HI] < ASINSIMPLEBOUND) {
+    /* If x == 0 the result is algebraic and equal to 0
+       If x < 0 the truncation rest is negative and less than 1 ulp, we return x
+       If x > 0 the truncation rest is positive and less than 1 ulp, we return x
+    */
+    return x;
+  }
+
+  /* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return PIHALFH;
+    }
+    if (x == -1.0) {
+      return - PIHALFH;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RZ(asinh, asinm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Final rounding */
+
+    ReturnRoundTowardsZero3(asinh,asinm,asinl);
+
+  } 
+
+  /* Strip off the sign of argument x */
+  sign = 1.0;
+  if (x < 0.0) sign = -sign;
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+    p9h = -p9h;
+    p9m = -p9m;
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    Add22(&asinh,&asinm,PIHALFH,PIHALFM,t1h,t1m);
+
+    /* Rounding test */
+
+    asinh *= sign;
+    asinm *= sign;
+
+    TEST_AND_RETURN_RZ(asinh, asinm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+    p9h = -p9h;
+    p9m = -p9m;
+    p9l = -p9l;
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+    Add33(&asinhover,&asinmover,&asinlover,PIHALFH,PIHALFM,PIHALFL,t1h,t1m,t1l);
+
+    Renormalize3(&asinh,&asinm,&asinl,asinhover,asinmover,asinlover);
+
+    /* Final rounding */    
+
+    asinh *= sign;
+    asinm *= sign;
+    asinl *= sign;
+
+    ReturnRoundTowardsZero3(asinh,asinm,asinl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+
+  /* Rounding test */
+
+  asinh *= sign;
+  asinm *= sign;
+  
+  TEST_AND_RETURN_RZ(asinh, asinm, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  if (x == ASINBADCASEX) return ASINBADCASEYRD;
+
+  p_accu(&asinh, &asinm, &asinl, z, index);
+  
+  /* Final rounding */
+
+  asinh *= sign;
+  asinm *= sign;
+  asinl *= sign;
+  
+  ReturnRoundTowardsZero3(asinh,asinm,asinl);
+
+}
+
+double acos_rn(double x) {
+  db_number xdb, zdb;
+  double z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double acosh, acosm, acosl;
+  double acoshover, acosmover, acoslover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-28) we have
+     
+     arccos(x) = (double-double(pi/2) - x) * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-87) 
+          
+     From 2^(-27) we have no bad rounding case longer than 5 bits 
+     more than the ulp of x, thus the approximation suffices.
+
+  */
+  if (xdb.i[HI] < ACOSSIMPLEBOUND) {
+    Add212(&acosh,&acosm,PIHALFH,PIHALFM,-x);
+    
+    return acosh;
+  }
+
+  /* acos is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.0;
+    }
+    if (x == -1.0) {
+      return PIH;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Recompose acos 
+
+       No cancellation possible because 
+
+       |asin(x)| <= 0.264 for |x| <= 0.26
+
+    */
+
+    asinh = - asinh;
+    asinm = - asinm;
+
+    Add22(&acosh,&acosm,PIHALFH,PIHALFM,asinh,asinm);
+
+    /* Rounding test */
+
+    if(acosh == (acosh + (acosm * RNROUNDCST))) 
+      return acosh;
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Recompose acos */
+
+    asinh = -asinh;
+    asinm = -asinm;
+    asinl = -asinl;
+
+    Add33(&acoshover,&acosmover,&acoslover,PIHALFH,PIHALFM,PIHALFL,asinh,asinm,asinl);
+    
+    Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+    /* Final rounding */
+
+    ReturnRoundToNearest3(acosh,acosm,acosl);
+
+  } 
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    
+    if (x > 0.0) {
+      acosh = t1h;
+      acosm = t1m;
+    } else {
+      /* arccos(-x) = Pi - arccos(x) */
+      t1h = - t1h;
+      t1m = - t1m;
+
+      Add22(&acosh,&acosm,PIH,PIM,t1h,t1m);
+    }
+
+    /* Rounding test */
+
+    if(acosh == (acosh + (acosm * RNROUNDCST))) 
+      return acosh;
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+
+    if (x > 0.0) {
+      Renormalize3(&acosh,&acosm,&acosl,t1h,t1m,t1l);
+    } else {
+      /* arccos(-x) = Pi - arccos(x) */
+      t1h = - t1h;
+      t1m = - t1m;
+      t1l = - t1l;
+
+      Add33(&acoshover,&acosmover,&acoslover,PIH,PIM,PIL,t1h,t1m,t1l);
+
+      Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+    }
+
+    /* Final rounding */    
+
+    ReturnRoundToNearest3(acosh,acosm,acosl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+  }
+
+  Add22Cond(&acosh,&acosm,PIHALFH,PIHALFM,asinh,asinm);
+
+  /* Rounding test */
+  
+  if(acosh == (acosh + (acosm * RNROUNDCST))) 
+    return acosh;
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+    asinl = - asinl; 
+  }
+
+  Add33Cond(&acoshover,&acosmover,&acoslover,PIHALFH,PIHALFM,PIHALFL,asinh,asinm,asinl);
+
+  Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+
+  /* Final rounding */
+  
+  ReturnRoundToNearest3(acosh,acosm,acosl);
+  
+  
+}
+
+double acos_ru(double x) {
+  db_number xdb, zdb, acoshdb;
+  double z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double acosh, acosm, acosl;
+  double acoshover, acosmover, acoslover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-28) we have
+     
+     arccos(x) = (double-double(pi/2) - x) * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-87) 
+          
+     From 2^(-27) we have no bad rounding case longer than 5 bits 
+     more than the ulp of x, thus the approximation suffices.
+
+  */
+  if (xdb.i[HI] < ACOSSIMPLEBOUND) {
+    Add212(&acosh,&acosm,PIHALFH,PIHALFM,-x);
+    
+    /* acosh is the round-to-nearest of acos(x) in this domain
+       
+       acosm is a at least 20 bit exact correction of the
+       rounding error of this round-to-nearest rounding.
+
+       If acosh is the rounded up result of acos(x), the
+       correction is negative and vice-versa.
+
+    */
+
+    if (acosm < 0.0) 
+      return acosh;
+ 
+    /* Here the correction acosm is positive, acosh is 
+       therefore the rounded down result of acos(x).
+       We add thus one ulp.
+    */
+
+    acoshdb.d = acosh;
+    acoshdb.l++;
+
+    return acoshdb.d;
+    
+  }
+
+  /* acos is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.0;
+    }
+    if (x == -1.0) {
+      return PIRU;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Recompose acos 
+
+       No cancellation possible because 
+
+       |asin(x)| <= 0.264 for |x| <= 0.26
+
+    */
+
+    asinh = - asinh;
+    asinm = - asinm;
+
+    Add22(&acosh,&acosm,PIHALFH,PIHALFM,asinh,asinm);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RU(acosh, acosm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Recompose acos */
+
+    asinh = -asinh;
+    asinm = -asinm;
+    asinl = -asinl;
+
+    Add33(&acoshover,&acosmover,&acoslover,PIHALFH,PIHALFM,PIHALFL,asinh,asinm,asinl);
+    
+    Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+    /* Final rounding */
+
+    ReturnRoundUpwards3(acosh,acosm,acosl);
+
+  } 
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    
+    if (x > 0.0) {
+      acosh = t1h;
+      acosm = t1m;
+    } else {
+      /* arccos(-x) = Pi - arccos(x) */
+      t1h = - t1h;
+      t1m = - t1m;
+
+      Add22(&acosh,&acosm,PIH,PIM,t1h,t1m);
+    }
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RU(acosh, acosm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+
+    if (x > 0.0) {
+      Renormalize3(&acosh,&acosm,&acosl,t1h,t1m,t1l);
+    } else {
+      /* arccos(-x) = Pi - arccos(x) */
+      t1h = - t1h;
+      t1m = - t1m;
+      t1l = - t1l;
+
+      Add33(&acoshover,&acosmover,&acoslover,PIH,PIM,PIL,t1h,t1m,t1l);
+
+      Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+    }
+
+    /* Final rounding */    
+
+    ReturnRoundUpwards3(acosh,acosm,acosl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+  }
+
+  Add22Cond(&acosh,&acosm,PIHALFH,PIHALFM,asinh,asinm);
+
+  /* Rounding test */
+  
+  TEST_AND_RETURN_RU(acosh, acosm, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+    asinl = - asinl; 
+  }
+
+  Add33Cond(&acoshover,&acosmover,&acoslover,PIHALFH,PIHALFM,PIHALFL,asinh,asinm,asinl);
+
+  Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+
+  /* Final rounding */
+  
+  ReturnRoundUpwards3(acosh,acosm,acosl);
+  
+}
+
+
+double acos_rd(double x) {
+  db_number xdb, zdb, acoshdb;
+  double z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double acosh, acosm, acosl;
+  double acoshover, acosmover, acoslover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-28) we have
+     
+     arccos(x) = (double-double(pi/2) - x) * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-87) 
+          
+     From 2^(-27) we have no bad rounding case longer than 5 bits 
+     more than the ulp of x, thus the approximation suffices.
+
+  */
+  if (xdb.i[HI] < ACOSSIMPLEBOUND) {
+    Add212(&acosh,&acosm,PIHALFH,PIHALFM,-x);
+    
+    /* acosh is the round-to-nearest of acos(x) in this domain
+       
+       acosm is a at least 20 bit exact correction of the
+       rounding error of this round-to-nearest rounding.
+
+       If acosh is the rounded up result of acos(x), the
+       correction is negative and vice-versa.
+
+    */
+
+    if (acosm > 0.0) 
+      return acosh;
+ 
+    /* Here the correction acosm is negative, acosh is 
+       therefore the rounded up result of acos(x).
+       We subtract thus one ulp.
+    */
+
+    acoshdb.d = acosh;
+    acoshdb.l--;
+
+    return acoshdb.d;
+    
+  }
+
+  /* acos is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.0;
+    }
+    if (x == -1.0) {
+      return PIH;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Recompose acos 
+
+       No cancellation possible because 
+
+       |asin(x)| <= 0.264 for |x| <= 0.26
+
+    */
+
+    asinh = - asinh;
+    asinm = - asinm;
+
+    Add22(&acosh,&acosm,PIHALFH,PIHALFM,asinh,asinm);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RD(acosh, acosm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Recompose acos */
+
+    asinh = -asinh;
+    asinm = -asinm;
+    asinl = -asinl;
+
+    Add33(&acoshover,&acosmover,&acoslover,PIHALFH,PIHALFM,PIHALFL,asinh,asinm,asinl);
+    
+    Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+    /* Final rounding */
+
+    ReturnRoundDownwards3(acosh,acosm,acosl);
+
+  } 
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    
+    if (x > 0.0) {
+      acosh = t1h;
+      acosm = t1m;
+    } else {
+      /* arccos(-x) = Pi - arccos(x) */
+      t1h = - t1h;
+      t1m = - t1m;
+
+      Add22(&acosh,&acosm,PIH,PIM,t1h,t1m);
+    }
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RD(acosh, acosm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+
+    if (x > 0.0) {
+      Renormalize3(&acosh,&acosm,&acosl,t1h,t1m,t1l);
+    } else {
+      /* arccos(-x) = Pi - arccos(x) */
+      t1h = - t1h;
+      t1m = - t1m;
+      t1l = - t1l;
+
+      Add33(&acoshover,&acosmover,&acoslover,PIH,PIM,PIL,t1h,t1m,t1l);
+
+      Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+    }
+
+    /* Final rounding */    
+
+    ReturnRoundDownwards3(acosh,acosm,acosl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+  }
+
+  Add22Cond(&acosh,&acosm,PIHALFH,PIHALFM,asinh,asinm);
+
+  /* Rounding test */
+  
+  TEST_AND_RETURN_RD(acosh, acosm, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+    asinl = - asinl; 
+  }
+
+  Add33Cond(&acoshover,&acosmover,&acoslover,PIHALFH,PIHALFM,PIHALFL,asinh,asinm,asinl);
+
+  Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+  /* Final rounding */
+  
+  ReturnRoundDownwards3(acosh,acosm,acosl);
+  
+}
+
+
+
+
+double acospi_rn(double x) {
+  db_number xdb, zdb;
+  double z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinpih, asinpim, asinpil;
+  double acosh, acosm, acosl;
+  double acoshover, acosmover, acoslover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double t2h, t2m, t2l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-54) we have
+     
+     arccos(x)/pi = 1/2 * (1 + xi)
+
+     with 0 <= xi < 2^(-54) 
+          
+     So arcospi(x) = 0.5 in this case.
+
+  */
+  if (xdb.i[HI] < ACOSPISIMPLEBOUND) {
+    return 0.5;
+  }
+
+  /* acospi is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.0;
+    }
+    if (x == -1.0) {
+      return 1.0;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Recompose acos/pi
+
+       We have 
+
+       arccos(x)/pi = 1/2 + (-1/pi) * arcsin(x)
+
+       No cancellation possible because 
+
+       |asin(x)/pi| <= 0.0837 for |x| <= 0.26
+
+    */
+
+    Mul22(&asinpih,&asinpim,MRECPRPIH,MRECPRPIM,asinh,asinm);
+    
+    Add122(&acosh,&acosm,0.5,asinpih,asinpim);
+
+    /* Rounding test */
+
+    if(acosh == (acosh + (acosm * RNROUNDCST))) 
+      return acosh;
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Recompose acos/pi */
+
+    Mul33(&asinpih,&asinpim,&asinpil,MRECPRPIH,MRECPRPIM,MRECPRPIL,asinh,asinm,asinl);
+    
+    Add133(&acoshover,&acosmover,&acoslover,0.5,asinpih,asinpim,asinpil);
+    
+    Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+    /* Final rounding */
+
+    ReturnRoundToNearest3(acosh,acosm,acosl);
+
+  } 
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    
+    Mul22(&t2h,&t2m,RECPRPIH,RECPRPIM,t1h,t1m);
+
+    if (x > 0.0) {
+      acosh = t2h;
+      acosm = t2m;
+    } else {
+      /* arccos(-x)/pi = 1 - arccos(x)/pi */
+      t2h = - t2h;
+      t2m = - t2m;
+
+      Add122(&acosh,&acosm,1.0,t2h,t2m);
+    }
+
+    /* Rounding test */
+
+    if(acosh == (acosh + (acosm * RNROUNDCST))) 
+      return acosh;
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+
+    Mul33(&t2h,&t2m,&t2l,RECPRPIH,RECPRPIM,RECPRPIL,t1h,t1m,t1l);
+
+    if (x > 0.0) {
+      Renormalize3(&acosh,&acosm,&acosl,t2h,t2m,t2l);
+    } else {
+      /* arccos(-x)/pi = 1 - arccos(x)/pi */
+      t2h = - t2h;
+      t2m = - t2m;
+      t2l = - t2l;
+
+      Add133(&acoshover,&acosmover,&acoslover,1.0,t2h,t2m,t2l);
+
+      Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+    }
+
+    /* Final rounding */    
+
+    ReturnRoundToNearest3(acosh,acosm,acosl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  /* Recompose acos(x)/pi out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+  }
+
+  Mul22(&asinpih,&asinpim,RECPRPIH,RECPRPIM,asinh,asinm);
+
+  Add122Cond(&acosh,&acosm,0.5,asinpih,asinpim);
+
+  /* Rounding test */
+  
+  if(acosh == (acosh + (acosm * RNROUNDCST))) 
+    return acosh;
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+    asinl = - asinl; 
+  }
+
+  Mul33(&asinpih,&asinpim,&asinpil,RECPRPIH,RECPRPIM,RECPRPIL,asinh,asinm,asinl);
+
+  Add133Cond(&acoshover,&acosmover,&acoslover,0.5,asinpih,asinpim,asinpil);
+
+  Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+  /* Final rounding */
+  
+  ReturnRoundToNearest3(acosh,acosm,acosl);
+    
+}
+
+double acospi_rd(double x) {
+  db_number xdb, zdb;
+  double z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinpih, asinpim, asinpil;
+  double acosh, acosm, acosl;
+  double acoshover, acosmover, acoslover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double t2h, t2m, t2l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-54) we have
+     
+     arccos(x)/pi = 1/2 * (1 + xi)
+
+     with 0 <= xi < 2^(-54) 
+          
+     Thus we have
+
+     acospi(x) = 
+
+     (i)  0.5                if x <= 0
+     (ii) 0.5 - 1/2 ulp(0.5) if x > 0
+
+  */
+  if (xdb.i[HI] < ACOSPISIMPLEBOUND) {
+    if (x <= 0.0) 
+      return 0.5;
+    
+    return HALFMINUSHALFULP;
+  }
+
+  /* acospi is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.0;
+    }
+    if (x == -1.0) {
+      return 1.0;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Recompose acos/pi
+
+       We have 
+
+       arccos(x)/pi = 1/2 + (-1/pi) * arcsin(x)
+
+       No cancellation possible because 
+
+       |asin(x)/pi| <= 0.0837 for |x| <= 0.26
+
+    */
+
+    Mul22(&asinpih,&asinpim,MRECPRPIH,MRECPRPIM,asinh,asinm);
+    
+    Add122(&acosh,&acosm,0.5,asinpih,asinpim);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RD(acosh, acosm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Recompose acos/pi */
+
+    Mul33(&asinpih,&asinpim,&asinpil,MRECPRPIH,MRECPRPIM,MRECPRPIL,asinh,asinm,asinl);
+    
+    Add133(&acoshover,&acosmover,&acoslover,0.5,asinpih,asinpim,asinpil);
+    
+    Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+    /* Final rounding */
+
+    ReturnRoundDownwards3(acosh,acosm,acosl);
+
+  } 
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    
+    Mul22(&t2h,&t2m,RECPRPIH,RECPRPIM,t1h,t1m);
+
+    if (x > 0.0) {
+      acosh = t2h;
+      acosm = t2m;
+    } else {
+      /* arccos(-x)/pi = 1 - arccos(x)/pi */
+      t2h = - t2h;
+      t2m = - t2m;
+
+      Add122(&acosh,&acosm,1.0,t2h,t2m);
+    }
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RD(acosh, acosm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+
+    Mul33(&t2h,&t2m,&t2l,RECPRPIH,RECPRPIM,RECPRPIL,t1h,t1m,t1l);
+
+    if (x > 0.0) {
+      Renormalize3(&acosh,&acosm,&acosl,t2h,t2m,t2l);
+    } else {
+      /* arccos(-x)/pi = 1 - arccos(x)/pi */
+      t2h = - t2h;
+      t2m = - t2m;
+      t2l = - t2l;
+
+      Add133(&acoshover,&acosmover,&acoslover,1.0,t2h,t2m,t2l);
+
+      Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+    }
+
+    /* Final rounding */    
+
+    ReturnRoundDownwards3(acosh,acosm,acosl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  /* Recompose acos(x)/pi out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+  }
+
+  Mul22(&asinpih,&asinpim,RECPRPIH,RECPRPIM,asinh,asinm);
+
+  Add122Cond(&acosh,&acosm,0.5,asinpih,asinpim);
+
+  /* Rounding test */
+  
+  TEST_AND_RETURN_RD(acosh, acosm, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+    asinl = - asinl; 
+  }
+
+  Mul33(&asinpih,&asinpim,&asinpil,RECPRPIH,RECPRPIM,RECPRPIL,asinh,asinm,asinl);
+
+  Add133Cond(&acoshover,&acosmover,&acoslover,0.5,asinpih,asinpim,asinpil);
+
+  Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+  /* Final rounding */
+  
+  ReturnRoundDownwards3(acosh,acosm,acosl);
+    
+}
+
+double acospi_ru(double x) {
+  db_number xdb, zdb;
+  double z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinpih, asinpim, asinpil;
+  double acosh, acosm, acosl;
+  double acoshover, acosmover, acoslover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double t2h, t2m, t2l;
+  double xabs;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-54) we have
+     
+     arccos(x)/pi = 1/2 * (1 + xi)
+
+     with 0 <= xi < 2^(-54) 
+          
+     Thus we have
+
+     acospi(x) = 
+
+     (i)  0.5              if x >= 0
+     (ii) 0.5 + 1 ulp(0.5) if x < 0
+
+  */
+  if (xdb.i[HI] < ACOSPISIMPLEBOUND) {
+    if (x >= 0.0) 
+      return 0.5;
+    
+    return 0.50000000000000011102230246251565404236316680908203125;
+  }
+
+  /* acospi is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.0;
+    }
+    if (x == -1.0) {
+      return 1.0;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    /* Recompose acos/pi
+
+       We have 
+
+       arccos(x)/pi = 1/2 + (-1/pi) * arcsin(x)
+
+       No cancellation possible because 
+
+       |asin(x)/pi| <= 0.0837 for |x| <= 0.26
+
+    */
+
+    Mul22(&asinpih,&asinpim,MRECPRPIH,MRECPRPIM,asinh,asinm);
+    
+    Add122(&acosh,&acosm,0.5,asinpih,asinpim);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RU(acosh, acosm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    /* Recompose acos/pi */
+
+    Mul33(&asinpih,&asinpim,&asinpil,MRECPRPIH,MRECPRPIM,MRECPRPIL,asinh,asinm,asinl);
+    
+    Add133(&acoshover,&acosmover,&acoslover,0.5,asinpih,asinpim,asinpil);
+    
+    Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+    /* Final rounding */
+
+    ReturnRoundUpwards3(acosh,acosm,acosl);
+
+  } 
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    
+    Mul22(&t2h,&t2m,RECPRPIH,RECPRPIM,t1h,t1m);
+
+    if (x > 0.0) {
+      acosh = t2h;
+      acosm = t2m;
+    } else {
+      /* arccos(-x)/pi = 1 - arccos(x)/pi */
+      t2h = - t2h;
+      t2m = - t2m;
+
+      Add122(&acosh,&acosm,1.0,t2h,t2m);
+    }
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RU(acosh, acosm, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+
+    Mul33(&t2h,&t2m,&t2l,RECPRPIH,RECPRPIM,RECPRPIL,t1h,t1m,t1l);
+
+    if (x > 0.0) {
+      Renormalize3(&acosh,&acosm,&acosl,t2h,t2m,t2l);
+    } else {
+      /* arccos(-x)/pi = 1 - arccos(x)/pi */
+      t2h = - t2h;
+      t2m = - t2m;
+      t2l = - t2l;
+
+      Add133(&acoshover,&acosmover,&acoslover,1.0,t2h,t2m,t2l);
+
+      Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+    }
+
+    /* Final rounding */    
+
+    ReturnRoundUpwards3(acosh,acosm,acosl);
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  /* Recompose acos(x)/pi out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+  }
+
+  Mul22(&asinpih,&asinpim,RECPRPIH,RECPRPIM,asinh,asinm);
+
+  Add122Cond(&acosh,&acosm,0.5,asinpih,asinpim);
+
+  /* Rounding test */
+  
+  TEST_AND_RETURN_RU(acosh, acosm, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+
+  /* Recompose acos(x) out of asin(abs(x)) 
+
+     In the case of a substraction, we will cancel 
+     not more than 1 bit.
+
+  */
+
+  if (x > 0.0) {
+    asinh = - asinh;
+    asinm = - asinm;
+    asinl = - asinl; 
+  }
+
+  Mul33(&asinpih,&asinpim,&asinpil,RECPRPIH,RECPRPIM,RECPRPIL,asinh,asinm,asinl);
+
+  Add133Cond(&acoshover,&acosmover,&acoslover,0.5,asinpih,asinpim,asinpil);
+
+  Renormalize3(&acosh,&acosm,&acosl,acoshover,acosmover,acoslover);
+
+  /* Final rounding */
+  
+  ReturnRoundUpwards3(acosh,acosm,acosl);
+    
+}
+
+
+
+double asinpi_rn(double x) {
+  db_number xdb, zdb, asinhdb, tempdb;
+  double sign, z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinpih, asinpim, asinpil;
+  double asinpihover, asinpimover, asinpilover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double t2h, t2m, t2l;
+  double asinpi;
+  double xabs;
+  double xScaled;
+  double xPih, xPim, xPil;
+  double xPihover, xPimover, xPilover;
+  double deltatemp, deltah, deltal;
+  double temp1, temp2h, temp2l, temp3;
+  double miulp;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-60) we have
+     
+     arcsin(x)/pi = x * triple-double(1/pi) * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-122)
+
+     We have no bad case worser than 
+     112 bits for asinpi(x) for |x| > 2^(-58)
+     and the order 3 term of asinpi is still more
+     far away. 
+          
+  */
+  if (xdb.i[HI] < ASINPISIMPLEBOUND) {
+    /* For a faster path for the exact case, 
+       we check first if x = 0
+    */
+
+    if (x == 0.0) 
+      return x;
+
+    /* We want a relatively fast path for values where
+       neither the input nor the output is subnormal 
+       because subnormal rounding is expensive.
+
+       Since 
+       
+       abs(double(asin(x)/pi)) <= 2^(-860) 
+       
+       for abs(x) <= 2^(-858), we filter for this (normal) value.
+
+    */
+
+    if (xdb.i[HI] >= ASINPINOSUBNORMALBOUND) {
+
+      /* Here abs(x) >= 2^(-858).
+	 The result is therefore clearly normal and
+	 the double precision numbers in the triple-double
+	 representation of TD(1/pi) * x are all normal, too.
+
+	 For speed, we use a two-step approach.
+	 We know that 
+
+	 || x*DD(1/pi)/(asin(x)/pi) - 1 ||_[-2^(-60);2^(-60)]^\infty <= 2^(-107.8) <= 2^(-80) 
+
+      */
+
+      Mul122(&xPih,&xPim,x,RECPRPIH,RECPRPIM);
+
+      if(xPih == (xPih + (xPim * RNROUNDCSTASINPI))) 
+	return xPih;
+      
+      Mul133(&xPihover,&xPimover,&xPilover,x,RECPRPIH,RECPRPIM,RECPRPIL);
+
+      Renormalize3(&xPih,&xPim,&xPil,xPihover,xPimover,xPilover);
+      
+      ReturnRoundToNearest3(xPih,xPim,xPil);
+
+    } 
+
+    /* Here abs(x) < 2^(-858)
+
+       Because of subnormals and especially because
+       of the fact that 1/pi < 1, we must scale x
+       appropriately. We compute hence:
+
+       asinpi(x) = round( ((x * 2^(1000)) * triple-double(1/pi)) * 2^(-1000))
+
+       where the rounding procedure works temporarily on the scaled 
+       intermediate.
+    */
+
+    xScaled = x * TWO1000;
+
+    Mul133(&xPihover,&xPimover,&xPilover,xScaled,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Renormalize3(&xPih,&xPim,&xPil,xPihover,xPimover,xPilover);
+
+    /* Produce a (possibly) subnormal intermediate rounding */
+
+    asinhdb.d = xPih * TWOM1000;
+
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+    tempdb.i[HI] = asinhdb.i[HI];
+    tempdb.i[LO] = asinhdb.i[LO];
+    asinhdb.i[LO] = tempdb.i[LO];
+    asinhdb.i[HI] = tempdb.i[HI];
+#else 
+    tempdb.d = asinhdb.d;
+#endif
+
+    /* Rescale the result */
+
+    temp1 = asinhdb.d * TWO1000;
+
+    /* Compute the scaled error, the operation is exact by Sterbenz' lemma */
+
+    deltatemp = xPih - temp1;
+
+    /* Sum up the errors, representing them on a double-double
+       
+       This is exact for the normal rounding case and the error
+       is neglectable in the subnormal rounding case.
+    */
+
+    Add12Cond(temp2h,temp2l,deltatemp,xPim);
+    temp3 = temp2l + xPil;
+    Add12(deltah,deltal,temp2h,temp3);
+
+    /* Compute now a scaled 1/2 ulp of the intermediate result 
+       in the direction of delta 
+    */
+
+    if ((x >= 0.0) ^ (deltah >= 0.0)) 
+      tempdb.l--;
+    else 
+      tempdb.l++;
+
+    miulp = TWO999 * (tempdb.d - asinhdb.d);
+
+    /* We must correct the intermediate rounding 
+       if the error on deltah + deltal is greater
+       in absolute value than miulp = 1/2 ulp in the
+       right direction.
+    */
+
+    if (ABS(deltah) < ABS(miulp)) {
+      /* deltah is less than miulp, deltal is less than 
+	 1/2 the ulp of deltah. Thus deltah + deltal is 
+	 less than miulp. We do not need to correct 
+	 the intermediate rounding.
+      */
+      return asinhdb.d;
+    }
+
+    if (ABS(deltah) > ABS(miulp)) {
+      /* deltah is greater than miulp and deltal cannot correct it.
+	 We must correct the rounding.
+
+	 tempdb.d (= asinhdb.d +/- 1 ulp) is the correct rounding.
+      */
+      return tempdb.d;
+    }
+
+    /* Here deltah and miulp are equal in absolute value 
+
+       We must correct the intermediate rounding iff the sign of deltal 
+       and deltah are the same.
+       
+    */
+
+    if ((deltah >= 0.0) ^ (deltal >= 0.0)) {
+      /* Here the sign is different, we return the 
+	 intermediate rounding asinhdb.d 
+      */
+      return asinhdb.d;
+    }
+    
+    /* Return the corrected result tempdb.d */
+
+    return tempdb.d;
+  }
+
+  /* asinpi is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.5;
+    }
+    if (x == -1.0) {
+      return - 0.5;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    Mul22(&asinpih,&asinpim,asinh,asinm,RECPRPIH,RECPRPIM);
+
+    /* Rounding test */
+
+    if(asinpih == (asinpih + (asinpim * RNROUNDCST))) 
+      return asinpih;
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    Mul33(&asinpihover,&asinpimover,&asinpilover,asinh,asinm,asinl,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+    /* Final rounding */
+
+    ReturnRoundToNearest3(asinpih,asinpim,asinpil);
+
+  } 
+
+  /* Strip off the sign of argument x */
+  sign = 1.0;
+  if (x < 0.0) sign = -sign;
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+    p9h = -p9h;
+    p9m = -p9m;
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    Mul22(&t2h,&t2m,t1h,t1m,RECPRPIH,RECPRPIM);
+
+    Add122(&asinpih,&asinpim,0.5,t2h,t2m);
+
+    /* Rounding test */
+
+    if(asinpih == (asinpih + (asinpim * RNROUNDCST))) 
+      return sign * asinpih;
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+    p9h = -p9h;
+    p9m = -p9m;
+    p9l = -p9l;
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+    Mul33(&t2h,&t2m,&t2l,t1h,t1m,t1l,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Add133(&asinpihover,&asinpimover,&asinpilover,0.5,t2h,t2m,t2l);
+
+    Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+    /* Final rounding */    
+
+    RoundToNearest3(&asinpi,asinpih,asinpim,asinpil);
+
+    return sign * asinpi;
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  Mul22(&asinpih,&asinpim,asinh,asinm,RECPRPIH,RECPRPIM);
+
+  /* Rounding test */
+  
+  if(asinpih == (asinpih + (asinpim * RNROUNDCST))) 
+    return sign * asinpih;
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+  
+  Mul33(&asinpihover,&asinpimover,&asinpilover,asinh,asinm,asinl,RECPRPIH,RECPRPIM,RECPRPIL);
+
+  Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+  /* Final rounding */
+  
+  RoundToNearest3(&asinpi,asinpih,asinpim,asinpil);
+  
+  return sign * asinpi;
+  
+}
+
+double asinpi_rd(double x) {
+  db_number xdb, zdb, asinhdb;
+  double sign, z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinpih, asinpim, asinpil;
+  double asinpihover, asinpimover, asinpilover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double t2h, t2m, t2l;
+  double asinpi;
+  double xabs;
+  double xScaled;
+  double xPih, xPim, xPil;
+  double xPihover, xPimover, xPilover;
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+  db_number tempdb;
+#endif
+  double deltatemp, deltah, deltal;
+  double temp1, temp2h, temp2l, temp3;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-60) we have
+     
+     arcsin(x)/pi = x * triple-double(1/pi) * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-122)
+
+     We have no bad case worser than 
+     112 bits for asinpi(x) for |x| > 2^(-58)
+     and the order 3 term of asinpi is still more
+     far away. 
+          
+  */
+  if (xdb.i[HI] < ASINPISIMPLEBOUND) {
+    /* For a faster path for the exact case, 
+       we check first if x = 0
+    */
+
+    if (x == 0.0) 
+      return x;
+
+    /* We want a relatively fast path for values where
+       neither the input nor the output is subnormal 
+       because subnormal rounding is expensive.
+
+       Since 
+       
+       abs(double(asin(x)/pi)) <= 2^(-860) 
+       
+       for abs(x) <= 2^(-858), we filter for this (normal) value.
+
+    */
+
+    if (xdb.i[HI] >= ASINPINOSUBNORMALBOUND) {
+
+      /* Here abs(x) >= 2^(-858).
+	 The result is therefore clearly normal and
+	 the double precision numbers in the triple-double
+	 representation of TD(1/pi) * x are all normal, too.
+
+	 For speed, we use a two-step approach.
+	 We know that 
+
+	 || x*DD(1/pi)/(asin(x)/pi) - 1 ||_[-2^(-60);2^(-60)]^\infty <= 2^(-107.8) <= 2^(-80) 
+
+      */
+
+      Mul122(&xPih,&xPim,x,RECPRPIH,RECPRPIM);
+
+      TEST_AND_RETURN_RD(xPih, xPim, RDROUNDCSTASINPI);
+      
+      Mul133(&xPihover,&xPimover,&xPilover,x,RECPRPIH,RECPRPIM,RECPRPIL);
+
+      Renormalize3(&xPih,&xPim,&xPil,xPihover,xPimover,xPilover);
+      
+      ReturnRoundDownwards3(xPih,xPim,xPil);
+
+    } 
+
+    /* Here abs(x) < 2^(-858)
+
+       Because of subnormals and especially because
+       of the fact that 1/pi < 1, we must scale x
+       appropriately. We compute hence:
+
+       asinpi(x) = round( ((x * 2^(1000)) * triple-double(1/pi)) * 2^(-1000))
+
+       where the rounding procedure works temporarily on the scaled 
+       intermediate.
+    */
+
+    xScaled = x * TWO1000;
+
+    Mul133(&xPihover,&xPimover,&xPilover,xScaled,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Renormalize3(&xPih,&xPim,&xPil,xPihover,xPimover,xPilover);
+
+    /* Produce a (possibly) subnormal intermediate rounding */
+
+    asinhdb.d = xPih * TWOM1000;
+
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+    tempdb.i[HI] = asinhdb.i[HI];
+    tempdb.i[LO] = asinhdb.i[LO];
+    asinhdb.i[LO] = tempdb.i[LO];
+    asinhdb.i[HI] = tempdb.i[HI];
+#endif
+
+
+    /* Rescale the result */
+
+    temp1 = asinhdb.d * TWO1000;
+
+    /* Compute the scaled error, the operation is exact by Sterbenz' lemma */
+
+    deltatemp = xPih - temp1;
+
+    /* Sum up the errors, representing them on a double-double
+       
+       This is exact for the normal rounding case and the error
+       is neglectable in the subnormal rounding case.
+    */
+
+    Add12Cond(temp2h,temp2l,deltatemp,xPim);
+    temp3 = temp2l + xPil;
+    Add12(deltah,deltal,temp2h,temp3);
+
+    /* We are doing directed rounding. Thus we must correct the rounding
+       if the sign of the error is not correct 
+       RD -> sign must be positive for correct rounding
+       RU -> sign must be negative for correct rounding
+       RZ -> sign must be positive for positive x and negative for negative x
+    */
+
+    if (deltah >= 0.0) {
+      /* The sign is correct, return the intermediate rounding */
+      return asinhdb.d;
+    }
+   
+    /* The sign is not correct
+
+       RD -> subtract 1 ulp
+       RU -> add 1 ulp
+       RZ -> subtract 1 ulp if x positive, add 1 ulp if x negative
+    */
+
+    if (x < 0.0) 
+      asinhdb.l++;
+    else 
+      asinhdb.l--;
+
+    return asinhdb.d;
+  }
+
+  /* asinpi is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.5;
+    }
+    if (x == -1.0) {
+      return - 0.5;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    Mul22(&asinpih,&asinpim,asinh,asinm,RECPRPIH,RECPRPIM);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RD(asinpih, asinpim, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    Mul33(&asinpihover,&asinpimover,&asinpilover,asinh,asinm,asinl,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+    /* Final rounding */
+
+    ReturnRoundDownwards3(asinpih,asinpim,asinpil);
+
+  } 
+
+  /* Strip off the sign of argument x */
+  sign = 1.0;
+  if (x < 0.0) sign = -sign;
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+    p9h = -p9h;
+    p9m = -p9m;
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    Mul22(&t2h,&t2m,t1h,t1m,RECPRPIH,RECPRPIM);
+
+    Add122(&asinpih,&asinpim,0.5,t2h,t2m);
+
+    /* Rounding test */
+
+    asinpih *= sign;
+    asinpim *= sign;
+
+    TEST_AND_RETURN_RD(asinpih, asinpim, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+    p9h = -p9h;
+    p9m = -p9m;
+    p9l = -p9l;
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+    Mul33(&t2h,&t2m,&t2l,t1h,t1m,t1l,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Add133(&asinpihover,&asinpimover,&asinpilover,0.5,t2h,t2m,t2l);
+
+    Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+    /* Final rounding */    
+
+    RoundDownwards3(&asinpi,asinpih,asinpim,asinpil);
+
+    return sign * asinpi;
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  Mul22(&asinpih,&asinpim,asinh,asinm,RECPRPIH,RECPRPIM);
+
+  /* Rounding test */
+
+  asinpih *= sign;
+  asinpim *= sign;
+  
+  TEST_AND_RETURN_RD(asinpih, asinpim, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+  
+  Mul33(&asinpihover,&asinpimover,&asinpilover,asinh,asinm,asinl,RECPRPIH,RECPRPIM,RECPRPIL);
+
+  Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+  /* Final rounding */
+  
+  RoundDownwards3(&asinpi,asinpih,asinpim,asinpil);
+  
+  return sign * asinpi;
+  
+}
+
+double asinpi_ru(double x) {
+  db_number xdb, zdb, asinhdb;
+  double sign, z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinpih, asinpim, asinpil;
+  double asinpihover, asinpimover, asinpilover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double t2h, t2m, t2l;
+  double asinpi;
+  double xabs;
+  double xScaled;
+  double xPih, xPim, xPil;
+  double xPihover, xPimover, xPilover;
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+  db_number tempdb;
+#endif
+  double deltatemp, deltah, deltal;
+  double temp1, temp2h, temp2l, temp3;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-60) we have
+     
+     arcsin(x)/pi = x * triple-double(1/pi) * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-122)
+
+     We have no bad case worser than 
+     112 bits for asinpi(x) for |x| > 2^(-58)
+     and the order 3 term of asinpi is still more
+     far away. 
+          
+  */
+  if (xdb.i[HI] < ASINPISIMPLEBOUND) {
+    /* For a faster path for the exact case, 
+       we check first if x = 0
+    */
+
+    if (x == 0.0) 
+      return x;
+
+    /* We want a relatively fast path for values where
+       neither the input nor the output is subnormal 
+       because subnormal rounding is expensive.
+
+       Since 
+       
+       abs(double(asin(x)/pi)) <= 2^(-860) 
+       
+       for abs(x) <= 2^(-858), we filter for this (normal) value.
+
+    */
+
+    if (xdb.i[HI] >= ASINPINOSUBNORMALBOUND) {
+
+      /* Here abs(x) >= 2^(-858).
+	 The result is therefore clearly normal and
+	 the double precision numbers in the triple-double
+	 representation of TD(1/pi) * x are all normal, too.
+
+	 For speed, we use a two-step approach.
+	 We know that 
+
+	 || x*DD(1/pi)/(asin(x)/pi) - 1 ||_[-2^(-60);2^(-60)]^\infty <= 2^(-107.8) <= 2^(-80) 
+
+      */
+
+      Mul122(&xPih,&xPim,x,RECPRPIH,RECPRPIM);
+
+      TEST_AND_RETURN_RU(xPih, xPim, RDROUNDCSTASINPI);
+      
+      Mul133(&xPihover,&xPimover,&xPilover,x,RECPRPIH,RECPRPIM,RECPRPIL);
+
+      Renormalize3(&xPih,&xPim,&xPil,xPihover,xPimover,xPilover);
+      
+      ReturnRoundUpwards3(xPih,xPim,xPil);
+
+    } 
+
+    /* Here abs(x) < 2^(-858)
+
+       Because of subnormals and especially because
+       of the fact that 1/pi < 1, we must scale x
+       appropriately. We compute hence:
+
+       asinpi(x) = round( ((x * 2^(1000)) * triple-double(1/pi)) * 2^(-1000))
+
+       where the rounding procedure works temporarily on the scaled 
+       intermediate.
+    */
+
+    xScaled = x * TWO1000;
+
+    Mul133(&xPihover,&xPimover,&xPilover,xScaled,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Renormalize3(&xPih,&xPim,&xPil,xPihover,xPimover,xPilover);
+
+    /* Produce a (possibly) subnormal intermediate rounding */
+
+    asinhdb.d = xPih * TWOM1000;
+
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+    tempdb.i[HI] = asinhdb.i[HI];
+    tempdb.i[LO] = asinhdb.i[LO];
+    asinhdb.i[LO] = tempdb.i[LO];
+    asinhdb.i[HI] = tempdb.i[HI];
+#endif
+
+    /* Rescale the result */
+
+    temp1 = asinhdb.d * TWO1000;
+
+    /* Compute the scaled error, the operation is exact by Sterbenz' lemma */
+
+    deltatemp = xPih - temp1;
+
+    /* Sum up the errors, representing them on a double-double
+       
+       This is exact for the normal rounding case and the error
+       is neglectable in the subnormal rounding case.
+    */
+
+    Add12Cond(temp2h,temp2l,deltatemp,xPim);
+    temp3 = temp2l + xPil;
+    Add12(deltah,deltal,temp2h,temp3);
+
+    /* We are doing directed rounding. Thus we must correct the rounding
+       if the sign of the error is not correct 
+       RD -> sign must be positive for correct rounding
+       RU -> sign must be negative for correct rounding
+       RZ -> sign must be positive for positive x and negative for negative x
+    */
+
+    if (deltah <= 0.0) {
+      /* The sign is correct, return the intermediate rounding */
+      return asinhdb.d;
+    }
+   
+    /* The sign is not correct
+
+       RD -> subtract 1 ulp
+       RU -> add 1 ulp
+       RZ -> subtract 1 ulp if x positive, add 1 ulp if x negative
+    */
+
+    if (x < 0.0) 
+      asinhdb.l--;
+    else 
+      asinhdb.l++;
+
+    return asinhdb.d;
+  }
+
+  /* asinpi is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.5;
+    }
+    if (x == -1.0) {
+      return - 0.5;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    Mul22(&asinpih,&asinpim,asinh,asinm,RECPRPIH,RECPRPIM);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RU(asinpih, asinpim, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    Mul33(&asinpihover,&asinpimover,&asinpilover,asinh,asinm,asinl,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+    /* Final rounding */
+
+    ReturnRoundUpwards3(asinpih,asinpim,asinpil);
+
+  } 
+
+  /* Strip off the sign of argument x */
+  sign = 1.0;
+  if (x < 0.0) sign = -sign;
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+    p9h = -p9h;
+    p9m = -p9m;
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    Mul22(&t2h,&t2m,t1h,t1m,RECPRPIH,RECPRPIM);
+
+    Add122(&asinpih,&asinpim,0.5,t2h,t2m);
+
+    /* Rounding test */
+
+    asinpih *= sign;
+    asinpim *= sign;
+
+    TEST_AND_RETURN_RU(asinpih, asinpim, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+    p9h = -p9h;
+    p9m = -p9m;
+    p9l = -p9l;
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+    Mul33(&t2h,&t2m,&t2l,t1h,t1m,t1l,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Add133(&asinpihover,&asinpimover,&asinpilover,0.5,t2h,t2m,t2l);
+
+    Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+    /* Final rounding */    
+
+    RoundUpwards3(&asinpi,asinpih,asinpim,asinpil);
+
+    return sign * asinpi;
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  Mul22(&asinpih,&asinpim,asinh,asinm,RECPRPIH,RECPRPIM);
+
+  /* Rounding test */
+
+  asinpih *= sign;
+  asinpim *= sign;
+  
+  TEST_AND_RETURN_RU(asinpih, asinpim, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+  
+  Mul33(&asinpihover,&asinpimover,&asinpilover,asinh,asinm,asinl,RECPRPIH,RECPRPIM,RECPRPIL);
+
+  Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+  /* Final rounding */
+  
+  RoundUpwards3(&asinpi,asinpih,asinpim,asinpil);
+  
+  return sign * asinpi;
+  
+}
+
+double asinpi_rz(double x) {
+  db_number xdb, zdb, asinhdb;
+  double sign, z, zp;
+  int index;
+  double asinh, asinm, asinl;
+  double asinpih, asinpim, asinpil;
+  double asinpihover, asinpimover, asinpilover;
+  double p9h, p9m, p9l, sqrh, sqrm, sqrl;
+  double t1h, t1m, t1l;
+  double t2h, t2m, t2l;
+  double asinpi;
+  double xabs;
+  double xScaled;
+  double xPih, xPim, xPil;
+  double xPihover, xPimover, xPilover;
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+  db_number tempdb;
+#endif
+  double deltatemp, deltah, deltal;
+  double temp1, temp2h, temp2l, temp3;
+
+  /* Start already computations for argument reduction */
+
+  zdb.d = 1.0 + x * x;
+
+  xdb.d = x;
+
+  /* Special case handling */
+  
+  /* Remove sign of x in floating-point */
+  xabs = ABS(x);
+  xdb.i[HI] &= 0x7fffffff;
+
+  /* If |x| < 2^(-60) we have
+     
+     arcsin(x)/pi = x * triple-double(1/pi) * ( 1 + xi ) 
+
+     with 0 <= xi < 2^(-122)
+
+     We have no bad case worser than 
+     112 bits for asinpi(x) for |x| > 2^(-58)
+     and the order 3 term of asinpi is still more
+     far away. 
+          
+  */
+  if (xdb.i[HI] < ASINPISIMPLEBOUND) {
+    /* For a faster path for the exact case, 
+       we check first if x = 0
+    */
+
+    if (x == 0.0) 
+      return x;
+
+    /* We want a relatively fast path for values where
+       neither the input nor the output is subnormal 
+       because subnormal rounding is expensive.
+
+       Since 
+       
+       abs(double(asin(x)/pi)) <= 2^(-860) 
+       
+       for abs(x) <= 2^(-858), we filter for this (normal) value.
+
+    */
+
+    if (xdb.i[HI] >= ASINPINOSUBNORMALBOUND) {
+
+      /* Here abs(x) >= 2^(-858).
+	 The result is therefore clearly normal and
+	 the double precision numbers in the triple-double
+	 representation of TD(1/pi) * x are all normal, too.
+
+	 For speed, we use a two-step approach.
+	 We know that 
+
+	 || x*DD(1/pi)/(asin(x)/pi) - 1 ||_[-2^(-60);2^(-60)]^\infty <= 2^(-107.8) <= 2^(-80) 
+
+      */
+
+      Mul122(&xPih,&xPim,x,RECPRPIH,RECPRPIM);
+
+      TEST_AND_RETURN_RZ(xPih, xPim, RDROUNDCSTASINPI);
+      
+      Mul133(&xPihover,&xPimover,&xPilover,x,RECPRPIH,RECPRPIM,RECPRPIL);
+
+      Renormalize3(&xPih,&xPim,&xPil,xPihover,xPimover,xPilover);
+      
+      ReturnRoundTowardsZero3(xPih,xPim,xPil);
+
+    } 
+
+    /* Here abs(x) < 2^(-858)
+
+       Because of subnormals and especially because
+       of the fact that 1/pi < 1, we must scale x
+       appropriately. We compute hence:
+
+       asinpi(x) = round( ((x * 2^(1000)) * triple-double(1/pi)) * 2^(-1000))
+
+       where the rounding procedure works temporarily on the scaled 
+       intermediate.
+    */
+
+    xScaled = x * TWO1000;
+
+    Mul133(&xPihover,&xPimover,&xPilover,xScaled,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Renormalize3(&xPih,&xPim,&xPil,xPihover,xPimover,xPilover);
+
+    /* Produce a (possibly) subnormal intermediate rounding */
+
+    asinhdb.d = xPih * TWOM1000;
+
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+    tempdb.i[HI] = asinhdb.i[HI];
+    tempdb.i[LO] = asinhdb.i[LO];
+    asinhdb.i[LO] = tempdb.i[LO];
+    asinhdb.i[HI] = tempdb.i[HI];
+#endif
+
+    /* Rescale the result */
+
+    temp1 = asinhdb.d * TWO1000;
+
+    /* Compute the scaled error, the operation is exact by Sterbenz' lemma */
+
+    deltatemp = xPih - temp1;
+
+    /* Sum up the errors, representing them on a double-double
+       
+       This is exact for the normal rounding case and the error
+       is neglectable in the subnormal rounding case.
+    */
+
+    Add12Cond(temp2h,temp2l,deltatemp,xPim);
+    temp3 = temp2l + xPil;
+    Add12(deltah,deltal,temp2h,temp3);
+
+    /* We are doing directed rounding. Thus we must correct the rounding
+       if the sign of the error is not correct 
+       RD -> sign must be positive for correct rounding
+       RU -> sign must be negative for correct rounding
+       RZ -> sign must be positive for positive x and negative for negative x
+    */
+
+    if ((x > 0.0) ^ (deltah < 0.0)) {
+      /* The sign is correct, return the intermediate rounding */
+      return asinhdb.d;
+    }
+   
+    /* The sign is not correct
+
+       RD -> subtract 1 ulp
+       RU -> add 1 ulp
+       RZ -> subtract 1 ulp if x positive, add 1 ulp if x negative
+    */
+
+    asinhdb.l--;
+
+    return asinhdb.d;
+  }
+
+  /* asinpi is defined on -1 <= x <= 1, elsewhere it is NaN */
+  if (xdb.i[HI] >= 0x3ff00000) {
+    if (x == 1.0) {
+      return 0.5;
+    }
+    if (x == -1.0) {
+      return - 0.5;
+    }
+    return (x-x)/0.0;    /* return NaN */
+  }
+
+  /* Argument reduction:
+
+     We have 10 intervals and 3 paths:
+
+     - interval 0   => path 1 using p0
+     - interval 1-8 => path 2 using p
+     - interval 9   => path 3 using p9
+
+  */
+
+  index = (0x000f0000 & zdb.i[HI]) >> 16;
+
+  /* 0 <= index <= 15 
+
+     index approximates roughly x^2 
+
+     Map indexes to intervals as follows:
+
+     0  -> 0 
+     1  -> 1
+     ... 
+     8  -> 8
+     9  -> 9
+     ... 
+     15 -> 9
+
+     For this mapping, filter first the case 0 -> 0
+     In consequence, 1 <= index <= 15, i.e. 
+     0 <= index - 1 <= 14 with the mapping index - 1 -> interval as
+
+     0  -> 1
+     ... 
+     7  -> 8
+     8  -> 9
+     ...
+     15 -> 9
+
+     Thus it suffices to check the 3rd bit of index - 1 after the first filter.
+     
+  */
+
+  if (index == 0) {
+    /* Path 1 using p0 */
+
+    p0_quick(&asinh, &asinm, x, xdb.i[HI]);
+
+    Mul22(&asinpih,&asinpim,asinh,asinm,RECPRPIH,RECPRPIM);
+
+    /* Rounding test */
+
+    TEST_AND_RETURN_RZ(asinpih, asinpim, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p0_accu(&asinh, &asinm, &asinl, x);
+
+    Mul33(&asinpihover,&asinpimover,&asinpilover,asinh,asinm,asinl,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+    /* Final rounding */
+
+    ReturnRoundTowardsZero3(asinpih,asinpim,asinpil);
+
+  } 
+
+  /* Strip off the sign of argument x */
+  sign = 1.0;
+  if (x < 0.0) sign = -sign;
+  
+  index--;
+  if ((index & 0x8) != 0) {
+    /* Path 3 using p9 */
+
+    /* Do argument reduction using a MI_9 as a midpoint value 
+       for the polynomial and compute exactly zp = 2 * (1 - x) 
+       for the asymptotical approximation using a square root.
+    */
+
+    z = xabs - MI_9;
+    zp = 2.0 * (1.0 - xabs);
+
+    /* Polynomial approximation and square root extraction */
+
+    p9_quick(&p9h, &p9m, z);
+    p9h = -p9h;
+    p9m = -p9m;
+
+    sqrt12_64_unfiltered(&sqrh,&sqrm,zp);
+
+    /* Reconstruction */
+
+    Mul22(&t1h,&t1m,sqrh,sqrm,p9h,p9m);
+    Mul22(&t2h,&t2m,t1h,t1m,RECPRPIH,RECPRPIM);
+
+    Add122(&asinpih,&asinpim,0.5,t2h,t2m);
+
+    /* Rounding test */
+
+    asinpih *= sign;
+    asinpim *= sign;
+
+    TEST_AND_RETURN_RZ(asinpih, asinpim, RDROUNDCST);
+
+    /* Rounding test failed, launch accurate phase */
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+    
+    p9_accu(&p9h, &p9m, &p9l, z);
+    p9h = -p9h;
+    p9m = -p9m;
+    p9l = -p9l;
+
+    Sqrt13(&sqrh,&sqrm,&sqrl,zp);
+
+    /* Reconstruction */
+
+    Mul33(&t1h,&t1m,&t1l,sqrh,sqrm,sqrl,p9h,p9m,p9l);
+    Mul33(&t2h,&t2m,&t2l,t1h,t1m,t1l,RECPRPIH,RECPRPIM,RECPRPIL);
+
+    Add133(&asinpihover,&asinpimover,&asinpilover,0.5,t2h,t2m,t2l);
+
+    Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+    /* Final rounding */    
+
+    RoundTowardsZero3(&asinpi,asinpih,asinpim,asinpil);
+
+    return sign * asinpi;
+
+  }
+
+  /* Path 2 using p */
+
+  /* Do argument reduction using a table value for 
+     the midpoint value 
+  */
+
+  z = xabs - mi_i;
+
+  p_quick(&asinh, &asinm, z, index);
+
+  Mul22(&asinpih,&asinpim,asinh,asinm,RECPRPIH,RECPRPIM);
+
+  /* Rounding test */
+
+  asinpih *= sign;
+  asinpim *= sign;
+  
+  TEST_AND_RETURN_RZ(asinpih, asinpim, RDROUNDCST);
+  
+  /* Rounding test failed, launch accurate phase */
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  p_accu(&asinh, &asinm, &asinl, z, index);
+  
+  Mul33(&asinpihover,&asinpimover,&asinpilover,asinh,asinm,asinl,RECPRPIH,RECPRPIM,RECPRPIL);
+
+  Renormalize3(&asinpih,&asinpim,&asinpil,asinpihover,asinpimover,asinpilover);
+
+  /* Final rounding */
+  
+  RoundTowardsZero3(&asinpi,asinpih,asinpim,asinpil);
+  
+  return sign * asinpi;
+  
+}
+
diff --git a/src/crlibm/asincos.h b/src/crlibm/asincos.h
new file mode 100644
index 0000000..b103e4a
--- /dev/null
+++ b/src/crlibm/asincos.h
@@ -0,0 +1,575 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+#define RNROUNDCST 1.00277296776935912123020172797003775857085744686284e+00
+#define RDROUNDCST 1.53329341668337408143884997262066747209318683475599e-19
+
+#define RNROUNDCSTASINPI 1.00000001500000000000000000000000000000000000000000e+00
+#define RDROUNDCSTASINPI 0.827180612553027674871408692069962853565812110900878906e-24
+
+#define ASINSIMPLEBOUND 0x3e300000 
+#define ACOSSIMPLEBOUND 0x3e400000
+
+#define ASINPISIMPLEBOUND 0x3c300000
+#define ACOSPISIMPLEBOUND 0x3c900000
+#define ASINPINOSUBNORMALBOUND 0xa5000000
+
+#define EXTRABOUND  0x3f500000  
+#define EXTRABOUND2 0x3f020000
+
+#define PIHALFH 1.57079632679489655799898173427209258079528808593750e+00
+#define PIHALFM 6.12323399573676603586882014729198302312846062338790e-17
+#define PIHALFL -1.49738490485916983294350817710599200835275047616952e-33
+
+#define PIHALFRU 0.15707963267948967800435866593034006655216217041015625e1 
+
+#define PIRU  0.3141592653589793560087173318606801331043243408203125e1
+#define PIH   0.3141592653589793115997963468544185161590576171875e1
+#define PIM   0.12246467991473532071737640294583966046256921246775800638e-15
+#define PIL   -0.29947698097183396658870163542119840167055009523390379678e-32
+
+#define RECPRPIH 0.318309886183790691216444201927515678107738494873046875
+#define RECPRPIM -0.19678676675182485881895190914091814184147410411859432932679681016452e-16
+#define RECPRPIL -0.10721436282893004003289965208411408821619722030338845557662168511367e-32
+
+#define MRECPRPIH -0.318309886183790691216444201927515678107738494873046875
+#define MRECPRPIM 0.19678676675182485881895190914091814184147410411859432932679681016452e-16
+#define MRECPRPIL 0.10721436282893004003289965208411408821619722030338845557662168511367e-32
+
+#define HALFPLUSULP      0.50000000000000011102230246251565404236316680908203125
+#define HALFMINUSHALFULP 0.499999999999999944488848768742172978818416595458984375
+
+#define TWO1000  0.107150860718626732094842504906000181056140481170553360744e302
+#define TWOM1000 0.933263618503218878990089544723817169617091446371708024622e-301
+#define TWO999   0.535754303593133660474212524530000905280702405852766803722e301
+
+#define ASINBADCASEX   0.47810755953933303796787868122919462621212005615234375
+#define ASINBADCASEYRU 0.49849878588087548347829169870237819850444793701171875
+#define ASINBADCASEYRD 0.498498785880875427967140467444551177322864532470703125
+
+
+#define p0_quick_coeff_19h  1.28394578033992016324882357025671808514744043350219726562500000000000000000000000e-02
+#define p0_quick_coeff_17h  1.11230171262417399519195626567125145811587572097778320312500000000000000000000000e-02
+#define p0_quick_coeff_15h  1.39970189350021451124561622236797120422124862670898437500000000000000000000000000e-02
+#define p0_quick_coeff_13h  1.73513233791185925158906400156411109492182731628417968750000000000000000000000000e-02
+#define p0_quick_coeff_11h  2.23721986984502102524530187110940460115671157836914062500000000000000000000000000e-02
+#define p0_quick_coeff_9h   3.03819437875142428495678359468001872301101684570312500000000000000000000000000000e-02
+#define p0_quick_coeff_7h   4.46428571490314687886247213555179769173264503479003906250000000000000000000000000e-02
+#define p0_quick_coeff_5h   7.49999999999713951037705328417359851300716400146484375000000000000000000000000000e-02
+#define p0_quick_coeff_3h   1.66666666666666712925959359381522517651319503784179687500000000000000000000000000e-01
+#define p0_quick_coeff_1h   1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+
+#define mi_i              asinPolyQuickMiddleTbl[16 * index + 0]
+#define p_quick_coeff_0h  asinPolyQuickMiddleTbl[16 * index + 1]
+#define p_quick_coeff_0m  asinPolyQuickMiddleTbl[16 * index + 2]
+#define p_quick_coeff_1h  asinPolyQuickMiddleTbl[16 * index + 3]
+#define p_quick_coeff_1m  asinPolyQuickMiddleTbl[16 * index + 4]
+#define p_quick_coeff_2h  asinPolyQuickMiddleTbl[16 * index + 5]
+#define p_quick_coeff_3h  asinPolyQuickMiddleTbl[16 * index + 6]
+#define p_quick_coeff_4h  asinPolyQuickMiddleTbl[16 * index + 7]
+#define p_quick_coeff_5h  asinPolyQuickMiddleTbl[16 * index + 8]
+#define p_quick_coeff_6h  asinPolyQuickMiddleTbl[16 * index + 9]
+#define p_quick_coeff_7h  asinPolyQuickMiddleTbl[16 * index + 10]
+#define p_quick_coeff_8h  asinPolyQuickMiddleTbl[16 * index + 11]
+#define p_quick_coeff_9h  asinPolyQuickMiddleTbl[16 * index + 12]
+#define p_quick_coeff_10h asinPolyQuickMiddleTbl[16 * index + 13]
+#define p_quick_coeff_11h asinPolyQuickMiddleTbl[16 * index + 14]
+#define p_quick_coeff_12h asinPolyQuickMiddleTbl[16 * index + 15]
+
+#define MI_9 0.87500000000078237416545334781403653323650360107421875
+
+#define p9_quick_coeff_0h 1.01072102056824553173441927356179803609848022460937500000000000000000000000000000e+00
+#define p9_quick_coeff_1h -8.82981536812866424357437722392205614596605300903320312500000000000000000000000000e-02
+#define p9_quick_coeff_2h 2.10353760393442237863759203264635289087891578674316406250000000000000000000000000e-02
+#define p9_quick_coeff_3h -6.65063923819934552095212154654291225597262382507324218750000000000000000000000000e-03
+#define p9_quick_coeff_4h 2.40768516599235756631136595729003602173179388046264648437500000000000000000000000e-03
+#define p9_quick_coeff_5h -9.43873142704901193882072174545783127541653811931610107421875000000000000000000000e-04
+#define p9_quick_coeff_6h 3.89946181164527888064752492169873221428133547306060791015625000000000000000000000e-04
+#define p9_quick_coeff_7h -1.67200190558221219085804909454395783541258424520492553710937500000000000000000000e-04
+#define p9_quick_coeff_8h 7.37040535228812338126858083597880977322347462177276611328125000000000000000000000e-05
+#define p9_quick_coeff_9h -3.32003992244226181431050737291599261880037374794483184814453125000000000000000000e-05
+#define p9_quick_coeff_10h 1.53656152855036036170705004977321550541091710329055786132812500000000000000000000e-05
+#define p9_quick_coeff_11h -7.04415207421768136802344914548790200115035986527800559997558593750000000000000000e-06
+
+
+#define p0_accu_coeff_1h 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+#define p0_accu_coeff_3h 1.66666666666666657414808128123695496469736099243164062500000000000000000000000000e-01
+#define p0_accu_coeff_3m 9.25185853854296757512770104458324356634117384146900539554358999794203555211424828e-18
+#define p0_accu_coeff_5h 7.49999999999999972244424384371086489409208297729492187500000000000000000000000000e-02
+#define p0_accu_coeff_5m 2.77555756157123848551244900139306363413139848179272961559149734966922551393508911e-18
+#define p0_accu_coeff_7h 4.46428571428571438484134148438897682353854179382324218750000000000000000000000000e-02
+#define p0_accu_coeff_7m -9.91270564650888671257031422999640405542600950171395167431764861021292745135724545e-19
+#define p0_accu_coeff_9h 3.03819444444444440589503386718206456862390041351318359375000000000000000000000000e-02
+#define p0_accu_coeff_9m 3.85497067132392282371332994114988395042540962791093560324551248186253360472619534e-19
+#define p0_accu_coeff_11h 2.23721590909090918553037141691675060428678989410400390625000000000000000000000000e-02
+#define p0_accu_coeff_11m -9.46970190235819944882493359250540536388374860744029243297958942093828227370977402e-19
+#define p0_accu_coeff_13h 1.73527644230769238775646812200648128055036067962646484375000000000000000000000000e-02
+#define p0_accu_coeff_13m -6.73286913315360860061003796178520710524664576113391175476996508564297982957214117e-19
+#define p0_accu_coeff_15h 1.39648437499999850813781065994589880574494600296020507812500000000000000000000000e-02
+#define p0_accu_coeff_17h 1.15518008961409714141499449624461703933775424957275390625000000000000000000000000e-02
+#define p0_accu_coeff_19h 9.76160952911427071132521859908592887222766876220703125000000000000000000000000000e-03
+#define p0_accu_coeff_21h 8.39033581342360154642356917520373826846480369567871093750000000000000000000000000e-03
+#define p0_accu_coeff_23h 7.31252573485535913022648202286291052587330341339111328125000000000000000000000000e-03
+#define p0_accu_coeff_25h 6.44721419032266533644115469314783695153892040252685546875000000000000000000000000e-03
+#define p0_accu_coeff_27h 5.73995473599474108350459999883241835050284862518310546875000000000000000000000000e-03
+#define p0_accu_coeff_29h 5.15465255859299739671364193327462999150156974792480468750000000000000000000000000e-03
+#define p0_accu_coeff_31h 4.64401037031901206542094939777598483487963676452636718750000000000000000000000000e-03
+#define p0_accu_coeff_33h 4.37957744519422778606276835944299818947911262512207031250000000000000000000000000e-03
+#define p0_accu_coeff_35h 3.08318270558301894476715965254243201343342661857604980468750000000000000000000000e-03
+#define p0_accu_coeff_37h 6.23791382502981474333925149267088272608816623687744140625000000000000000000000000e-03
+
+#define p_accu_coeff_0h  asinPolyAccuMiddleTbl[32 * index + 0]
+#define p_accu_coeff_0m  asinPolyAccuMiddleTbl[32 * index + 1]
+#define p_accu_coeff_1h  asinPolyAccuMiddleTbl[32 * index + 2]
+#define p_accu_coeff_1m  asinPolyAccuMiddleTbl[32 * index + 3]
+#define p_accu_coeff_2h  asinPolyAccuMiddleTbl[32 * index + 4]
+#define p_accu_coeff_2m  asinPolyAccuMiddleTbl[32 * index + 5]
+#define p_accu_coeff_3h  asinPolyAccuMiddleTbl[32 * index + 6]
+#define p_accu_coeff_3m  asinPolyAccuMiddleTbl[32 * index + 7]
+#define p_accu_coeff_4h  asinPolyAccuMiddleTbl[32 * index + 8]
+#define p_accu_coeff_4m  asinPolyAccuMiddleTbl[32 * index + 9]
+#define p_accu_coeff_5h  asinPolyAccuMiddleTbl[32 * index + 10]
+#define p_accu_coeff_5m  asinPolyAccuMiddleTbl[32 * index + 11]
+#define p_accu_coeff_6h  asinPolyAccuMiddleTbl[32 * index + 12]
+#define p_accu_coeff_6m  asinPolyAccuMiddleTbl[32 * index + 13]
+#define p_accu_coeff_7h  asinPolyAccuMiddleTbl[32 * index + 14]
+#define p_accu_coeff_7m  asinPolyAccuMiddleTbl[32 * index + 15]
+#define p_accu_coeff_8h  asinPolyAccuMiddleTbl[32 * index + 16]
+#define p_accu_coeff_8m  asinPolyAccuMiddleTbl[32 * index + 17]
+#define p_accu_coeff_9h  asinPolyAccuMiddleTbl[32 * index + 18]
+#define p_accu_coeff_10h asinPolyAccuMiddleTbl[32 * index + 19]
+#define p_accu_coeff_11h asinPolyAccuMiddleTbl[32 * index + 20]
+#define p_accu_coeff_12h asinPolyAccuMiddleTbl[32 * index + 21]
+#define p_accu_coeff_13h asinPolyAccuMiddleTbl[32 * index + 22]
+#define p_accu_coeff_14h asinPolyAccuMiddleTbl[32 * index + 23]
+#define p_accu_coeff_15h asinPolyAccuMiddleTbl[32 * index + 24]
+#define p_accu_coeff_16h asinPolyAccuMiddleTbl[32 * index + 25]
+#define p_accu_coeff_17h asinPolyAccuMiddleTbl[32 * index + 26]
+#define p_accu_coeff_18h asinPolyAccuMiddleTbl[32 * index + 27]
+#define p_accu_coeff_19h asinPolyAccuMiddleTbl[32 * index + 28]
+#define p_accu_coeff_20h asinPolyAccuMiddleTbl[32 * index + 29]
+#define p_accu_coeff_21h asinPolyAccuMiddleTbl[32 * index + 30]
+#define p_accu_coeff_22h asinPolyAccuMiddleTbl[32 * index + 31]
+
+#define p9_accu_coeff_0h 1.01072102056824553173441927356179803609848022460937500000000000000000000000000000e+00
+#define p9_accu_coeff_0m 1.39129934510313097947345056199237890632902839379463674068793110905062349047511816e-20
+#define p9_accu_coeff_1h -8.82981536812866424357437722392205614596605300903320312500000000000000000000000000e-02
+#define p9_accu_coeff_1m 2.41792724167186006978828150786347532734726726246399404474107797113902051933109760e-18
+#define p9_accu_coeff_2h 2.10353760393441266418612656252662418410181999206542968750000000000000000000000000e-02
+#define p9_accu_coeff_2m 1.08336737333055412851633739558643005025128690376628494418387305131545872427523136e-18
+#define p9_accu_coeff_3h -6.65063923820143239329372164547748980112373828887939453125000000000000000000000000e-03
+#define p9_accu_coeff_3m -3.26520170221686406454105223534078119197675928213141878161951403569673857418820262e-19
+#define p9_accu_coeff_4h 2.40768516606927433787443959545271354727447032928466796875000000000000000000000000e-03
+#define p9_accu_coeff_4m -1.97265146971483602383336920707508202998297784121844945705998020102356349525507540e-19
+#define p9_accu_coeff_5h -9.43873142126153748948658162021274620201438665390014648437500000000000000000000000e-04
+#define p9_accu_coeff_5m -1.00627526920533400945274389592272919368733418903938436114037235924456581415142864e-20
+#define p9_accu_coeff_6h 3.89946159535203471478703729502512942417524755001068115234375000000000000000000000e-04
+#define p9_accu_coeff_6m -1.68716106145871574328060887792714981312318371720271803146373734705321112414821982e-21
+#define p9_accu_coeff_7h -1.67200258171404256496775375673280450428137555718421936035156250000000000000000000e-04
+#define p9_accu_coeff_7m 1.19784970040097203700724589956273625590162416200800595011445592863452702658833005e-20
+#define p9_accu_coeff_8h 7.37067653300902520495385683574340873747132718563079833984375000000000000000000000e-05
+#define p9_accu_coeff_9h -3.31971960015731878111157338029357788400375284254550933837890625000000000000000000e-05
+#define p9_accu_coeff_10h 1.52100265651915579552836896293221968790021492168307304382324218750000000000000000e-05
+#define p9_accu_coeff_11h -7.06684216556374468498364499469133193088055122643709182739257812500000000000000000e-06
+#define p9_accu_coeff_12h 3.32174016771150049044582924784307920162973459810018539428710937500000000000000000e-06
+#define p9_accu_coeff_13h -1.57676504579047108034364592377141178758392925374209880828857421875000000000000000e-06
+#define p9_accu_coeff_14h 7.54770805302124936124669781628560016883966454770416021347045898437500000000000000e-07
+#define p9_accu_coeff_15h -3.63931772276869473623270951831432107326236291555687785148620605468750000000000000e-07
+#define p9_accu_coeff_16h 1.76596931693785619791949872102454488498324280953966081142425537109375000000000000e-07
+#define p9_accu_coeff_17h -8.61593313016896376739609539688324879591618810081854462623596191406250000000000000e-08
+#define p9_accu_coeff_18h 4.22538400682347749169000988064132107169257324130740016698837280273437500000000000e-08
+#define p9_accu_coeff_19h -2.12414533709850257115170054159070112120843987213447690010070800781250000000000000e-08
+#define p9_accu_coeff_20h 1.04941939883081181921218176284101020190320241454173810780048370361328125000000000e-08
+
+
+
+static const double asinPolyQuickMiddleTbl[128] = {
+0.30177669529663886383019644199521280825138092041015625,                                     // mi_1     
+3.06555683602418194144689778113388456404209136962890625000000000000000000000000000e-01,	     // p_coeff_0h	 
+1.37864228855288786229514205458277346294726855883500333047053665325165638932958245e-19,	     // p_coeff_0m	 
+1.04890120337530645677759366662940010428428649902343750000000000000000000000000000e+00,	     // p_coeff_1h	 
+-1.03997489957388085277493589447823941146606896923035995294881672634801361709833145e-16,     // p_coeff_1m	 
+1.74124328129031780143520791170885786414146423339843750000000000000000000000000000e-01,	     // p_coeff_2h	 
+2.50143932843980842939402009506011381745338439941406250000000000000000000000000000e-01,	     // p_coeff_3h	 
+1.67670575222466200493443011509953066706657409667968750000000000000000000000000000e-01,	     // p_coeff_4h	 
+2.01779349315375722273557812513899989426136016845703125000000000000000000000000000e-01,	     // p_coeff_5h	 
+1.98874061108935212827120153633586596697568893432617187500000000000000000000000000e-01,	     // p_coeff_6h	 
+2.35900184842710441968094414733059238642454147338867187500000000000000000000000000e-01,	     // p_coeff_7h	 
+2.67930172148400869147621961019467562437057495117187500000000000000000000000000000e-01,	     // p_coeff_8h	 
+3.24866122351198272077965611970284953713417053222656250000000000000000000000000000e-01,	     // p_coeff_9h	 
+3.92983759990528369598905555903911590576171875000000000000000000000000000000000000e-01,	     // p_coeff_10h	 
+4.95395034513885057503301823089714162051677703857421875000000000000000000000000000e-01,	     // p_coeff_11h	 
+6.17581482281306048953695153613807633519172668457031250000000000000000000000000000e-01,	     // p_coeff_12h	 
+0.393283046242751843646345832894439809024333953857421875,  		                     // mi_2  
+4.04199666960039116769820566332782618701457977294921875000000000000000000000000000e-01,	     // p_coeff_0h	 
+-7.29414577305862355348006038497258990002592122212580672446953500287492033749003895e-21,     // p_coeff_0m	 
+1.08764522696446319649510314775398001074790954589843750000000000000000000000000000e+00,	     // p_coeff_1h	 
+7.18002807945845121967809924279486007735232949667977808694274699519155547022819519e-17,	     // p_coeff_1m	 
+2.53009602569167157959384439891437068581581115722656250000000000000000000000000000e-01,	     // p_coeff_2h	 
+3.32153251441154206968775497443857602775096893310546875000000000000000000000000000e-01,	     // p_coeff_3h	 
+2.92932692232720115477206945797661319375038146972656250000000000000000000000000000e-01,	     // p_coeff_4h	 
+3.67616411036137902268450261544785462319850921630859375000000000000000000000000000e-01,	     // p_coeff_5h	 
+4.41363028117747802081538566199014894664287567138671875000000000000000000000000000e-01,	     // p_coeff_6h	 
+5.81535898184487698436839764326578006148338317871093750000000000000000000000000000e-01,	     // p_coeff_7h	 
+7.75300865782017067928677533927839249372482299804687500000000000000000000000000000e-01,	     // p_coeff_8h	 
+1.06930850499925678143142704357160255312919616699218750000000000000000000000000000e+00,	     // p_coeff_9h	 
+1.49812947255186612594002326659392565488815307617187500000000000000000000000000000e+00,	     // p_coeff_10h	 
+2.15844993342769164712535712169483304023742675781250000000000000000000000000000000e+00,	     // p_coeff_11h	 
+3.06928679300128992579743680835235863924026489257812500000000000000000000000000000e+00,	     // p_coeff_12h	 
+0.466506350946100212251366201599012129008769989013671875,				     // mi_3 
+4.85336867180323261461438733022077940404415130615234375000000000000000000000000000e-01,	     // p_coeff_0h	 
+2.48687685471405101032185714779683260767432502103446885499682394993214984424412251e-18,	     // p_coeff_0m	 
+1.13055943592368102201817237073555588722229003906250000000000000000000000000000000e+00,	     // p_coeff_1h	 
+8.31884808460703843039094509953103826114589262451931572783792034897487610578536987e-17,	     // p_coeff_1m	 
+3.37060423475326498277127029723487794399261474609375000000000000000000000000000000e-01,	     // p_coeff_2h	 
+4.41819848339723264540879199557821266353130340576171875000000000000000000000000000e-01,	     // p_coeff_3h	 
+4.72912200341658373048403518623672425746917724609375000000000000000000000000000000e-01,	     // p_coeff_4h	 
+6.48901300732837138518505071260733529925346374511718750000000000000000000000000000e-01,	     // p_coeff_5h	 
+9.02760918994661598624418274994241073727607727050781250000000000000000000000000000e-01,	     // p_coeff_6h	 
+1.33957799576799718721531462506391108036041259765625000000000000000000000000000000e+00,	     // p_coeff_7h	 
+2.03975089767692541187216193065978586673736572265625000000000000000000000000000000e+00,	     // p_coeff_8h	 
+3.19221018967622649498139253410045057535171508789062500000000000000000000000000000e+00,	     // p_coeff_9h	 
+5.09007693218536960699793780804611742496490478515625000000000000000000000000000000e+00,	     // p_coeff_10h	 
+8.32900562875201266876956651685759425163269042968750000000000000000000000000000000e+00,	     // p_coeff_11h	 
+1.35684931403507018643495030119083821773529052734375000000000000000000000000000000e+01,	     // p_coeff_12h	 
+0.52950849718750470085382175966515205800533294677734375,				     // mi_4
+5.58021066268902909968119274708442389965057373046875000000000000000000000000000000e-01,	     // p_coeff_0h	 
+9.12034392087434999453497016043152989309974709890359127750780743326686206273734570e-20,	     // p_coeff_0m	 
+1.17882180572684136521388609253335744142532348632812500000000000000000000000000000e+00,	     // p_coeff_1h	 
+2.42941652280796864299660766500640409154688815034626482580737416583360754884779453e-18,	     // p_coeff_1m	 
+4.33698001053000381510571514809271320700645446777343750000000000000000000000000000e-01,	     // p_coeff_2h	 
+5.92141175601994751431789154594298452138900756835937500000000000000000000000000000e-01,	     // p_coeff_3h	 
+7.45525652675174788086565058620180934667587280273437500000000000000000000000000000e-01,	     // p_coeff_4h	 
+1.13828091051635160724231354834046214818954467773437500000000000000000000000000000e+00,	     // p_coeff_5h	 
+1.80888030356391027453355491161346435546875000000000000000000000000000000000000000e+00,	     // p_coeff_6h	 
+3.03311161272506835118178969423752278089523315429687500000000000000000000000000000e+00,	     // p_coeff_7h	 
+5.24261669742490976631188459577970206737518310546875000000000000000000000000000000e+00,	     // p_coeff_8h	 
+9.29745896553562900521683332044631242752075195312500000000000000000000000000000000e+00,	     // p_coeff_9h	 
+1.68115356121078072249019896844401955604553222656250000000000000000000000000000000e+01,	     // p_coeff_10h	 
+3.11875660002322234731764183379709720611572265625000000000000000000000000000000000e+01,	     // p_coeff_11h	 
+5.76621480399203818478781613521277904510498046875000000000000000000000000000000000e+01,	     // p_coeff_12h	 
+0.58569471503532011258386091867578215897083282470703125,				     // mi_5   	 
+6.25736902820868912122875826753443107008934020996093750000000000000000000000000000e-01,	     // p_coeff_0h	 
+1.09771341515678393197247834713042073087550408801910172083143857335585380496922880e-20,	     // p_coeff_0m	 
+1.23375797792237640315704538807040080428123474121093750000000000000000000000000000e+00,	     // p_coeff_1h	 
+-1.59140559577392273960428308971385735880640476257478696520131222769123269245028496e-17,     // p_coeff_1m	 
+5.49960162399266483390647408668883144855499267578125000000000000000000000000000000e-01,	     // p_coeff_2h	 
+8.03296584298027416259913024987326934933662414550781250000000000000000000000000000e-01,	     // p_coeff_3h	 
+1.17423627321739276752055047836620360612869262695312500000000000000000000000000000e+00,	     // p_coeff_4h	 
+2.01583293591475243289323771023191511631011962890625000000000000000000000000000000e+00,	     // p_coeff_5h	 
+3.64900021733109003463368935626931488513946533203125000000000000000000000000000000e+00,	     // p_coeff_6h	 
+6.93854486506604661855135418591089546680450439453125000000000000000000000000000000e+00,	     // p_coeff_7h	 
+1.36226794507666699729497850057668983936309814453125000000000000000000000000000000e+01,	     // p_coeff_8h	 
+2.74281125080204652988413727143779397010803222656250000000000000000000000000000000e+01,	     // p_coeff_9h	 
+5.63049247624184658889134880155324935913085937500000000000000000000000000000000000e+01,	     // p_coeff_10h	 
+1.18700353964991606403600599151104688644409179687500000000000000000000000000000000e+02,	     // p_coeff_11h	 
+2.55076107485252919104823376983404159545898437500000000000000000000000000000000000e+02,	     // p_coeff_12h	 
+0.636905131730956863833625902771018445491790771484375, 					     // mi_6  
+6.90477178468776764397318856936180964112281799316406250000000000000000000000000000e-01,	     // p_coeff_0h	 
+3.39469506786599975391257859730058491397981612722623695477253136232320684939622879e-18,	     // p_coeff_0m	 
+1.29711412734153253012436834978871047496795654296875000000000000000000000000000000e+00,	     // p_coeff_1h	 
+-4.95712225725049321877947559927504147795821978121980078135777603165479376912117004e-17,     // p_coeff_1m	 
+6.94991224248453054457286270917393267154693603515625000000000000000000000000000000e-01,	     // p_coeff_2h	 
+1.10848340356457941702217340207425877451896667480468750000000000000000000000000000e+00,	     // p_coeff_3h	 
+1.87458354117332537391860114439623430371284484863281250000000000000000000000000000e+00,	     // p_coeff_4h	 
+3.65157801390048675216348783578723669052124023437500000000000000000000000000000000e+00,	     // p_coeff_5h	 
+7.55165652847091450894367881119251251220703125000000000000000000000000000000000000e+00,	     // p_coeff_6h	 
+1.63735362549250531571942701702937483787536621093750000000000000000000000000000000e+01,	     // p_coeff_7h	 
+3.66799061204043113093575811944901943206787109375000000000000000000000000000000000e+01,	     // p_coeff_8h	 
+8.42542910813925374213795294053852558135986328125000000000000000000000000000000000e+01,	     // p_coeff_9h	 
+1.97368592013039233279414474964141845703125000000000000000000000000000000000000000e+02,	     // p_coeff_10h	 
+4.75165552896886765665840357542037963867187500000000000000000000000000000000000000e+02,	     // p_coeff_11h	 
+1.14668095983602756859909277409315109252929687500000000000000000000000000000000000e+03,	     // p_coeff_12h	 
+0.68427230447631171017519591259770095348358154296875,					     // mi_7 	 
+7.53605330605588874526290510402759537100791931152343750000000000000000000000000000e-01,	     // p_coeff_0h	 
+-6.81399026788433814240085924387948818667013384621768622671778015131849315366707742e-20,     // p_coeff_0m	 
+1.37131588394733516800272354885237291455268859863281250000000000000000000000000000e+00,	     // p_coeff_1h	 
+5.75522635997281408409017033924079017806689197384387157718776961701223626732826233e-17,	     // p_coeff_1m	 
+8.82290262843787198576706032326910644769668579101562500000000000000000000000000000e-01,	     // p_coeff_2h	 
+1.56510752146510800919543271447764709591865539550781250000000000000000000000000000e+00,	     // p_coeff_3h	 
+3.07048550645086359978108703217003494501113891601562500000000000000000000000000000e+00,	     // p_coeff_4h	 
+6.85588913497096008597964100772514939308166503906250000000000000000000000000000000e+00,	     // p_coeff_5h	 
+1.63125257116160859993669873801991343498229980468750000000000000000000000000000000e+01,	     // p_coeff_6h	 
+4.06593958002900990322814323008060455322265625000000000000000000000000000000000000e+01,	     // p_coeff_7h	 
+1.04739642911711854367240448482334613800048828125000000000000000000000000000000000e+02,	     // p_coeff_8h	 
+2.76645653402371124229830456897616386413574218750000000000000000000000000000000000e+02,	     // p_coeff_9h	 
+7.45184231247284060373203828930854797363281250000000000000000000000000000000000000e+02,	     // p_coeff_10h	 
+2.06663648786018939063069410622119903564453125000000000000000000000000000000000000e+03,	     // p_coeff_11h	 
+5.75344088930418638483388349413871765136718750000000000000000000000000000000000000e+03,	     // p_coeff_12h	 
+0.7285533905932444209696541292942129075527191162109375,					     // mi_8   
+8.16207699480864135033186812506755813956260681152343750000000000000000000000000000e-01,	     // p_coeff_0h	 
+1.13998759014226814082709277093003596330685011160153518976201336698750310461036861e-20,	     // p_coeff_0m	 
+1.45987741598546749699494284868706017732620239257812500000000000000000000000000000e+00,	     // p_coeff_1h	 
+1.00585284375539824516783136958955684505754068277117579954804682529356796294450760e-16,	     // p_coeff_1m	 
+1.13339308477403566399743795045651495456695556640625000000000000000000000000000000e+00,	     // p_coeff_2h	 
+2.27840492593358323603069948148913681507110595703125000000000000000000000000000000e+00,	     // p_coeff_3h	 
+5.22734481752265178755578745040111243724822998046875000000000000000000000000000000e+00,	     // p_coeff_4h	 
+1.35483951828855158083797505241818726062774658203125000000000000000000000000000000e+01,	     // p_coeff_5h	 
+3.74970966332361186346133763436228036880493164062500000000000000000000000000000000e+01,	     // p_coeff_6h	 
+1.08680173096203162685924326069653034210205078125000000000000000000000000000000000e+02,	     // p_coeff_7h	 
+3.25593435218005822662235004827380180358886718750000000000000000000000000000000000e+02,	     // p_coeff_8h	 
+1.00013553235534163832198828458786010742187500000000000000000000000000000000000000e+03,	     // p_coeff_9h	 
+3.13330209627358499346883036196231842041015625000000000000000000000000000000000000e+03,	     // p_coeff_10h	 
+1.01324957719780304614687338471412658691406250000000000000000000000000000000000000e+04,	     // p_coeff_11h	 
+3.27393534650766232516616582870483398437500000000000000000000000000000000000000000e+04	     // p_coeff_12h	 
+};
+
+
+static const double asinPolyAccuMiddleTbl[258] = {
+3.06555683602418194144689778113388456404209136962890625000000000000000000000000000e-01,		   // p_coeff_0h	 
+1.38398751617026410180086928097698669616246328887899420551771401122209681489039212e-19,		   // p_coeff_0m	 
+1.04890120337530645677759366662940010428428649902343750000000000000000000000000000e+00,		   // p_coeff_1h	 
+-1.03082627287649058162739898016810705246384011505786371110104937542928382754325867e-16,	   // p_coeff_1m	 
+1.74124328129031780143520791170885786414146423339843750000000000000000000000000000e-01,		   // p_coeff_2h	 
+-1.22415542219236523063144722572481689558635471916500300770813680628634756430983543e-17,	   // p_coeff_2m	 
+2.50143932843971239510239001901936717331409454345703125000000000000000000000000000e-01,		   // p_coeff_3h	 
+-4.13151149720064821141736364751386140320745355927365902171111144980386598035693169e-18,	   // p_coeff_3m	 
+1.67670575222510526147701170884829480201005935668945312500000000000000000000000000e-01,		   // p_coeff_4h	 
+9.08471320692536034881317437634606200189439625594786317797080243963137036189436913e-18,		   // p_coeff_4m	 
+2.01779349344123004605933147104224190115928649902343750000000000000000000000000000e-01,		   // p_coeff_5h	 
+-2.81327768912778086871203966934740276353563377312707108335310124402894871309399605e-18,	   // p_coeff_5m	 
+1.98874061057130652185875874238263349980115890502929687500000000000000000000000000e-01,		   // p_coeff_6h	 
+4.84208641776008377910230190635861197948724910162295737015014651660749223083257675e-18,		   // p_coeff_6m	 
+2.35900148032034129297329627661383710801601409912109375000000000000000000000000000e-01,		   // p_coeff_7h	 
+-7.70265627820459694705350308676046582995139915634938421185040624550310894846916199e-18,	   // p_coeff_7m	 
+2.67930188076546671460675952403107658028602600097656250000000000000000000000000000e-01,		   // p_coeff_8h	 
+-1.74203278137786025999080009256505191287370077696727496685547009747097035869956017e-17,	   // p_coeff_8m	 
+3.24889007694808218396076426870422437787055969238281250000000000000000000000000000e-01,		   // p_coeff_9h	 
+3.92992300726306809099952488395501859486103057861328125000000000000000000000000000e-01,		   // p_coeff_10h	 
+4.88578374389609604300233058893354609608650207519531250000000000000000000000000000e-01,		   // p_coeff_11h	 
+6.11426267619878727188620359811466187238693237304687500000000000000000000000000000e-01,		   // p_coeff_12h	 
+7.76087253732093085289989176089875400066375732421875000000000000000000000000000000e-01,		   // p_coeff_13h	 
+9.92362795771243533238248346606269478797912597656250000000000000000000000000000000e-01,		   // p_coeff_14h	 
+1.28020190849177639691447438963223248720169067382812500000000000000000000000000000e+00,		   // p_coeff_15h	 
+1.66202082783864191206646410137182101607322692871093750000000000000000000000000000e+00,		   // p_coeff_16h	 
+2.17134697355479078240136914246249943971633911132812500000000000000000000000000000e+00,		   // p_coeff_17h	 
+2.85144941725608758176235824066679924726486206054687500000000000000000000000000000e+00,		   // p_coeff_18h	 
+3.76113082197504100534501958463806658983230590820312500000000000000000000000000000e+00,		   // p_coeff_19h	 
+4.98320258065187005058760405518114566802978515625000000000000000000000000000000000e+00,		   // p_coeff_20h	 
+6.83567147351494863727339179604314267635345458984375000000000000000000000000000000e+00,		   // p_coeff_21h	 
+9.17671174961649249723905086284503340721130371093750000000000000000000000000000000e+00,		   // p_coeff_22h	 
+4.04199666960039116769820566332782618701457977294921875000000000000000000000000000e-01,		   // p_coeff_0h	 
+-6.46825370068901234687011200856515476665908008275043725957432344531028434175823350e-21,	   // p_coeff_0m	 
+1.08764522696446319649510314775398001074790954589843750000000000000000000000000000e+00,		   // p_coeff_1h	 
+7.20122509204450857334003577729908463703780203035882678808121681868215091526508331e-17,		   // p_coeff_1m	 
+2.53009602569167157959384439891437068581581115722656250000000000000000000000000000e-01,		   // p_coeff_2h	 
+-2.62855515233500204494953653812414612827096270443634484781370019845780916512012482e-17,	   // p_coeff_2m	 
+3.32153251441150376699340540653793141245841979980468750000000000000000000000000000e-01,		   // p_coeff_3h	 
+-2.17141385535786665092496720426544052591009587195721927677105611564911669120192528e-17,	   // p_coeff_3m	 
+2.92932692232876656923679092869861051440238952636718750000000000000000000000000000e-01,		   // p_coeff_4h	 
+-2.54506532782342113657805222827712812531223364242776927013345300565561046823859215e-17,	   // p_coeff_4m	 
+3.67616411055874059421455513074761256575584411621093750000000000000000000000000000e-01,		   // p_coeff_5h	 
+-6.76970835849273256879417289105284614692988316998734608931354017613557516597211361e-18,	   // p_coeff_5m	 
+4.41363027759851866971274603201891295611858367919921875000000000000000000000000000e-01,		   // p_coeff_6h	 
+-2.90651996480231385490406350336172813253854649135862232844917940610685036517679691e-18,	   // p_coeff_6m	 
+5.81535855061384165942683921457501128315925598144531250000000000000000000000000000e-01,		   // p_coeff_7h	 
+2.15506151894707480118506866417280461854749969158187919426872269923478597775101662e-17,		   // p_coeff_7m	 
+7.75301235143548206352193119528237730264663696289062500000000000000000000000000000e-01,		   // p_coeff_8h	 
+-5.09980429509694427469186543286592667631136122693286116813737862685229629278182983e-17,	   // p_coeff_8m	 
+1.06935418322891551135001009242841973900794982910156250000000000000000000000000000e+00,		   // p_coeff_9h	 
+1.49796852292175275422891900234390050172805786132812500000000000000000000000000000e+00,		   // p_coeff_10h	 
+2.13528146071462776589555687678512185811996459960937500000000000000000000000000000e+00,		   // p_coeff_11h	 
+3.08095882478763538614430217421613633632659912109375000000000000000000000000000000e+00,		   // p_coeff_12h	 
+4.49525762116327154416239864076487720012664794921875000000000000000000000000000000e+00,		   // p_coeff_13h	 
+6.61832853156151212914437564904801547527313232421875000000000000000000000000000000e+00,		   // p_coeff_14h	 
+9.82196882969892293147040618350729346275329589843750000000000000000000000000000000e+00,		   // p_coeff_15h	 
+1.46763291696545170594845330924727022647857666015625000000000000000000000000000000e+01,		   // p_coeff_16h	 
+2.20625545956168913619421800831332802772521972656250000000000000000000000000000000e+01,		   // p_coeff_17h	 
+3.33428595472074320582578366156667470932006835937500000000000000000000000000000000e+01,		   // p_coeff_18h	 
+5.06298287402715487814930384047329425811767578125000000000000000000000000000000000e+01,		   // p_coeff_19h	 
+7.72361044088683854624832747504115104675292968750000000000000000000000000000000000e+01,		   // p_coeff_20h	 
+1.19605340680796203400859667453914880752563476562500000000000000000000000000000000e+02,		   // p_coeff_21h	 
+1.80182167313889749493682757019996643066406250000000000000000000000000000000000000e+02,		   // p_coeff_22h	 
+4.85336867180323261461438733022077940404415130615234375000000000000000000000000000e-01,		   // p_coeff_0h	 
+2.48711731548431450339898686061161136444646421020973452165048200868113781325519085e-18,		   // p_coeff_0m	 
+1.13055943592368102201817237073555588722229003906250000000000000000000000000000000e+00,		   // p_coeff_1h	 
+8.33253077521152707672020411779329031688034814541986283753516318029141984879970551e-17,		   // p_coeff_1m	 
+3.37060423475326498277127029723487794399261474609375000000000000000000000000000000e-01,		   // p_coeff_2h	 
+-1.06567668725757610844479862637418971752325776427227331522029629695680341683328152e-17,	   // p_coeff_2m	 
+4.41819848339719767338351630314718931913375854492187500000000000000000000000000000e-01,		   // p_coeff_3h	 
+1.00442163349492148002936541754087371062381994416120786772772532913222676143050194e-17,		   // p_coeff_3m	 
+4.72912200341745858622743980959057807922363281250000000000000000000000000000000000e-01,		   // p_coeff_4h	 
+4.32579192702017095690398912101462577298397752038590716172627992364141391590237617e-18,		   // p_coeff_4m	 
+6.48901300757961929654982213833136484026908874511718750000000000000000000000000000e-01,		   // p_coeff_5h	 
+5.53173550473638312502352924376368778723557407693469517573348070982319768518209457e-17,		   // p_coeff_5m	 
+9.02760918723618410730580308154458180069923400878906250000000000000000000000000000e-01,		   // p_coeff_6h	 
+1.83127184204758972652773042458306136013081307308989972848500826785311801359057426e-17,		   // p_coeff_6m	 
+1.33957791852745100591448590421350672841072082519531250000000000000000000000000000e+00,		   // p_coeff_7h	 
+-8.08660441258249393782142982707336982340679568071958871477988850529072806239128113e-17,	   // p_coeff_7m	 
+2.03975126091931757699171612330246716737747192382812500000000000000000000000000000e+00,		   // p_coeff_8h	 
+1.39326386720348649025304457272644525059897659732127683795965822355356067419052124e-16,		   // p_coeff_8m	 
+3.19232532691492343346340021525975316762924194335937500000000000000000000000000000e+00,		   // p_coeff_9h	 
+5.08990447700057480062696413369849324226379394531250000000000000000000000000000000e+00,		   // p_coeff_10h	 
+8.24681325581985547046315332408994436264038085937500000000000000000000000000000000e+00,		   // p_coeff_11h	 
+1.35339383861901847438957702252082526683807373046875000000000000000000000000000000e+01,		   // p_coeff_12h	 
+2.24533939052931295066173333907499909400939941406250000000000000000000000000000000e+01,		   // p_coeff_13h	 
+3.75945346965856899146274372469633817672729492187500000000000000000000000000000000e+01,		   // p_coeff_14h	 
+6.34457878603441614018265681806951761245727539062500000000000000000000000000000000e+01,		   // p_coeff_15h	 
+1.07811054823829493898301734589040279388427734375000000000000000000000000000000000e+02,		   // p_coeff_16h	 
+1.84306463662936579339657328091561794281005859375000000000000000000000000000000000e+02,		   // p_coeff_17h	 
+3.16759786376428792209480889141559600830078125000000000000000000000000000000000000e+02,		   // p_coeff_18h	 
+5.47025706678748861122585367411375045776367187500000000000000000000000000000000000e+02,		   // p_coeff_19h	 
+9.49215135261129944410640746355056762695312500000000000000000000000000000000000000e+02,		   // p_coeff_20h	 
+1.66325303120893772756971884518861770629882812500000000000000000000000000000000000e+03,		   // p_coeff_21h	 
+2.81005886721817250872845761477947235107421875000000000000000000000000000000000000e+03,		   // p_coeff_22h	 
+5.58021066268902909968119274708442389965057373046875000000000000000000000000000000e-01,		   // p_coeff_0h	 
+9.14056635248981946291334736807400951779846267656755277007663007537985322414897382e-20,		   // p_coeff_0m	 
+1.17882180572684136521388609253335744142532348632812500000000000000000000000000000e+00,		   // p_coeff_1h	 
+2.57506761959083747975269601591872190204330911429892510960959484123122820165008307e-18,		   // p_coeff_1m	 
+4.33698001053000381510571514809271320700645446777343750000000000000000000000000000e-01,		   // p_coeff_2h	 
+-1.13987489167043526825762332057111190978471845558278249810335580605169525370001793e-17,	   // p_coeff_2m	 
+5.92141175601989977472783266421174630522727966308593750000000000000000000000000000e-01,		   // p_coeff_3h	 
+1.51434599074934130528344780896022003291074232766760462864930047999223461374640465e-17,		   // p_coeff_3m	 
+7.45525652675293803994804875401314347982406616210937500000000000000000000000000000e-01,		   // p_coeff_4h	 
+-4.95666529120828261720386639182573717908098482969568576717023233868530951440334320e-17,	   // p_coeff_4m	 
+1.13828091056041680317889586149249225854873657226562500000000000000000000000000000e+00,		   // p_coeff_5h	 
+6.30476130024642952826684347359752494928069360322596403900519135277136228978633881e-17,		   // p_coeff_5m	 
+1.80888030309746783430568939365912228822708129882812500000000000000000000000000000e+00,		   // p_coeff_6h	 
+6.53471855925770582546264336577217040248932212759963578108113324560690671205520630e-17,		   // p_coeff_6m	 
+3.03311143845375674743536364985629916191101074218750000000000000000000000000000000e+00,		   // p_coeff_7h	 
+-2.14585117370534459252749227343052173552538040022033549725222201232099905610084534e-16,	   // p_coeff_7m	 
+5.24261747644370590393236852833069860935211181640625000000000000000000000000000000e+00,		   // p_coeff_8h	 
+-5.46512862978737750269761176067830595023185492192796530730447557289153337478637695e-17,	   // p_coeff_8m	 
+9.29779331096978367554584110621362924575805664062500000000000000000000000000000000e+00,		   // p_coeff_9h	 
+1.68111140106672962701850337907671928405761718750000000000000000000000000000000000e+01,		   // p_coeff_10h	 
+3.08802874723923395094971056096255779266357421875000000000000000000000000000000000e+01,		   // p_coeff_11h	 
+5.74616531317601229034153220709413290023803710937500000000000000000000000000000000e+01,		   // p_coeff_12h	 
+1.08089434897446437844337197020649909973144531250000000000000000000000000000000000e+02,		   // p_coeff_13h	 
+2.05202846011656902192044071853160858154296875000000000000000000000000000000000000e+02,		   // p_coeff_14h	 
+3.92662709897826516680652275681495666503906250000000000000000000000000000000000000e+02,		   // p_coeff_15h	 
+7.56557048606022931380721274763345718383789062500000000000000000000000000000000000e+02,		   // p_coeff_16h	 
+1.46649727257876816111092921346426010131835937500000000000000000000000000000000000e+03,		   // p_coeff_17h	 
+2.85782276299161503629875369369983673095703125000000000000000000000000000000000000e+03,		   // p_coeff_18h	 
+5.59751274793538505036849528551101684570312500000000000000000000000000000000000000e+03,		   // p_coeff_19h	 
+1.10145801644146959006320685148239135742187500000000000000000000000000000000000000e+04,		   // p_coeff_20h	 
+2.15676400725272833369672298431396484375000000000000000000000000000000000000000000e+04,		   // p_coeff_21h	 
+4.10662669419021476642228662967681884765625000000000000000000000000000000000000000e+04,		   // p_coeff_22h	 
+6.25736902820868912122875826753443107008934020996093750000000000000000000000000000e-01,		   // p_coeff_0h	 
+1.03044861946200352361105560063972534424839340803290894401332555840866689322865568e-20,		   // p_coeff_0m	 
+1.23375797792237640315704538807040080428123474121093750000000000000000000000000000e+00,		   // p_coeff_1h	 
+-1.56943153280384722085732805658465945105123195556662968330741136924189049750566483e-17,	   // p_coeff_1m	 
+5.49960162399266483390647408668883144855499267578125000000000000000000000000000000e-01,		   // p_coeff_2h	 
+4.77724544586887245869366226653936105958167895554379589473370515406713820993900299e-17,		   // p_coeff_2m	 
+8.03296584298018756520320948766311630606651306152343750000000000000000000000000000e-01,		   // p_coeff_3h	 
+8.24298592592304193429233278946371287822415169276122487440616737330856267362833023e-18,		   // p_coeff_3m	 
+1.17423627321674173273891028657089918851852416992187500000000000000000000000000000e+00,		   // p_coeff_4h	 
+6.51885136427795249608596859127055587343811181939758764292136561380175407975912094e-18,		   // p_coeff_4m	 
+2.01583293601212298895575258939061313867568969726562500000000000000000000000000000e+00,		   // p_coeff_5h	 
+-1.74898605368430358273924263609101302050140983100449953990818130478146485984325409e-16,	   // p_coeff_5m	 
+3.64900022085783248826373892370611429214477539062500000000000000000000000000000000e+00,		   // p_coeff_6h	 
+1.43304714197470670030886399120078425706334125872346008101487768726656213402748108e-16,		   // p_coeff_6m	 
+6.93854439566079062018388867727480828762054443359375000000000000000000000000000000e+00,		   // p_coeff_7h	 
+-3.60750117305009285790273957823616258349535174413877380850124154676450416445732117e-16,	   // p_coeff_7m	 
+1.36226702672788579917551032849587500095367431640625000000000000000000000000000000e+01,		   // p_coeff_8h	 
+5.62980642478103599614115253967152086402971956392848884576096679666079580783843994e-16,		   // p_coeff_8m	 
+2.74292117002245703361040796153247356414794921875000000000000000000000000000000000e+01,		   // p_coeff_9h	 
+5.63167951919359666135278530418872833251953125000000000000000000000000000000000000e+01,		   // p_coeff_10h	 
+1.17466533739617389642262423876672983169555664062500000000000000000000000000000000e+02,		   // p_coeff_11h	 
+2.48208400271530678082854137755930423736572265625000000000000000000000000000000000e+02,		   // p_coeff_12h	 
+5.30187120971580611694662366062402725219726562500000000000000000000000000000000000e+02,		   // p_coeff_13h	 
+1.14298685390676246242946945130825042724609375000000000000000000000000000000000000e+03,		   // p_coeff_14h	 
+2.48365898527212812041398137807846069335937500000000000000000000000000000000000000e+03,		   // p_coeff_15h	 
+5.43413912381613681645831093192100524902343750000000000000000000000000000000000000e+03,		   // p_coeff_16h	 
+1.19616511180501001945231109857559204101562500000000000000000000000000000000000000e+04,		   // p_coeff_17h	 
+2.64708277570606114750262349843978881835937500000000000000000000000000000000000000e+04,		   // p_coeff_18h	 
+5.88376889385143513209186494350433349609375000000000000000000000000000000000000000e+04,		   // p_coeff_19h	 
+1.31386216977166535798460245132446289062500000000000000000000000000000000000000000e+05,		   // p_coeff_20h	 
+3.03303368112601048778742551803588867187500000000000000000000000000000000000000000e+05,		   // p_coeff_21h	 
+6.82215743360355845652520656585693359375000000000000000000000000000000000000000000e+05,		   // p_coeff_22h	 
+6.90477178468776764397318856936180964112281799316406250000000000000000000000000000e-01,		   // p_coeff_0h	 
+3.39466231816613032388245073452427079551490712938188829689289960356290976051241159e-18,		   // p_coeff_0m	 
+1.29711412734153253012436834978871047496795654296875000000000000000000000000000000e+00,		   // p_coeff_1h	 
+-4.91536443957924304285159601199758593586250555616465329755726543226046487689018250e-17,	   // p_coeff_1m	 
+6.94991224248453054457286270917393267154693603515625000000000000000000000000000000e-01,		   // p_coeff_2h	 
+4.14055567174545404801311585696815622965502227300336503257316422832445823587477207e-18,		   // p_coeff_2m	 
+1.10848340356455987709693999931914731860160827636718750000000000000000000000000000e+00,		   // p_coeff_3h	 
+4.16266958244922006708243033738862584564114206709881105261672473716316744685173035e-17,		   // p_coeff_3m	 
+1.87458354117322345544494055502582341432571411132812500000000000000000000000000000e+00,		   // p_coeff_4h	 
+1.01371418047977543599188915056692109774560397669751488081146817421540617942810059e-16,		   // p_coeff_4m	 
+3.65157801416010441286630339163821190595626831054687500000000000000000000000000000e+00,		   // p_coeff_5h	 
+1.26536476346012852031977695308463633490816727090143289924384362166165374219417572e-16,		   // p_coeff_5m	 
+7.55165652946598697781155351549386978149414062500000000000000000000000000000000000e+00,		   // p_coeff_6h	 
+-2.14190464475496048348382959343551268818198527301224776131505223020212724804878235e-16,	   // p_coeff_6m	 
+1.63735347750204702776954945875331759452819824218750000000000000000000000000000000e+01,		   // p_coeff_7h	 
+1.51055732062479748503833695277300766424363764363347772956558401347137987613677979e-15,		   // p_coeff_7m	 
+3.66799013891310394797073968220502138137817382812500000000000000000000000000000000e+01,		   // p_coeff_8h	 
+-1.96467879903428952233615671924270070336884016354295212636316136922687292098999023e-15,	   // p_coeff_8m	 
+8.42583880764557306974893435835838317871093750000000000000000000000000000000000000e+01,		   // p_coeff_9h	 
+1.97380229224487067085647140629589557647705078125000000000000000000000000000000000e+02,		   // p_coeff_10h	 
+4.69729422521515630251087713986635208129882812500000000000000000000000000000000000e+02,		   // p_coeff_11h	 
+1.13246616901346669692429713904857635498046875000000000000000000000000000000000000e+03,		   // p_coeff_12h	 
+2.76004978747814584494335576891899108886718750000000000000000000000000000000000000e+03,		   // p_coeff_13h	 
+6.78908667818280082428827881813049316406250000000000000000000000000000000000000000e+03,		   // p_coeff_14h	 
+1.68324374222143451333977282047271728515625000000000000000000000000000000000000000e+04,		   // p_coeff_15h	 
+4.20216193300401428132317960262298583984375000000000000000000000000000000000000000e+04,		   // p_coeff_16h	 
+1.05540980227414402179419994354248046875000000000000000000000000000000000000000000e+05,		   // p_coeff_17h	 
+2.66494483142128563486039638519287109375000000000000000000000000000000000000000000e+05,		   // p_coeff_18h	 
+6.76009364551451755687594413757324218750000000000000000000000000000000000000000000e+05,		   // p_coeff_19h	 
+1.72216034198046685196459293365478515625000000000000000000000000000000000000000000e+06,		   // p_coeff_20h	 
+4.49188704440361727029085159301757812500000000000000000000000000000000000000000000e+06,		   // p_coeff_21h	 
+1.15993861480669919401407241821289062500000000000000000000000000000000000000000000e+07,		   // p_coeff_22h	 
+7.53605330605588874526290510402759537100791931152343750000000000000000000000000000e-01,		   // p_coeff_0h	 
+-6.86303578932659590324882262388685086010663787564085999357010869914574868744239211e-20,	   // p_coeff_0m	 
+1.37131588394733516800272354885237291455268859863281250000000000000000000000000000e+00,		   // p_coeff_1h	 
+5.85729819349925155946752593741546617096794483808830378279708384070545434951782227e-17,		   // p_coeff_1m	 
+8.82290262843787198576706032326910644769668579101562500000000000000000000000000000e-01,		   // p_coeff_2h	 
+5.16377114572074856584788281695076928068533622922381409736658497422467917203903198e-17,		   // p_coeff_2m	 
+1.56510752146505316417801623174455016851425170898437500000000000000000000000000000e+00,		   // p_coeff_3h	 
+-4.39163602371923391288987498767894166026634554891340533888666186612681485712528229e-17,	   // p_coeff_3m	 
+3.07048550644979600932060748164076358079910278320312500000000000000000000000000000e+00,		   // p_coeff_4h	 
+-1.10182145686314872930592860300828689006905830376995686359364867712429258972406387e-16,	   // p_coeff_4m	 
+6.85588913581356962367863161489367485046386718750000000000000000000000000000000000e+00,		   // p_coeff_5h	 
+4.35622325486244782178679451752414705321823684735019210911843856592895463109016418e-16,		   // p_coeff_5m	 
+1.63125257206586802283254655776545405387878417968750000000000000000000000000000000e+01,		   // p_coeff_6h	 
+-1.42810985056358952027816317128163090933704222357941704402151117392349988222122192e-16,	   // p_coeff_6m	 
+4.06593902603693564401510229799896478652954101562500000000000000000000000000000000e+01,		   // p_coeff_7h	 
+1.26451118649566617072575681437226509832616233499485991487176761438604444265365601e-15,		   // p_coeff_7m	 
+1.04739604506448415577324340119957923889160156250000000000000000000000000000000000e+02,		   // p_coeff_8h	 
+-4.21355762035756719251654947961735015460869348269401513107368373312056064605712891e-16,	   // p_coeff_8m	 
+2.76663345345012544385099317878484725952148437500000000000000000000000000000000000e+02,		   // p_coeff_9h	 
+7.45270800399650397594086825847625732421875000000000000000000000000000000000000000e+02,		   // p_coeff_10h	 
+2.03955855522386173106497153639793395996093750000000000000000000000000000000000000e+03,		   // p_coeff_11h	 
+5.65453975726426688197534531354904174804687500000000000000000000000000000000000000e+03,		   // p_coeff_12h	 
+1.58480736247709683084394782781600952148437500000000000000000000000000000000000000e+04,		   // p_coeff_13h	 
+4.48292577388124118442647159099578857421875000000000000000000000000000000000000000e+04,		   // p_coeff_14h	 
+1.27817476628451069700531661510467529296875000000000000000000000000000000000000000e+05,		   // p_coeff_15h	 
+3.66953462486772332340478897094726562500000000000000000000000000000000000000000000e+05,		   // p_coeff_16h	 
+1.05988028936582896858453750610351562500000000000000000000000000000000000000000000e+06,		   // p_coeff_17h	 
+3.07766344983369577676057815551757812500000000000000000000000000000000000000000000e+06,		   // p_coeff_18h	 
+8.97598008321647346019744873046875000000000000000000000000000000000000000000000000e+06,		   // p_coeff_19h	 
+2.63006417766936272382736206054687500000000000000000000000000000000000000000000000e+07,		   // p_coeff_20h	 
+7.97293238009131550788879394531250000000000000000000000000000000000000000000000000e+07,		   // p_coeff_21h	 
+2.35266135040413618087768554687500000000000000000000000000000000000000000000000000e+08,		   // p_coeff_22h	 
+8.16207699480864135033186812506755813956260681152343750000000000000000000000000000e-01,		   // p_coeff_0h	 
+1.10010191397663675140086054218782967355131241568134164879148861881930088202352636e-20,		   // p_coeff_0m	 
+1.45987741598546749699494284868706017732620239257812500000000000000000000000000000e+00,		   // p_coeff_1h	 
+1.03784174873658842691949705484313598874177727812186111666648002938018180429935455e-16,		   // p_coeff_1m	 
+1.13339308477403566399743795045651495456695556640625000000000000000000000000000000e+00,		   // p_coeff_2h	 
+6.19984751477578508212901866489819694255822369395765580879498202193644829094409943e-17,		   // p_coeff_2m	 
+2.27840492593338828086757530400063842535018920898437500000000000000000000000000000e+00,		   // p_coeff_3h	 
+1.29623917002581965214107410636027293901696556366158474826733026930014602839946747e-16,		   // p_coeff_3m	 
+5.22734481752082214001120519242249429225921630859375000000000000000000000000000000e+00,		   // p_coeff_4h	 
+-3.48196612292005370465186545711763157537164151090688934964134659821866080164909363e-16,	   // p_coeff_4m	 
+1.35483951862735629845246876357123255729675292968750000000000000000000000000000000e+01,		   // p_coeff_5h	 
+-4.53291289318611746967298644014774748053833951222640202827207644986629020422697067e-17,	   // p_coeff_5m	 
+3.74970966548151878328098973724991083145141601562500000000000000000000000000000000e+01,		   // p_coeff_6h	 
+3.16809448186690022670167104047109366061463187579094746837427010177634656429290771e-15,		   // p_coeff_6m	 
+1.08680147858936038574029225856065750122070312500000000000000000000000000000000000e+02,		   // p_coeff_7h	 
+-6.36137089188991992639408248982314785589906210028221522634339635260403156280517578e-15,	   // p_coeff_7m	 
+3.25593310030335430838022148236632347106933593750000000000000000000000000000000000e+02,		   // p_coeff_8h	 
+1.91287227671501587672951512619431386699611966073497626439348096027970314025878906e-14,		   // p_coeff_8m	 
+1.00022684509519501716567901894450187683105468750000000000000000000000000000000000e+03,		   // p_coeff_9h	 
+3.13368188220144656952470541000366210937500000000000000000000000000000000000000000e+03,		   // p_coeff_10h	 
+9.97418849150001005909871309995651245117187500000000000000000000000000000000000000e+03,		   // p_coeff_11h	 
+3.21620985996262825210578739643096923828125000000000000000000000000000000000000000e+04,		   // p_coeff_12h	 
+1.04841470601619919762015342712402343750000000000000000000000000000000000000000000e+05,		   // p_coeff_13h	 
+3.44929702756780723575502634048461914062500000000000000000000000000000000000000000e+05,		   // p_coeff_14h	 
+1.14386293806761899031698703765869140625000000000000000000000000000000000000000000e+06,		   // p_coeff_15h	 
+3.81954181095832167193293571472167968750000000000000000000000000000000000000000000e+06,		   // p_coeff_16h	 
+1.28314429144318234175443649291992187500000000000000000000000000000000000000000000e+07,		   // p_coeff_17h	 
+4.33370274414261654019355773925781250000000000000000000000000000000000000000000000e+07,		   // p_coeff_18h	 
+1.46996088810462892055511474609375000000000000000000000000000000000000000000000000e+08,		   // p_coeff_19h	 
+5.00961200009291708469390869140625000000000000000000000000000000000000000000000000e+08,		   // p_coeff_20h	 
+1.77139381348167872428894042968750000000000000000000000000000000000000000000000000e+09,		   // p_coeff_21h	 
+6.08314919055301284790039062500000000000000000000000000000000000000000000000000000e+09		   // p_coeff_22h	 
+};
diff --git a/src/crlibm/atan-itanium.c b/src/crlibm/atan-itanium.c
new file mode 100644
index 0000000..9c44b7f
--- /dev/null
+++ b/src/crlibm/atan-itanium.c
@@ -0,0 +1,846 @@
+/* 
+ *this function computes a correctly rounded atan using double-extended arithmetic, FMAs and other dirty tricks 
+ *
+ * Author : Nicolas Gast, Florent de Dinechin
+ * nicolas.gast at ens.fr
+ *
+
+WARNING : This code is dirty and experimental, and remains here for
+history. A cleaner, portable version using double-extended arithmetic will be available some day as atan-de.c
+For this reason there is only atan_rn so it fails the "make check" for all the other rounding modes
+
+
+   To test within crlibm: (tested with Intel icc compiler version 8.1)
+icc -Qoption,cpp,--extended_float_types -IPF_fp_speculationsafe -c atan-itanium.c; mv atan-itanium.o atan_fast.o; make
+
+
+
+
+This file is completely self-contained so that we can change the crlibm infrastructure without bothering maintaining it.
+
+
+ */
+
+/* WARNING Due to some quantum effect not understood so far, 
+   turning debugging on may change the result */
+#define DEBUG 0
+
+
+
+typedef          __int64  INT64;
+typedef   signed __int64 SINT64;
+typedef unsigned __int64 UINT64;
+
+/* FP register type */
+typedef __fpreg L_FLOAT_TYPE;
+
+/* Almost the same as the previous, except exponent field smaller, and morally in memory */
+typedef long double LC_FLOAT_TYPE;
+
+/* The double-double-ext type, using registers */
+typedef struct __X_FLOAT_TYPE_TAG {
+    L_FLOAT_TYPE hi,lo; /* order is critical! */
+} X_FLOAT_TYPE;
+
+/* The double-double-ext type, in memory */
+typedef struct __XC_FLOAT_TYPE_TAG {
+    LC_FLOAT_TYPE hi,lo; /* order is critical! */
+} XC_FLOAT_TYPE;
+
+
+/* For debugging */
+typedef union {
+  int i[3];                 
+  long double d;
+} db_ext_number;
+
+
+typedef enum {
+    _PC_S        = 1        /* single .s */
+   ,_PC_D        = 2        /* double .d */
+   ,_PC_NONE     = 3        /* dynamic   */
+} _Asm_pc;
+
+/* Table 1-22: legal getf/setf floating-point register access completers */
+typedef enum {
+    _FR_S        = 1        /* single form      .s   */
+   ,_FR_D        = 2        /* double form      .d   */
+   ,_FR_EXP      = 3        /* exponent form    .exp */
+   ,_FR_SIG      = 4        /* significand form .sig */
+} _Asm_fr_access;
+
+/* Table 1-24: legal floating-point FPSR status field completers (.sf) */
+typedef enum {
+    _SF0         = 0        /* FPSR status field 0 .s0 */
+   ,_SF1         = 1        /* FPSR status field 1 .s1 */
+   ,_SF2         = 2        /* FPSR status field 2 .s2 */
+   ,_SF3         = 3        /* FPSR status field 3 .s3 */
+} _Asm_sf;
+
+#define print_debug(msg, _z) {\
+  db_ext_number dbg;\
+  dbg.d=_z;\
+  printf(msg);\
+  printf(" %08x %08x %08x \n", (dbg.i[2]<<16)>>16, dbg.i[1], dbg.i[0]);\
+}
+
+
+#define Add12_ext(s, r, a, b)            \
+    { L_FLOAT_TYPE _z, _a, _b, _s;       \
+      _a= (a); _b=(b);                   \
+      s = (_a + _b);                     \
+      _z= ( a - s );                     \
+      r = (_b + _z); }            
+
+
+#define Add22_ext(zh,zl,xh,xl,yh,yl) \
+do {\
+L_FLOAT_TYPE r,s;\
+r = (xh)+(yh);\
+s = (xh)-r;\
+s+= (yh);\
+s+= (yl);\
+s+= (xl);\
+zh = r+s;\
+zl = r - (zh);\
+zl+=  s;\
+} while(0)
+
+
+
+#define Mul12_ext(_rh,_rl,_u,_v)                    \
+{                                                     \
+  _rh = _u*_v;                                      \
+  _rl = _Asm_fms( 3/*_PC_NONE*/, _u, _v, _rh, 1/*_SF1*/ );\
+}
+#define Mul22_ext(zh,zl, xh,xl, yh,yl)              \
+{                                                     \
+L_FLOAT_TYPE ph, pl;                                   \
+  ph = (xh)*(yh);                                         \
+  pl = _Asm_fms( 3/*_PC_NONE*/, xh, yh, ph, 1/*_SF1*/ );;  \
+  pl = (xh)*(yl) + pl;                                    \
+  pl = (xl)*(yh) + pl;                                    \
+  zh = ph+pl;					      \
+  zl = ph - zh;                                 \
+  zl += pl;                                         \
+}
+
+#define  Div22_ext(zh,zl,xh,xl,yh,yl) \
+  {           \
+L_FLOAT_TYPE _ch,_cl,_uh,_ul;                        \
+  _ch=(xh)/(yh);  \
+  Mul12_ext(_uh,_ul,_ch,(yh));    \
+  _cl=(xh)-_uh;                                   \
+  _cl -= _ul;                                       \
+  _cl += (xl);                                      \
+  _cl -= _ch*(yl);                               \
+  _cl /= (yh);                                   \
+  zh = _ch + _cl;                                  \
+  zl=(_ch-(zh)); zl += _cl;                  \
+}
+
+
+
+
+
+#define ULL(bits) 0x##bits##uLL
+
+#if (!defined(EM64T) && defined(__linux__) && defined(IA32))
+# define LDOUBLE_ALIGN 12   /* IA32 Linux: 12-byte alignment */
+#else
+# define LDOUBLE_ALIGN 16   /* EM64T, IA32 Win or IPF Win/Linux: 16-byte alignm\
+			       ent */
+#endif
+
+#if (LDOUBLE_ALIGN == 16)
+#define _XPD_ ,0x0000,0x0000,0x0000
+#else /*12*/
+#define _XPD_ ,0x0000
+#endif
+
+#define LDOUBLE_HEX(w4,w3,w2,w1,w0) 0x##w0,0x##w1,0x##w2,0x##w3,0x##w4 _XPD_ /*LITTLE_ENDIAN*/
+
+
+
+double dde_atan_rn(double x) {
+  return 0;
+}
+
+double atan_rd(double x) {
+  return 0;
+}
+
+double atan_ru(double x) {
+  return 0;
+}
+
+double atan_rz(double x) {
+  return 0;
+}
+
+
+static const double  HALFPI = 1.57079632679489655799898173427209258079528808593750e+00;
+#define MIN_REDUCTION_NEEDED ULL(3F89FDF8BCCE533D)
+#define A 0
+#define B 1
+#define ATAN_BHI 0
+#define ATAN_BLO 1
+#define epsilon 2.04221581890623872536809598138553304900554884091659e-19
+#define epsilon_no_red 1.56771350764719825686165002299335165493769973908433e-19
+#define TWO_M_64 5.42101086242752217003726400434970855712890625000000e-20
+#define TWO_10 1.02400000000000000000000000000000000000000000000000e+03
+
+__declspec(align(16)) 
+
+static const struct{long long int a; double b;} ab_table[62] = {
+ { /*a[0] ~= 1.26914436930661800408e-02   */   ULL(3F89FDF8BCCE533D),
+   /*b[0] = */   2.53869765124364009378776785297304741106927394866943e-02},
+ { /*a[1] ~= 3.80906929270782388369e-02   */   ULL(3FA3809F90CEBC31),
+   /*b[1] = */   5.08066978456951506837313559117319528013467788696289e-02},
+ { /*a[2] ~= 6.35391122156262234502e-02   */   ULL(3FB0441968FBA526),
+   /*b[2] = */   7.62920780032335793530151590857713017612695693969727e-02},
+ { /*a[3] ~= 8.90697640843219481662e-02   */   ULL(3FB6CD46ABCDFA25),
+   /*b[3] = */   1.01876371166982934712841313285025535151362419128418e-01},
+ { /*a[4] ~= 1.14716138034642060814e-01   */   ULL(3FBD5E096D2EA546),
+   /*b[4] = */   1.27593346472767293908745500630175229161977767944336e-01},
+ { /*a[5] ~= 1.40512327929006382604e-01   */   ULL(3FC1FC4ED691E891),
+   /*b[5] = */   1.53477468508642272970732278736250009387731552124023e-01},
+ { /*a[6] ~= 1.66493216120905490981e-01   */   ULL(3FC54FA6531F610B),
+   /*b[6] = */   1.79564085612852891715718328669026959687471389770508e-01},
+ { /*a[7] ~= 1.92694666476959805056e-01   */   ULL(3FC8AA380550EAF1),
+   /*b[7] = */   2.05889628199359991933548030829115305095911026000977e-01},
+ { /*a[8] ~= 2.19153728611415840590e-01   */   ULL(3FCC0D3AB8975BD9),
+   /*b[8] = */   2.32491819536184141092860500066308304667472839355469e-01},
+ { /*a[9] ~= 2.45908855876056406352e-01   */   ULL(3FCF79F0FEE46885),
+   /*b[9] = */   2.59409901651160901270287695297156460583209991455078e-01},
+ { /*a[10] ~= 2.73000139926648314534e-01   */   ULL(3FD178D5943274CA),
+   /*b[10] = */   2.86684879348826082701151563014718703925609588623047e-01},
+ { /*a[11] ~= 3.00469565029600954026e-01   */   ULL(3FD33AE4B2CFB5F7),
+   /*b[11] = */   3.14359785700871030567071784389554522931575775146484e-01},
+ { /*a[12] ~= 3.28361285690481766972e-01   */   ULL(3FD503DF0DD40A5B),
+   /*b[12] = */   3.42479972833279300292730340515845455229282379150391e-01},
+ { /*a[13] ~= 3.56721931693259067415e-01   */   ULL(3FD6D4883998DD14),
+   /*b[13] = */   3.71093432391343347465095803272561170160770416259766e-01},
+ { /*a[14] ~= 3.85600945252912822931e-01   */   ULL(3FD8ADAF964ABFA5),
+   /*b[14] = */   4.00251150738601846335029676993144676089286804199219e-01},
+ { /*a[15] ~= 4.15050955725992373816e-01   */   ULL(3FDA9031E241114E),
+   /*b[15] = */   4.30007504761513281721363455289974808692932128906250e-01},
+ { /*a[16] ~= 4.45128198220858643198e-01   */   ULL(3FDC7CFAFB78B41D),
+   /*b[16] = */   4.60420705138676944478959285333985462784767150878906e-01},
+ { /*a[17] ~= 4.75892983535655022698e-01   */   ULL(3FDE7507D82B9DC6),
+   /*b[17] = */   4.91553295129659728601723145402502268552780151367188e-01},
+ { /*a[18] ~= 5.07410228170177493351e-01   */   ULL(3FE03CB45FF4B2AB),
+   /*b[18] = */   5.23472714391912563591802154405741021037101745605469e-01},
+ { /*a[19] ~= 5.39750054761637805872e-01   */   ULL(3FE145A1E826E4EA),
+   /*b[19] = */   5.56251939105489867642972967587411403656005859375000e-01},
+ { /*a[20] ~= 5.72988475252136329570e-01   */   ULL(3FE255EBED462BAC),
+   /*b[20] = */   5.89970211851368997457711884635500609874725341796875e-01},
+ { /*a[21] ~= 6.07208171494496387417e-01   */   ULL(3FE36E3FD4CDD9AC),
+   /*b[21] = */   6.24713877348479162954220100800739601254463195800781e-01},
+ { /*a[22] ~= 6.42499390954343656748e-01   */   ULL(3FE48F5AE1FB2991),
+   /*b[22] = */   6.60577343433393693317157158162444829940795898437500e-01},
+ { /*a[23] ~= 6.78960978813340497734e-01   */   ULL(3FE5BA0C5FE86E27),
+   /*b[23] = */   6.97664190728041089251121320558013394474983215332031e-01},
+ { /*a[24] ~= 7.16701572306941533027e-01   */   ULL(3FE6EF3822C19A5D),
+   /*b[24] = */   7.36088459496464064812926153535954654216766357421875e-01},
+ { /*a[25] ~= 7.55840988781748695010e-01   */   ULL(3FE82FD970F967BD),
+   /*b[25] = */   7.75976148518263131315109148999908939003944396972656e-01},
+ { /*a[26] ~= 7.96511846049556065643e-01   */   ULL(3FE97D0669351A0D),
+   /*b[26] = */   8.17466968767843527032823658373672515153884887695312e-01},
+ { /*a[27] ~= 8.38861462565995493716e-01   */   ULL(3FEAD7F3FE730FCD),
+   /*b[27] = */   8.60716404767067566616844942473107948899269104003906e-01},
+ { /*a[28] ~= 8.83054096327761096527e-01   */   ULL(3FEC41FAAA0A733E),
+   /*b[28] = */   9.05898149317818313086547732382314279675483703613281e-01},
+ { /*a[29] ~= 9.29273595909162105525e-01   */   ULL(3FEDBC9BFAEEEADF),
+   /*b[29] = */   9.53206993785724487899813084368361160159111022949219e-01},
+ { /*a[30] ~= 9.77726555752981254442e-01   */   ULL(3FEF498933AC790A),
+   /*b[30] = */   1.00286227737052557884567249857354909181594848632812e+00},
+ { /*a[31] ~= 1.02864609206350806308e+00   */   ULL(3FF075559AC922B4),
+   /*b[31] = */   1.05511202646791502068879253783961758017539978027344e+00},
+ { /*a[32] ~= 1.08229638730567912228e+00   */   ULL(3FF151160440E8D3),
+   /*b[32] = */   1.11023795151925819268967643438372761011123657226562e+00},
+ { /*a[33] ~= 1.13897819300824741364e+00   */   ULL(3FF23941329D3DD8),
+   /*b[33] = */   1.16856151675095110142876819736557081341743469238281e+00},
+ { /*a[34] ~= 1.19903553596580987055e+00   */   ULL(3FF32F3FE2DB7094),
+   /*b[34] = */   1.23045136228081597451478046423289924860000610351562e+00},
+ { /*a[35] ~= 1.26286394722716532198e+00   */   ULL(3FF434B0D38A35D7),
+   /*b[35] = */   1.29633244442242001603915468876948580145835876464844e+00},
+ { /*a[36] ~= 1.33092063388866265448e+00   */   ULL(3FF54B736F41F96D),
+   /*b[36] = */   1.36669737760087572908673791971523314714431762695312e+00},
+ { /*a[37] ~= 1.40373715148086145849e+00   */   ULL(3FF675B5165CA5E1),
+   /*b[37] = */   1.44212062317890032936418265308020636439323425292969e+00},
+ { /*a[38] ~= 1.48193532552453321547e+00   */   ULL(3FF7B601D0DEA3C6),
+   /*b[38] = */   1.52327639603630871079076314345002174377441406250000e+00},
+ { /*a[39] ~= 1.56624743831976717041e+00   */   ULL(3FF90F5979506F51),
+   /*b[39] = */   1.61096147803441858137318831722950562834739685058594e+00},
+ { /*a[40] ~= 1.65754207708184630948e+00   */   ULL(3FFA854AD74CF791),
+   /*b[40] = */   1.70612458293084490179580825497396290302276611328125e+00},
+ { /*a[41] ~= 1.75685758736121174681e+00   */   ULL(3FFC1C16B3972246),
+   /*b[41] = */   1.80990457885083300126893846027087420225143432617188e+00},
+ { /*a[42] ~= 1.86544587781964938190e+00   */   ULL(3FFDD8DDC6DB1831),
+   /*b[42] = */   1.92368085119253517945026032975874841213226318359375e+00},
+ { /*a[43] ~= 1.98483051718814034750e+00   */   ULL(3FFFC1DDA4F6D032),
+   /*b[43] = */   2.04914055707593512067887786542996764183044433593750e+00},
+ { /*a[44] ~= 2.11688487740990979279e+00   */   ULL(4000EF6156AEFAF2),
+   /*b[44] = */   2.18836977316091063627823132264893501996994018554688e+00},
+ { /*a[45] ~= 2.26393888595347935033e+00   */   ULL(40021C8BFD9A80C1),
+   /*b[45] = */   2.34397906437763481335423421114683151245117187500000e+00},
+ { /*a[46] ~= 2.42892740222016626128e+00   */   ULL(40036E717D67269C),
+   /*b[46] = */   2.51927965826279764982587039412464946508407592773438e+00},
+ { /*a[47] ~= 2.61560046981161264128e+00   */   ULL(4004ECBFF069F1E4),
+   /*b[47] = */   2.71853573297491069027387311507482081651687622070312e+00},
+ { /*a[48] ~= 2.82882779840766906527e+00   */   ULL(4006A170780169B7),
+   /*b[48] = */   2.94733416149008720097413061012048274278640747070312e+00},
+ { /*a[49] ~= 3.07505072362971616974e+00   */   ULL(400899B4319C3F02),
+   /*b[49] = */   3.21314087722892072207514502224512398242950439453125e+00},
+ { /*a[50] ~= 3.36297230191158715455e+00   */   ULL(400AE75E05B0834A),
+   /*b[50] = */   3.52616384863255349912947167467791587114334106445312e+00},
+ { /*a[51] ~= 3.70464601821196143254e+00   */   ULL(400DA31D739BD0E3),
+   /*b[51] = */   3.90073973345466518125590482668485492467880249023438e+00},
+ { /*a[52] ~= 4.11726034471856573100e+00   */   ULL(401078131886BC57),
+   /*b[52] = */   4.35765668014056828383218089584261178970336914062500e+00},
+ { /*a[53] ~= 4.62619989820137847648e+00   */   ULL(4012813A8BCE2241),
+   /*b[53] = */   4.92824409985376998832862227573059499263763427734375e+00},
+ { /*a[54] ~= 5.27059285056349616385e+00   */   ULL(401515164ACECE78),
+   /*b[54] = */   5.66202526987798027136022938066162168979644775390625e+00},
+ { /*a[55] ~= 6.11406930017863578891e+00   */   ULL(401874CE9526FAB9),
+   /*b[55] = */   6.64216890962962569489036468439735472202301025390625e+00},
+ { /*a[56] ~= 7.26750136287798241547e+00   */   ULL(401D11EBE094C913),
+   /*b[56] = */   8.01990986231011859786121931392699480056762695312500e+00},
+ { /*a[57] ~= 8.94284159107796650204e+00   */   ULL(4021E2BC220DFA19),
+   /*b[57] = */   1.01020964280653942068965989165008068084716796875000e+01},
+ { /*a[58] ~= 1.16023240149353498339e+01   */   ULL(40273463D0337C49),
+   /*b[58] = */   1.36206610885392880305744256475009024143218994140625e+01},
+ { /*a[59] ~= 1.64826377753716631495e+01   */   ULL(40307B8E26350916),
+   /*b[59] = */   2.08587363260064613257327437167987227439880371093750e+01},
+ { /*a[60] ~= 2.83859754493341325216e+01   */   ULL(403C62CF497BF2F2),
+   /*b[60] = */   4.43908820444562195461912779137492179870605468750000e+01},
+ { /*a[61] ~= 1.01699461607316896213e+02   */   ULL(40596CC3FA9E0EF4),
+   /*b[61] = */   8.27932424540746438879068591631948947906494140625000e+01}
+};
+
+
+#define atanb_table ((const XC_FLOAT_TYPE *)_atanb_table)
+__declspec(align(16)) static const unsigned short _atanb_table[] = {
+ /*atan_b[0] ~= 2.5381524664e-02*/
+  LDOUBLE_HEX(3FF9, CFEC, EA4B, 4FCB, 5DFD), 
+   LDOUBLE_HEX(BFB7, CBBA, 8342, F523, 8BE7), 
+ /*atan_b[1] ~= 5.0763049304e-02*/
+  LDOUBLE_HEX(3FFA, CFEC, EA49, B131, 647C), 
+   LDOUBLE_HEX(3FB6, D38B, A5E1, 4DEF, A6BD), 
+ /*atan_b[2] ~= 7.6144573921e-02*/
+  LDOUBLE_HEX(3FFB, 9BF1, AFB6, 0F03, 5D53), 
+   LDOUBLE_HEX(3FB8, EF7C, 871F, DC70, BCA9), 
+ /*atan_b[3] ~= 1.0152609851e-01*/
+  LDOUBLE_HEX(3FFB, CFEC, EA46, 78CC, AECA), 
+   LDOUBLE_HEX(BFB7, DCB7, 3BED, 3BD7, 633C), 
+ /*atan_b[4] ~= 1.2690762308e-01*/
+  LDOUBLE_HEX(3FFC, 81F4, 126B, 0C0A, B24C), 
+   LDOUBLE_HEX(3FB8, 9C93, 50C6, 8748, 202B), 
+ /*atan_b[5] ~= 1.5228914763e-01*/
+  LDOUBLE_HEX(3FFC, 9BF1, AFB2, 77C1, F1F3), 
+   LDOUBLE_HEX(BFBB, 9D89, 6B54, 2B43, C3D3), 
+ /*atan_b[6] ~= 1.7767067216e-01*/
+  LDOUBLE_HEX(3FFC, B5EF, 4CF9, 8121, 27D9), 
+   LDOUBLE_HEX(BFBB, D8AB, 134C, C337, 1424), 
+ /*atan_b[7] ~= 2.0305219666e-01*/
+  LDOUBLE_HEX(3FFC, CFEC, EA40, 29FE, 3D0C), 
+   LDOUBLE_HEX(BFBA, 964C, 23A5, 78A9, 286C), 
+ /*atan_b[8] ~= 2.2843372114e-01*/
+  LDOUBLE_HEX(3FFC, E9EA, 8786, 746E, CBDE), 
+   LDOUBLE_HEX(3FBB, 95CE, 8C74, D4B3, 3D3D), 
+ /*atan_b[9] ~= 2.5381524560e-01*/
+  LDOUBLE_HEX(3FFD, 81F4, 1266, 3163, 58ED), 
+   LDOUBLE_HEX(3FBB, B292, B8DC, 903F, C86D), 
+ /*atan_b[10] ~= 2.7919677004e-01*/
+  LDOUBLE_HEX(3FFD, 8EF2, E108, FBCB, 4839), 
+   LDOUBLE_HEX(BFBC, C5E3, D3F8, 42F0, A001), 
+ /*atan_b[11] ~= 3.0457829447e-01*/
+  LDOUBLE_HEX(3FFD, 9BF1, AFAB, 9AD5, 051A), 
+   LDOUBLE_HEX(3FBC, BE9C, AF21, 45D0, CBC5), 
+ /*atan_b[12] ~= 3.2995981887e-01*/
+  LDOUBLE_HEX(3FFD, A8F0, 7E4E, 1002, FE3F), 
+   LDOUBLE_HEX(3FB9, ACDF, 4585, 84D5, 7EE8), 
+ /*atan_b[13] ~= 3.5534134325e-01*/
+  LDOUBLE_HEX(3FFD, B5EF, 4CF0, 5CF3, 3B2F), 
+   LDOUBLE_HEX(BFB9, DAF1, E542, E461, 5C3F), 
+ /*atan_b[14] ~= 3.8072286762e-01*/
+  LDOUBLE_HEX(3FFD, C2EE, 1B92, 835E, 5241), 
+   LDOUBLE_HEX(3FBC, F450, E872, E8D5, 5B89), 
+ /*atan_b[15] ~= 4.0610439197e-01*/
+  LDOUBLE_HEX(3FFD, CFEC, EA34, 8516, 3E60), 
+   LDOUBLE_HEX(BFBC, 91DD, F6E6, 0680, E8AD), 
+ /*atan_b[16] ~= 4.3148591630e-01*/
+  LDOUBLE_HEX(3FFD, DCEB, B8D6, 6405, 31AA), 
+   LDOUBLE_HEX(BFBC, 8502, E09D, 5663, 1B39), 
+ /*atan_b[17] ~= 4.5686744062e-01*/
+  LDOUBLE_HEX(3FFD, E9EA, 8778, 222C, 48BB), 
+   LDOUBLE_HEX(BFBB, F51E, C2F3, 5A3E, F53D), 
+ /*atan_b[18] ~= 4.8224896492e-01*/
+  LDOUBLE_HEX(3FFD, F6E9, 5619, C1A2, 5014), 
+   LDOUBLE_HEX(BFBB, E1E1, FABB, 35B7, 64D8), 
+ /*atan_b[19] ~= 5.0763048922e-01*/
+  LDOUBLE_HEX(3FFE, 81F4, 125D, A249, 1B96), 
+   LDOUBLE_HEX(BFBB, FEB6, 20F5, A80E, ABD8), 
+ /*atan_b[20] ~= 5.3301201350e-01*/
+  LDOUBLE_HEX(3FFE, 8873, 79AE, 569C, E82C), 
+   LDOUBLE_HEX(BFBD, 9333, CB85, 3253, A31F), 
+ /*atan_b[21] ~= 5.5839353776e-01*/
+  LDOUBLE_HEX(3FFE, 8EF2, E0FE, FEF4, 22DF), 
+   LDOUBLE_HEX(3FBD, FBF4, E487, 2960, 19F2), 
+ /*atan_b[22] ~= 5.8377506202e-01*/
+  LDOUBLE_HEX(3FFE, 9572, 484F, 9C7E, 4569), 
+   LDOUBLE_HEX(BFBD, ED41, 6021, 317B, 1548), 
+ /*atan_b[23] ~= 6.0915658627e-01*/
+  LDOUBLE_HEX(3FFE, 9BF1, AFA0, 3071, E801), 
+   LDOUBLE_HEX(3FBD, C46B, 95C4, B736, D8A5), 
+ /*atan_b[24] ~= 6.3453811052e-01*/
+  LDOUBLE_HEX(3FFE, A271, 16F0, BC0B, F541), 
+   LDOUBLE_HEX(3FBD, E479, 64B6, 873E, E8BE), 
+ /*atan_b[25] ~= 6.5991963475e-01*/
+  LDOUBLE_HEX(3FFE, A8F0, 7E41, 408E, DDC6), 
+   LDOUBLE_HEX(3FBD, C200, D1A3, 7D02, 9DAA), 
+ /*atan_b[26] ~= 6.8530115898e-01*/
+  LDOUBLE_HEX(3FFE, AF6F, E591, BF41, BD98), 
+   LDOUBLE_HEX(3FBC, AB83, 86B7, DBD3, 49B9), 
+ /*atan_b[27] ~= 7.1068268321e-01*/
+  LDOUBLE_HEX(3FFE, B5EF, 4CE2, 396F, 887A), 
+   LDOUBLE_HEX(3FB9, 93C0, 6F69, 2472, DD13), 
+ /*atan_b[28] ~= 7.3606420743e-01*/
+  LDOUBLE_HEX(3FFE, BC6E, B432, B066, 2617), 
+   LDOUBLE_HEX(BFBD, C5F2, 72DA, A216, 8845), 
+ /*atan_b[29] ~= 7.6144573166e-01*/
+  LDOUBLE_HEX(3FFE, C2EE, 1B83, 2575, A17C), 
+   LDOUBLE_HEX(3FBA, FC52, 25AC, D135, 67B0), 
+ /*atan_b[30] ~= 7.8682725588e-01*/
+  LDOUBLE_HEX(3FFE, C96D, 82D3, 99EF, 4753), 
+   LDOUBLE_HEX(3FBC, E6CB, 9CE5, F7DC, 32EF), 
+ /*atan_b[31] ~= 8.1220878010e-01*/
+  LDOUBLE_HEX(3FFE, CFEC, EA24, 0F24, C5A3), 
+   LDOUBLE_HEX(BFBB, 9F94, 64A4, 0D49, 77DA), 
+ /*atan_b[32] ~= 8.3759030433e-01*/
+  LDOUBLE_HEX(3FFE, D66C, 5174, 8667, 5086), 
+   LDOUBLE_HEX(BFBC, E480, 36A7, 98A0, E416), 
+ /*atan_b[33] ~= 8.6297182855e-01*/
+  LDOUBLE_HEX(3FFE, DCEB, B8C5, 0106, C115), 
+   LDOUBLE_HEX(BFBB, AE5E, 111C, 0925, 5FC1), 
+ /*atan_b[34] ~= 8.8835335278e-01*/
+  LDOUBLE_HEX(3FFE, E36B, 2015, 8050, B874), 
+   LDOUBLE_HEX(BFBC, 8DD3, E1A9, 67EE, B236), 
+ /*atan_b[35] ~= 9.1373487702e-01*/
+  LDOUBLE_HEX(3FFE, E9EA, 8766, 058F, C400), 
+   LDOUBLE_HEX(BFBD, 994E, 5D94, 7944, 5BF2), 
+ /*atan_b[36] ~= 9.3911640126e-01*/
+  LDOUBLE_HEX(3FFE, F069, EEB6, 920A, 8756), 
+   LDOUBLE_HEX(BFBD, F0FC, 830B, 5639, 9FED), 
+ /*atan_b[37] ~= 9.6449792552e-01*/
+  LDOUBLE_HEX(3FFE, F6E9, 5607, 2702, D403), 
+   LDOUBLE_HEX(BFBD, B0EF, D9DB, FF7A, BBF3), 
+ /*atan_b[38] ~= 9.8987944978e-01*/
+  LDOUBLE_HEX(3FFE, FD68, BD57, C5B4, F372), 
+   LDOUBLE_HEX(BFBD, 9706, 5831, 4248, 656E), 
+ /*atan_b[39] ~= 1.0152609740e+00*/
+  LDOUBLE_HEX(3FFF, 81F4, 1254, 37AB, 59C4), 
+   LDOUBLE_HEX(3FBE, C83B, C3BE, 8160, FE56), 
+ /*atan_b[40] ~= 1.0406424983e+00*/
+  LDOUBLE_HEX(3FFF, 8533, C5FC, 928B, 5DCD), 
+   LDOUBLE_HEX(3FBE, C025, 7DA6, 5435, CDA0), 
+ /*atan_b[41] ~= 1.0660240226e+00*/
+  LDOUBLE_HEX(3FFF, 8873, 79A4, F40D, D390), 
+   LDOUBLE_HEX(BFBE, BB70, CBE8, FB3B, AA03), 
+ /*atan_b[42] ~= 1.0914055469e+00*/
+  LDOUBLE_HEX(3FFF, 8BB3, 2D4D, 5CC1, ADB6), 
+   LDOUBLE_HEX(3FBE, 8161, 18FB, A932, 136B), 
+ /*atan_b[43] ~= 1.1167870712e+00*/
+  LDOUBLE_HEX(3FFF, 8EF2, E0F5, CD31, 1F80), 
+   LDOUBLE_HEX(BFBC, BD96, 57B0, 5730, 7576), 
+ /*atan_b[44] ~= 1.1421685956e+00*/
+  LDOUBLE_HEX(3FFF, 9232, 949E, 45E1, 3E02), 
+   LDOUBLE_HEX(BFBD, CDB1, 87A1, 5D56, 06EC), 
+ /*atan_b[45] ~= 1.1675501199e+00*/
+  LDOUBLE_HEX(3FFF, 9572, 4846, C751, B4C7), 
+   LDOUBLE_HEX(BFBD, A1AB, 140B, 2B49, DF68), 
+ /*atan_b[46] ~= 1.1929316443e+00*/
+  LDOUBLE_HEX(3FFF, 98B1, FBEF, 51FC, 635A), 
+   LDOUBLE_HEX(3FBE, CA64, 3ADC, 86D5, FB02), 
+ /*atan_b[47] ~= 1.2183131687e+00*/
+  LDOUBLE_HEX(3FFF, 9BF1, AF97, E655, 1527), 
+   LDOUBLE_HEX(3FBE, CA1D, 3262, C2F9, D84C), 
+ /*atan_b[48] ~= 1.2436946931e+00*/
+  LDOUBLE_HEX(3FFF, 9F31, 6340, 84C9, 33A7), 
+   LDOUBLE_HEX(3FBD, AF23, 2B16, BE75, 8B87), 
+ /*atan_b[49] ~= 1.2690762175e+00*/
+  LDOUBLE_HEX(3FFF, A271, 16E9, 2DBF, 7CA7), 
+   LDOUBLE_HEX(3FBE, FDDA, 7599, 4DA2, 0F86), 
+ /*atan_b[50] ~= 1.2944577420e+00*/
+  LDOUBLE_HEX(3FFF, A5B0, CA91, E197, C307), 
+   LDOUBLE_HEX(BFBC, D265, 9307, D567, 08BE), 
+ /*atan_b[51] ~= 1.3198392664e+00*/
+  LDOUBLE_HEX(3FFF, A8F0, 7E3A, A0AA, A7E2), 
+   LDOUBLE_HEX(3FBE, BE3C, 4D06, 7D11, 0641), 
+ /*atan_b[52] ~= 1.3452207909e+00*/
+  LDOUBLE_HEX(3FFF, AC30, 31E3, 6B49, 6713), 
+   LDOUBLE_HEX(BFBE, B9DD, 9D13, C459, 6F6C), 
+ /*atan_b[53] ~= 1.3706023154e+00*/
+  LDOUBLE_HEX(3FFF, AF6F, E58C, 41BD, 9EA8), 
+   LDOUBLE_HEX(BFBD, 802F, 2153, DC49, 3698), 
+ /*atan_b[54] ~= 1.3959838399e+00*/
+  LDOUBLE_HEX(3FFF, B2AF, 9935, 2449, 1D44), 
+   LDOUBLE_HEX(3FBE, CAFC, 43E2, 3F23, 5075), 
+ /*atan_b[55] ~= 1.4213653645e+00*/
+  LDOUBLE_HEX(3FFF, B5EF, 4CDE, 1325, B93A), 
+   LDOUBLE_HEX(BFBA, 9155, 4FBC, 9598, FA3D), 
+ /*atan_b[56] ~= 1.4467468891e+00*/
+  LDOUBLE_HEX(3FFF, B92F, 0087, 0E85, 296B), 
+   LDOUBLE_HEX(3FBE, C76A, DB5B, 6055, 9EA6), 
+ /*atan_b[57] ~= 1.4721284137e+00*/
+  LDOUBLE_HEX(3FFF, BC6E, B430, 1690, E405), 
+   LDOUBLE_HEX(3FBA, A6CB, 4564, 7FF8, 4121), 
+ /*atan_b[58] ~= 1.4975099383e+00*/
+  LDOUBLE_HEX(3FFF, BFAE, 67D9, 2B6A, 02AA), 
+   LDOUBLE_HEX(BFBD, B0AE, B984, 420B, 761D), 
+ /*atan_b[59] ~= 1.5228914629e+00*/
+  LDOUBLE_HEX(3FFF, C2EE, 1B82, 4D29, 2EBE), 
+   LDOUBLE_HEX(BFBE, 9CBD, 26E8, 9FF8, E917), 
+ /*atan_b[60] ~= 1.5482729876e+00*/
+  LDOUBLE_HEX(3FFF, C62D, CF2B, 7BDE, 8EE3), 
+   LDOUBLE_HEX(BFBE, AF45, EFD8, 2A64, 49A5), 
+ /*atan_b[61] ~= 1.5587186337e+00*/
+  LDOUBLE_HEX(3FFF, C784, 1799, 9E5D, D2A5), 
+   LDOUBLE_HEX(BFBE, A231, BD90, F170, 34A5), 
+};
+ static const long double coef_poly[9][2] = {
+{ -3.33333333333333333342368351437379203616728773340583e-01L,  9.03501810404587028364033466367082415937499719525463e-21L},
+{ 2.00000000000000000002710505431213761085018632002175e-01L,  -2.71050543121376108505536620063805076318847614178820e-21L},
+{ -1.42857142857142857140921067549133027796415262855589e-01L,  -1.93607530800982934641564128836546985281459293443700e-21L},
+{ 1.11111111111111111109605274760436799397211871109903e-01L,  1.50583635067431171387883211317314321885579450456211e-21L},
+{ -9.09090909090909090933731867556488737136533018201590e-02L, 0},
+{ 7.69230769230769230779655790120052927250071661546826e-02L, 0},
+{ -6.66666666666666666698289230030827212658550706692040e-02L, 0},
+{ 5.88235294117647058825522430464127765503690170589834e-02L, 0},
+{ -5.26315789473684210515616425929419364138084347359836e-02L, 0},
+}; 
+
+
+
+
+extern double atan_rn(double xd) {
+
+  unsigned int hx;
+  double sign;
+  double u;
+  double comp;
+
+  int i, i1, m;
+  UINT64 x_val,x_abs,sign_mask;
+  L_FLOAT_TYPE xe, tmp, bi, atanbhi, xred, xred2,q;
+  L_FLOAT_TYPE res,reshi,reslo,rn_constant,test;
+  L_FLOAT_TYPE xred4,tmp2;    
+  L_FLOAT_TYPE a,b,e0,e1,e2,e3,q0,q1,q2,y0,y1,y2,xred2coarse;
+  L_FLOAT_TYPE C3,C5,C7,C9 ;
+
+  
+  x_val = _Asm_getf( _FR_D, xd );
+  x_abs = (x_val & ULL(7fffffffffffffff));
+  sign_mask = ((SINT64)x_val >> 63); /* either 00..00 or 11...11 */
+
+
+
+  /* cast x to a DE register */
+  if(sign_mask) 
+    xe=-xd;
+  else
+    xe=xd;
+
+
+  /* Filter cases */
+  if (__builtin_expect( x_abs >= ULL(4350000000000000), 0)) {           /* x >= 2^54 */
+    if (xd!=xd )
+      return xd+xd;                /* NaN */
+    else {/* atan(x) = +/- Pi/2 */
+      if(sign_mask) return -HALFPI; else return HALFPI;
+    }
+  }
+  else if (__builtin_expect( x_abs < ULL(3E40000000000000), 0))
+    /* TODO Add stuff to raise inexact flag */ 
+    return xd;                   /* x<2^-27 then atan(x) =~ x */
+
+
+  /* Now there is something to compute*/
+  
+  /* load polynomial coeffs */
+  C3=coef_poly[0][0];
+  C5=coef_poly[1][0];
+  C7=coef_poly[2][0];
+  C9=coef_poly[3][0];
+  
+  if (__builtin_expect(x_abs > MIN_REDUCTION_NEEDED, 0)) /* test if reduction is necessary : */
+    {
+      /* 1) Argument reduction :  */
+      /* This constant was found by dichotomy. I am very ashamed */
+      rn_constant = 1.002;
+      
+      /* compute i so that a[i] < x < a[i+1] */
+
+     if (x_abs>ab_table[61].a)
+        i=61;
+     else {
+       i=31;
+        if (x_abs < ab_table[i].a) i-= 16;
+        else i+=16;
+        if (x_abs < ab_table[i].a) i-= 8;
+        else i+= 8;
+        if (x_abs < ab_table[i].a) i-= 4;
+        else i+= 4;
+        if (x_abs < ab_table[i].a) i-= 2;
+        else i+= 2;
+        if (x_abs < ab_table[i].a) i-= 1;
+        else i+= 1;
+        if (x_abs < ab_table[i].a) i-= 1;
+     }
+          
+     bi= ab_table[i].b;
+     atanbhi = atanb_table[i].hi;
+     
+     /* the dividend and the divisor for the argument reduction */
+     a = xe-bi;       b = 1 +  xe * bi;
+     
+
+#if 1
+     /* now we want to compute  (xe - bi )/b as a DE, but 
+	we will need the accurate quotient  only later on, 
+	we can start the computation of the polynomial with a much coarser approximation.
+	Saves 12 cycles.
+      */
+     /* Algo 8.11 in Markstein book */
+     _Asm_frcpa(&y0, a, b, _SF1);
+     
+      e0 = 1 - b*y0;       q0 = a*y0;
+      e2 = e0 + e0*e0;     e1 = e0*e0;
+      e3 = e0 + e1*e1;     q1 = q0+q0*e2;        
+      xred = q0 + q1*e3;   xred2coarse = q1*q1;   /* 62 bits in xred, more than enough */
+      xred2 = xred*xred;   xred4 = xred2coarse*xred2coarse; 
+
+
+
+      /*polynom  evaluation */
+
+      tmp2 = C7 + xred2coarse * C9 ;
+
+      /* here we need xred2,  xred2coarse loses a lot of precision to win 3 cycles. */
+      tmp = C3 + xred2 * C5;
+
+      q = tmp + xred4 * tmp2;
+
+
+#else
+      xred=a/b; 
+      xred2=xred*xred;
+      xred4=xred2*xred2;
+      tmp2 = C7 + xred2 * C9 ;
+      tmp = C3 + xred2 * C5;
+      q = tmp + xred4 * tmp2;
+#endif
+
+      tmp = 1+q*xred2;
+      /* reconstruction : atan(x) = atan(b[i]) + atan(x) */
+      res = atanbhi+xred*tmp;
+      /*      atan = atanbhi + tmp;  with round to double */
+      reshi = _Asm_fma( _PC_D, xred, tmp, atanbhi, _SF0 );
+
+    }
+  else
+    /* no reduction needed */
+    {
+
+
+      /* Polynomial evaluation */
+      
+      xred2 = xe*xe;
+      /*poly eval */
+      xred4=xred2*xred2;
+      tmp2 = C7 + xred2 * C9 ;
+      tmp = C3 + xred2 * C5;
+      q = tmp + xred4 * tmp2;
+      q *= xred2;
+      
+
+      /* compute q*xe+xe with round to double */
+      res = _Asm_fma( _PC_NONE, q, xe, xe, _SF1 );
+      reshi = _Asm_fma( _PC_D, q, xe, xe, _SF0 );
+    }
+  
+#if 0 /* To time the first step only */
+  if(sign_mask) 
+    return -reshi; 
+  else 
+    return reshi;
+#endif
+  
+#if 1
+    i1 = _Asm_getf( _FR_SIG, res);
+    m =  i1 & (0xff<<3);
+    if(__builtin_expect((m!=(0x7f<<3) && m!=(0x80<<3)), 1+1==2)) {
+      if(sign_mask) 
+	return -reshi; 
+      else 
+	return reshi;
+    }      
+#else
+  /* ROUNDING TEST � la Ziv */
+      /* This constant was found by dichotomy. I am very ashamed */
+      rn_constant = 1.01;
+  reslo = res - reshi;
+  test=_Asm_fma( _PC_D, reslo, rn_constant, reshi, _SF0 );
+  
+  if (__builtin_expect(reshi == test, 1+1==2)) {
+    if(sign_mask) 
+      return -reshi; 
+    else 
+      return reshi;
+  }
+#endif
+
+
+  else {
+
+    /******************************************************************/
+    /*  Double-double-extended  */
+    L_FLOAT_TYPE tmphi, tmplo, x0hi, x0lo, xmBihi, xmBilo, Xredhi, Xredlo, Xred2, qhi,qlo, q, Xred2hi,Xred2lo, atanhi,atanlo;
+    int j;
+
+
+
+
+#if EVAL_PERF
+    crlibm_second_step_taken++;
+#endif
+
+#if DEBUG
+       printf("Toto\n");
+#endif
+
+  if (__builtin_expect(x_abs > MIN_REDUCTION_NEEDED, 0))  {/* test if reduction is necessary : */
+    if(i==61){
+      Add12_ext( xmBihi , xmBilo , xe , -ab_table[61].b);
+    }
+    else {
+      xmBihi = xe-ab_table[i].b;
+      xmBilo = 0.0;
+    }
+    
+    Mul12_ext(tmphi,tmplo, xe, (ab_table[i].b));
+
+    if (xe > 1) /* TODO remplacer par xabs */
+      Add22_ext(x0hi,x0lo,tmphi,tmplo, 1.0,0.0);
+    else {
+      Add22_ext(x0hi , x0lo , 1.0,0.0,tmphi,tmplo);
+    }
+    
+#if 1
+    Div22_ext(Xredhi, Xredlo, xmBihi , xmBilo , x0hi,x0lo);
+#else
+    Xredhi=1; Xredlo=0; /* to time the Div22*/
+#endif
+    
+#if DEBUG
+    printf("i=%d, num=%1.15e   den=%1.15e\n",i, (double)xmBihi, (double)x0hi);
+    printf("Xred=%1.15e\n", (double)Xredhi);
+#endif
+
+    Xred2 = Xredhi*Xredhi;
+    Mul22_ext(Xred2hi,Xred2lo,Xredhi,Xredlo,Xredhi, Xredlo);
+    
+      /*poly eval */
+      
+    q = (coef_poly[4][0]+Xred2*
+	 (coef_poly[5][0]+Xred2*
+	  (coef_poly[6][0]+Xred2*
+	   (coef_poly[7][0]+
+	    (Xred2*coef_poly[8][0])))));
+      
+    Mul12_ext(qhi, qlo, q, Xred2);
+    
+    for(j=3;j>=0;j--)
+      {
+	Add22_ext(qhi,qlo, (coef_poly[j][0]), (coef_poly[j][1]), qhi,qlo);
+	Mul22_ext(qhi,qlo, qhi,qlo, Xred2hi,Xred2lo);
+      }
+      
+    Mul22_ext(qhi,qlo, Xredhi,Xredlo, qhi,qlo);
+    Add22_ext(qhi,qlo, Xredhi,Xredlo, qhi,qlo);
+    
+    /* reconstruction : atan(x) = atan(b[i]) + atan(x) */
+    Add22_ext(atanhi,atanlo, atanb_table[i].hi, atanb_table[i].lo, qhi,qlo);
+  }
+  else
+    /* no reduction needed */
+    {
+
+#if DEBUG
+       printf("Tata\n");
+#endif
+      /* Polynomial evaluation */
+      Mul12_ext( Xred2hi,Xred2lo,xe,xe);
+
+      /*poly eval - don't take risks, keep plain Horner */
+
+      q = coef_poly[8][0];
+      q = coef_poly[7][0]+Xred2hi*q;
+      q = coef_poly[6][0]+Xred2hi*q;
+      q = coef_poly[5][0]+Xred2hi*q;
+      
+      Add12_ext(qhi,qlo, coef_poly[4][0], Xred2hi*q);
+#if DEBUG
+      printf("    qhi+ql = %1.50Le + %1.50Le\n",(long double)qhi, (long double)qlo);
+      print_debug("qhi", qhi);
+      print_debug("qlo", qlo);
+#endif
+      Mul22_ext(qhi,qlo, qhi,qlo, Xred2hi,Xred2lo);
+#if DEBUG
+      printf("    Xred2  = %1.50Le + %1.50Le\n",(long double)Xred2hi, (long double)Xred2lo);
+      printf("    qhi+ql = %1.50Le + %1.50Le\n",(long double)qhi, (long double)qlo);
+      print_debug("qhi", qhi);
+      print_debug("qlo", qlo);
+#endif
+      
+      for(j=3;j>=0;j--)
+        {
+          Add22_ext(qhi,qlo, (coef_poly[j][0]), (coef_poly[j][1]), qhi,qlo);
+          Mul22_ext(qhi,qlo, qhi,qlo, Xred2hi,Xred2lo);
+        }
+      
+      Mul22_ext (qhi,qlo, xe,0, qhi,qlo);
+
+#if DEBUG
+      printf("    qhi+ql = %1.50Le + %1.50Le\n",(long double)qhi, (long double)qlo);
+      print_debug("qhi", qhi);
+      print_debug("qlo", qlo);
+#endif
+      /* Now comes the addition sequence proven in the TOMS paper */
+      Add12_ext(atanhi,atanlo,xe,qhi);
+#if DEBUG
+      print_debug("atanhi", atanhi);
+      printf(" atan hi+lo  %1.50Le + %1.50Le\n",(long double)atanhi, (long double)atanlo);
+#endif
+      atanlo += qlo;
+
+    }
+
+#if DEBUG
+  printf(" atan hi+lo  %1.50Le + %1.50Le\n",(long double)atanhi, (long double)atanlo);
+  printf("             %1.50e + %1.50e\n",(double)atanhi,(double) atanlo);
+  printf("             %1.50Le\n",(long double)(atanhi + atanlo));
+  printf("             ");
+#endif
+  
+    if(sign_mask) 
+      res= -(double) (atanhi+atanlo);
+    else 
+      res= (double) (atanhi+atanlo);
+
+    return res;
+    
+  }
+} 
+
diff --git a/src/crlibm/atan-pentium.c b/src/crlibm/atan-pentium.c
new file mode 100644
index 0000000..47004b1
--- /dev/null
+++ b/src/crlibm/atan-pentium.c
@@ -0,0 +1,280 @@
+/* 
+ *
+THIS CODE IS BROKEN. DO NOT USE.
+
+ this function computes atan correctly rounded to the nearest, 
+ using experimental techniques based on  double-extended arithmetic
+
+It used to work, honest, but changes in the crlibm framework have
+broken it. It should be merged some day with atan-itanium, but this is
+not high on the agenda.
+ 
+ *
+ * Author : Nicolas Gast, Florent de Dinechin
+ * nicolas.gast at ens.fr
+ *
+
+ To have it replace the crlibm atan, do:
+ gcc -DHAVE_CONFIG_H -I.  -fPIC  -O2 -c atan-pentium.c;   mv atan-pentium.o atan_fast.o; make 
+ 
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <crlibm.h>
+#include <crlibm_private.h>
+#include <double-extended.h>
+
+#define debug 0 /*Warning : turning debugging on seems to change the final result */
+#define DEBUG 0
+#define NICOLASTEST 0
+
+#ifdef HAVE_FENV_H
+#include <fenv.h>
+#endif
+
+
+/* The following seems perfectly harmless */
+
+#ifdef FENV_H
+#pragma STDC FENV_ACCESS ON
+#endif
+
+#include "atan-pentium.h"
+#include <fpu_control.h>
+
+
+
+/* Dummy functions to compile OK */
+extern double atan_rd(double x) {return 0;}
+extern double atan_ru(double x) {return 0;}
+extern double atan_rz(double x) {return 0;}
+
+
+extern double atan_rn(double x) {
+  db_number x_db;
+  unsigned int hx;
+  double sign;
+  double u;
+  double comp;
+  double atanhi, atanlo, atanlo_u;
+
+  long double Xred;
+  long double Xred2;
+  long double q;
+  long double atan;
+  long double eps;
+  int i;
+  
+  if(x>=0)
+    sign = 1;
+  else
+    {sign = -1;
+    x=-x;}
+  
+  x_db.d = x;
+  hx = x_db.i[HI] & 0x7FFFFFFF; 
+  
+  /* Filter cases */
+  if ( hx >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ( (x_db.i[LO] == 0) && (hx & 0x000fffff) == 0x00080000)
+        return x+x;                /* NaN */
+      else
+        return sign*HALFPI.d;           /* atan(x) = Pi/2 */
+    }
+  else
+    if ( hx < 0x3E400000 )
+      {return sign*x;}                   /* x<2^-27 then atan(x) =~ x */
+
+   DOUBLE_EXTENDED_MODE;
+
+
+  if (x > MIN_REDUCTION_NEEDED) /* test if reduction is necessary : */
+    {
+      /* 1) Argument reduction :  */
+      
+      /* compute i so that a[i] < x < a[i+1] */
+      if (x>arctan_table[61][A])
+        i=61;
+      else {
+        i=31;
+        if (x < arctan_table[i][A]) i-= 16;
+        else i+=16;
+        if (x < arctan_table[i][A]) i-= 8;
+        else i+= 8;
+        if (x < arctan_table[i][A]) i-= 4;
+        else i+= 4;
+        if (x < arctan_table[i][A]) i-= 2;
+        else i+= 2;
+        if (x < arctan_table[i][A]) i-= 1;
+        else i+= 1;
+        if (x < arctan_table[i][A]) i-= 1;
+      }
+      Xred = (x - arctan_table[i][B] )/(1.0L +  x * arctan_table[i][B] );
+      
+      Xred2 = Xred*Xred;
+      /* Polynomial evaluation */
+      q = Xred2*(coef_poly[0][0]+Xred2*
+           (coef_poly[1][0]+Xred2*
+            (coef_poly[2][0]+Xred2*
+             (coef_poly[3][0]))));
+      
+      /* reconstruction : atan(x) = atan(b[i]) + atan(x) */
+      atan = arctan_table[i][ATAN_BHI] + (Xred + q*Xred);
+      
+
+      atanhi = (double) atan;
+      atanlo = atan-atanhi;
+      
+      
+    }
+  else
+    
+    // no reduction needed
+    {
+      
+      Xred2 = x*x;
+      
+      /* Polynomial evaluation */
+      q = Xred2*(coef_poly[0][0]+Xred2*
+           (coef_poly[1][0]+Xred2*
+            (coef_poly[2][0]+Xred2*
+             (coef_poly[3][0]))));
+      
+      atan = q*x + x;
+    
+    }
+  
+  /* We do not use the macro of double-extended.h because we want to
+     compute in parallel the rounding test and the product sign*atan */
+
+#if 1
+  DE_TEST_AND_RETURN_RN(sign*atan, ACCURATE_TO_62_BITS);
+
+#else
+{                                                           
+  db_ext_number _z;   double _yd, retval;   
+  int _lo;                                                  
+  int _mask=ACCURATE_TO_62_BITS;                        
+  _z.d = atan; retval= sign*atan;                                              
+  _yd = (double) atan;                                        
+  _lo = _z.i[DE_MANTISSA_LO] &(_mask);                      
+  if((_lo!=(0x3ff&(_mask))) && (_lo!= (0x400&(_mask)))) {   
+    BACK_TO_DOUBLE_MODE;                                    
+    return retval;                                             
+  }                                                         
+}
+#endif
+  
+   {
+
+    /*Second step, double-double  */
+    long double tmphi, tmplo;
+    long double x0hi, x0lo;
+    long double xmBihi, xmBilo;
+    long double Xredhi, Xredlo;
+    long double Xred2;
+    long double qhi,qlo; /* q = polynomial */
+    long double q;
+    long double Xred2hi,Xred2lo;
+    long double atanhi,atanlo;
+    int j;
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  if (x > MIN_REDUCTION_NEEDED) /* test if reduction is necessary : */
+    {
+      /* 1) Argument reduction :  */
+      
+      if (i==61) 
+        {
+          Add12_ext( &xmBihi , &xmBilo , x , -arctan_table[61][B]);
+        }
+      else 
+        {
+          xmBihi = x-arctan_table[i][B];
+          xmBilo = 0.0;
+        }
+      
+      Mul12_ext(&tmphi,&tmplo, x, arctan_table[i][B]);
+      
+      if (x > 1)
+        Add22_ext(&x0hi,&x0lo,tmphi,tmplo, 1.0,0.0);
+      else {Add22_ext( &x0hi , &x0lo , 1.0,0.0,tmphi,tmplo);}
+      
+      Div22_ext( Xredhi, Xredlo, xmBihi , xmBilo , x0hi,x0lo);
+      
+      Xred2 = Xredhi*Xredhi;
+      Mul22_ext( &Xred2hi,&Xred2lo,Xredhi,Xredlo,Xredhi, Xredlo);
+      
+      /*poly eval */
+      
+      q = (coef_poly[4][0]+Xred2*
+           (coef_poly[5][0]+Xred2*
+            (coef_poly[6][0]+Xred2*
+             (coef_poly[7][0]+
+              (Xred2*coef_poly[8][0])))));
+      
+      Mul12_ext( &qhi, &qlo, q, Xred2);
+      
+      for(j=3;j>=0;j--)
+        {
+          Add22_ext(&qhi,&qlo, coef_poly[j][0], coef_poly[j][1], qhi,qlo);
+          Mul22_ext(&qhi,&qlo, qhi,qlo, Xred2hi,Xred2lo);
+        }
+      
+      Mul22_ext(&qhi,&qlo, Xredhi,Xredlo, qhi,qlo);
+      Add22_ext(&qhi,&qlo, Xredhi,Xredlo, qhi,qlo);
+      
+      /* reconstruction : atan(x) = atan(b[i]) + atan(x) */
+      Add22_ext(&atanhi,&atanlo, arctan_table[i][ATAN_BHI], arctan_table[i][ATAN_BLO], qhi,qlo);
+    }
+  else
+    
+    // no reduction needed
+    {
+      /* Polynomial evaluation */
+      Mul12_ext( &Xred2hi,&Xred2lo,x,x);
+      
+      /*poly eval */
+      q = Xred2hi*(coef_poly[5][0]+Xred2hi*
+		   (coef_poly[6][0]+Xred2hi*
+		    (coef_poly[7][0]+Xred2hi*
+		     (coef_poly[8][0]))));
+      
+      Add12_ext(&qhi,&qlo, coef_poly[4][0],q);
+#if debug
+  printf(" xred2   =   %1.50Le + %1.50Le\n", Xred2hi, Xred2lo);
+  printf(" qhi+qlo0=   %1.50Le + %1.50Le\n",qhi, qlo);
+#endif
+      Mul22_ext(&qhi,&qlo, qhi,qlo, Xred2hi,Xred2lo);
+      
+      for(j=3;j>=0;j--)
+        {
+          Add22_ext(&qhi,&qlo, coef_poly[j][0], coef_poly[j][1], qhi,qlo);
+          Mul22_ext(&qhi,&qlo, qhi,qlo, Xred2hi,Xred2lo);
+        }
+      
+      Mul22_ext (&qhi,&qlo, x,0, qhi,qlo);
+
+#if debug
+  printf(" qhi+qlo =   %1.50Le + %1.50Le\n",qhi, qlo);
+#endif
+
+      /* The sequence in the TOMS paper */
+      Add12_ext (&atanhi,&atanlo,x,qhi);
+      atanlo += qlo;
+    }
+#if debug
+  printf("             %1.50Le + %1.50Le\n",atanhi, atanlo);
+  printf("             %1.50Le\n",atanhi + atanlo);
+#endif
+  
+   BACK_TO_DOUBLE_MODE;
+  return sign*((double) (atanhi+atanlo));
+    }
+}
diff --git a/src/crlibm/atan-pentium.h b/src/crlibm/atan-pentium.h
new file mode 100644
index 0000000..d7e2dac
--- /dev/null
+++ b/src/crlibm/atan-pentium.h
@@ -0,0 +1,343 @@
+/* file generated by atan_ext.mpl*/
+
+#include "double-extended.h"
+#ifdef WORDS_BIGENDIAN
+static const db_number HALFPI = {{0x3FF921FB,0x54442D18}};
+#else
+static const db_number HALFPI = {{0x54442D18,0x3FF921FB}};
+#endif
+#define MIN_REDUCTION_NEEDED 0.01269144369306618004077670910586377580133132772550
+#define A 0
+#define B 1
+#define ATAN_BHI 2
+#define ATAN_BLO 3
+#define EPSILON 2.04221581890623872536809598138553304900554884091659e-19
+#define EPSILON_NO_RED 1.56771350764719825686165002299335165493769973908433e-19
+#define TWO_M_64 5.42101086242752217003726400434970855712890625000000e-20
+#define TWO_10 1.02400000000000000000000000000000000000000000000000e+03
+static long double const arctan_table[62][4] = 
+{
+{
+/*a[0]     */ 1.26914436930661800407767091058637758013313277255025e-02L ,
+/*b[0] :   */ 2.53869765124364010090284460990917025924318295437843e-02L ,
+/*atan_b[0]*/ 2.53815246637655720121743178549489350359635864151642e-02L,-3.82867671985365148296195510993062067276578228375704e-22L ,
+}
+,{
+/*a[1]     */ 3.80906929270782389081071355032096219670426556476096e-02L ,
+/*b[1] :   */ 5.08066978456951537364380978162303748035810713190585e-02L ,
+/*atan_b[1]*/ 5.07630493039637822849077710557486042830532824154943e-02L,-9.08476246908274392997382820602430859506166364517308e-22L ,
+}
+,{
+/*a[2]     */ 6.35391122156262265073608708121557700191864542424734e-02L ,
+/*b[2] :   */ 7.62920780032335878368971587848434978695877362042665e-02L ,
+/*atan_b[2]*/ 7.61445739207162224570710207238732891710242256522179e-02L,-8.68282459278828642628371257575800957271427290973051e-22L ,
+}
+,{
+/*a[3]     */ 8.90697640843219566678833329168019764753902351477774e-02L ,
+/*b[3] :   */ 1.01876371166982943013764196377168858020922925788909e-01L ,
+/*atan_b[3]*/ 1.01526098514204888296065358577191517497340100817382e-01L,2.45769122345174324242177208623096072189462913881225e-21L ,
+}
+,{
+/*a[4]     */ 1.14716138034642069137320417229771403756391587930350e-01L ,
+/*b[4] :   */ 1.27593346472767313573462404086011900972152943722904e-01L ,
+/*atan_b[4]*/ 1.26907623084671710832899149679064976226072758436203e-01L,-2.78816905606569560493152971332904010388470569035556e-21L ,
+}
+,{
+/*a[5]     */ 1.40512327929006402335609329563511567374816039056592e-01L ,
+/*b[5] :   */ 1.53477468508642290209546821255770510106231085956097e-01L ,
+/*atan_b[5]*/ 1.52289147632417933012007223159134383649870869703591e-01L,5.68472586734099921502541679282214217956262541061124e-21L ,
+}
+,{
+/*a[6]     */ 1.66493216120905508290155447580666771977220433369075e-01L ,
+/*b[6] :   */ 1.79564085612852898464876852391292061383865075185895e-01L ,
+/*atan_b[6]*/ 1.77670672157803333676934047502538049911890993826091e-01L,2.87836193526503867133275526409685067962483884000160e-22L ,
+}
+,{
+/*a[7]     */ 1.92694666476959811837109742880645880397828687778289e-01L ,
+/*b[7] :   */ 2.05889628199360004388320487256347490756525075994432e-01L ,
+/*atan_b[7]*/ 2.03052196661245300563923728287551995208559674210846e-01L,6.51289679452996937811343386488447297822880946308131e-21L ,
+}
+,{
+/*a[8]     */ 2.19153728611415853112422718806867132089178565966211e-01L ,
+/*b[8] :   */ 2.32491819536184162126382646285094324412057176232338e-01L ,
+/*atan_b[8]*/ 2.28433721143217755085073027154773939173537655733526e-01L,-3.99672208045526890632745378555235922768746788959726e-21L ,
+}
+,{
+/*a[9]     */ 2.45908855876056427513150499868929834361055540260207e-01L ,
+/*b[9] :   */ 2.59409901651160933037411349122436377001577056944370e-01L ,
+/*atan_b[9]*/ 2.53815245604249931191424491383479278283630264922976e-01L,7.56455309308095037743734018000284139150046029645800e-21L ,
+}
+,{
+/*a[10]     */ 2.73000139926648346516383602081188127403848190278175e-01L ,
+/*b[10] :   */ 2.86684879348826103653358546297091891119634965434670e-01L ,
+/*atan_b[10]*/ 2.79196770044925012070049716306208154037449276074767e-01L,-2.52115788641577571295756044335677296592687943925995e-21L ,
+}
+,{
+/*a[11]     */ 3.00469565029600975134893331013376561555834254185520e-01L ,
+/*b[11] :   */ 3.14359785700871038210697100412360782684118021279573e-01L ,
+/*atan_b[11]*/ 3.04578294465878627494048389023895140326203545555472e-01L,2.91230434592492772694189684967968754208118542272081e-22L ,
+}
+,{
+/*a[12]     */ 3.28361285690481774678262393368066760807466830418924e-01L ,
+/*b[12] :   */ 3.42479972833279288854397420793773676450655329972506e-01L ,
+/*atan_b[12]*/ 3.29959818867797216379112237860660172827920177951455e-01L,9.30919107029496230740423735124228172173872279217061e-21L ,
+}
+,{
+/*a[13]     */ 3.56721931693259055874505029587211651856214717987120e-01L ,
+/*b[13] :   */ 3.71093432391343328410242621839820742479787440970540e-01L ,
+/*atan_b[13]*/ 3.55341343251416258219388746852906990625342587009072e-01L,1.05238591424673141000163053238160966240559825585058e-21L ,
+}
+,{
+/*a[14]     */ 3.85600945252912803692499039003231191720641179521153e-01L ,
+/*b[14] :   */ 4.00251150738601814323960534358626262019242858514190e-01L ,
+/*atan_b[14]*/ 3.80722867617518378200239248521086210530484095215797e-01L,-1.21945811870033495672278691057491669776578154458509e-20L ,
+}
+,{
+/*a[15]     */ 4.15050955725992341472273957165949013751986760007989e-01L ,
+/*b[15] :   */ 4.30007504761513240142210140470879764507117215543985e-01L ,
+/*atan_b[15]*/ 4.06104391966931330934563806889237014274840475991368e-01L,2.65998962597399045630215293174401738151071787628836e-21L ,
+}
+,{
+/*a[16]     */ 4.45128198220858601154729507448273565784681133190970e-01L ,
+/*b[16] :   */ 4.60420705138676883411271920087948217314988141879439e-01L ,
+/*atan_b[16]*/ 4.31485916300525867999758264370591120950848562642932e-01L,-5.15731898573788000867228224617550054933376770292499e-21L ,
+}
+,{
+/*a[17]     */ 4.75892983535654960900184477034957958538394330627699e-01L ,
+/*b[17] :   */ 4.91553295129659681411823587970921778378396993502975e-01L ,
+/*atan_b[17]*/ 4.56867440619213494398158717513247495389805408194661e-01L,-1.17767132157456183414344600410550075200279622028076e-20L ,
+}
+,{
+/*a[18]     */ 5.07410228170177445558907530181202563476000281365126e-01L ,
+/*b[18] :   */ 5.23472714391912459942074464791517129924613982439041e-01L ,
+/*atan_b[18]*/ 4.82248964923944120283556130646118731419846881181002e-01L,7.19228812371825763087471157928804601190451351795533e-21L ,
+}
+,{
+/*a[19]     */ 5.39750054761637700814449941371777322570256912129319e-01L ,
+/*b[19] :   */ 5.56251939105489768655314619660856578775565139949322e-01L ,
+/*atan_b[19]*/ 5.07630489215703613835577873159010664494417142122984e-01L,1.95729185540933029018896909629355663993263278227122e-20L ,
+}
+,{
+/*a[20]     */ 5.72988475252136229153362345470036573847020634274658e-01L ,
+/*b[20] :   */ 5.89970211851368934573985880476243437442462891340256e-01L ,
+/*atan_b[20]*/ 5.33012013495511261082417803214283935631101485341787e-01L,1.19136600379842308834059395767709777186646606458244e-20L ,
+}
+,{
+/*a[21]     */ 6.07208171494496323570585450136999928494042072413638e-01L ,
+/*b[21] :   */ 6.24713877348479113026710057843260415211261715739965e-01L ,
+/*atan_b[21]*/ 5.58393537764417140017384616479390047061315272003412e-01L,1.60618754495076238470882310232850107535836684871974e-21L ,
+}
+,{
+/*a[22]     */ 6.42499390954343606010936791107363164108340977746831e-01L ,
+/*b[22] :   */ 6.60577343433393635583391473309333719043934252113104e-01L ,
+/*atan_b[22]*/ 5.83775062023499415216325897359794794283516239374876e-01L,4.35252648168202510134394817934791829596865136622329e-21L ,
+}
+,{
+/*a[23]     */ 6.78960978813340439010418458717160717274973479682160e-01L ,
+/*b[23] :   */ 6.97664190728041029999472594225196075967687647789717e-01L ,
+/*atan_b[23]*/ 6.09156586273861560165872319760893560669501312077045e-01L,1.16980357484588651119506030046331492746458861536954e-20L ,
+}
+,{
+/*a[24]     */ 7.16701572306941472702660857359560926553184289676267e-01L ,
+/*b[24] :   */ 7.36088459496464051585659649212800559325842186808586e-01L ,
+/*atan_b[24]*/ 6.34538110516629514322711064222559684822044800966978e-01L,1.04271379790869044477776255742912246791868144138838e-20L ,
+}
+,{
+/*a[25]     */ 7.55840988781748681529424123295264811121247558513562e-01L ,
+/*b[25] :   */ 7.75976148518263165846948342663225162141316104680300e-01L ,
+/*atan_b[25]*/ 6.59919634752948782276463224327756051934557035565376e-01L,-1.49707000168437254867185968448020110086938384414132e-21L ,
+}
+,{
+/*a[26]     */ 7.96511846049556100870729410829982316343265859222562e-01L ,
+/*b[26] :   */ 8.17466968767843598319116499295589051143906544893980e-01L ,
+/*atan_b[26]*/ 6.85301158983981482551370301159465725504560396075249e-01L,2.26378453363027050436135458770294067540690440344722e-20L ,
+}
+,{
+/*a[27]     */ 8.38861462565995566516507125655143945180189448200243e-01L ,
+/*b[27] :   */ 8.60716404767067592908747625246590473579999525099993e-01L ,
+/*atan_b[27]*/ 7.10682683210903353798835319077298322554270271211863e-01L,-2.05816942072267395453305456292103819891300383499067e-20L ,
+}
+,{
+/*a[28]     */ 8.83054096327761123407402015796301185982961275018315e-01L ,
+/*b[28] :   */ 9.05898149317818312002345559896809845668030902743340e-01L ,
+/*atan_b[28]*/ 7.36064207434900725319712466721000510005978867411613e-01L,-2.01495891478093883255259057095598284567266076155582e-20L ,
+}
+,{
+/*a[29]     */ 9.29273595909162104414831936686333705299409223136150e-01L ,
+/*b[29] :   */ 9.53206993785724477057791359513316820084583014249802e-01L ,
+/*atan_b[29]*/ 7.61445731657167461023643512119107867874845396727324e-01L,1.47965126934808321509456759477582856707733884056372e-20L ,
+}
+,{
+/*a[30]     */ 9.77726555752981243330808011822410329661495519093198e-01L ,
+/*b[30] :   */ 1.00286227737052556691944860123300031773396767675877e+00L ,
+/*atan_b[30]*/ 7.86827255878901883601704569937140831825672648847103e-01L,-2.49482501517232918872374648277419736886605467025447e-20L ,
+}
+,{
+/*a[31]     */ 1.02864609206350805084140161862944784564808293337947e+00L ,
+/*b[31] :   */ 1.05511202646791504811910750172287976056395564228296e+00L ,
+/*atan_b[31]*/ 8.12208780101303686881249188633802305048448033630848e-01L,1.96461905827059736765985245197019056188424880993332e-20L ,
+}
+,{
+/*a[32]     */ 1.08229638730567915046224506841117525832899403036327e+00L ,
+/*b[32] :   */ 1.11023795151925827769112675724727523629553616046906e+00L ,
+/*atan_b[32]*/ 8.37590304325570845578666223651964628515997901558876e-01L,4.77668553328124723447016157387373681394230124469672e-21L ,
+}
+,{
+/*a[33]     */ 1.13897819300824750110026713455197322166401899613175e+00L ,
+/*b[33] :   */ 1.16856151675095125820440233876951197089510969817638e+00L ,
+/*atan_b[33]*/ 8.62971828552896528467374553938995518365118186920881e-01L,2.55195648839450962773383050246911687940245767371150e-20L ,
+}
+,{
+/*a[34]     */ 1.19903553596581003210823783418146470970525164116258e+00L ,
+/*b[34] :   */ 1.23045136228081621770132775273154379647166933864355e+00L ,
+/*atan_b[34]*/ 8.88353352784466024664664085541687654767883941531181e-01L,1.41663860918952637119424194776437812752208835503398e-20L ,
+}
+,{
+/*a[35]     */ 1.26286394722716557298308552637571192753133513841112e+00L ,
+/*b[35] :   */ 1.29633244442242035832178054244323561761120799928904e+00L ,
+/*atan_b[35]*/ 9.13734877021453689705226403061644191438972484320402e-01L,1.35938158484232369531731558502252718011660684187715e-20L ,
+}
+,{
+/*a[36]     */ 1.33092063388866300837157174273995154222416258004689e+00L ,
+/*b[36] :   */ 1.36669737760087601715925514911376126292452681809664e+00L ,
+/*atan_b[36]*/ 9.39116401265019920129202557479430879538995213806629e-01L,2.59014288448756031532855884942098995887757875539126e-20L ,
+}
+,{
+/*a[37]     */ 1.40373715148086175686920053249645601637145483857833e+00L ,
+/*b[37] :   */ 1.44212062317890074136100819757189128722529858350754e+00L ,
+/*atan_b[37]*/ 9.64497925516308163957322763248924957224517129361629e-01L,2.26449827804982598409987486349767644635807688391558e-20L ,
+}
+,{
+/*a[38]     */ 1.48193532552453364304137000542447266699467290887996e+00L ,
+/*b[38] :   */ 1.52327639603630905871124029404839461676601786166430e+00L ,
+/*atan_b[38]*/ 9.89879449776441974696763320684667064597306307405233e-01L,-2.05144805536593178229841247027644547853640074453000e-20L ,
+}
+,{
+/*a[39]     */ 1.56624743831976753224512371327739997328623336583318e+00L ,
+/*b[39] :   */ 1.61096147803441905560321856238914506320725195109844e+00L ,
+/*atan_b[39]*/ 1.01526097404652211662976629691357288720610085874796e+00L,1.55023677688950991064710439859627109422709756104447e-21L ,
+}
+,{
+/*a[40]     */ 1.65754207708184680379297330985407381999685675116978e+00L ,
+/*b[40] :   */ 1.70612458293084534295767223932571710065531078726053e+00L ,
+/*atan_b[40]*/ 1.04064249832762372913706749866236123125418089330196e+00L,-2.04790285052346263108315613096497455796579459366338e-20L ,
+}
+,{
+/*a[41]     */ 1.75685758736121220779123774339350281513663381064643e+00L ,
+/*b[41] :   */ 1.80990457885083358467812747472081014166178647428751e+00L ,
+/*atan_b[41]*/ 1.06602402262079355645292555454517469115671701729298e+00L,1.35761391457454697238630079551792662430377488900508e-20L ,
+}
+,{
+/*a[42]     */ 1.86544587781964999316146180453643112839113228663557e+00L ,
+/*b[42] :   */ 1.92368085119253588136274679687431898855720646679401e+00L ,
+/*atan_b[42]*/ 1.09140554692704725130852905223832749470602720975876e+00L,-4.99912973600412204300099687136900356413053111793263e-20L ,
+}
+,{
+/*a[43]     */ 1.98483051718814108510073200565874404907343358553592e+00L ,
+/*b[43] :   */ 2.04914055707593576686337266679061031027231365442276e+00L ,
+/*atan_b[43]*/ 1.11678707124736675761374204984832658738014288246632e+00L,3.10946302324418261534220010195063618443711756432142e-20L ,
+}
+,{
+/*a[44]     */ 2.11688487740991047405177746304945089925532521933200e+00L ,
+/*b[44] :   */ 2.18836977316091156413845053574362964354804717004299e+00L ,
+/*atan_b[44]*/ 1.14216859558269778155553675347277930995915085077286e+00L,1.40640078849491175132740694767582500364133325443408e-20L ,
+}
+,{
+/*a[45]     */ 2.26393888595348033211664828855751235332413889868857e+00L ,
+/*b[45] :   */ 2.34397906437763570955574998766479666301165707409382e+00L ,
+/*atan_b[45]*/ 1.16755011993394735431150976978642574977129697799683e+00L,-3.65632431589086661411806107644207364740664894984231e-20L ,
+}
+,{
+/*a[46]     */ 2.42892740222016721343601364411619003865374618991270e+00L ,
+/*b[46] :   */ 2.51927965826279850135825666423983193453750573098660e+00L ,
+/*atan_b[46]*/ 1.19293164430198149548578018253053301123145502060652e+00L,4.73277414284342449192776814622229467942243084497994e-20L ,
+}
+,{
+/*a[47]     */ 2.61560046981161355013387674598293220046878570571436e+00L ,
+/*b[47] :   */ 2.71853573297491153746945069524798554994049482047558e+00L ,
+/*atan_b[47]*/ 1.21831316868762298247143988083607268890773411840200e+00L,-3.32698220688116567699867573421587503115973351391857e-20L ,
+}
+,{
+/*a[48]     */ 2.82882779840766997424337148646633655837718719950330e+00L ,
+/*b[48] :   */ 2.94733416149008806183065556361100334470393136143684e+00L ,
+/*atan_b[48]*/ 1.24369469309164922975110417757704794894380029290915e+00L,-1.68084377873484618069695715707321800300036208288904e-20L ,
+}
+,{
+/*a[49]     */ 3.07505072362971709895160078641983571814943843203348e+00L ,
+/*b[49] :   */ 3.21314087722892193746578037849559450478409416973591e+00L ,
+/*atan_b[49]*/ 1.26907621751479028680918009763800569089653436094522e+00L,4.38792946241904218827598608948466154796821458517843e-20L ,
+}
+,{
+/*a[50]     */ 3.36297230191158847569456390937866319039822318494439e+00L ,
+/*b[50] :   */ 3.52616384863255472514528832128632984677096828818321e+00L ,
+/*atan_b[50]*/ 1.29445774195772695714951733281239398820616770535707e+00L,-3.76594892854190752512165708240508698224814967846662e-20L ,
+}
+,{
+/*a[51]     */ 3.70464601821196277634078130355925061867935789919545e+00L ,
+/*b[51] :   */ 3.90073973345466671345041498319972106401110067963600e+00L ,
+/*atan_b[51]*/ 1.31983926642108904373103250851073653393541462719440e+00L,-1.42201047639732182814773447172854731688387282967153e-20L ,
+}
+,{
+/*a[52]     */ 4.11726034471856742723635875546283846965135299824434e+00L ,
+/*b[52] :   */ 4.35765668014057021934989921696512737980810925364494e+00L ,
+/*atan_b[52]*/ 1.34522079090545372721809957994310025242157280445099e+00L,-3.03025789161007606745201605098058359973216476112863e-20L ,
+}
+,{
+/*a[53]     */ 4.62619989820138064559978332787477354097622698462263e+00L ,
+/*b[53] :   */ 4.92824409985377215716664811573366478114621713757515e+00L ,
+/*atan_b[53]*/ 1.37060231541134407834674896475846139765053521841764e+00L,-7.07054719690683194328303436662645365432934240975534e-21L ,
+}
+,{
+/*a[54]     */ 5.27059285056349863215309743877271992636756004729045e+00L ,
+/*b[54] :   */ 5.66202526987798314059285864630055584711953997612000e+00L ,
+/*atan_b[54]*/ 1.39598383993922771069504801255689585559593979269266e+00L,-9.10562671648253215988230309564473943324088366141305e-21L ,
+}
+,{
+/*a[55]     */ 6.11406930017863912016759088682326676363852737284111e+00L ,
+/*b[55] :   */ 6.64216890962962991200313478401540123741142451763153e+00L ,
+/*atan_b[55]*/ 1.42136536448951557570080650449995118833612650632858e+00L,7.52628100149995238564921704233583060300504688449482e-21L ,
+}
+,{
+/*a[56]     */ 7.26750136287798744557578279291351829750470434026984e+00L ,
+/*b[56] :   */ 8.01990986231012476740526162544142607657704502344131e+00L ,
+/*atan_b[56]*/ 1.44674688906256090415499565571266771257796790450811e+00L,-4.76166414128333839459064144083355125451074263289874e-20L ,
+}
+,{
+/*a[57]     */ 8.94284159107797415028212824375737065074638836862153e+00L ,
+/*b[57] :   */ 1.01020964280654031866926723104427310317987576127052e+01L ,
+/*atan_b[57]*/ 1.47212841365865829579718387920550526359875220805407e+00L,-2.94511141270828048641690533512857277905398719218800e-20L ,
+}
+,{
+/*a[58]     */ 1.16023240149353616510359287691089007792909044742814e+01L ,
+/*b[58] :   */ 1.36206610885393049918332120107322680269135162234306e+01L ,
+/*atan_b[58]*/ 1.49750993827804296080769691501544116363220382481813e+00L,-4.91079244887503652449167717983894414693145750621499e-20L ,
+}
+,{
+/*a[59]     */ 1.64826377753716879452100734158101774215127233018738e+01L ,
+/*b[59] :   */ 2.08587363260064998487369747337538683495949953794479e+01L ,
+/*atan_b[59]*/ 1.52289146292089011330492254181478983809938654303551e+00L,5.06637296145401718980478181281990081396813033880353e-20L ,
+}
+,{
+/*a[60]     */ 2.83859754493342037894536299710691579018801830357118e+01L ,
+/*b[60] :   */ 4.43908820444563916793323521403635822935029864311218e+01L ,
+/*atan_b[60]*/ 1.54827298758731452064246747468700959871057420969009e+00L,-6.87408573264970738043205172896303636687514563517111e-21L ,
+}
+,{
+/*a[61]     */ 1.01699461607317799313064417304063275580797148199765e+02L ,
+/*b[61] :   */ 8.27932424540746422086945344176456273999065160751343e+01L ,
+/*atan_b[61]*/ 1.55871863366040360279231313800352154430584050714970e+00L,4.59787536942001704904414526825329883423547987397342e-20L ,
+}
+,
+};
+/*File generated by atan_exp.mpl*/
+ static const long double coef_poly[9][2] = {
+{ -3.33333333333333333342368351437379203616728773340583e-01L,  9.03501810404587028364033466367082415937499719525463e-21L},
+{ 2.00000000000000000002710505431213761085018632002175e-01L,  -2.71050543121376108505536620063805076318847614178820e-21L},
+{ -1.42857142857142857140921067549133027796415262855589e-01L,  -1.93607530800982934641564128836546985281459293443700e-21L},
+{ 1.11111111111111111109605274760436799397211871109903e-01L,  1.50583635067431171387883211317314321885579450456211e-21L},
+{ -9.09090909090909090933731867556488737136533018201590e-02L, 0},
+{ 7.69230769230769230779655790120052927250071661546826e-02L, 0},
+{ -6.66666666666666666698289230030827212658550706692040e-02L, 0},
+{ 5.88235294117647058825522430464127765503690170589834e-02L, 0},
+{ -5.26315789473684210515616425929419364138084347359836e-02L, 0},
+}; 
diff --git a/src/crlibm/atan_accurate.c b/src/crlibm/atan_accurate.c
new file mode 100644
index 0000000..7b016f4
--- /dev/null
+++ b/src/crlibm/atan_accurate.c
@@ -0,0 +1,341 @@
+/*
+ * Correctly rounded arctangent
+ *
+ * Author : Nicolas Gast (Ecole Normale Superieure), Florent de Dinechin
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm_private.h"
+#include "atan_accurate.h"
+#include "atan_fast.h"
+
+
+/*
+ *  WHAT WE CAN DO :
+ *
+ * 1) Range reduction 
+ *
+ *	x > 0  because atan(-x) = - atan(x)
+ *	
+ *	we have built 50 intervals I(i), associated to a b(i) so that :
+ *	
+ *	For every x :
+ *	
+ *	we find the interval I(i) , as atan(x) = atan(b(i)) + atan( (x - b(i)) / (1 + x * b(i)) ) 
+ *	
+ *		so that X = (x - b(i)) / (1 + x * b(i))  be in interval [ -2^(-6) , 2^(-6) ] 
+ *		There is no cancellation because :
+ *		for every x in [ -2^(-6) , 2^(-6) ],
+ *		
+ *					     atan(x) <= 0.01562372862     in binary 0.000001111111111
+ *		AND for the smallest b(i)    atan(b(i)) = 0.04687118592   in binary 0.00001011111111 	   
+ *
+ *
+ * 2) Polynomial evaluation of atan(X), atan(b(i)) is tabulated.
+ *                  
+ *                                  (-???)  
+ *   Approximation error: |err| < 2^ 
+ *
+ *
+ * 3) Reconstruction:
+ *
+ *    atan(x) = atan(b(i)) + atan(X) 
+ *
+ *
+ * 4) Rounding:
+ *
+ *    when |x| is too big, the result is always sign(x) * Pi/2,
+ *    because Pi/2 is appromated by the biggest value smallest than Pi/2, 
+ *    in order not to have an atan > Pi/2.
+ */
+
+
+ 
+ 
+static void scs_atan(scs_ptr res_scs, scs_ptr x){
+  scs_t X_scs, denom1_scs, denom2_scs, poly_scs, X2;
+  scs_t atanbhihi,atanbhilo, atanblo, atanbhi, atanb;
+  scs_t bsc_ptr;
+  db_number db;
+  double test;
+  int k, i=31;
+
+  
+  scs_get_d(&db.d, x);  
+  
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  /* test if x as to be reduced */
+  if (db.d > MIN_REDUCTION_NEEDED) {
+    /* Compute i so that  x E [a[i],a[i+1]] */
+    if (db.d < arctan_table[i][A].d) i-= 16;
+    else i+=16;
+    if (db.d < arctan_table[i][A].d) i-= 8;
+    else i+= 8;
+    if (db.d < arctan_table[i][A].d) i-= 4;
+    else i+= 4;
+    if (db.d < arctan_table[i][A].d) i-= 2;
+    else i+= 2;
+    if (db.d < arctan_table[i][A].d) i-= 1;
+    else if (i<61) i+= 1;
+    if (db.d < arctan_table[i][A].d) i-= 1;
+    
+    /* evaluate X = (x - b(i)) / (1 + x*b(i)) */
+    scs_set_d(bsc_ptr, arctan_table[i][B].d);
+    
+    scs_mul(denom1_scs,bsc_ptr,x);
+    scs_add(denom2_scs,denom1_scs,SCS_ONE);
+    scs_sub(X_scs,x,bsc_ptr);
+    scs_div(X_scs,X_scs,denom2_scs);
+    
+    scs_get_d(&test,X_scs);
+    
+    /* Polynomial evaluation of atan(X) , X = (x-b(i)) / (1+ x*b(i)) */
+    scs_square(X2, X_scs);
+    scs_set(res_scs, constant_poly_ptr[0]);
+    for(k=1; k < 10; k++) {
+      /* we use Horner expression */
+      scs_mul(res_scs, res_scs, X2);
+      scs_add(res_scs, constant_poly_ptr[k], res_scs);
+    }
+    scs_mul(poly_scs, res_scs, X_scs);
+    
+    /* reconstruction : */
+    
+    /* 1st we load atan ( b[i] ) in a scs*/ 
+    scs_set_d( atanbhihi , arctan_table[i][ATAN_BHI].d);
+    scs_set_d( atanbhilo , arctan_table[i][ATAN_BLO].d);
+    scs_set_d( atanblo , atan_blolo[i].d);
+    scs_add(atanbhi,atanbhihi,atanbhilo);
+    scs_add(atanb,atanbhi,atanblo);
+    scs_add(res_scs,atanb, poly_scs); 
+    return;
+  }
+  
+  else 
+    { /* no reduction needed */
+      /* Polynomial evaluation of atan(x) */
+      scs_square(X2, x);
+      scs_set(res_scs, constant_poly_ptr[0]);
+      for(k=1; k < 10; k++) {
+        /* we use Horner expression */
+        scs_mul(res_scs, res_scs, X2);
+        scs_add(res_scs, constant_poly_ptr[k], res_scs);
+      }
+      scs_mul(res_scs, res_scs, x);
+      return;
+    }
+}
+
+
+
+static void scs_atanpi(scs_ptr res, scs_ptr x){
+  scs_t at;
+  scs_atan(at, x);
+  scs_mul(res, at, InvPiSCS_ptr);
+}
+
+
+
+
+double scs_atan_rn(double x){ 
+  /* This function does NOT compute atan(x) correctly if it isn't 
+   * called in atan_rn() 
+   */
+  scs_t sc1;
+  scs_t res_scs;
+  db_number res;
+  int sign =1;
+  
+  res.d = x;
+
+  if (x < 0){
+    sign = -1;
+    x *= -1;
+  }
+  scs_set_d(sc1, x);
+  scs_atan(res_scs, sc1);
+  scs_get_d(&res.d, res_scs);
+  
+  res.d *= sign;
+  
+  return res.d;
+}
+
+
+
+
+
+
+
+
+double scs_atan_rd(double x){ 
+  scs_t sc1;
+  scs_t res_scs;
+  db_number res;
+  int sign = 1;
+   
+  res.d = x;
+
+  /* Filter cases */
+  if (x < 0){
+    sign = -1;
+    x *= -1;
+  }
+  scs_set_d(sc1, x);
+  scs_atan(res_scs, sc1);
+  if (sign == -1){
+    scs_get_d_pinf(&res.d, res_scs);
+    res.d *= -1;
+    return res.d;
+  }
+  else{
+    scs_get_d_minf(&res.d, res_scs);		
+    return res.d;
+  }
+}
+
+
+
+
+
+double scs_atan_ru(double x){ 
+  scs_t sc1;
+  scs_t res_scs;
+  db_number res;
+  int sign = 1;
+  
+  res.d = x;
+
+  /* Filter cases */
+  if (x < 0){
+    sign = -1;
+    x *= -1;
+  }
+ 
+  scs_set_d(sc1, x);
+  scs_atan(res_scs, sc1);
+  if (sign == -1){
+    scs_get_d_minf(&res.d, res_scs);
+    res.d *= -1;
+    return res.d;
+  }
+  else{
+    scs_get_d_pinf(&res.d, res_scs);		
+    return res.d;
+  }
+}
+
+
+
+
+
+/************************************************************/
+/********  AtanPi *******************************************/
+
+
+
+
+double scs_atanpi_rn(double x){ 
+  /* This function does NOT compute atanpi(x) correctly if it isn't 
+   * called in atanpi_rn() 
+   */
+  scs_t sc1;
+  scs_t res_scs;
+  db_number res;
+  int sign =1;
+  
+  res.d = x;
+
+  if (x < 0){
+    sign = -1;
+    x *= -1;
+  }
+  scs_set_d(sc1, x);
+  scs_atanpi(res_scs, sc1);
+  scs_get_d(&res.d, res_scs);
+  
+  res.d *= sign;
+  
+  return res.d;
+}
+
+
+double scs_atanpi_rd(double x){ 
+  scs_t sc1;
+  scs_t res_scs;
+  db_number res;
+  int sign = 1;
+   
+  res.d = x;
+
+  /* Filter cases */
+  if (x < 0){
+    sign = -1;
+    x *= -1;
+  }
+  scs_set_d(sc1, x);
+  scs_atanpi(res_scs, sc1);
+  if (sign == -1){
+    scs_get_d_pinf(&res.d, res_scs);
+    res.d *= -1;
+    return res.d;
+  }
+  else{
+    scs_get_d_minf(&res.d, res_scs);		
+    return res.d;
+  }
+}
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  +INFINITY
+ *************************************************************
+ *************************************************************/
+
+double scs_atanpi_ru(double x){ 
+  scs_t sc1;
+  scs_t res_scs;
+  db_number res;
+  int sign = 1;
+  
+  res.d = x;
+
+  /* Filter cases */
+  if (x < 0){
+    sign = -1;
+    x *= -1;
+  }
+ 
+  scs_set_d(sc1, x);
+  scs_atanpi(res_scs, sc1);
+  if (sign == -1){
+    scs_get_d_minf(&res.d, res_scs);
+    res.d *= -1;
+    return res.d;
+  }
+  else{
+    scs_get_d_pinf(&res.d, res_scs);		
+    return res.d;
+  }
+}
+
diff --git a/src/crlibm/atan_accurate.h b/src/crlibm/atan_accurate.h
new file mode 100644
index 0000000..96defae
--- /dev/null
+++ b/src/crlibm/atan_accurate.h
@@ -0,0 +1,198 @@
+#include "crlibm.h"
+#include "crlibm_private.h" 
+#include "atan_fast.h"
+
+/*File generated by maple/atan.mpl */
+static const scs constant_poly [10]=
+/* ~-5.26315789473684210526315789473684210526315789473684e-02 */ 
+{{{0x035e50d7, 0x250d7943, 0x179435e5, 0x035e50d7, 
+0x250d7943, 0x179435e5, 0x035e50d7, 0x250d7943},
+DB_ONE,  -1,  -1 } 
+,
+/* ~5.88235294117647058823529411764705882352941176470588e-02 */ 
+{{0x03c3c3c3, 0x30f0f0f0, 0x3c3c3c3c, 0x0f0f0f0f, 
+0x03c3c3c3, 0x30f0f0f0, 0x3c3c3c3c, 0x0f0f0f0f},
+DB_ONE,  -1,   1 } 
+,
+/* ~-6.66666666666666666666666666666666666666666666666667e-02 */ 
+{{0x04444444, 0x11111111, 0x04444444, 0x11111111, 
+0x04444444, 0x11111111, 0x04444444, 0x11111111},
+DB_ONE,  -1,  -1 } 
+,
+/* ~7.69230769230769230769230769230769230769230769230769e-02 */ 
+{{0x04ec4ec4, 0x3b13b13b, 0x04ec4ec4, 0x3b13b13b, 
+0x04ec4ec4, 0x3b13b13b, 0x04ec4ec4, 0x3b13b13b},
+DB_ONE,  -1,   1 } 
+,
+/* ~-9.09090909090909090909090909090909090909090909090909e-02 */ 
+{{0x05d1745d, 0x05d1745d, 0x05d1745d, 0x05d1745d, 
+0x05d1745d, 0x05d1745d, 0x05d1745d, 0x05d1745d},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.11111111111111111111111111111111111111111111111111e-01 */ 
+{{0x071c71c7, 0x071c71c7, 0x071c71c7, 0x071c71c7, 
+0x071c71c7, 0x071c71c7, 0x071c71c7, 0x071c71c7},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.42857142857142857142857142857142857142857142857143e-01 */ 
+{{0x09249249, 0x09249249, 0x09249249, 0x09249249, 
+0x09249249, 0x09249249, 0x09249249, 0x09249249},
+DB_ONE,  -1,  -1 } 
+,
+/* ~2.00000000000000000000000000000000000000000000000000e-01 */ 
+{{0x0ccccccc, 0x33333333, 0x0ccccccc, 0x33333333, 
+0x0ccccccc, 0x33333333, 0x0ccccccc, 0x33333333},
+DB_ONE,  -1,   1 } 
+,
+/* ~-3.33333333333333333333333333333333333333333333333333e-01 */ 
+{{0x15555555, 0x15555555, 0x15555555, 0x15555555, 
+0x15555555, 0x15555555, 0x15555555, 0x15555555},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.00000000000000000000000000000000000000000000000000e+00 */ 
+{{0x00000001, 0x00000000, 0x00000000, 0x00000000, 
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+DB_ONE,   0,   1 } 
+};
+#define constant_poly_ptr (scs_ptr)&constant_poly
+static const scs InvPiSCS=
+{{0x145f306d, 0x327220a9, 0x13f84eaf, 0x28fa9a6e, 
+0x381b6c52, 0x2cc9e21c, 0x2083fca2, 0x31d5ef5d},
+DB_ONE,  -1,   1 } 
+;
+#define InvPiSCS_ptr  (scs_ptr)(& InvPiSCS)
+
+#ifdef WORDS_BIGENDIAN
+
+static const db_number atan_blolo[62] = {
+/* 0 */  {{0xB8D1C5F3,0xA947CCE9}} /* -5.3484426395e-35 */, 
+/* 1 */  {{0xB8B05943,0x3C749846}} /* -1.2299381479e-35 */, 
+/* 2 */  {{0x38FC2F2A,0x267751FB}} /* +3.3925541143e-34 */, 
+/* 3 */  {{0x38D44E61,0xDDA4249D}} /* +6.1106690132e-35 */, 
+/* 4 */  {{0xB906FBFA,0xA5B245C8}} /* -5.5332673453e-34 */, 
+/* 5 */  {{0xB8DE1E98,0x67CABE65}} /* -9.0637612563e-35 */, 
+/* 6 */  {{0x38BD7B8F,0x45D13048}} /* +2.2180284354e-35 */, 
+/* 7 */  {{0xB9049436,0x23AD369B}} /* -4.9542022687e-34 */, 
+/* 8 */  {{0xB8F98586,0xF6BB1DB7}} /* -3.0720497269e-34 */, 
+/* 9 */  {{0xB89BC985,0xCB4D6219}} /* -5.2261910438e-36 */, 
+/* 10 */  {{0xB8C4002C,0x9C3884F4}} /* -3.0093679582e-35 */, 
+/* 11 */  {{0x3910CBC4,0x893058D9}} /* +8.0869642604e-34 */, 
+/* 12 */  {{0xB8F5408B,0xFF010BB5}} /* -2.5581328396e-34 */, 
+/* 13 */  {{0xB908570F,0xB5813578}} /* -5.8596619457e-34 */, 
+/* 14 */  {{0x39155B89,0x7E967248}} /* +1.0283294335e-33 */, 
+/* 15 */  {{0xB8CD159A,0x2031F115}} /* -4.3761315763e-35 */, 
+/* 16 */  {{0xB8E8D9C6,0x0FC3C81C}} /* -1.4956458040e-34 */, 
+/* 17 */  {{0x38C0AC30,0x8219F20D}} /* +2.5086163140e-35 */, 
+/* 18 */  {{0x38B36506,0x32EDCB95}} /* +1.4590894790e-35 */, 
+/* 19 */  {{0xB8FD57B0,0x5932E7C2}} /* -3.5319791285e-34 */, 
+/* 20 */  {{0x38C73827,0x91A2D916}} /* +3.4936600564e-35 */, 
+/* 21 */  {{0xB92FE60D,0x9EC5116C}} /* -3.0717278111e-33 */, 
+/* 22 */  {{0x3903AADF,0x6A3B8AE2}} /* +4.7347715466e-34 */, 
+/* 23 */  {{0xB88D6A01,0x71B87C3C}} /* -2.7660872166e-36 */, 
+/* 24 */  {{0xB8E17427,0xEA5AC8E8}} /* -1.0504584084e-34 */, 
+/* 25 */  {{0x38F4ED52,0xF776B005}} /* +2.5190016806e-34 */, 
+/* 26 */  {{0xB9265B23,0x75D2B05C}} /* -2.1528054385e-33 */, 
+/* 27 */  {{0xB8DA45DA,0xAFEAB282}} /* -7.9062036715e-35 */, 
+/* 28 */  {{0x3912EF75,0xBD16D3D4}} /* +9.1170587963e-34 */, 
+/* 29 */  {{0x390AB3D7,0xE904B022}} /* +6.4283962392e-34 */, 
+/* 30 */  {{0xB8EE688B,0x3F9F468B}} /* -1.8301374849e-34 */, 
+/* 31 */  {{0xB9225DF6,0x71A98823}} /* -1.7686817787e-33 */, 
+/* 32 */  {{0xB8CC82B0,0x522BE0F8}} /* -4.2897836993e-35 */, 
+/* 33 */  {{0xB912AFE0,0x88BB6A0B}} /* -8.9974727841e-34 */, 
+/* 34 */  {{0x38D4DC99,0x8640FAE5}} /* +6.2778447830e-35 */, 
+/* 35 */  {{0xB9016FC6,0x406A343B}} /* -4.1977132916e-34 */, 
+/* 36 */  {{0x3909804C,0x126FC74C}} /* +6.1391811422e-34 */, 
+/* 37 */  {{0x39051033,0xE5B0956F}} /* +5.0708030720e-34 */, 
+/* 38 */  {{0xB910CADC,0x203B114C}} /* -8.0852567814e-34 */, 
+/* 39 */  {{0x38EFCAC7,0xF97ED36B}} /* +1.9134182531e-34 */, 
+/* 40 */  {{0xB92464C0,0xB51D77B4}} /* -1.9638289218e-33 */, 
+/* 41 */  {{0x391157F3,0x2D4A03DE}} /* +8.3506176591e-34 */, 
+/* 42 */  {{0xB92BD929,0x136A8DDE}} /* -2.6816921082e-33 */, 
+/* 43 */  {{0x390F1514,0x035DF6B3}} /* +7.4828003563e-34 */, 
+/* 44 */  {{0xB92606EC,0x19DB7E3B}} /* -2.1211268072e-33 */, 
+/* 45 */  {{0x393B104B,0xCDA1B51D}} /* +5.2122706777e-33 */, 
+/* 46 */  {{0x3935FB01,0xF88A520C}} /* +4.2332900876e-33 */, 
+/* 47 */  {{0xB9189ED1,0x1940944D}} /* -1.1854280852e-33 */, 
+/* 48 */  {{0xB914E8F2,0x38D4794B}} /* -1.0067772791e-33 */, 
+/* 49 */  {{0xB93DF07A,0x73581CF5}} /* -5.7661126209e-33 */, 
+/* 50 */  {{0xB939C22F,0x727CE10C}} /* -4.9609136744e-33 */, 
+/* 51 */  {{0xB8EF37D2,0x26E1A810}} /* -1.8788680655e-34 */, 
+/* 52 */  {{0x391A4251,0x45155DAA}} /* +1.2643273919e-33 */, 
+/* 53 */  {{0xB9126D2F,0xA42D0A9A}} /* -8.8720409776e-34 */, 
+/* 54 */  {{0xB93CAF8B,0x3DFAFFA5}} /* -5.5246684074e-33 */, 
+/* 55 */  {{0x3919C170,0xA9A35831}} /* +1.2400882522e-33 */, 
+/* 56 */  {{0xB924C2B3,0xAE51E4B3}} /* -1.9991686511e-33 */, 
+/* 57 */  {{0xB8DEFB7D,0x0DE98917}} /* -9.3234199178e-35 */, 
+/* 58 */  {{0xB916EC39,0x1ABE373B}} /* -1.1036900898e-33 */, 
+/* 59 */  {{0x391C5BA4,0x4135ADBE}} /* +1.3653868341e-33 */, 
+/* 60 */  {{0xB9112692,0xD7179E60}} /* -8.2577511316e-34 */, 
+/* 61 */  {{0x392F96B5,0xBCC93753}} /* +3.0418821818e-33 */, 
+};
+
+#else
+static const db_number atan_blolo[62] = {
+/* 0 */  {{0xA947CCE9,0xB8D1C5F3}} /* -5.3484426395e-35 */, 
+/* 1 */  {{0x3C749846,0xB8B05943}} /* -1.2299381479e-35 */, 
+/* 2 */  {{0x267751FB,0x38FC2F2A}} /* +3.3925541143e-34 */, 
+/* 3 */  {{0xDDA4249D,0x38D44E61}} /* +6.1106690132e-35 */, 
+/* 4 */  {{0xA5B245C8,0xB906FBFA}} /* -5.5332673453e-34 */, 
+/* 5 */  {{0x67CABE65,0xB8DE1E98}} /* -9.0637612563e-35 */, 
+/* 6 */  {{0x45D13048,0x38BD7B8F}} /* +2.2180284354e-35 */, 
+/* 7 */  {{0x23AD369B,0xB9049436}} /* -4.9542022687e-34 */, 
+/* 8 */  {{0xF6BB1DB7,0xB8F98586}} /* -3.0720497269e-34 */, 
+/* 9 */  {{0xCB4D6219,0xB89BC985}} /* -5.2261910438e-36 */, 
+/* 10 */  {{0x9C3884F4,0xB8C4002C}} /* -3.0093679582e-35 */, 
+/* 11 */  {{0x893058D9,0x3910CBC4}} /* +8.0869642604e-34 */, 
+/* 12 */  {{0xFF010BB5,0xB8F5408B}} /* -2.5581328396e-34 */, 
+/* 13 */  {{0xB5813578,0xB908570F}} /* -5.8596619457e-34 */, 
+/* 14 */  {{0x7E967248,0x39155B89}} /* +1.0283294335e-33 */, 
+/* 15 */  {{0x2031F115,0xB8CD159A}} /* -4.3761315763e-35 */, 
+/* 16 */  {{0x0FC3C81C,0xB8E8D9C6}} /* -1.4956458040e-34 */, 
+/* 17 */  {{0x8219F20D,0x38C0AC30}} /* +2.5086163140e-35 */, 
+/* 18 */  {{0x32EDCB95,0x38B36506}} /* +1.4590894790e-35 */, 
+/* 19 */  {{0x5932E7C2,0xB8FD57B0}} /* -3.5319791285e-34 */, 
+/* 20 */  {{0x91A2D916,0x38C73827}} /* +3.4936600564e-35 */, 
+/* 21 */  {{0x9EC5116C,0xB92FE60D}} /* -3.0717278111e-33 */, 
+/* 22 */  {{0x6A3B8AE2,0x3903AADF}} /* +4.7347715466e-34 */, 
+/* 23 */  {{0x71B87C3C,0xB88D6A01}} /* -2.7660872166e-36 */, 
+/* 24 */  {{0xEA5AC8E8,0xB8E17427}} /* -1.0504584084e-34 */, 
+/* 25 */  {{0xF776B005,0x38F4ED52}} /* +2.5190016806e-34 */, 
+/* 26 */  {{0x75D2B05C,0xB9265B23}} /* -2.1528054385e-33 */, 
+/* 27 */  {{0xAFEAB282,0xB8DA45DA}} /* -7.9062036715e-35 */, 
+/* 28 */  {{0xBD16D3D4,0x3912EF75}} /* +9.1170587963e-34 */, 
+/* 29 */  {{0xE904B022,0x390AB3D7}} /* +6.4283962392e-34 */, 
+/* 30 */  {{0x3F9F468B,0xB8EE688B}} /* -1.8301374849e-34 */, 
+/* 31 */  {{0x71A98823,0xB9225DF6}} /* -1.7686817787e-33 */, 
+/* 32 */  {{0x522BE0F8,0xB8CC82B0}} /* -4.2897836993e-35 */, 
+/* 33 */  {{0x88BB6A0B,0xB912AFE0}} /* -8.9974727841e-34 */, 
+/* 34 */  {{0x8640FAE5,0x38D4DC99}} /* +6.2778447830e-35 */, 
+/* 35 */  {{0x406A343B,0xB9016FC6}} /* -4.1977132916e-34 */, 
+/* 36 */  {{0x126FC74C,0x3909804C}} /* +6.1391811422e-34 */, 
+/* 37 */  {{0xE5B0956F,0x39051033}} /* +5.0708030720e-34 */, 
+/* 38 */  {{0x203B114C,0xB910CADC}} /* -8.0852567814e-34 */, 
+/* 39 */  {{0xF97ED36B,0x38EFCAC7}} /* +1.9134182531e-34 */, 
+/* 40 */  {{0xB51D77B4,0xB92464C0}} /* -1.9638289218e-33 */, 
+/* 41 */  {{0x2D4A03DE,0x391157F3}} /* +8.3506176591e-34 */, 
+/* 42 */  {{0x136A8DDE,0xB92BD929}} /* -2.6816921082e-33 */, 
+/* 43 */  {{0x035DF6B3,0x390F1514}} /* +7.4828003563e-34 */, 
+/* 44 */  {{0x19DB7E3B,0xB92606EC}} /* -2.1211268072e-33 */, 
+/* 45 */  {{0xCDA1B51D,0x393B104B}} /* +5.2122706777e-33 */, 
+/* 46 */  {{0xF88A520C,0x3935FB01}} /* +4.2332900876e-33 */, 
+/* 47 */  {{0x1940944D,0xB9189ED1}} /* -1.1854280852e-33 */, 
+/* 48 */  {{0x38D4794B,0xB914E8F2}} /* -1.0067772791e-33 */, 
+/* 49 */  {{0x73581CF5,0xB93DF07A}} /* -5.7661126209e-33 */, 
+/* 50 */  {{0x727CE10C,0xB939C22F}} /* -4.9609136744e-33 */, 
+/* 51 */  {{0x26E1A810,0xB8EF37D2}} /* -1.8788680655e-34 */, 
+/* 52 */  {{0x45155DAA,0x391A4251}} /* +1.2643273919e-33 */, 
+/* 53 */  {{0xA42D0A9A,0xB9126D2F}} /* -8.8720409776e-34 */, 
+/* 54 */  {{0x3DFAFFA5,0xB93CAF8B}} /* -5.5246684074e-33 */, 
+/* 55 */  {{0xA9A35831,0x3919C170}} /* +1.2400882522e-33 */, 
+/* 56 */  {{0xAE51E4B3,0xB924C2B3}} /* -1.9991686511e-33 */, 
+/* 57 */  {{0x0DE98917,0xB8DEFB7D}} /* -9.3234199178e-35 */, 
+/* 58 */  {{0x1ABE373B,0xB916EC39}} /* -1.1036900898e-33 */, 
+/* 59 */  {{0x4135ADBE,0x391C5BA4}} /* +1.3653868341e-33 */, 
+/* 60 */  {{0xD7179E60,0xB9112692}} /* -8.2577511316e-34 */, 
+/* 61 */  {{0xBCC93753,0x392F96B5}} /* +3.0418821818e-33 */, 
+};
+
+#endif  /* WORDS_BIGENDIAN */ 
diff --git a/src/crlibm/atan_fast.c b/src/crlibm/atan_fast.c
new file mode 100644
index 0000000..827bd5a
--- /dev/null
+++ b/src/crlibm/atan_fast.c
@@ -0,0 +1,506 @@
+/*
+ * Correctly rounded arctangent
+ *
+ * Author : Nicolas Gast (Ecole Normale Superieure), Florent de Dinechin
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "atan_fast.h"
+
+extern double scs_atan_rn(double); 
+extern double scs_atan_rd(double); 
+extern double scs_atan_ru(double); 
+extern double scs_atanpi_rn(double); 
+extern double scs_atanpi_rd(double); 
+extern double scs_atanpi_ru(double); 
+
+
+static void atan_quick(double *atanhi,double *atanlo, int *index_of_e, double x) {
+
+  double tmphi,tmplo, x0hi,x0lo;
+  double q,Xred2,x2;
+  double Xredhi,Xredlo;
+  double xmBihi, xmBilo, tmphi2, tmplo2, atanlolo;
+  
+  int i;
+  
+  if (x > MIN_REDUCTION_NEEDED) /* test if reduction is necessary : */
+    {
+      /*
+       * 1) Argument reduction : 
+       * 
+       *  tan(x) = tan( b(i) ) + tan ( (x-b(i)) / (1+x*b(i)))
+       *
+       *                                                     6.3
+       * we choose 62 b(i) so that (x-b(i)) / (1+x*b(i)) < 2^
+       */ 
+      
+
+      
+      if (x > arctan_table[61][B].d) {
+        i=61;
+        Add12( xmBihi , xmBilo , x , -arctan_table[61][B].d);
+      }
+      else 
+        {
+          /* compute i so that a[i] < x < a[i+1] */
+          i=31;
+          if (x < arctan_table[i][A].d) i-= 16;
+          else i+=16;
+          if (x < arctan_table[i][A].d) i-= 8;
+          else i+= 8;
+          if (x < arctan_table[i][A].d) i-= 4;
+          else i+= 4;
+          if (x < arctan_table[i][A].d) i-= 2;
+          else i+= 2;
+          if (x < arctan_table[i][A].d) i-= 1;
+          else i+= 1;
+          if (x < arctan_table[i][A].d) i-= 1;     
+          xmBihi = x-arctan_table[i][B].d;
+          xmBilo = 0.0;
+        }
+        
+      /* we now compute Xred = ( x-b[i] ) / ( 1 + x*b[i] )
+       * 
+       * def : x0 := 1+x*b[i]
+       *
+       * 1st we compute an approximation of y = 1/x0
+       * then we compute a better approx x' = y*(2-x0*y)
+       * we can proove that :
+       * if y = 1/x0*(1+e) 
+       *     then x' = 1/x0 * (1-e^2)
+       *                   
+       */
+      
+      Mul12(&tmphi,&tmplo, x, arctan_table[i][B].d);
+
+      if (x > 1)
+        Add22(&x0hi,&x0lo,tmphi,tmplo, 1.0,0.0);
+      else {Add22( &x0hi , &x0lo , 1.0,0.0,tmphi,tmplo);}
+
+      Div22( &Xredhi, &Xredlo, xmBihi , xmBilo , x0hi,x0lo);
+
+      /* Polynomial evaluation : 
+       *  
+       *  1rt compute Q(x^2) = (1 - x^2/3 + ...)
+       *      then P(x) = x * Q(x^2)
+       *
+       */
+
+      Xred2 = Xredhi*Xredhi;
+      
+      q = Xred2*(coef_poly[3]+Xred2*
+                 (coef_poly[2]+Xred2*
+                  (coef_poly[1]+Xred2*
+                   coef_poly[0]))) ;
+
+      /* reconstruction : atan(x) = atan(b[i]) + atan(x) */
+      atanlolo = (Xredlo + arctan_table[i][ATAN_BLO].d);
+      atanlolo += Xredhi*q;
+      Add12( tmphi2, tmplo2, arctan_table[i][ATAN_BHI].d, Xredhi);
+      Add12( *atanhi, *atanlo, tmphi2, (tmplo2+atanlolo));
+      
+      if (i<10)
+        *index_of_e = 0;
+      else
+        *index_of_e = 1;
+    }
+  else 
+    // no reduction needed
+    {
+      /* Polynomial evaluation : 
+       *  
+       *  1rt compute Q(x^2) = (1 - x^2/3 + ...)
+       *      then P(x) = x * Q(x^2)
+       *
+       */
+      
+      x2 = x*x;
+      q = x2*(coef_poly[3]+x2*
+              (coef_poly[2]+x2*
+               (coef_poly[1]+x2*
+                coef_poly[0]))) ;
+      Add12(*atanhi,*atanlo, x , x*q);
+      
+      *index_of_e = 2;
+    }
+
+}
+
+
+
+
+
+
+
+extern double atan_rn(double x) {
+ 
+  double atanhi,atanlo;
+  int index_of_e;
+  double sign;
+  db_number x_db;
+  int absxhi;
+
+  x_db.d = x;
+  absxhi = x_db.i[HI] & 0x7fffffff; 
+
+  if(x_db.i[HI] & 0x80000000){
+    x_db.i[HI] = absxhi;
+    sign =-1;
+  }
+  else 
+    sign=1;
+  
+  /* Filter cases */
+  if ( absxhi >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((absxhi > 0x7ff00000) || ((absxhi == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else 
+        return sign*HALFPI.d;           /* atan(+/-infty) = +/- Pi/2 */
+    }
+  if ( absxhi < 0x3E400000 )
+      return x;                   /* x<2^-27 then atan(x) =~ x */
+  
+  atan_quick(&atanhi, &atanlo,&index_of_e , x_db.d);
+  
+  if (atanhi == (atanhi + (atanlo*rncst[index_of_e]))) 
+    return sign*atanhi;
+  else
+    {
+      /* more accuracy is needed , lauch accurate phase */ 
+      return sign*scs_atan_rn(x_db.d);
+    }
+}
+
+
+
+
+
+
+
+extern double atan_rd(double x) {
+  double atanhi,atanlo;
+  int index_of_e;
+  double maxepsilon;
+  db_number x_db;
+  int absxhi;
+  int sign;
+
+  x_db.d = x;
+  absxhi = x_db.i[HI] & 0x7FFFFFFF; 
+
+  if(x_db.i[HI] & 0x80000000){
+    x_db.i[HI] = absxhi;
+    sign =-1;
+  }
+  else 
+    sign=1;
+
+  /* Filter cases */
+  if ( absxhi >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((absxhi > 0x7ff00000) || ((absxhi == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else{
+	if (sign>0)
+	  return HALFPI.d;
+	else
+	  return -HALFPI_TO_PLUS_INFINITY.d;           /* atan(x) = Pi/2 */
+      }
+    }
+  else
+    if ( absxhi < 0x3E400000 )
+      {if (sign>0)
+        {if(x==0)
+	  return x;
+        else
+          x_db.l--;
+        return x_db.d;
+        }
+      else
+        return x;
+      }
+  
+  atan_quick(&atanhi, &atanlo,&index_of_e, x_db.d);
+  maxepsilon = epsilon[index_of_e];
+  atanhi = sign*atanhi;
+  atanlo = sign*atanlo;
+  
+  /* Rounding test to - infinity */ 
+  
+  TEST_AND_RETURN_RD(atanhi, atanlo, maxepsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_atan_rd(sign*x_db.d);
+}
+
+
+
+
+
+
+
+extern double atan_ru(double x) {
+  double atanhi,atanlo;
+  int index_of_e;
+  int sign;
+  double maxepsilon;
+  db_number x_db;
+  int absxhi;
+
+  x_db.d = x;
+  absxhi = x_db.i[HI] & 0x7FFFFFFF; 
+
+  if (x_db.i[HI] & 0x80000000){
+    sign = -1;
+    x_db.i[HI] = absxhi;
+  }
+  else 
+    sign = 1;
+  
+  
+  /* Filter cases */
+  if ( absxhi >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((absxhi > 0x7ff00000) || ((absxhi == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else
+        {
+          if (sign>0)
+            return HALFPI_TO_PLUS_INFINITY.d;
+        else
+          return -HALFPI.d;           /* atan(x) = Pi/2 */
+        }
+    }
+    
+  if ( absxhi < 0x3E400000 ){
+    if(x==0)
+      return x;
+    
+    if (sign<0) {
+      x_db.l--;
+      return -x_db.d;
+    }
+    else
+      return x;
+  }                   /* x<2^-27 then atan(x) =~ x */
+  
+  atan_quick(&atanhi, &atanlo, &index_of_e, x_db.d);
+  maxepsilon = epsilon[index_of_e];
+  atanhi = sign*atanhi;
+  atanlo = sign*atanlo;
+  
+  TEST_AND_RETURN_RU(atanhi, atanlo, maxepsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_atan_ru(x);
+}
+
+
+
+
+
+extern double atan_rz(double x) {
+  if (x>0)
+    return atan_rd(x);
+  else
+    return atan_ru(x);
+}
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *                       AtanPi  		             *
+ *************************************************************
+ *************************************************************/
+
+
+
+extern double atanpi_rn(double x) {
+ 
+  double atanhi,atanlo,atanpihi,atanpilo;
+  int index_of_e;
+  double sign;
+  db_number x_db;
+  int absxhi;
+
+  x_db.d = x;
+  absxhi = x_db.i[HI] & 0x7fffffff; 
+
+  if(x_db.i[HI] & 0x80000000){
+    x_db.i[HI] = absxhi;
+    sign =-1;
+  }
+  else 
+    sign=1;
+  
+  /* Filter cases */
+  if ( absxhi >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((absxhi > 0x7ff00000) || ((absxhi == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else 
+        return sign*0.5;           /* atan(+/-infty) = +/- Pi/2 */
+    }
+  if ( absxhi < 0x3E400000 )
+    return sign*scs_atanpi_rn(x_db.d); /* TODO optim here */
+  
+  atan_quick(&atanhi, &atanlo,&index_of_e , x_db.d);
+  Mul22(&atanpihi,&atanpilo, INVPIH, INVPIL, atanhi,atanlo);
+
+  if (atanpihi == (atanpihi + (atanpilo*rncst[index_of_e]))) 
+    return sign*atanpihi;
+  else
+    /* more accuracy is needed , lauch accurate phase */ 
+    return sign*scs_atanpi_rn(x_db.d);
+}
+
+
+
+
+
+
+
+extern double atanpi_rd(double x) {
+  double atanhi,atanlo,atanpihi,atanpilo;
+  int index_of_e;
+  double maxepsilon;
+  db_number x_db;
+  int absxhi;
+  int sign;
+
+  x_db.d = x;
+  absxhi = x_db.i[HI] & 0x7FFFFFFF; 
+
+  if(x_db.i[HI] & 0x80000000){
+    x_db.i[HI] = absxhi;
+    sign =-1;
+  }
+  else 
+    sign=1;
+
+  /* Filter cases */
+  if ( absxhi >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((absxhi > 0x7ff00000) || ((absxhi == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else{
+	if (sign>0)
+	  return 0.5; 
+	/* Or should it be 0.4999999999999999444888487687421729788184165954589843750; nextdown(0.5) */
+	else
+	  return -0.5;           /* atan(infty) = Pi/2 */
+      }
+    }
+  else
+    if ( absxhi < 0x3E400000 ) {
+      if(x==0.0) 
+	return x;  /* signed */
+      else
+	return scs_atanpi_rd(sign*x_db.d); /* TODO optim here */
+    }
+  atan_quick(&atanhi, &atanlo,&index_of_e, x_db.d);
+  Mul22(&atanpihi,&atanpilo, INVPIH, INVPIL, atanhi,atanlo);
+  maxepsilon = epsilon[index_of_e];
+  atanpihi = sign*atanpihi;
+  atanpilo = sign*atanpilo;
+  
+  /* Rounding test to - infinity */ 
+  
+  TEST_AND_RETURN_RD(atanpihi, atanpilo, maxepsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_atanpi_rd(sign*x_db.d);
+}
+
+
+
+
+
+
+
+extern double atanpi_ru(double x) {
+  double atanhi,atanlo,atanpihi,atanpilo;
+  int index_of_e;
+  int sign;
+  double maxepsilon;
+  db_number x_db;
+  int absxhi;
+
+  x_db.d = x;
+  absxhi = x_db.i[HI] & 0x7FFFFFFF; 
+
+  if (x_db.i[HI] & 0x80000000){
+    sign = -1;
+    x_db.i[HI] = absxhi;
+  }
+  else 
+    sign = 1;
+  
+  
+  /* Filter cases */
+  if ( absxhi >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((absxhi > 0x7ff00000) || ((absxhi == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else
+        {
+          if (sign>0)
+            return 0.5;
+        else
+          return - 0.5;           
+        }
+    }
+    
+    if ( absxhi < 0x3E400000 ) {
+      if(x==0.0)
+	return x; /* signed */
+      else
+	return scs_atanpi_ru(x);
+    }  
+  atan_quick(&atanhi, &atanlo, &index_of_e, x_db.d);
+  Mul22(&atanpihi,&atanpilo, INVPIH, INVPIL, atanhi,atanlo);
+  maxepsilon = epsilon[index_of_e];
+  atanpihi = sign*atanpihi;
+  atanpilo = sign*atanpilo;
+  
+  TEST_AND_RETURN_RU(atanpihi, atanpilo, maxepsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_atanpi_ru(x);
+}
+
+
+
+
+
+extern double atanpi_rz(double x) {
+  if (x>0)
+    return atanpi_rd(x);
+  else
+    return atanpi_ru(x);
+}
+
diff --git a/src/crlibm/atan_fast.h b/src/crlibm/atan_fast.h
new file mode 100644
index 0000000..cbfb8b7
--- /dev/null
+++ b/src/crlibm/atan_fast.h
@@ -0,0 +1,680 @@
+
+/*File generated by maple/atan.mpl */
+#ifndef _ATAN_FAST_H
+#define _ATAN_FAST_H
+
+#include "crlibm.h"
+#include "crlibm_private.h"
+#ifdef WORDS_BIGENDIAN
+static const db_number HALFPI = {{0x3FF921FB,0x54442D18}};static const db_number HALFPI_TO_PLUS_INFINITY = {{0x3FF921FB,0x54442D19}};
+#else
+static const db_number HALFPI = {{0x54442D18,0x3FF921FB}};static const db_number HALFPI_TO_PLUS_INFINITY = {{0x54442D19,0x3FF921FB}};
+#endif
+#define MIN_REDUCTION_NEEDED 0.01269144369306618004077670910586377580133132772550
+#define INVPIH 0.31830988618379069121644420192751567810773849487305
+#define INVPIL -0.00000000000000001967867667518248588189519091409181
+#define nb_of_ai 62
+#define nb_of_bi 62
+static const double rncst[4] ={
+1.00108178765940960655050071055243374002677613873338 , /* i<10 */ 
+1.00005232457100223306383112145248847898875939835839 , /* i>10 */ 
+1.00177430465884899885886845639867196876576265849646 , /* e > 2^-10 */ 
+1.00001038174963923723172604569348623337721036178939 , /* e < 2^-10 */ 
+ };
+static const double epsilon[4] ={
+5.98811545469121308132334292226294391299405661608483e-20 ,
+2.85148356343799927177205125935801754271662806490715e-21 ,
+9.82484875894815915914535124879847312836985338769278e-20 ,
+5.23355329168770007392834621113547073694289911517614e-22 ,
+ };
+#define DEGREE 4
+static double const coef_poly[4] = 
+{
+/* coef for degree 9 */ 0.11111111111111110494320541874913033097982406616211, 
+/* coef for degree 7 */ -0.14285714285714284921269268124888185411691665649414, 
+/* coef for degree 5 */ 0.20000000000000001110223024625156540423631668090820, 
+/* coef for degree 3 */ -0.33333333333333331482961625624739099293947219848633, 
+ }; 
+#define A 0
+#define B 1
+#define ATAN_BHI 2
+#define ATAN_BLO 3
+
+#ifdef WORDS_BIGENDIAN
+ 
+/* limits of the intervals [a[i],b[i]] */
+static db_number const arctan_table[62][4] = 
+{
+{
+/*a[0]     */ {{0x3F89FDF8,0xBCCE533D}} /* +1.2691443693e-02 */ ,
+/*b[0] :   */ {{0x3F99FF0B,0x27760007}} /* +2.5386976512e-02 */ ,
+/*atan_b[0]*/ {{0x3F99FD9D,0x4969F96C}} /* +2.5381524664e-02 */,{{0xBC301997,0x750685EA}} /* -8.7278097631e-19 */ ,
+}
+,{
+/*a[1]     */ {{0x3FA3809F,0x90CEBC31}} /* +3.8090692927e-02 */ ,
+/*b[1] :   */ {{0x3FAA0355,0xE3547CC2}} /* +5.0806697846e-02 */ ,
+/*atan_b[1]*/ {{0x3FA9FD9D,0x4936262D}} /* +5.0763049304e-02 */,{{0xBC4C1F96,0x3A2D0F59}} /* -3.0491436238e-18 */ ,
+}
+,{
+/*a[2]     */ {{0x3FB04419,0x68FBA526}} /* +6.3539112216e-02 */ ,
+/*b[2] :   */ {{0x3FB387E0,0xABF7BFB9}} /* +7.6292078003e-02 */ ,
+/*atan_b[2]*/ {{0x3FB37E35,0xF6C1E06C}} /* +7.6144573921e-02 */,{{0xBC556710,0x8378E024}} /* -4.6409481568e-18 */ ,
+}
+,{
+/*a[3]     */ {{0x3FB6CD46,0xABCDFA25}} /* +8.9069764084e-02 */ ,
+/*b[3] :   */ {{0x3FBA1491,0xE265B8AB}} /* +1.0187637117e-01 */ ,
+/*atan_b[3]*/ {{0x3FB9FD9D,0x48CF1996}} /* +1.0152609851e-01 */,{{0xBC4360DC,0xB73BED3C}} /* -2.1010068528e-18 */ ,
+}
+,{
+/*a[4]     */ {{0x3FBD5E09,0x6D2EA546}} /* +1.1471613803e-01 */ ,
+/*b[4] :   */ {{0x3FC054FA,0x9124D46B}} /* +1.2759334647e-01 */ ,
+/*atan_b[4]*/ {{0x3FC03E82,0x4D618156}} /* +1.2690762308e-01 */,{{0x3C62604E,0x49A86344}} /* +7.9694040325e-18 */ ,
+}
+,{
+/*a[5]     */ {{0x3FC1FC4E,0xD691E891}} /* +1.4051232793e-01 */ ,
+/*b[5] :   */ {{0x3FC3A526,0x51F57043}} /* +1.5347746851e-01 */ ,
+/*atan_b[5]*/ {{0x3FC37E35,0xF64EF83E}} /* +1.5228914763e-01 */,{{0x3C5F2B13,0xB4A55EA6}} /* +6.7585410867e-18 */ ,
+}
+,{
+/*a[6]     */ {{0x3FC54FA6,0x531F610B}} /* +1.6649321612e-01 */ ,
+/*b[6] :   */ {{0x3FC6FBF4,0xB99F2601}} /* +1.7956408561e-01 */ ,
+/*atan_b[6]*/ {{0x3FC6BDE9,0x9F302425}} /* +1.7767067216e-01 */,{{0xBC23B62A,0xC4D330CE}} /* -5.3428372026e-19 */ ,
+}
+,{
+/*a[7]     */ {{0x3FC8AA38,0x0550EAF1}} /* +1.9269466648e-01 */ ,
+/*b[7] :   */ {{0x3FCA5A97,0x61D9D63D}} /* +2.0588962820e-01 */ ,
+/*atan_b[7]*/ {{0x3FC9FD9D,0x48053FC8}} /* +2.0305219666e-01 */,{{0xBC67A12C,0x98474AF1}} /* -1.0247699700e-17 */ ,
+}
+,{
+/*a[8]     */ {{0x3FCC0D3A,0xB8975BD9}} /* +2.1915372861e-01 */ ,
+/*b[8] :   */ {{0x3FCDC24A,0xBCBF6ABC}} /* +2.3249181954e-01 */ ,
+/*atan_b[8]*/ {{0x3FCD3D50,0xF0CE8DD9}} /* +2.2843372114e-01 */,{{0x3C6EF257,0x3A31D353}} /* +1.3420967238e-17 */ ,
+}
+,{
+/*a[9]     */ {{0x3FCF79F0,0xFEE46885}} /* +2.4590885588e-01 */ ,
+/*b[9] :   */ {{0x3FD09A2B,0xFCF66B85}} /* +2.5940990165e-01 */ ,
+/*atan_b[9]*/ {{0x3FD03E82,0x4CC62C6B}} /* +2.5381524560e-01 */,{{0x3C5DA594,0x95C6E482}} /* +6.4286246635e-18 */ ,
+}
+,{
+/*a[10]     */ {{0x3FD178D5,0x943274CA}} /* +2.7300013993e-01 */ ,
+/*b[10] :   */ {{0x3FD2590B,0x8943E603}} /* +2.8668487935e-01 */ ,
+/*atan_b[10]*/ {{0x3FD1DE5C,0x211F7969}} /* +2.7919677004e-01 */,{{0x3C3C4E87,0x0B01EF44}} /* +1.5345118889e-18 */ ,
+}
+,{
+/*a[11]     */ {{0x3FD33AE4,0xB2CFB5F7}} /* +3.0046956503e-01 */ ,
+/*b[11] :   */ {{0x3FD41E78,0x81B0D1DF}} /* +3.1435978570e-01 */ ,
+/*atan_b[11]*/ {{0x3FD37E35,0xF5735AA1}} /* +3.0457829447e-01 */,{{0xBC772D05,0x8D437AE9}} /* -2.0101859382e-17 */ ,
+}
+,{
+/*a[12]     */ {{0x3FD503DF,0x0DD40A5B}} /* +3.2836128569e-01 */ ,
+/*b[12] :   */ {{0x3FD5EB31,0x1EB6A659}} /* +3.4247997283e-01 */ ,
+/*atan_b[12]*/ {{0x3FD51E0F,0xC9C20060}} /* +3.2995981887e-01 */,{{0xBC6C0F53,0x20BA7A7B}} /* -1.2169025414e-17 */ ,
+}
+,{
+/*a[13]     */ {{0x3FD6D488,0x3998DD14}} /* +3.5672193169e-01 */ ,
+/*b[13] :   */ {{0x3FD7BFFE,0xAAF865B1}} /* +3.7109343239e-01 */ ,
+/*atan_b[13]*/ {{0x3FD6BDE9,0x9E0B9E67}} /* +3.5534134325e-01 */,{{0x3C797792,0x870D5E8E}} /* +2.2089170409e-17 */ ,
+}
+,{
+/*a[14]     */ {{0x3FD8ADAF,0x964ABFA5}} /* +3.8560094525e-01 */ ,
+/*b[14] :   */ {{0x3FD99DB7,0x00A6F44E}} /* +4.0025115074e-01 */ ,
+/*atan_b[14]*/ {{0x3FD85DC3,0x72506BCA}} /* +3.8072286762e-01 */,{{0x3C720BD1,0x43A1CBA3}} /* +1.5652550322e-17 */ ,
+}
+,{
+/*a[15]     */ {{0x3FDA9031,0xE241114E}} /* +4.1505095573e-01 */ ,
+/*b[15] :   */ {{0x3FDB853E,0x327F0E90}} /* +4.3000750476e-01 */ ,
+/*atan_b[15]*/ {{0x3FD9FD9D,0x4690A2C8}} /* +4.0610439197e-01 */,{{0xBC6A048E,0xEFB73034}} /* -1.1283424731e-17 */ ,
+}
+,{
+/*a[16]     */ {{0x3FDC7CFA,0xFB78B41D}} /* +4.4512819822e-01 */ ,
+/*b[16] :   */ {{0x3FDD7788,0x67BE333A}} /* +4.6042070514e-01 */ ,
+/*atan_b[16]*/ {{0x3FDB9D77,0x1ACC80A6}} /* +4.3148591630e-01 */,{{0x3C6A9BD7,0xE8FB154D}} /* +1.1539711581e-17 */ ,
+}
+,{
+/*a[17]     */ {{0x3FDE7507,0xD82B9DC6}} /* +4.7589298354e-01 */ ,
+/*b[17] :   */ {{0x3FDF759B,0xF3B4AACC}} /* +4.9155329513e-01 */ ,
+/*atan_b[17]*/ {{0x3FDD3D50,0xEF044589}} /* +4.5686744062e-01 */,{{0x3C575857,0x09E8652E}} /* +5.0621568797e-18 */ ,
+}
+,{
+/*a[18]     */ {{0x3FE03CB4,0x5FF4B2AB}} /* +5.0741022817e-01 */ ,
+/*b[18] :   */ {{0x3FE0C049,0xD9952BEF}} /* +5.2347271439e-01 */ ,
+/*atan_b[18]*/ {{0x3FDEDD2A,0xC338344A}} /* +4.8224896492e-01 */,{{0x3C23C787,0x81513292}} /* +5.3612202011e-19 */ ,
+}
+,{
+/*a[19]     */ {{0x3FE145A1,0xE826E4EA}} /* +5.3975005476e-01 */ ,
+/*b[19] :   */ {{0x3FE1CCD0,0xDDD96DE0}} /* +5.5625193911e-01 */ ,
+/*atan_b[19]*/ {{0x3FE03E82,0x4BB44923}} /* +5.0763048922e-01 */,{{0x3C8CAF01,0x49DF0A58}} /* +4.9758137561e-17 */ ,
+}
+,{
+/*a[20]     */ {{0x3FE255EB,0xED462BAC}} /* +5.7298847525e-01 */ ,
+/*b[20] :   */ {{0x3FE2E109,0x35B0819C}} /* +5.8997021185e-01 */ ,
+/*atan_b[20]*/ {{0x3FE10E6F,0x35CAD39D}} /* +5.3301201350e-01 */,{{0x3C45DB33,0x0D1EB36B}} /* +2.3696591272e-18 */ ,
+}
+,{
+/*a[21]     */ {{0x3FE36E3F,0xD4CDD9AC}} /* +6.0720817149e-01 */ ,
+/*b[21] :   */ {{0x3FE3FDA7,0xF51235D9}} /* +6.2471387735e-01 */ ,
+/*atan_b[21]*/ {{0x3FE1DE5C,0x1FDFDE84}} /* +5.5839353776e-01 */,{{0x3C86FBEF,0xD3921CA6}} /* +3.9871106783e-17 */ ,
+}
+,{
+/*a[22]     */ {{0x3FE48F5A,0xE1FB2991}} /* +6.4249939095e-01 */ ,
+/*b[22] :   */ {{0x3FE52373,0x18D0CCB0}} /* +6.6057734343e-01 */ ,
+/*atan_b[22]*/ {{0x3FE2AE49,0x09F38FC9}} /* +5.8377506202e-01 */,{{0xBC84BBB5,0x058084C6}} /* -3.5966422408e-17 */ ,
+}
+,{
+/*a[23]     */ {{0x3FE5BA0C,0x5FE86E27}} /* +6.7896097881e-01 */ ,
+/*b[23] :   */ {{0x3FE65343,0xDA588D41}} /* +6.9766419073e-01 */ ,
+/*atan_b[23]*/ {{0x3FE37E35,0xF4060E3D}} /* +6.0915658627e-01 */,{{0x3BF6235C,0xAE25B9B7}} /* +7.5006911959e-20 */ ,
+}
+,{
+/*a[24]     */ {{0x3FE6EF38,0x22C19A5D}} /* +7.1670157231e-01 */ ,
+/*b[24] :   */ {{0x3FE78E09,0x629002BC}} /* +7.3608845950e-01 */ ,
+/*atan_b[24]*/ {{0x3FE44E22,0xDE17817F}} /* +6.3453811052e-01 */,{{0xBC85F46E,0x1A6D25E3}} /* -3.8085515717e-17 */ ,
+}
+,{
+/*a[25]     */ {{0x3FE82FD9,0x70F967BD}} /* +7.5584098878e-01 */ ,
+/*b[25] :   */ {{0x3FE8D4CB,0xEE8B9555}} /* +7.7597614852e-01 */ ,
+/*atan_b[25]*/ {{0x3FE51E0F,0xC82811DC}} /* +6.5991963475e-01 */,{{0xBC81CCF7,0xFCB9720C}} /* -3.0879221028e-17 */ ,
+}
+,{
+/*a[26]     */ {{0x3FE97D06,0x69351A0D}} /* +7.9651184605e-01 */ ,
+/*b[26] :   */ {{0x3FEA28B0,0x7D0D616A}} /* +8.1746696877e-01 */ ,
+/*atan_b[26]*/ {{0x3FE5EDFC,0xB237E838}} /* +6.8530115898e-01 */,{{0xBC833EA8,0xF8F29048}} /* -3.3384347049e-17 */ ,
+}
+,{
+/*a[27]     */ {{0x3FEAD7F3,0xFE730FCD}} /* +8.3886146257e-01 */ ,
+/*b[27] :   */ {{0x3FEB8AFD,0x21335E3D}} /* +8.6071640477e-01 */ ,
+/*atan_b[27]*/ {{0x3FE6BDE9,0x9C472DF1}} /* +7.1068268321e-01 */,{{0x3C5E8127,0x80DED249}} /* +6.6146109909e-18 */ ,
+}
+,{
+/*a[28]     */ {{0x3FEC41FA,0xAA0A733E}} /* +8.8305409633e-01 */ ,
+/*b[28] :   */ {{0x3FECFD1E,0x1D9A7669}} /* +9.0589814932e-01 */ ,
+/*atan_b[28]*/ {{0x3FE78DD6,0x86560CC5}} /* +7.3606420743e-01 */,{{0xBC7E962F,0x9396D511}} /* -2.6529701578e-17 */ ,
+}
+,{
+/*a[29]     */ {{0x3FEDBC9B,0xFAEEEADF}} /* +9.2927359591e-01 */ ,
+/*b[29] :   */ {{0x3FEE80AB,0xF41419E7}} /* +9.5320699379e-01 */ ,
+/*atan_b[29]*/ {{0x3FE85DC3,0x7064AEB4}} /* +7.6144573166e-01 */,{{0x3C77C0FC,0x5225ACD1}} /* +2.0603180716e-17 */ ,
+}
+,{
+/*a[30]     */ {{0x3FEF4989,0x33AC790A}} /* +9.7772655575e-01 */ ,
+/*b[30] :   */ {{0x3FF00BB9,0x50BB2D02}} /* +1.0028622774e+00 */ ,
+/*atan_b[30]*/ {{0x3FE92DB0,0x5A733DE9}} /* +7.8682725588e-01 */,{{0xBC6598C9,0xA318D041}} /* -9.3661305872e-18 */ ,
+}
+,{
+/*a[31]     */ {{0x3FF07555,0x9AC922B4}} /* +1.0286460921e+00 */ ,
+/*b[31] :   */ {{0x3FF0E1BD,0x25F4BC57}} /* +1.0551120265e+00 */ ,
+/*atan_b[31]*/ {{0x3FE9FD9D,0x4481E499}} /* +8.1220878010e-01 */,{{0xBC82E89F,0x9464A40D}} /* -3.2801339756e-17 */ ,
+}
+,{
+/*a[32]     */ {{0x3FF15116,0x0440E8D3}} /* +1.0822963873e+00 */ ,
+/*b[32] :   */ {{0x3FF1C388,0xDEC8DA1A}} /* +1.1102379515e+00 */ ,
+/*atan_b[32]*/ {{0x3FEACD8A,0x2E90CCEA}} /* +8.3759030433e-01 */,{{0x3C60B8DB,0xFE4AC33B}} /* +7.2520578222e-18 */ ,
+}
+,{
+/*a[33]     */ {{0x3FF23941,0x329D3DD8}} /* +1.1389781930e+00 */ ,
+/*b[33] :   */ {{0x3FF2B26D,0x8F9CF3AD}} /* +1.1685615168e+00 */ ,
+/*atan_b[33]*/ {{0x3FEB9D77,0x18A020D8}} /* +8.6297182855e-01 */,{{0x3C714EA3,0x43DDC7EE}} /* +1.5011584621e-17 */ ,
+}
+,{
+/*a[34]     */ {{0x3FF32F3F,0xE2DB7094}} /* +1.1990355360e+00 */ ,
+/*b[34] :   */ {{0x3FF3AFED,0xC485093A}} /* +1.2304513623e+00 */ ,
+/*atan_b[34]*/ {{0x3FEC6D64,0x02B00A17}} /* +8.8835335278e-01 */,{{0x3C5CF722,0xC1E56981}} /* +6.2808643065e-18 */ ,
+}
+,{
+/*a[35]     */ {{0x3FF434B0,0xD38A35D7}} /* +1.2628639472e+00 */ ,
+/*b[35] :   */ {{0x3FF4BDC7,0x16D89BC7}} /* +1.2963324444e+00 */ ,
+/*atan_b[35]*/ {{0x3FED3D50,0xECC0B1F8}} /* +9.1373487702e-01 */,{{0x3C8FFD9A,0xC689AE1B}} /* +5.5494919315e-17 */ ,
+}
+,{
+/*a[36]     */ {{0x3FF54B73,0x6F41F96D}} /* +1.3309206339e+00 */ ,
+/*b[36] :   */ {{0x3FF5DDFE,0x11C53212}} /* +1.3666973776e+00 */ ,
+/*atan_b[36]*/ {{0x3FEE0D3D,0xD6D24151}} /* +9.3911640126e-01 */,{{0xBC654F0F,0xC830B564}} /* -9.2412338910e-18 */ ,
+}
+,{
+/*a[37]     */ {{0x3FF675B5,0x165CA5E1}} /* +1.4037371515e+00 */ ,
+/*b[37] :   */ {{0x3FF712ED,0x13170C5B}} /* +1.4421206232e+00 */ ,
+/*atan_b[37]*/ {{0x3FEEDD2A,0xC0E4E05B}} /* +9.6449792552e-01 */,{{0xBC8FEAC3,0xBF676FFE}} /* -5.5367254830e-17 */ ,
+}
+,{
+/*a[38]     */ {{0x3FF7B601,0xD0DEA3C6}} /* +1.4819353255e+00 */ ,
+/*b[38] :   */ {{0x3FF85F57,0x11FBEA40}} /* +1.5232763960e+00 */ ,
+/*atan_b[38]*/ {{0x3FEFAD17,0xAAF8B69E}} /* +9.8987944978e-01 */,{{0x3C8B8DA3,0xE69F3AF7}} /* +4.7797325436e-17 */ ,
+}
+,{
+/*a[39]     */ {{0x3FF90F59,0x79506F51}} /* +1.5662474383e+00 */ ,
+/*b[39] :   */ {{0x3FF9C67F,0x8AF460DF}} /* +1.6109614780e+00 */ ,
+/*atan_b[39]*/ {{0x3FF03E82,0x4A86F56B}} /* +1.0152609740e+00 */,{{0x3C8C4641,0xDE1DF40B}} /* +4.9048339280e-17 */ ,
+}
+,{
+/*a[40]     */ {{0x3FFA854A,0xD74CF791}} /* +1.6575420771e+00 */ ,
+/*b[40] :   */ {{0x3FFB4C49,0x4A696F14}} /* +1.7061245829e+00 */ ,
+/*atan_b[40]*/ {{0x3FF0A678,0xBF92516C}} /* +1.0406424983e+00 */,{{0xBC9194FF,0x6A0966AF}} /* -6.0999893718e-17 */ ,
+}
+,{
+/*a[41]     */ {{0x3FFC1C16,0xB3972246}} /* +1.7568575874e+00 */ ,
+/*b[41] :   */ {{0x3FFCF55E,0x80F0B83E}} /* +1.8099045788e+00 */ ,
+/*atan_b[41]*/ {{0x3FF10E6F,0x349E81BA}} /* +1.0660240226e+00 */,{{0x3C9C7D12,0x3CD05C13}} /* +9.8839546037e-17 */ ,
+}
+,{
+/*a[42]     */ {{0x3FFDD8DD,0xC6DB1831}} /* +1.8654458778e+00 */ ,
+/*b[42] :   */ {{0x3FFEC765,0x927D039C}} /* +1.9236808512e+00 */ ,
+/*atan_b[42]*/ {{0x3FF17665,0xA9AB9836}} /* +1.0914055469e+00 */,{{0xBC924DFA,0x7B9C115B}} /* -6.3506850178e-17 */ ,
+}
+,{
+/*a[43]     */ {{0x3FFFC1DD,0xA4F6D032}} /* +1.9848305172e+00 */ ,
+/*b[43] :   */ {{0x400064A3,0xCDEC630C}} /* +2.0491405571e+00 */ ,
+/*atan_b[43]*/ {{0x3FF1DE5C,0x1EB9A624}} /* +1.1167870712e+00 */,{{0xBC7002F6,0x595EC15D}} /* -1.3887824475e-17 */ ,
+}
+,{
+/*a[44]     */ {{0x4000EF61,0x56AEFAF2}} /* +2.1168848774e+00 */ ,
+/*b[44] :   */ {{0x400181C8,0x02FA3F97}} /* +2.1883697732e+00 */ ,
+/*atan_b[44]*/ {{0x3FF24652,0x93C8BC28}} /* +1.1421685956e+00 */,{{0xBC8FE336,0xC61E8575}} /* -5.5316089441e-17 */ ,
+}
+,{
+/*a[45]     */ {{0x40021C8B,0xFD9A80C1}} /* +2.2639388860e+00 */ ,
+/*b[45] :   */ {{0x4002C078,0x188015C0}} /* +2.3439790644e+00 */ ,
+/*atan_b[45]*/ {{0x3FF2AE49,0x08D8EA37}} /* +1.1675501199e+00 */,{{0xBC99C943,0x56281657}} /* -8.9463796524e-17 */ ,
+}
+,{
+/*a[46]     */ {{0x40036E71,0x7D67269C}} /* +2.4289274022e+00 */ ,
+/*b[46] :   */ {{0x4004277C,0x17EDBBF3}} /* +2.5192796583e+00 */ ,
+/*atan_b[46]*/ {{0x3FF3163F,0x7DEA3F8C}} /* +1.1929316443e+00 */,{{0x3C9AD329,0x90EB721B}} /* +9.3067404471e-17 */ ,
+}
+,{
+/*a[47]     */ {{0x4004ECBF,0xF069F1E4}} /* +2.6156004698e+00 */ ,
+/*b[47] :   */ {{0x4005BF8F,0xA99113B9}} /* +2.7185357330e+00 */ ,
+/*atan_b[47]*/ {{0x3FF37E35,0xF2FCCAA3}} /* +1.2183131687e+00 */,{{0xBC96C4D7,0x8B3674F4}} /* -7.8995539059e-17 */ ,
+}
+,{
+/*a[48]     */ {{0x4006A170,0x780169B7}} /* +2.8288277984e+00 */ ,
+/*b[48] :   */ {{0x40079423,0xEECFDE39}} /* +2.9473341615e+00 */ ,
+/*atan_b[48]*/ {{0x3FF3E62C,0x68109926}} /* +1.2436946931e+00 */,{{0x3C9D395E,0x46562D7D}} /* +1.0139144652e-16 */ ,
+}
+,{
+/*a[49]     */ {{0x400899B4,0x319C3F02}} /* +3.0750507236e+00 */ ,
+/*b[49] :   */ {{0x4009B483,0x34491C9A}} /* +3.2131408772e+00 */ ,
+/*atan_b[49]*/ {{0x3FF44E22,0xDD25B7F0}} /* +1.2690762175e+00 */,{{0xBC9AC408,0x96299AC9}} /* -9.2862370643e-17 */ ,
+}
+,{
+/*a[50]     */ {{0x400AE75E,0x05B0834A}} /* +3.3629723019e+00 */ ,
+/*b[50] :   */ {{0x400C3595,0x6451B6E9}} /* +3.5261638486e+00 */ ,
+/*atan_b[50]*/ {{0x3FF4B619,0x523C32F8}} /* +1.2944577420e+00 */,{{0x3C98372D,0x9A6CF82B}} /* +8.4014530055e-17 */ ,
+}
+,{
+/*a[51]     */ {{0x400DA31D,0x739BD0E3}} /* +3.7046460182e+00 */ ,
+/*b[51] :   */ {{0x400F34B7,0x088B2A13}} /* +3.9007397335e+00 */ ,
+/*atan_b[51]*/ {{0x3FF51E0F,0xC7541555}} /* +1.3198392664e+00 */,{{0xBC4DA0E1,0xD97CC177}} /* -3.2123225727e-18 */ ,
+}
+,{
+/*a[52]     */ {{0x40107813,0x1886BC57}} /* +4.1172603447e+00 */ ,
+/*b[52] :   */ {{0x40116E3D,0x8D819944}} /* +4.3576566801e+00 */ ,
+/*atan_b[52]*/ {{0x3FF58606,0x3C6D692D}} /* +1.3452207909e+00 */,{{0xBC7DAB9D,0xD9D13C46}} /* -2.5734950076e-17 */ ,
+}
+,{
+/*a[53]     */ {{0x4012813A,0x8BCE2241}} /* +4.6261998982e+00 */ ,
+/*b[53] :   */ {{0x4013B685,0x9F0E4EBF}} /* +4.9282440999e+00 */ ,
+/*atan_b[53]*/ {{0x3FF5EDFC,0xB18837B4}} /* +1.3706023154e+00 */,{{0xBC858200,0xBC854F71}} /* -3.7310126753e-17 */ ,
+}
+,{
+/*a[54]     */ {{0x40151516,0x4ACECE78}} /* +5.2705928506e+00 */ ,
+/*b[54] :   */ {{0x4016A5E9,0xF3CD0189}} /* +5.6620252699e+00 */ ,
+/*atan_b[54]*/ {{0x3FF655F3,0x26A48924}} /* +1.3959838399e+00 */,{{0xBC95DCD4,0x0EF07703}} /* -7.5851168241e-17 */ ,
+}
+,{
+/*a[55]     */ {{0x401874CE,0x9526FAB9}} /* +6.1140693002e+00 */ ,
+/*b[55] :   */ {{0x401A9194,0xBA057809}} /* +6.6421689096e+00 */ ,
+/*atan_b[55]*/ {{0x3FF6BDE9,0x9BC264B7}} /* +1.4213653645e+00 */,{{0x3C839FB7,0x555821B5}} /* +3.4042024747e-17 */ ,
+}
+,{
+/*a[56]     */ {{0x401D11EB,0xE094C913}} /* +7.2675013629e+00 */ ,
+/*b[56] :   */ {{0x40200A31,0xA01EFACA}} /* +8.0199098623e+00 */ ,
+/*atan_b[56]*/ {{0x3FF725E0,0x10E1D0A5}} /* +1.4467468891e+00 */,{{0x3C86B63B,0x56DADB03}} /* +3.9398767140e-17 */ ,
+}
+,{
+/*a[57]     */ {{0x4021E2BC,0x220DFA19}} /* +8.9428415911e+00 */ ,
+/*b[57] :   */ {{0x40243445,0xFBA72898}} /* +1.0102096428e+01 */ ,
+/*atan_b[57]*/ {{0x3FF78DD6,0x8602D21D}} /* +1.4721284137e+00 */,{{0xBC9FD7D6,0x4D2EA6E0}} /* -1.1047799388e-16 */ ,
+}
+,{
+/*a[58]     */ {{0x40273463,0xD0337C49}} /* +1.1602324015e+01 */ ,
+/*b[58] :   */ {{0x402B3DC7,0x4A4A5A1D}} /* +1.3620661089e+01 */ ,
+/*atan_b[58]*/ {{0x3FF7F5CC,0xFB256D40}} /* +1.4975099383e+00 */,{{0x3C954E9E,0xA28CF77C}} /* +7.3923881174e-17 */ ,
+}
+,{
+/*a[59]     */ {{0x40307B8E,0x26350916}} /* +1.6482637775e+01 */ ,
+/*b[59] :   */ {{0x4034DBD6,0x24D415BF}} /* +2.0858736326e+01 */ ,
+/*atan_b[59]*/ {{0x3FF85DC3,0x7049A526}} /* +1.5228914629e+00 */,{{0xBC8424E5,0xE9374500}} /* -3.4944500702e-17 */ ,
+}
+,{
+/*a[60]     */ {{0x403C62CF,0x497BF2F2}} /* +2.8385975449e+01 */ ,
+/*b[60] :   */ {{0x40463208,0x6C3EC43C}} /* +4.4390882044e+01 */ ,
+/*atan_b[60]*/ {{0x3FF8C5B9,0xE56F7BD2}} /* +1.5482729876e+00 */,{{0xBC81D57A,0x2F7EC153}} /* -3.0936877458e-17 */ ,
+}
+,{
+/*a[61]     */ {{0x40596CC3,0xFA9E0EF4}} /* +1.0169946161e+02 */ ,
+/*b[61] :   */ {{0x4054B2C4,0x7BFF8329}} /* +8.2793242454e+01 */ ,
+/*atan_b[61]*/ {{0x3FF8F082,0xF333CBBA}} /* +1.5587186337e+00 */,{{0x3C952577,0x3909BC3A}} /* +7.3366141099e-17 */ ,
+}
+,
+};
+#else
+
+/* limits of the intervals [a[i],b[i]] */
+static db_number const arctan_table[62][4] = 
+{
+{
+/*a[0]     */ {{0xBCCE533D,0x3F89FDF8}} /* +1.2691443693e-02 */ ,
+/*b[0] :   */ {{0x27760007,0x3F99FF0B}} /* +2.5386976512e-02 */ ,
+/*atan_b[0]*/ {{0x4969F96C,0x3F99FD9D}} /* +2.5381524664e-02 */,{{0x750685EA,0xBC301997}} /* -8.7278097631e-19 */ ,
+}
+,{
+/*a[1]     */ {{0x90CEBC31,0x3FA3809F}} /* +3.8090692927e-02 */ ,
+/*b[1] :   */ {{0xE3547CC2,0x3FAA0355}} /* +5.0806697846e-02 */ ,
+/*atan_b[1]*/ {{0x4936262D,0x3FA9FD9D}} /* +5.0763049304e-02 */,{{0x3A2D0F59,0xBC4C1F96}} /* -3.0491436238e-18 */ ,
+}
+,{
+/*a[2]     */ {{0x68FBA526,0x3FB04419}} /* +6.3539112216e-02 */ ,
+/*b[2] :   */ {{0xABF7BFB9,0x3FB387E0}} /* +7.6292078003e-02 */ ,
+/*atan_b[2]*/ {{0xF6C1E06C,0x3FB37E35}} /* +7.6144573921e-02 */,{{0x8378E024,0xBC556710}} /* -4.6409481568e-18 */ ,
+}
+,{
+/*a[3]     */ {{0xABCDFA25,0x3FB6CD46}} /* +8.9069764084e-02 */ ,
+/*b[3] :   */ {{0xE265B8AB,0x3FBA1491}} /* +1.0187637117e-01 */ ,
+/*atan_b[3]*/ {{0x48CF1996,0x3FB9FD9D}} /* +1.0152609851e-01 */,{{0xB73BED3C,0xBC4360DC}} /* -2.1010068528e-18 */ ,
+}
+,{
+/*a[4]     */ {{0x6D2EA546,0x3FBD5E09}} /* +1.1471613803e-01 */ ,
+/*b[4] :   */ {{0x9124D46B,0x3FC054FA}} /* +1.2759334647e-01 */ ,
+/*atan_b[4]*/ {{0x4D618156,0x3FC03E82}} /* +1.2690762308e-01 */,{{0x49A86344,0x3C62604E}} /* +7.9694040325e-18 */ ,
+}
+,{
+/*a[5]     */ {{0xD691E891,0x3FC1FC4E}} /* +1.4051232793e-01 */ ,
+/*b[5] :   */ {{0x51F57043,0x3FC3A526}} /* +1.5347746851e-01 */ ,
+/*atan_b[5]*/ {{0xF64EF83E,0x3FC37E35}} /* +1.5228914763e-01 */,{{0xB4A55EA6,0x3C5F2B13}} /* +6.7585410867e-18 */ ,
+}
+,{
+/*a[6]     */ {{0x531F610B,0x3FC54FA6}} /* +1.6649321612e-01 */ ,
+/*b[6] :   */ {{0xB99F2601,0x3FC6FBF4}} /* +1.7956408561e-01 */ ,
+/*atan_b[6]*/ {{0x9F302425,0x3FC6BDE9}} /* +1.7767067216e-01 */,{{0xC4D330CE,0xBC23B62A}} /* -5.3428372026e-19 */ ,
+}
+,{
+/*a[7]     */ {{0x0550EAF1,0x3FC8AA38}} /* +1.9269466648e-01 */ ,
+/*b[7] :   */ {{0x61D9D63D,0x3FCA5A97}} /* +2.0588962820e-01 */ ,
+/*atan_b[7]*/ {{0x48053FC8,0x3FC9FD9D}} /* +2.0305219666e-01 */,{{0x98474AF1,0xBC67A12C}} /* -1.0247699700e-17 */ ,
+}
+,{
+/*a[8]     */ {{0xB8975BD9,0x3FCC0D3A}} /* +2.1915372861e-01 */ ,
+/*b[8] :   */ {{0xBCBF6ABC,0x3FCDC24A}} /* +2.3249181954e-01 */ ,
+/*atan_b[8]*/ {{0xF0CE8DD9,0x3FCD3D50}} /* +2.2843372114e-01 */,{{0x3A31D353,0x3C6EF257}} /* +1.3420967238e-17 */ ,
+}
+,{
+/*a[9]     */ {{0xFEE46885,0x3FCF79F0}} /* +2.4590885588e-01 */ ,
+/*b[9] :   */ {{0xFCF66B85,0x3FD09A2B}} /* +2.5940990165e-01 */ ,
+/*atan_b[9]*/ {{0x4CC62C6B,0x3FD03E82}} /* +2.5381524560e-01 */,{{0x95C6E482,0x3C5DA594}} /* +6.4286246635e-18 */ ,
+}
+,{
+/*a[10]     */ {{0x943274CA,0x3FD178D5}} /* +2.7300013993e-01 */ ,
+/*b[10] :   */ {{0x8943E603,0x3FD2590B}} /* +2.8668487935e-01 */ ,
+/*atan_b[10]*/ {{0x211F7969,0x3FD1DE5C}} /* +2.7919677004e-01 */,{{0x0B01EF44,0x3C3C4E87}} /* +1.5345118889e-18 */ ,
+}
+,{
+/*a[11]     */ {{0xB2CFB5F7,0x3FD33AE4}} /* +3.0046956503e-01 */ ,
+/*b[11] :   */ {{0x81B0D1DF,0x3FD41E78}} /* +3.1435978570e-01 */ ,
+/*atan_b[11]*/ {{0xF5735AA1,0x3FD37E35}} /* +3.0457829447e-01 */,{{0x8D437AE9,0xBC772D05}} /* -2.0101859382e-17 */ ,
+}
+,{
+/*a[12]     */ {{0x0DD40A5B,0x3FD503DF}} /* +3.2836128569e-01 */ ,
+/*b[12] :   */ {{0x1EB6A659,0x3FD5EB31}} /* +3.4247997283e-01 */ ,
+/*atan_b[12]*/ {{0xC9C20060,0x3FD51E0F}} /* +3.2995981887e-01 */,{{0x20BA7A7B,0xBC6C0F53}} /* -1.2169025414e-17 */ ,
+}
+,{
+/*a[13]     */ {{0x3998DD14,0x3FD6D488}} /* +3.5672193169e-01 */ ,
+/*b[13] :   */ {{0xAAF865B1,0x3FD7BFFE}} /* +3.7109343239e-01 */ ,
+/*atan_b[13]*/ {{0x9E0B9E67,0x3FD6BDE9}} /* +3.5534134325e-01 */,{{0x870D5E8E,0x3C797792}} /* +2.2089170409e-17 */ ,
+}
+,{
+/*a[14]     */ {{0x964ABFA5,0x3FD8ADAF}} /* +3.8560094525e-01 */ ,
+/*b[14] :   */ {{0x00A6F44E,0x3FD99DB7}} /* +4.0025115074e-01 */ ,
+/*atan_b[14]*/ {{0x72506BCA,0x3FD85DC3}} /* +3.8072286762e-01 */,{{0x43A1CBA3,0x3C720BD1}} /* +1.5652550322e-17 */ ,
+}
+,{
+/*a[15]     */ {{0xE241114E,0x3FDA9031}} /* +4.1505095573e-01 */ ,
+/*b[15] :   */ {{0x327F0E90,0x3FDB853E}} /* +4.3000750476e-01 */ ,
+/*atan_b[15]*/ {{0x4690A2C8,0x3FD9FD9D}} /* +4.0610439197e-01 */,{{0xEFB73034,0xBC6A048E}} /* -1.1283424731e-17 */ ,
+}
+,{
+/*a[16]     */ {{0xFB78B41D,0x3FDC7CFA}} /* +4.4512819822e-01 */ ,
+/*b[16] :   */ {{0x67BE333A,0x3FDD7788}} /* +4.6042070514e-01 */ ,
+/*atan_b[16]*/ {{0x1ACC80A6,0x3FDB9D77}} /* +4.3148591630e-01 */,{{0xE8FB154D,0x3C6A9BD7}} /* +1.1539711581e-17 */ ,
+}
+,{
+/*a[17]     */ {{0xD82B9DC6,0x3FDE7507}} /* +4.7589298354e-01 */ ,
+/*b[17] :   */ {{0xF3B4AACC,0x3FDF759B}} /* +4.9155329513e-01 */ ,
+/*atan_b[17]*/ {{0xEF044589,0x3FDD3D50}} /* +4.5686744062e-01 */,{{0x09E8652E,0x3C575857}} /* +5.0621568797e-18 */ ,
+}
+,{
+/*a[18]     */ {{0x5FF4B2AB,0x3FE03CB4}} /* +5.0741022817e-01 */ ,
+/*b[18] :   */ {{0xD9952BEF,0x3FE0C049}} /* +5.2347271439e-01 */ ,
+/*atan_b[18]*/ {{0xC338344A,0x3FDEDD2A}} /* +4.8224896492e-01 */,{{0x81513292,0x3C23C787}} /* +5.3612202011e-19 */ ,
+}
+,{
+/*a[19]     */ {{0xE826E4EA,0x3FE145A1}} /* +5.3975005476e-01 */ ,
+/*b[19] :   */ {{0xDDD96DE0,0x3FE1CCD0}} /* +5.5625193911e-01 */ ,
+/*atan_b[19]*/ {{0x4BB44923,0x3FE03E82}} /* +5.0763048922e-01 */,{{0x49DF0A58,0x3C8CAF01}} /* +4.9758137561e-17 */ ,
+}
+,{
+/*a[20]     */ {{0xED462BAC,0x3FE255EB}} /* +5.7298847525e-01 */ ,
+/*b[20] :   */ {{0x35B0819C,0x3FE2E109}} /* +5.8997021185e-01 */ ,
+/*atan_b[20]*/ {{0x35CAD39D,0x3FE10E6F}} /* +5.3301201350e-01 */,{{0x0D1EB36B,0x3C45DB33}} /* +2.3696591272e-18 */ ,
+}
+,{
+/*a[21]     */ {{0xD4CDD9AC,0x3FE36E3F}} /* +6.0720817149e-01 */ ,
+/*b[21] :   */ {{0xF51235D9,0x3FE3FDA7}} /* +6.2471387735e-01 */ ,
+/*atan_b[21]*/ {{0x1FDFDE84,0x3FE1DE5C}} /* +5.5839353776e-01 */,{{0xD3921CA6,0x3C86FBEF}} /* +3.9871106783e-17 */ ,
+}
+,{
+/*a[22]     */ {{0xE1FB2991,0x3FE48F5A}} /* +6.4249939095e-01 */ ,
+/*b[22] :   */ {{0x18D0CCB0,0x3FE52373}} /* +6.6057734343e-01 */ ,
+/*atan_b[22]*/ {{0x09F38FC9,0x3FE2AE49}} /* +5.8377506202e-01 */,{{0x058084C6,0xBC84BBB5}} /* -3.5966422408e-17 */ ,
+}
+,{
+/*a[23]     */ {{0x5FE86E27,0x3FE5BA0C}} /* +6.7896097881e-01 */ ,
+/*b[23] :   */ {{0xDA588D41,0x3FE65343}} /* +6.9766419073e-01 */ ,
+/*atan_b[23]*/ {{0xF4060E3D,0x3FE37E35}} /* +6.0915658627e-01 */,{{0xAE25B9B7,0x3BF6235C}} /* +7.5006911959e-20 */ ,
+}
+,{
+/*a[24]     */ {{0x22C19A5D,0x3FE6EF38}} /* +7.1670157231e-01 */ ,
+/*b[24] :   */ {{0x629002BC,0x3FE78E09}} /* +7.3608845950e-01 */ ,
+/*atan_b[24]*/ {{0xDE17817F,0x3FE44E22}} /* +6.3453811052e-01 */,{{0x1A6D25E3,0xBC85F46E}} /* -3.8085515717e-17 */ ,
+}
+,{
+/*a[25]     */ {{0x70F967BD,0x3FE82FD9}} /* +7.5584098878e-01 */ ,
+/*b[25] :   */ {{0xEE8B9555,0x3FE8D4CB}} /* +7.7597614852e-01 */ ,
+/*atan_b[25]*/ {{0xC82811DC,0x3FE51E0F}} /* +6.5991963475e-01 */,{{0xFCB9720C,0xBC81CCF7}} /* -3.0879221028e-17 */ ,
+}
+,{
+/*a[26]     */ {{0x69351A0D,0x3FE97D06}} /* +7.9651184605e-01 */ ,
+/*b[26] :   */ {{0x7D0D616A,0x3FEA28B0}} /* +8.1746696877e-01 */ ,
+/*atan_b[26]*/ {{0xB237E838,0x3FE5EDFC}} /* +6.8530115898e-01 */,{{0xF8F29048,0xBC833EA8}} /* -3.3384347049e-17 */ ,
+}
+,{
+/*a[27]     */ {{0xFE730FCD,0x3FEAD7F3}} /* +8.3886146257e-01 */ ,
+/*b[27] :   */ {{0x21335E3D,0x3FEB8AFD}} /* +8.6071640477e-01 */ ,
+/*atan_b[27]*/ {{0x9C472DF1,0x3FE6BDE9}} /* +7.1068268321e-01 */,{{0x80DED249,0x3C5E8127}} /* +6.6146109909e-18 */ ,
+}
+,{
+/*a[28]     */ {{0xAA0A733E,0x3FEC41FA}} /* +8.8305409633e-01 */ ,
+/*b[28] :   */ {{0x1D9A7669,0x3FECFD1E}} /* +9.0589814932e-01 */ ,
+/*atan_b[28]*/ {{0x86560CC5,0x3FE78DD6}} /* +7.3606420743e-01 */,{{0x9396D511,0xBC7E962F}} /* -2.6529701578e-17 */ ,
+}
+,{
+/*a[29]     */ {{0xFAEEEADF,0x3FEDBC9B}} /* +9.2927359591e-01 */ ,
+/*b[29] :   */ {{0xF41419E7,0x3FEE80AB}} /* +9.5320699379e-01 */ ,
+/*atan_b[29]*/ {{0x7064AEB4,0x3FE85DC3}} /* +7.6144573166e-01 */,{{0x5225ACD1,0x3C77C0FC}} /* +2.0603180716e-17 */ ,
+}
+,{
+/*a[30]     */ {{0x33AC790A,0x3FEF4989}} /* +9.7772655575e-01 */ ,
+/*b[30] :   */ {{0x50BB2D02,0x3FF00BB9}} /* +1.0028622774e+00 */ ,
+/*atan_b[30]*/ {{0x5A733DE9,0x3FE92DB0}} /* +7.8682725588e-01 */,{{0xA318D041,0xBC6598C9}} /* -9.3661305872e-18 */ ,
+}
+,{
+/*a[31]     */ {{0x9AC922B4,0x3FF07555}} /* +1.0286460921e+00 */ ,
+/*b[31] :   */ {{0x25F4BC57,0x3FF0E1BD}} /* +1.0551120265e+00 */ ,
+/*atan_b[31]*/ {{0x4481E499,0x3FE9FD9D}} /* +8.1220878010e-01 */,{{0x9464A40D,0xBC82E89F}} /* -3.2801339756e-17 */ ,
+}
+,{
+/*a[32]     */ {{0x0440E8D3,0x3FF15116}} /* +1.0822963873e+00 */ ,
+/*b[32] :   */ {{0xDEC8DA1A,0x3FF1C388}} /* +1.1102379515e+00 */ ,
+/*atan_b[32]*/ {{0x2E90CCEA,0x3FEACD8A}} /* +8.3759030433e-01 */,{{0xFE4AC33B,0x3C60B8DB}} /* +7.2520578222e-18 */ ,
+}
+,{
+/*a[33]     */ {{0x329D3DD8,0x3FF23941}} /* +1.1389781930e+00 */ ,
+/*b[33] :   */ {{0x8F9CF3AD,0x3FF2B26D}} /* +1.1685615168e+00 */ ,
+/*atan_b[33]*/ {{0x18A020D8,0x3FEB9D77}} /* +8.6297182855e-01 */,{{0x43DDC7EE,0x3C714EA3}} /* +1.5011584621e-17 */ ,
+}
+,{
+/*a[34]     */ {{0xE2DB7094,0x3FF32F3F}} /* +1.1990355360e+00 */ ,
+/*b[34] :   */ {{0xC485093A,0x3FF3AFED}} /* +1.2304513623e+00 */ ,
+/*atan_b[34]*/ {{0x02B00A17,0x3FEC6D64}} /* +8.8835335278e-01 */,{{0xC1E56981,0x3C5CF722}} /* +6.2808643065e-18 */ ,
+}
+,{
+/*a[35]     */ {{0xD38A35D7,0x3FF434B0}} /* +1.2628639472e+00 */ ,
+/*b[35] :   */ {{0x16D89BC7,0x3FF4BDC7}} /* +1.2963324444e+00 */ ,
+/*atan_b[35]*/ {{0xECC0B1F8,0x3FED3D50}} /* +9.1373487702e-01 */,{{0xC689AE1B,0x3C8FFD9A}} /* +5.5494919315e-17 */ ,
+}
+,{
+/*a[36]     */ {{0x6F41F96D,0x3FF54B73}} /* +1.3309206339e+00 */ ,
+/*b[36] :   */ {{0x11C53212,0x3FF5DDFE}} /* +1.3666973776e+00 */ ,
+/*atan_b[36]*/ {{0xD6D24151,0x3FEE0D3D}} /* +9.3911640126e-01 */,{{0xC830B564,0xBC654F0F}} /* -9.2412338910e-18 */ ,
+}
+,{
+/*a[37]     */ {{0x165CA5E1,0x3FF675B5}} /* +1.4037371515e+00 */ ,
+/*b[37] :   */ {{0x13170C5B,0x3FF712ED}} /* +1.4421206232e+00 */ ,
+/*atan_b[37]*/ {{0xC0E4E05B,0x3FEEDD2A}} /* +9.6449792552e-01 */,{{0xBF676FFE,0xBC8FEAC3}} /* -5.5367254830e-17 */ ,
+}
+,{
+/*a[38]     */ {{0xD0DEA3C6,0x3FF7B601}} /* +1.4819353255e+00 */ ,
+/*b[38] :   */ {{0x11FBEA40,0x3FF85F57}} /* +1.5232763960e+00 */ ,
+/*atan_b[38]*/ {{0xAAF8B69E,0x3FEFAD17}} /* +9.8987944978e-01 */,{{0xE69F3AF7,0x3C8B8DA3}} /* +4.7797325436e-17 */ ,
+}
+,{
+/*a[39]     */ {{0x79506F51,0x3FF90F59}} /* +1.5662474383e+00 */ ,
+/*b[39] :   */ {{0x8AF460DF,0x3FF9C67F}} /* +1.6109614780e+00 */ ,
+/*atan_b[39]*/ {{0x4A86F56B,0x3FF03E82}} /* +1.0152609740e+00 */,{{0xDE1DF40B,0x3C8C4641}} /* +4.9048339280e-17 */ ,
+}
+,{
+/*a[40]     */ {{0xD74CF791,0x3FFA854A}} /* +1.6575420771e+00 */ ,
+/*b[40] :   */ {{0x4A696F14,0x3FFB4C49}} /* +1.7061245829e+00 */ ,
+/*atan_b[40]*/ {{0xBF92516C,0x3FF0A678}} /* +1.0406424983e+00 */,{{0x6A0966AF,0xBC9194FF}} /* -6.0999893718e-17 */ ,
+}
+,{
+/*a[41]     */ {{0xB3972246,0x3FFC1C16}} /* +1.7568575874e+00 */ ,
+/*b[41] :   */ {{0x80F0B83E,0x3FFCF55E}} /* +1.8099045788e+00 */ ,
+/*atan_b[41]*/ {{0x349E81BA,0x3FF10E6F}} /* +1.0660240226e+00 */,{{0x3CD05C13,0x3C9C7D12}} /* +9.8839546037e-17 */ ,
+}
+,{
+/*a[42]     */ {{0xC6DB1831,0x3FFDD8DD}} /* +1.8654458778e+00 */ ,
+/*b[42] :   */ {{0x927D039C,0x3FFEC765}} /* +1.9236808512e+00 */ ,
+/*atan_b[42]*/ {{0xA9AB9836,0x3FF17665}} /* +1.0914055469e+00 */,{{0x7B9C115B,0xBC924DFA}} /* -6.3506850178e-17 */ ,
+}
+,{
+/*a[43]     */ {{0xA4F6D032,0x3FFFC1DD}} /* +1.9848305172e+00 */ ,
+/*b[43] :   */ {{0xCDEC630C,0x400064A3}} /* +2.0491405571e+00 */ ,
+/*atan_b[43]*/ {{0x1EB9A624,0x3FF1DE5C}} /* +1.1167870712e+00 */,{{0x595EC15D,0xBC7002F6}} /* -1.3887824475e-17 */ ,
+}
+,{
+/*a[44]     */ {{0x56AEFAF2,0x4000EF61}} /* +2.1168848774e+00 */ ,
+/*b[44] :   */ {{0x02FA3F97,0x400181C8}} /* +2.1883697732e+00 */ ,
+/*atan_b[44]*/ {{0x93C8BC28,0x3FF24652}} /* +1.1421685956e+00 */,{{0xC61E8575,0xBC8FE336}} /* -5.5316089441e-17 */ ,
+}
+,{
+/*a[45]     */ {{0xFD9A80C1,0x40021C8B}} /* +2.2639388860e+00 */ ,
+/*b[45] :   */ {{0x188015C0,0x4002C078}} /* +2.3439790644e+00 */ ,
+/*atan_b[45]*/ {{0x08D8EA37,0x3FF2AE49}} /* +1.1675501199e+00 */,{{0x56281657,0xBC99C943}} /* -8.9463796524e-17 */ ,
+}
+,{
+/*a[46]     */ {{0x7D67269C,0x40036E71}} /* +2.4289274022e+00 */ ,
+/*b[46] :   */ {{0x17EDBBF3,0x4004277C}} /* +2.5192796583e+00 */ ,
+/*atan_b[46]*/ {{0x7DEA3F8C,0x3FF3163F}} /* +1.1929316443e+00 */,{{0x90EB721B,0x3C9AD329}} /* +9.3067404471e-17 */ ,
+}
+,{
+/*a[47]     */ {{0xF069F1E4,0x4004ECBF}} /* +2.6156004698e+00 */ ,
+/*b[47] :   */ {{0xA99113B9,0x4005BF8F}} /* +2.7185357330e+00 */ ,
+/*atan_b[47]*/ {{0xF2FCCAA3,0x3FF37E35}} /* +1.2183131687e+00 */,{{0x8B3674F4,0xBC96C4D7}} /* -7.8995539059e-17 */ ,
+}
+,{
+/*a[48]     */ {{0x780169B7,0x4006A170}} /* +2.8288277984e+00 */ ,
+/*b[48] :   */ {{0xEECFDE39,0x40079423}} /* +2.9473341615e+00 */ ,
+/*atan_b[48]*/ {{0x68109926,0x3FF3E62C}} /* +1.2436946931e+00 */,{{0x46562D7D,0x3C9D395E}} /* +1.0139144652e-16 */ ,
+}
+,{
+/*a[49]     */ {{0x319C3F02,0x400899B4}} /* +3.0750507236e+00 */ ,
+/*b[49] :   */ {{0x34491C9A,0x4009B483}} /* +3.2131408772e+00 */ ,
+/*atan_b[49]*/ {{0xDD25B7F0,0x3FF44E22}} /* +1.2690762175e+00 */,{{0x96299AC9,0xBC9AC408}} /* -9.2862370643e-17 */ ,
+}
+,{
+/*a[50]     */ {{0x05B0834A,0x400AE75E}} /* +3.3629723019e+00 */ ,
+/*b[50] :   */ {{0x6451B6E9,0x400C3595}} /* +3.5261638486e+00 */ ,
+/*atan_b[50]*/ {{0x523C32F8,0x3FF4B619}} /* +1.2944577420e+00 */,{{0x9A6CF82B,0x3C98372D}} /* +8.4014530055e-17 */ ,
+}
+,{
+/*a[51]     */ {{0x739BD0E3,0x400DA31D}} /* +3.7046460182e+00 */ ,
+/*b[51] :   */ {{0x088B2A13,0x400F34B7}} /* +3.9007397335e+00 */ ,
+/*atan_b[51]*/ {{0xC7541555,0x3FF51E0F}} /* +1.3198392664e+00 */,{{0xD97CC177,0xBC4DA0E1}} /* -3.2123225727e-18 */ ,
+}
+,{
+/*a[52]     */ {{0x1886BC57,0x40107813}} /* +4.1172603447e+00 */ ,
+/*b[52] :   */ {{0x8D819944,0x40116E3D}} /* +4.3576566801e+00 */ ,
+/*atan_b[52]*/ {{0x3C6D692D,0x3FF58606}} /* +1.3452207909e+00 */,{{0xD9D13C46,0xBC7DAB9D}} /* -2.5734950076e-17 */ ,
+}
+,{
+/*a[53]     */ {{0x8BCE2241,0x4012813A}} /* +4.6261998982e+00 */ ,
+/*b[53] :   */ {{0x9F0E4EBF,0x4013B685}} /* +4.9282440999e+00 */ ,
+/*atan_b[53]*/ {{0xB18837B4,0x3FF5EDFC}} /* +1.3706023154e+00 */,{{0xBC854F71,0xBC858200}} /* -3.7310126753e-17 */ ,
+}
+,{
+/*a[54]     */ {{0x4ACECE78,0x40151516}} /* +5.2705928506e+00 */ ,
+/*b[54] :   */ {{0xF3CD0189,0x4016A5E9}} /* +5.6620252699e+00 */ ,
+/*atan_b[54]*/ {{0x26A48924,0x3FF655F3}} /* +1.3959838399e+00 */,{{0x0EF07703,0xBC95DCD4}} /* -7.5851168241e-17 */ ,
+}
+,{
+/*a[55]     */ {{0x9526FAB9,0x401874CE}} /* +6.1140693002e+00 */ ,
+/*b[55] :   */ {{0xBA057809,0x401A9194}} /* +6.6421689096e+00 */ ,
+/*atan_b[55]*/ {{0x9BC264B7,0x3FF6BDE9}} /* +1.4213653645e+00 */,{{0x555821B5,0x3C839FB7}} /* +3.4042024747e-17 */ ,
+}
+,{
+/*a[56]     */ {{0xE094C913,0x401D11EB}} /* +7.2675013629e+00 */ ,
+/*b[56] :   */ {{0xA01EFACA,0x40200A31}} /* +8.0199098623e+00 */ ,
+/*atan_b[56]*/ {{0x10E1D0A5,0x3FF725E0}} /* +1.4467468891e+00 */,{{0x56DADB03,0x3C86B63B}} /* +3.9398767140e-17 */ ,
+}
+,{
+/*a[57]     */ {{0x220DFA19,0x4021E2BC}} /* +8.9428415911e+00 */ ,
+/*b[57] :   */ {{0xFBA72898,0x40243445}} /* +1.0102096428e+01 */ ,
+/*atan_b[57]*/ {{0x8602D21D,0x3FF78DD6}} /* +1.4721284137e+00 */,{{0x4D2EA6E0,0xBC9FD7D6}} /* -1.1047799388e-16 */ ,
+}
+,{
+/*a[58]     */ {{0xD0337C49,0x40273463}} /* +1.1602324015e+01 */ ,
+/*b[58] :   */ {{0x4A4A5A1D,0x402B3DC7}} /* +1.3620661089e+01 */ ,
+/*atan_b[58]*/ {{0xFB256D40,0x3FF7F5CC}} /* +1.4975099383e+00 */,{{0xA28CF77C,0x3C954E9E}} /* +7.3923881174e-17 */ ,
+}
+,{
+/*a[59]     */ {{0x26350916,0x40307B8E}} /* +1.6482637775e+01 */ ,
+/*b[59] :   */ {{0x24D415BF,0x4034DBD6}} /* +2.0858736326e+01 */ ,
+/*atan_b[59]*/ {{0x7049A526,0x3FF85DC3}} /* +1.5228914629e+00 */,{{0xE9374500,0xBC8424E5}} /* -3.4944500702e-17 */ ,
+}
+,{
+/*a[60]     */ {{0x497BF2F2,0x403C62CF}} /* +2.8385975449e+01 */ ,
+/*b[60] :   */ {{0x6C3EC43C,0x40463208}} /* +4.4390882044e+01 */ ,
+/*atan_b[60]*/ {{0xE56F7BD2,0x3FF8C5B9}} /* +1.5482729876e+00 */,{{0x2F7EC153,0xBC81D57A}} /* -3.0936877458e-17 */ ,
+}
+,{
+/*a[61]     */ {{0xFA9E0EF4,0x40596CC3}} /* +1.0169946161e+02 */ ,
+/*b[61] :   */ {{0x7BFF8329,0x4054B2C4}} /* +8.2793242454e+01 */ ,
+/*atan_b[61]*/ {{0xF333CBBA,0x3FF8F082}} /* +1.5587186337e+00 */,{{0x3909BC3A,0x3C952577}} /* +7.3366141099e-17 */ ,
+}
+,
+};
+
+#endif
+
+#endif /* def _ATAN_FAST_H */
diff --git a/src/crlibm/compile b/src/crlibm/compile
new file mode 100755
index 0000000..531136b
--- /dev/null
+++ b/src/crlibm/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# This program 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 2, or (at your option)
+# any later version.
+#
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""	$nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+	# lazily determine how to convert abs files
+	case `uname -s` in
+	  MINGW*)
+	    file_conv=mingw
+	    ;;
+	  CYGWIN*)
+	    file_conv=cygwin
+	    ;;
+	  *)
+	    file_conv=wine
+	    ;;
+	esac
+      fi
+      case $file_conv/,$2, in
+	*,$file_conv,*)
+	  ;;
+	mingw/*)
+	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+	  ;;
+	cygwin/*)
+	  file=`cygpath -m "$file" || echo "$file"`
+	  ;;
+	wine/*)
+	  file=`winepath -w "$file" || echo "$file"`
+	  ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+	-o)
+	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
+	  eat=1
+	  case $2 in
+	    *.o | *.[oO][bB][jJ])
+	      func_file_conv "$2"
+	      set x "$@" -Fo"$file"
+	      shift
+	      ;;
+	    *)
+	      func_file_conv "$2"
+	      set x "$@" -Fe"$file"
+	      shift
+	      ;;
+	  esac
+	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-I*)
+	  func_file_conv "${1#-I}" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-l*)
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
+	  ;;
+	-L*)
+	  func_cl_dashL "${1#-L}"
+	  ;;
+	-static)
+	  shared=false
+	  ;;
+	-Wl,*)
+	  arg=${1#-Wl,}
+	  save_ifs="$IFS"; IFS=','
+	  for flag in $arg; do
+	    IFS="$save_ifs"
+	    linker_opts="$linker_opts $flag"
+	  done
+	  IFS="$save_ifs"
+	  ;;
+	-Xlinker)
+	  eat=1
+	  linker_opts="$linker_opts $2"
+	  ;;
+	-*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+	  func_file_conv "$1"
+	  set x "$@" -Tp"$file"
+	  shift
+	  ;;
+	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+	  func_file_conv "$1" mingw
+	  set x "$@" "$file"
+	  shift
+	  ;;
+	*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
+case $1 in
+  '')
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as 'compile cc -o foo foo.c'.
+	# So we strip '-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no '-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # '.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/crlibm/config.guess b/src/crlibm/config.guess
new file mode 100755
index 0000000..1f5c50c
--- /dev/null
+++ b/src/crlibm/config.guess
@@ -0,0 +1,1420 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
+
+timestamp='2014-03-23'
+
+# This file 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.
+#
+# This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2014 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+	exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+	exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+	exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+	exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    *:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	;;
+    openrisc*:Linux:*:*)
+	echo or1k-unknown-linux-${LIBC}
+	exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-${LIBC}
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-${LIBC}
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel at ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+		echo mips-nec-sysv${UNAME_RELEASE}
+	else
+		echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		    grep IS_64BIT_ARCH >/dev/null
+		then
+		    case $UNAME_PROCESSOR in
+			i386) UNAME_PROCESSOR=x86_64 ;;
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		    esac
+		fi
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
+	    # that puts up a graphical alert prompting to install
+	    # developer tools.  Any system running Mac OS X 10.7 or
+	    # later (Darwin 11 and later) is required to have a 64-bit
+	    # processor. This is not true of the ARM version of Darwin
+	    # that Apple uses in portable devices.
+	    UNAME_PROCESSOR=x86_64
+	fi
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
+esac
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/src/crlibm/config.sub b/src/crlibm/config.sub
new file mode 100755
index 0000000..bba4efb
--- /dev/null
+++ b/src/crlibm/config.sub
@@ -0,0 +1,1799 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
+
+timestamp='2014-09-11'
+
+# This file 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.
+#
+# This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2014 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray | -microblaze*)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+	-chorusrdb)
+		os=-chorusrdb
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| aarch64 | aarch64_be \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
+	| bfin \
+	| c4x | c8051 | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| k1om \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa32r6 | mipsisa32r6el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64r6 | mipsisa64r6el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 | nios2eb | nios2el \
+	| ns16k | ns32k \
+	| open8 | or1k | or1knd | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| riscv32 | riscv64 \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| aarch64-* | aarch64_be-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| c8051-* | clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| k1om-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa32r6-* | mipsisa32r6el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64r6-* | mipsisa64r6el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| or1k*-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	microblaze*)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
+	mingw32)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	moxiebox)
+		basic_machine=moxie-unknown
+		os=-moxiebox
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i686-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+	# First match some system type aliases
+	# that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* | -plan9* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	c8051-*)
+		os=-elf
+		;;
+	hexagon-*)
+		os=-elf
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-cnk*|-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/src/crlibm/configure b/src/crlibm/configure
new file mode 100755
index 0000000..f654e4d
--- /dev/null
+++ b/src/crlibm/configure
@@ -0,0 +1,7386 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="crlibm.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+USE_HARDWARE_DE_FALSE
+USE_HARDWARE_DE_TRUE
+USE_INTERVAL_FUNCTIONS_FALSE
+USE_INTERVAL_FUNCTIONS_TRUE
+USE_SSE2_FALSE
+USE_SSE2_TRUE
+HAS_FPU_CONTROL_FALSE
+HAS_FPU_CONTROL_TRUE
+EGREP
+GREP
+CPP
+LN_S
+RANLIB
+COMPILER_ICC_FALSE
+COMPILER_ICC_TRUE
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+ISODATE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_sse2
+enable_interval_functions
+enable_double_extended
+enable_nbdigits
+enable_digitsize
+enable_mpfr
+enable_gmp
+enable_ultim
+enable_mcr
+with_gmp_include
+with_gmp_lib
+with_gmp
+with_mpfr_include
+with_mpfr_lib
+with_mpfr
+with_ultim_include
+with_ultim_lib
+with_ultim
+with_mcr_include
+with_mcr_lib
+with_mcr
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
+  --enable-sse2    forces the use of sse2 arith  [default=no]
+  --enable-interval-functions    enables filib-compatible interval functions (DOES NOT WORK YET)  [default=no]
+  --enable-double-extended       enable double-extended optimised versions of functions if hardware supports it  [default=yes]
+  --enable-nbdigits=N            set the number of digits in the SCS structure to N [default=8]
+  --enable-digitsize=N           set the size of a digit to N bits [default=30]
+  --enable-mpfr                  enable MPFR function [default=no]
+  --enable-gmp                   enable GMP function [default=no]
+  --enable-ultim                 enable comparison with libultim, IBM's Accurate Portable Math Library [default=no]
+  --enable-mcr                   enable comparison with Sun's LIBMCR  [default=no]
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gmp-include=DIR    GMP include directory
+  --with-gmp-lib=DIR        GMP lib directory
+  --with-gmp=DIR            GMP directory
+  --with-mpfr-include=DIR   MPFR include directory
+  --with-mpfr-lib=DIR       MPFR lib directory
+  --with-mpfr=DIR           MPFR directory
+  --with-ultim-include=DIR  ULTIM include directory
+  --with-ultim-lib=DIR      ULTIM lib directory
+  --with-ultim=DIR          ULTIM directory
+  --with-mcr-include=DIR    LIBMCR include directory
+  --with-mcr-lib=DIR        LIBMCR lib directory
+  --with-mcr=DIR            LIBMCR directory
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+crlibm_version=`cat $srcdir/VERSION`
+am__api_version='1.14'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$*" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$*" != "X $srcdir/configure conftest.file" \
+	&& test "$*" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+
+ PACKAGE=crlibm
+ VERSION=$crlibm_version
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+  fi
+fi
+
+
+ac_config_headers="$ac_config_headers crlibm_config.h"
+
+
+
+
+
+ISODATE=`date +%Y-%m-%d`
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+case $host_os in
+hpux*)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPEOS_HPUX 1
+_ACEOF
+;;
+*cygwin* | *mingw* | *uwin* | *djgpp | *emx*)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPEOS_CYGWIN 1
+_ACEOF
+;;
+freebsd*|netbsd*|darwin*)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPEOS_BSD 1
+_ACEOF
+;;
+esac;
+
+
+case $host_cpu in
+alpha)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPECPU_ALPHA 1
+_ACEOF
+ ;;
+sparc)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPECPU_SPARC 1
+_ACEOF
+ ;;
+powerpc*)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPECPU_POWERPC 1
+_ACEOF
+;;
+i*86|k6|k7|pentium*|athlon*)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPECPU_X86 1
+_ACEOF
+
+	has_ia32_de=true;;
+x86_64|amd64)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPECPU_AMD64 1
+_ACEOF
+
+	has_ia32_de=true;;
+ia64)
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_TYPECPU_ITANIUM 1
+_ACEOF
+
+	has_ia64_de=true;;
+esac;
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in gcc icc cc
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in gcc icc cc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+# Try to set compiler flags to get floating point arithmetics
+# to work. This is an old heritage and should become useless within 30 years
+#
+if test "${GCC}" != "yes" ; then
+    case "${build}" in
+        *-*-hpux* )
+	    AM_CFLAGS="${AM_CFLAGS} -Wp,-H30000"
+            ;;
+        *-dec-osf* )
+            AM_CFLAGS="${AM_CFLAGS} -ieee"
+            ;;
+	*-apple-darwin* )
+	    AM_CFLAGS="${AM_CFLAGS} -fno-common"
+	    ;;
+	*-sgi-irix* )
+	    ;;
+    esac
+else
+    case "${CC}" in
+	*icc* )
+	    # -Wall causes relocation errors with icc.
+	    AM_CFLAGS="${AM_CFLAGS} -wd269"
+	    ;;
+        * )
+            case "${build}" in
+	        *-dec-osf* )
+	            AM_CFLAGS="${AM_CFLAGS} -mieee -Wall"
+	            ;;
+                *alpha*-*-linux* )
+                    AM_CFLAGS="${AM_CFLAGS} -mieee -Wall"
+                    ;;
+                *alpha*-*-freebsd* )
+                    AM_CFLAGS="${AM_CFLAGS} -mieee -Wall"
+                    ;;
+	        *-apple-darwin* )
+	            AM_CFLAGS="${AM_CFLAGS} -fno-common -Wall"
+	            ;;
+	        * )
+	            AM_CFLAGS="${AM_CFLAGS} -Wall"
+	            ;;
+            esac
+	    ;;
+    esac
+fi
+
+
+
+
+
+
+ if test x$CC = xicc; then
+  COMPILER_ICC_TRUE=
+  COMPILER_ICC_FALSE='#'
+else
+  COMPILER_ICC_TRUE='#'
+  COMPILER_ICC_FALSE=
+fi
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this sort of thing.  */
+  typedef int charset[2];
+  const charset cs = { 0, 0 };
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
+else
+  ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+
+
+for ac_func in sqrt
+do :
+  ac_fn_c_check_func "$LINENO" "sqrt" "ac_cv_func_sqrt"
+if test "x$ac_cv_func_sqrt" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SQRT 1
+_ACEOF
+
+fi
+done
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in fenv.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "fenv.h" "ac_cv_header_fenv_h" "$ac_includes_default"
+if test "x$ac_cv_header_fenv_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_FENV_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in float.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
+if test "x$ac_cv_header_float_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_FLOAT_H 1
+_ACEOF
+
+fi
+
+done
+
+ac_fn_c_check_header_mongrel "$LINENO" "fpu_control.h" "ac_cv_header_fpu_control_h" "$ac_includes_default"
+if test "x$ac_cv_header_fpu_control_h" = xyes; then :
+  has_fpu_control=yes
+else
+  has_fpu_control=no
+fi
+
+
+
+ if test x$has_fpu_control = xyes; then
+  HAS_FPU_CONTROL_TRUE=
+  HAS_FPU_CONTROL_FALSE='#'
+else
+  HAS_FPU_CONTROL_TRUE='#'
+  HAS_FPU_CONTROL_FALSE=
+fi
+
+
+if test x$has_fpu_control = xyes ; then
+
+cat >>confdefs.h <<_ACEOF
+#define CRLIBM_HAS_FPU_CONTROL 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for log in -lm" >&5
+$as_echo_n "checking for log in -lm... " >&6; }
+if ${ac_cv_lib_m_log+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log ();
+int
+main ()
+{
+return log ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_log=yes
+else
+  ac_cv_lib_m_log=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log" >&5
+$as_echo "$ac_cv_lib_m_log" >&6; }
+if test "x$ac_cv_lib_m_log" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+	       not a universal capable compiler
+	     #endif
+	     typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+	# Check for potential -arch flags.  It is not universal unless
+	# there are at least two -arch flags with different values.
+	ac_arch=
+	ac_prev=
+	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+	 if test -n "$ac_prev"; then
+	   case $ac_word in
+	     i?86 | x86_64 | ppc | ppc64)
+	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+		 ac_arch=$ac_word
+	       else
+		 ac_cv_c_bigendian=universal
+		 break
+	       fi
+	       ;;
+	   esac
+	   ac_prev=
+	 elif test "x$ac_word" = "x-arch"; then
+	   ac_prev=arch
+	 fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+	     #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+		     && LITTLE_ENDIAN)
+	      bogus endian macros
+	     #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+		#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+		 not big endian
+		#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+	      bogus endian macros
+	     #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+		 not big endian
+		#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+		short int ascii_ii[] =
+		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+		int use_ascii (int i) {
+		  return ascii_mm[i] + ascii_ii[i];
+		}
+		short int ebcdic_ii[] =
+		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+		short int ebcdic_mm[] =
+		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+		int use_ebcdic (int i) {
+		  return ebcdic_mm[i] + ebcdic_ii[i];
+		}
+		extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+	      ac_cv_c_bigendian=yes
+	    fi
+	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+	      if test "$ac_cv_c_bigendian" = unknown; then
+		ac_cv_c_bigendian=no
+	      else
+		# finding both strings is unlikely to happen, but who knows?
+		ac_cv_c_bigendian=unknown
+	      fi
+	    fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+	     /* Are we little or big endian?  From Harbison&Steele.  */
+	     union
+	     {
+	       long int l;
+	       char c[sizeof (long int)];
+	     } u;
+	     u.l = 1;
+	     return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
+else
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5
+$as_echo_n "checking for long double with more range or precision than double... " >&6; }
+if ${ac_cv_type_long_double_wider+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <float.h>
+	    long double const a[] =
+	      {
+		 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
+		 LDBL_MIN, LDBL_MAX, LDBL_EPSILON
+	      };
+	    long double
+	    f (long double x)
+	    {
+	       return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
+			+ (x ? f (x) : 'c'));
+	    }
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
+		   + (DBL_MANT_DIG < LDBL_MANT_DIG)
+		   - (LDBL_MAX_EXP < DBL_MAX_EXP)
+		   - (LDBL_MANT_DIG < DBL_MANT_DIG)))
+	    && (int) LDBL_EPSILON == 0
+	  )];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_long_double_wider=yes
+else
+  ac_cv_type_long_double_wider=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5
+$as_echo "$ac_cv_type_long_double_wider" >&6; }
+  if test $ac_cv_type_long_double_wider = yes; then
+
+$as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h
+
+  fi
+
+    ac_cv_c_long_double=$ac_cv_type_long_double_wider
+    if test $ac_cv_c_long_double = yes; then
+
+$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
+
+    fi
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_int=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-sse2 was given.
+if test "${enable_sse2+set}" = set; then :
+  enableval=$enable_sse2; case $enableval in
+    yes)
+
+cat >>confdefs.h <<_ACEOF
+#define HAS_SSE2 1
+_ACEOF
+;;
+    no) ;;
+    *) as_fn_error $? "bad value $enableval for --enable-sse2, need yes or no" "$LINENO" 5 ;;
+  esac
+else
+  enable_sse2=no
+fi
+
+ if test x$enable_sse2 = xyes  ; then
+  USE_SSE2_TRUE=
+  USE_SSE2_FALSE='#'
+else
+  USE_SSE2_TRUE='#'
+  USE_SSE2_FALSE=
+fi
+
+
+
+
+
+# Check whether --enable-interval-functions was given.
+if test "${enable_interval_functions+set}" = set; then :
+  enableval=$enable_interval_functions; case $enableval in
+    yes)
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_INTERVAL_FUNCTIONS 1
+_ACEOF
+;;
+    no) ;;
+    *) as_fn_error $? "bad value $enableval for --enable-interval-functions, need yes or no" "$LINENO" 5 ;;
+  esac
+else
+  enable_interval_functions=no
+fi
+
+ if test x$enable_interval_functions = xyes  ; then
+  USE_INTERVAL_FUNCTIONS_TRUE=
+  USE_INTERVAL_FUNCTIONS_FALSE='#'
+else
+  USE_INTERVAL_FUNCTIONS_TRUE='#'
+  USE_INTERVAL_FUNCTIONS_FALSE=
+fi
+
+
+
+
+# Check whether --enable-double-extended was given.
+if test "${enable_double_extended+set}" = set; then :
+  enableval=$enable_double_extended; case $enableval in
+    yes|no) ;;
+    *) as_fn_error $? "bad value $enableval for --enable-double-extended, need yes or no" "$LINENO" 5 ;;
+  esac
+else
+  enable_double_extended=yes
+fi
+
+
+
+ if test x$has_ia32_de = xtrue  -a x$has_fpu_control = xyes  -a x$enable_double_extended = xyes -a x$enable_interval_functions = xno    ; then
+  USE_HARDWARE_DE_TRUE=
+  USE_HARDWARE_DE_FALSE='#'
+else
+  USE_HARDWARE_DE_TRUE='#'
+  USE_HARDWARE_DE_FALSE=
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-nbdigits was given.
+if test "${enable_nbdigits+set}" = set; then :
+  enableval=$enable_nbdigits; case $enableval in
+	      *[0-9])
+cat >>confdefs.h <<_ACEOF
+#define SCS_NB_WORDS $enableval
+_ACEOF
+;;
+	      *) as_fn_error $? "bad value $enableval for --enable-nbdigits, number expected" "$LINENO" 5 ;;
+	 esac
+else
+
+cat >>confdefs.h <<_ACEOF
+#define SCS_NB_WORDS 8
+_ACEOF
+
+
+fi
+
+
+# Check whether --enable-digitsize was given.
+if test "${enable_digitsize+set}" = set; then :
+  enableval=$enable_digitsize; case $enableval in
+	      *[0-9])
+cat >>confdefs.h <<_ACEOF
+#define SCS_NB_BITS $enableval
+_ACEOF
+;;
+	      *) as_fn_error $? "bad value $enableval for --enable-digitsize, number expected" "$LINENO" 5 ;;
+	 esac
+else
+
+cat >>confdefs.h <<_ACEOF
+#define SCS_NB_BITS 30
+_ACEOF
+
+
+fi
+
+
+
+# Check whether --enable-mpfr was given.
+if test "${enable_mpfr+set}" = set; then :
+  enableval=$enable_mpfr; case $enableval in
+     yes|no) ;;
+     *) as_fn_error $? "bad value $enableval for --enable-mpfr, need yes or no" "$LINENO" 5 ;;
+   esac
+else
+  enable_mpfr=no
+fi
+
+
+
+# Check whether --enable-gmp was given.
+if test "${enable_gmp+set}" = set; then :
+  enableval=$enable_gmp; case $enableval in
+     yes|no) ;;
+     *) as_fn_error $? "bad value $enableval for --enable-gmp, need yes or no" "$LINENO" 5 ;;
+   esac
+else
+  enable_gmp=no
+fi
+
+
+
+# Check whether --enable-ultim was given.
+if test "${enable_ultim+set}" = set; then :
+  enableval=$enable_ultim; case $enableval in
+     yes|no) ;;
+     *) as_fn_error $? "bad value $enableval for --enable-ultim, need yes or no" "$LINENO" 5 ;;
+   esac
+else
+  enable_ultim=no
+fi
+
+
+
+# Check whether --enable-mcr was given.
+if test "${enable_mcr+set}" = set; then :
+  enableval=$enable_mcr; case $enableval in
+     yes|no) ;;
+     *) as_fn_error $? "bad value $enableval for --enable-mcr, need yes or no" "$LINENO" 5 ;;
+   esac
+else
+  enable_mcr=no
+fi
+
+
+
+
+
+if test "$enable_gmp" = "yes" -o "$enable_mpfr" = "yes"; then
+
+
+# Check whether --with-gmp_include was given.
+if test "${with_gmp_include+set}" = set; then :
+  withval=$with_gmp_include; with_gmp_include=$withval
+fi
+
+
+# Check whether --with-gmp_lib was given.
+if test "${with_gmp_lib+set}" = set; then :
+  withval=$with_gmp_lib; with_gmp_lib=$withval
+fi
+
+
+# Check whether --with-gmp was given.
+if test "${with_gmp+set}" = set; then :
+  withval=$with_gmp; with_gmp_include=$withval/include with_gmp_lib=$withval/lib
+fi
+
+
+if test -d "$with_gmp_include"; then
+  CPPFLAGS="$CPPFLAGS -I$with_gmp_include"
+else
+  with_gmp_include=
+fi
+
+if ` test "$with_gmp_lib" `
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking gmp library" >&5
+$as_echo_n "checking gmp library... " >&6; }
+	if  test -r "$with_gmp_lib/libgmp.a" -o -r "$with_gmp_lib/libgmp.so"
+	then
+	  LDFLAGS="$LDFLAGS -L$with_gmp_lib"
+          LIBS   ="$LIBS -lgmp"
+	else
+	   as_fn_error $? "gmp not found" "$LINENO" 5
+	fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgmp" >&5
+$as_echo_n "checking for main in -lgmp... " >&6; }
+if ${ac_cv_lib_gmp_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgmp  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gmp_main=yes
+else
+  ac_cv_lib_gmp_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_main" >&5
+$as_echo "$ac_cv_lib_gmp_main" >&6; }
+if test "x$ac_cv_lib_gmp_main" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGMP 1
+_ACEOF
+
+  LIBS="-lgmp $LIBS"
+
+else
+  as_fn_error $? "gmp not found" "$LINENO" 5
+fi
+
+fi
+
+
+
+for ac_header in gmp.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
+if test "x$ac_cv_header_gmp_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GMP_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgmp" >&5
+$as_echo_n "checking for main in -lgmp... " >&6; }
+if ${ac_cv_lib_gmp_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgmp  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gmp_main=yes
+else
+  ac_cv_lib_gmp_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_main" >&5
+$as_echo "$ac_cv_lib_gmp_main" >&6; }
+if test "x$ac_cv_lib_gmp_main" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGMP 1
+_ACEOF
+
+  LIBS="-lgmp $LIBS"
+
+fi
+
+
+fi
+
+
+
+
+if test "$enable_mpfr" = "yes"; then
+
+# Check whether --with-mpfr_include was given.
+if test "${with_mpfr_include+set}" = set; then :
+  withval=$with_mpfr_include; with_mpfr_include=$withval
+fi
+
+
+# Check whether --with-mpfr_lib was given.
+if test "${with_mpfr_lib+set}" = set; then :
+  withval=$with_mpfr_lib; with_mpfr_lib=$withval
+fi
+
+
+# Check whether --with-mpfr was given.
+if test "${with_mpfr+set}" = set; then :
+  withval=$with_mpfr; with_mpfr_include=$withval/include with_mpfr_lib=$withval/lib
+fi
+
+
+if test -d "$with_mpfr_include"; then
+  CPPFLAGS="$CPPFLAGS -I$with_mpfr_include"
+else
+  with_mpfr_include=
+fi
+
+if ` test "$with_mpfr_lib" `
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking mpfr library" >&5
+$as_echo_n "checking mpfr library... " >&6; }
+	if  test -r "$with_mpfr_lib/libmpfr.a" -o -r "$with_mpfr_lib/libmpfr.so"
+	then
+	  LDFLAGS="$LDFLAGS -L$with_mpfr_lib"
+          LIBS   ="$LIBS -lmpfr"
+	else
+	   as_fn_error $? "mpfr not found" "$LINENO" 5
+	fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmpfr" >&5
+$as_echo_n "checking for main in -lmpfr... " >&6; }
+if ${ac_cv_lib_mpfr_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmpfr  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mpfr_main=yes
+else
+  ac_cv_lib_mpfr_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpfr_main" >&5
+$as_echo "$ac_cv_lib_mpfr_main" >&6; }
+if test "x$ac_cv_lib_mpfr_main" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMPFR 1
+_ACEOF
+
+  LIBS="-lmpfr $LIBS"
+
+else
+  as_fn_error $? "mpfr not found" "$LINENO" 5
+fi
+
+fi
+
+
+
+
+for ac_header in mpfr.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "mpfr.h" "ac_cv_header_mpfr_h" "#include<gmp.h>
+"
+if test "x$ac_cv_header_mpfr_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MPFR_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmpfr" >&5
+$as_echo_n "checking for main in -lmpfr... " >&6; }
+if ${ac_cv_lib_mpfr_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmpfr  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mpfr_main=yes
+else
+  ac_cv_lib_mpfr_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpfr_main" >&5
+$as_echo "$ac_cv_lib_mpfr_main" >&6; }
+if test "x$ac_cv_lib_mpfr_main" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMPFR 1
+_ACEOF
+
+  LIBS="-lmpfr $LIBS"
+
+fi
+
+
+fi
+
+
+
+if test "$enable_ultim" = "yes"; then
+
+
+# Check whether --with-ultim_include was given.
+if test "${with_ultim_include+set}" = set; then :
+  withval=$with_ultim_include; with_ultim_include=$withval
+fi
+
+
+# Check whether --with-ultim_lib was given.
+if test "${with_ultim_lib+set}" = set; then :
+  withval=$with_ultim_lib; with_ultim_lib=$withval
+fi
+
+
+# Check whether --with-ultim was given.
+if test "${with_ultim+set}" = set; then :
+  withval=$with_ultim; with_ultim_include=$withval/include with_ultim_lib=$withval/lib
+fi
+
+
+if test -d "$with_ultim_include"; then
+  CPPFLAGS="$CPPFLAGS -I$with_ultim_include"
+else
+  with_ultim_include=
+fi
+
+if ` test "$with_ultim_lib" `
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking ultim library" >&5
+$as_echo_n "checking ultim library... " >&6; }
+	if  test -r "$with_ultim_lib/libultim.a" -o -r "$with_ultim_lib/libultim.so"
+	then
+	  LDFLAGS="$LDFLAGS -L$with_ultim_lib"
+          LIBS   ="$LIBS -lultim"
+	else
+	   as_fn_error $? "ultim not found" "$LINENO" 5
+	fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lultim" >&5
+$as_echo_n "checking for main in -lultim... " >&6; }
+if ${ac_cv_lib_ultim_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lultim  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ultim_main=yes
+else
+  ac_cv_lib_ultim_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ultim_main" >&5
+$as_echo "$ac_cv_lib_ultim_main" >&6; }
+if test "x$ac_cv_lib_ultim_main" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBULTIM 1
+_ACEOF
+
+  LIBS="-lultim $LIBS"
+
+else
+  as_fn_error $? "ultim not found" "$LINENO" 5
+fi
+
+fi
+
+
+
+for ac_header in MathLib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "MathLib.h" "ac_cv_header_MathLib_h" "$ac_includes_default"
+if test "x$ac_cv_header_MathLib_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MATHLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lultim" >&5
+$as_echo_n "checking for main in -lultim... " >&6; }
+if ${ac_cv_lib_ultim_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lultim  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ultim_main=yes
+else
+  ac_cv_lib_ultim_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ultim_main" >&5
+$as_echo "$ac_cv_lib_ultim_main" >&6; }
+if test "x$ac_cv_lib_ultim_main" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBULTIM 1
+_ACEOF
+
+  LIBS="-lultim $LIBS"
+
+fi
+
+
+fi
+
+
+
+if test "$enable_mcr" = "yes"; then
+
+
+# Check whether --with-mcr_include was given.
+if test "${with_mcr_include+set}" = set; then :
+  withval=$with_mcr_include; with_mcr_include=$withval
+fi
+
+
+# Check whether --with-mcr_lib was given.
+if test "${with_mcr_lib+set}" = set; then :
+  withval=$with_mcr_lib; with_mcr_lib=$withval
+fi
+
+
+# Check whether --with-mcr was given.
+if test "${with_mcr+set}" = set; then :
+  withval=$with_mcr; with_mcr_include=$withval/include with_mcr_lib=$withval/lib
+fi
+
+
+if test -d "$with_mcr_include"; then
+  CPPFLAGS="$CPPFLAGS -I$with_mcr_include"
+else
+  with_mcr_include=
+fi
+
+if ` test "$with_mcr_lib" `
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking mcr library" >&5
+$as_echo_n "checking mcr library... " >&6; }
+	if  test -r "$with_mcr_lib/libmcr.a" -o -r "$with_mcr_lib/libmcr.so"
+	then
+	  LDFLAGS="$LDFLAGS -L$with_mcr_lib"
+          LIBS   ="$LIBS -lmcr"
+	else
+	   as_fn_error $? "mcr not found" "$LINENO" 5
+	fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcr" >&5
+$as_echo_n "checking for main in -lmcr... " >&6; }
+if ${ac_cv_lib_mcr_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmcr  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mcr_main=yes
+else
+  ac_cv_lib_mcr_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcr_main" >&5
+$as_echo "$ac_cv_lib_mcr_main" >&6; }
+if test "x$ac_cv_lib_mcr_main" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMCR 1
+_ACEOF
+
+  LIBS="-lmcr $LIBS"
+
+else
+  as_fn_error $? "mcr not found" "$LINENO" 5
+fi
+
+fi
+
+
+
+for ac_header in libmcr.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libmcr.h" "ac_cv_header_libmcr_h" "$ac_includes_default"
+if test "x$ac_cv_header_libmcr_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMCR_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcr" >&5
+$as_echo_n "checking for main in -lmcr... " >&6; }
+if ${ac_cv_lib_mcr_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmcr  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mcr_main=yes
+else
+  ac_cv_lib_mcr_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcr_main" >&5
+$as_echo "$ac_cv_lib_mcr_main" >&6; }
+if test "x$ac_cv_lib_mcr_main" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMCR 1
+_ACEOF
+
+  LIBS="-lmcr $LIBS"
+
+fi
+
+
+fi
+
+
+#AC_CONFIG_SUBDIRS([scs_lib])
+
+
+
+ac_config_files="$ac_config_files Makefile scs_lib/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COMPILER_ICC_TRUE}" && test -z "${COMPILER_ICC_FALSE}"; then
+  as_fn_error $? "conditional \"COMPILER_ICC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAS_FPU_CONTROL_TRUE}" && test -z "${HAS_FPU_CONTROL_FALSE}"; then
+  as_fn_error $? "conditional \"HAS_FPU_CONTROL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${USE_SSE2_TRUE}" && test -z "${USE_SSE2_FALSE}"; then
+  as_fn_error $? "conditional \"USE_SSE2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_INTERVAL_FUNCTIONS_TRUE}" && test -z "${USE_INTERVAL_FUNCTIONS_FALSE}"; then
+  as_fn_error $? "conditional \"USE_INTERVAL_FUNCTIONS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_HARDWARE_DE_TRUE}" && test -z "${USE_HARDWARE_DE_FALSE}"; then
+  as_fn_error $? "conditional \"USE_HARDWARE_DE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "crlibm_config.h") CONFIG_HEADERS="$CONFIG_HEADERS crlibm_config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "scs_lib/Makefile") CONFIG_FILES="$CONFIG_FILES scs_lib/Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Older Autoconf quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+
diff --git a/src/crlibm/configure.ac b/src/crlibm/configure.ac
new file mode 100644
index 0000000..a948f0e
--- /dev/null
+++ b/src/crlibm/configure.ac
@@ -0,0 +1,419 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT
+
+crlibm_version=`cat $srcdir/VERSION`
+dnl For Automake
+AM_INIT_AUTOMAKE(crlibm, $crlibm_version)
+
+AC_CONFIG_HEADERS([crlibm_config.h])
+
+
+AC_SUBST(VERSION)
+
+ISODATE=`date +%Y-%m-%d`
+AC_SUBST(ISODATE)
+
+dnl Check for system information
+AC_CANONICAL_HOST
+case $host_os in
+hpux*)
+	AC_DEFINE_UNQUOTED(CRLIBM_TYPEOS_HPUX,1,[OS type]);;
+*cygwin* | *mingw* | *uwin* | *djgpp | *emx*)
+	AC_DEFINE_UNQUOTED(CRLIBM_TYPEOS_CYGWIN,1,[OS type]);;
+freebsd*|netbsd*|darwin*)
+	AC_DEFINE_UNQUOTED(CRLIBM_TYPEOS_BSD,1,[OS type]);;
+esac;
+
+
+case $host_cpu in
+alpha)     
+	AC_DEFINE_UNQUOTED(CRLIBM_TYPECPU_ALPHA,1,[Processor type]) ;;
+sparc)     
+	AC_DEFINE_UNQUOTED(CRLIBM_TYPECPU_SPARC,1,[Processor type]) ;;
+powerpc*)  
+	AC_DEFINE_UNQUOTED(CRLIBM_TYPECPU_POWERPC,1,[Processor type]);;
+i*86|k6|k7|pentium*|athlon*)
+	AC_DEFINE_UNQUOTED(CRLIBM_TYPECPU_X86,1,[Processor type])
+	has_ia32_de=true;;
+x86_64|amd64)
+        AC_DEFINE_UNQUOTED(CRLIBM_TYPECPU_AMD64,1,[Processor type])
+	has_ia32_de=true;;
+ia64)
+	AC_DEFINE_UNQUOTED(CRLIBM_TYPECPU_ITANIUM,1,[Processor type])
+	has_ia64_de=true;;
+esac;
+
+
+AC_CONFIG_SRCDIR([crlibm.h])
+AC_PROG_MAKE_SET
+
+dnl Check for compiler
+
+AC_PROG_CC(gcc icc cc)
+
+# Try to set compiler flags to get floating point arithmetics 
+# to work. This is an old heritage and should become useless within 30 years
+#
+if test "${GCC}" != "yes" ; then
+    case "${build}" in
+        *-*-hpux* )
+	    AM_CFLAGS="${AM_CFLAGS} -Wp,-H30000"
+            ;;
+        *-dec-osf* )
+            AM_CFLAGS="${AM_CFLAGS} -ieee"
+            ;;
+	*-apple-darwin* )
+	    AM_CFLAGS="${AM_CFLAGS} -fno-common"
+	    ;;
+	*-sgi-irix* )
+	    ;;
+    esac
+else
+    case "${CC}" in
+	*icc* )
+	    # -Wall causes relocation errors with icc. 
+	    AM_CFLAGS="${AM_CFLAGS} -wd269"
+	    ;;
+        * )
+            case "${build}" in
+	        *-dec-osf* )
+	            AM_CFLAGS="${AM_CFLAGS} -mieee -Wall"
+	            ;;
+                *alpha*-*-linux* )
+                    AM_CFLAGS="${AM_CFLAGS} -mieee -Wall"
+                    ;;
+                *alpha*-*-freebsd* )
+                    AM_CFLAGS="${AM_CFLAGS} -mieee -Wall"
+                    ;;
+	        *-apple-darwin* )
+	            AM_CFLAGS="${AM_CFLAGS} -fno-common -Wall"
+	            ;;
+	        * )
+	            AM_CFLAGS="${AM_CFLAGS} -Wall"
+	            ;;
+            esac
+	    ;;
+    esac
+fi
+
+
+
+
+
+
+dnl send this information to automake to set up compilation flags
+dnl (add your compiler here)
+AM_CONDITIONAL(COMPILER_ICC, test x$CC = xicc)
+
+dnl Checks for programs.
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+AC_PROG_LN_S
+
+dnl Checks for standard C stuff.
+AC_HEADER_STDC
+AC_C_CONST
+AC_C_INLINE
+
+
+AC_CHECK_FUNCS([sqrt])
+AC_CHECK_HEADERS([fenv.h])
+AC_CHECK_HEADERS([float.h])
+AC_CHECK_HEADER(fpu_control.h, has_fpu_control=yes, has_fpu_control=no)
+
+dnl Send this information to automake
+AM_CONDITIONAL(HAS_FPU_CONTROL, 	test x$has_fpu_control = xyes)
+
+if test x$has_fpu_control = xyes ; then
+AC_DEFINE_UNQUOTED(CRLIBM_HAS_FPU_CONTROL,1,[architecture- and system-specific FPU control header file])
+fi
+
+dnl adds -lm
+AC_CHECK_LIB([m], [log])
+
+dnl Other checks
+AC_C_BIGENDIAN(,,)
+dnl defines WORDS_BIGENDIAN, or not 
+
+AC_C_LONG_DOUBLE
+dnl defines HAVE_LONG_DOUBLE, or not
+
+
+AC_CHECK_SIZEOF(int)
+dnl defines SIZEOF_INT to be the size in bytes of int
+
+
+
+
+
+dnl All the rest is related to MPFR and to Ziv's lib, useful for testing.
+
+dnl Sometimes the following function is provided by aclocal, sometimes not.
+dnl Copying it here is probably a bad way of managing this problem
+AC_DEFUN([AC_ADD_PATH_LIBS],
+[
+if ` test "$1" `
+then  
+  AC_MSG_CHECKING($2 library)
+	if  test -r "$1/lib$2.a" -o -r "$1/lib$2.so"
+	then
+	  LDFLAGS="$LDFLAGS -L$1"
+          LIBS   ="$LIBS -l$2" 	
+	else
+	   AC_MSG_ERROR($2 not found)
+	fi
+  AC_MSG_RESULT(yes)
+else
+  AC_CHECK_LIB($2, main, , AC_MSG_ERROR($2 not found))
+fi
+]
+)
+
+
+
+
+
+dnl Command-line arguments to ./configure:
+
+
+dnl switch for SSE2
+AC_ARG_ENABLE(sse2,
+  [  --enable-sse2    forces the use of sse2 arith  [[default=no]]],
+  [case $enableval in
+    yes)
+      AC_DEFINE_UNQUOTED(HAS_SSE2,1,[Use the sse2 operators ]);;
+    no) ;;
+    *) AC_MSG_ERROR([bad value $enableval for --enable-sse2, need yes or no]) ;;
+  esac],
+  [enable_sse2=no])
+dnl Send this information to automake 
+AM_CONDITIONAL(USE_SSE2, test x$enable_sse2 = xyes  )
+
+
+
+
+dnl switch for compiling the interval functions
+AC_ARG_ENABLE(interval-functions,
+  [  --enable-interval-functions    enables filib-compatible interval functions (DOES NOT WORK YET)  [[default=no]]],
+  [case $enableval in
+    yes)
+      AC_DEFINE_UNQUOTED(BUILD_INTERVAL_FUNCTIONS,1,[Compile the filib-compatible interval functions]);;
+    no) ;;
+    *) AC_MSG_ERROR([bad value $enableval for --enable-interval-functions, need yes or no]) ;;
+  esac],
+  [enable_interval_functions=no])
+dnl Send this information to automake 
+AM_CONDITIONAL(USE_INTERVAL_FUNCTIONS, test x$enable_interval_functions = xyes  )
+
+
+
+dnl A switch to disable use of double-extended optimised version
+AC_ARG_ENABLE(double-extended,        
+  [  --enable-double-extended       enable double-extended optimised versions of functions if hardware supports it  [[default=yes]]],
+  [case $enableval in
+    yes|no) ;;
+    *) AC_MSG_ERROR([bad value $enableval for --enable-double-extended, need yes or no]) ;;
+  esac],
+  [enable_double_extended=yes])
+
+dnl following line needs a little bit more work on log-de.c and double-extended.h
+dnl AM_CONDITIONAL(USE_HARDWARE_DE, test x$has_ia32_de = xtrue -a x$enable_double_extended = xyes -a x$has_fpu_control=xyes   -o  x$has_ia64_de = xtrue -a x$CC = xicc -a x$enable_double_extended = xyes  )
+
+AM_CONDITIONAL(USE_HARDWARE_DE, test x$has_ia32_de = xtrue  -a x$has_fpu_control = xyes  -a x$enable_double_extended = xyes -a x$enable_interval_functions = xno    )
+dnl  Note that at the moment, enabling intervals disables double-extended
+
+
+
+
+
+
+
+
+dnl If at some point we wish to include SPARC optimization back,
+dnl  the default should take the value 10 and 25 in this case 
+dnl  for around 200 bits of precision
+
+AC_ARG_ENABLE(nbdigits,
+  [  --enable-nbdigits=N            set the number of digits in the SCS structure to N [[default=8]] ],
+  [case $enableval in
+	      *[[0-9]])  AC_DEFINE_UNQUOTED(SCS_NB_WORDS, $enableval, [Number of digits in the SCS structure]);;
+	      *) AC_MSG_ERROR([bad value $enableval for --enable-nbdigits, number expected]) ;;
+	 esac],
+  [AC_DEFINE_UNQUOTED(SCS_NB_WORDS, 8, [Number of digits in the SCS structure])]
+)
+
+AC_ARG_ENABLE(digitsize,
+  [  --enable-digitsize=N           set the size of a digit to N bits [[default=30]] ],
+  [case $enableval in
+	      *[[0-9]])  AC_DEFINE_UNQUOTED(SCS_NB_BITS, $enableval, [Size of an SCS digit]);;
+	      *) AC_MSG_ERROR([bad value $enableval for --enable-digitsize, number expected]) ;;
+	 esac],
+  [AC_DEFINE_UNQUOTED(SCS_NB_BITS, 30, [Size of an SCS digit])]
+)
+
+
+dnl  ... for  MPFR
+AC_ARG_ENABLE(mpfr,       
+  [  --enable-mpfr                  enable MPFR function [[default=no]]],
+  [case $enableval in 
+     yes|no) ;;
+     *) AC_MSG_ERROR([bad value $enableval for --enable-mpfr, need yes or no]) ;;
+   esac],
+  [enable_mpfr=no])
+
+
+dnl  ... for GMP
+AC_ARG_ENABLE(gmp,
+  [  --enable-gmp                   enable GMP function [[default=no]]],
+  [case $enableval in
+     yes|no) ;;
+     *) AC_MSG_ERROR([bad value $enableval for --enable-gmp, need yes or no]) ;;
+   esac],
+  [enable_gmp=no])
+
+
+dnl  ... for IBM Accurate Portable Library
+AC_ARG_ENABLE(ultim,
+  [  --enable-ultim                 enable comparison with libultim, IBM's Accurate Portable Math Library [[default=no]]],
+  [case $enableval in
+     yes|no) ;;
+     *) AC_MSG_ERROR([bad value $enableval for --enable-ultim, need yes or no]) ;;
+   esac],
+   [enable_ultim=no])
+
+
+dnl  ... for Sun's libmcr
+AC_ARG_ENABLE(mcr,
+  [  --enable-mcr                   enable comparison with Sun's LIBMCR  [[default=no]]],
+  [case $enableval in
+     yes|no) ;;
+     *) AC_MSG_ERROR([bad value $enableval for --enable-mcr, need yes or no]) ;;
+   esac],
+  [enable_mcr=no])
+
+
+dnl Now consider the result of the previous to set directories:
+
+
+dnl ... for GMP
+if test "$enable_gmp" = "yes" -o "$enable_mpfr" = "yes"; then
+
+AC_ARG_WITH(gmp_include, [  --with-gmp-include=DIR    GMP include directory ],
+ with_gmp_include=$withval)
+AC_ARG_WITH(gmp_lib,     [  --with-gmp-lib=DIR        GMP lib directory ],
+ with_gmp_lib=$withval)
+AC_ARG_WITH(gmp,         [  --with-gmp=DIR            GMP directory ],
+ with_gmp_include=$withval/include with_gmp_lib=$withval/lib)
+
+if test -d "$with_gmp_include"; then
+  CPPFLAGS="$CPPFLAGS -I$with_gmp_include"
+else
+  with_gmp_include=
+fi
+AC_ADD_PATH_LIBS($with_gmp_lib, gmp)
+
+dnl If gmp.h is found, #defines HAVE_GMP_H
+AC_CHECK_HEADERS([gmp.h])
+
+dnl If libgmp is found, adds -lgmp to LIBS
+dnl correct in theory:  AC_CHECK_LIB([gmp], [__gmp_fprintf])
+AC_CHECK_LIB([gmp], [main])
+
+dnl end of test for gmp
+fi
+
+
+
+dnl  and for MPFR 
+
+if test "$enable_mpfr" = "yes"; then
+AC_ARG_WITH(mpfr_include, [  --with-mpfr-include=DIR   MPFR include directory ], 
+with_mpfr_include=$withval)
+AC_ARG_WITH(mpfr_lib,     [  --with-mpfr-lib=DIR       MPFR lib directory ], 
+with_mpfr_lib=$withval)
+AC_ARG_WITH(mpfr,         [  --with-mpfr=DIR           MPFR directory ],
+with_mpfr_include=$withval/include with_mpfr_lib=$withval/lib)
+
+if test -d "$with_mpfr_include"; then
+  CPPFLAGS="$CPPFLAGS -I$with_mpfr_include"
+else
+  with_mpfr_include=
+fi
+AC_ADD_PATH_LIBS($with_mpfr_lib, mpfr)
+
+
+dnl If mpfr.h is found, #defines HAVE_MPFR_H
+dnl this line should be
+dnl AC_CHECK_HEADERS([mpfr.h], [], [], [#if HAVE_GMP_H #include<gmp.h> #endif])
+dnl but it doesn't work properly so we assume that gmp is installed on the system
+dnl is mpfr is !!!
+AC_CHECK_HEADERS([mpfr.h], [], [], [#include<gmp.h>])
+
+dnl If MPFR is found, adds -lmpfr to LIBS
+dnl correct in theory:  AC_CHECK_LIB([mpfr], [mpfr_init2])
+AC_CHECK_LIB([mpfr], [main])
+
+dnl end of test for mpfr
+fi
+
+
+
+dnl ... for IBM
+if test "$enable_ultim" = "yes"; then
+
+AC_ARG_WITH(ultim_include, [  --with-ultim-include=DIR  ULTIM include directory ],
+ with_ultim_include=$withval)
+AC_ARG_WITH(ultim_lib,     [  --with-ultim-lib=DIR      ULTIM lib directory ],
+ with_ultim_lib=$withval)
+AC_ARG_WITH(ultim,         [  --with-ultim=DIR          ULTIM directory ],
+ with_ultim_include=$withval/include with_ultim_lib=$withval/lib)
+
+if test -d "$with_ultim_include"; then
+  CPPFLAGS="$CPPFLAGS -I$with_ultim_include"
+else
+  with_ultim_include=
+fi
+AC_ADD_PATH_LIBS($with_ultim_lib, ultim)
+
+AC_CHECK_HEADERS([MathLib.h])
+
+AC_CHECK_LIB([ultim], [main])
+
+dnl end of test for IBM libultim
+fi
+
+
+
+dnl ... for SUN
+if test "$enable_mcr" = "yes"; then
+
+AC_ARG_WITH(mcr_include, [  --with-mcr-include=DIR    LIBMCR include directory ],
+ with_mcr_include=$withval)
+AC_ARG_WITH(mcr_lib,     [  --with-mcr-lib=DIR        LIBMCR lib directory ],
+ with_mcr_lib=$withval)
+AC_ARG_WITH(mcr,         [  --with-mcr=DIR            LIBMCR directory ],
+ with_mcr_include=$withval/include with_mcr_lib=$withval/lib)
+
+if test -d "$with_mcr_include"; then
+  CPPFLAGS="$CPPFLAGS -I$with_mcr_include"
+else
+  with_mcr_include=
+fi
+AC_ADD_PATH_LIBS($with_mcr_lib, mcr)
+
+AC_CHECK_HEADERS([libmcr.h])
+
+AC_CHECK_LIB([mcr], [main])
+
+dnl end of test for IBM libultim
+fi
+
+
+#AC_CONFIG_SUBDIRS([scs_lib])
+
+
+
+AC_CONFIG_FILES([Makefile scs_lib/Makefile])
+AC_OUTPUT
+
+
diff --git a/src/crlibm/crlibm.h b/src/crlibm/crlibm.h
new file mode 100644
index 0000000..f223785
--- /dev/null
+++ b/src/crlibm/crlibm.h
@@ -0,0 +1,204 @@
+/*
+ * Author  : David Defour, Catherine Daramy, Florent de Dinechin, Christoph Lauter
+ * Contact : David.Defour at ens-lyon.fr, catherine_daramy at ens-lyon.fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ */
+
+#ifndef CRLIBM_H
+#define CRLIBM_H
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+
+/* An init function which sets FPU flags when needed (mostly on Intel
+   architectures with default double extended) */
+extern unsigned long long crlibm_init(void);
+
+/* An exit function which restores FPU flags when needed (mostly on Intel
+   architectures with default double extended) */
+extern  void crlibm_exit(unsigned long long);
+
+
+/* Finished functions */
+/* These functions are computed in two steps and have an average
+   execution time comparable to that of a standard libm
+*/
+
+/*  exponential  */
+extern double exp_rn(double); /* to nearest  */
+extern double exp_rd(double); /* toward -inf */ 
+extern double exp_ru(double); /* toward +inf */ 
+#define exp_rz exp_rd         /* toward zero */ 
+
+/*  logarithm  */
+extern double log_rn(double); /* to nearest  */
+extern double log_rd(double); /* toward -inf */ 
+extern double log_ru(double); /* toward +inf */ 
+extern double log_rz(double); /* toward zero */ 
+
+/*  cosine  */
+extern double cos_rn(double); /* to nearest  */
+extern double cos_rd(double); /* toward -inf */ 
+extern double cos_ru(double); /* toward +inf */ 
+extern double cos_rz(double); /* toward zero */ 
+
+/*  sine  */
+extern double sin_rn(double); /* to nearest  */
+extern double sin_rd(double); /* toward -inf */ 
+extern double sin_ru(double); /* toward +inf */ 
+extern double sin_rz(double); /* toward zero */ 
+
+/*  tangent  */
+extern double tan_rn(double); /* to nearest  */
+extern double tan_rd(double); /* toward -inf */ 
+extern double tan_ru(double); /* toward +inf */
+extern double tan_rz(double); /* toward zero */
+ 
+/*  cosine of pi times x  */
+extern double cospi_rn(double); /* to nearest  */
+extern double cospi_rd(double); /* toward -inf */ 
+extern double cospi_ru(double); /* toward +inf */ 
+extern double cospi_rz(double); /* toward zero */ 
+
+/*  sine  of pi times x */
+extern double sinpi_rn(double); /* to nearest  */
+extern double sinpi_rd(double); /* toward -inf */ 
+extern double sinpi_ru(double); /* toward +inf */ 
+extern double sinpi_rz(double); /* toward zero */ 
+
+/*  tangent of pi times x */
+extern double tanpi_rn(double); /* to nearest  */
+extern double tanpi_rd(double); /* toward -inf */ 
+extern double tanpi_ru(double); /* toward +inf */
+extern double tanpi_rz(double); /* toward zero */
+ 
+
+
+
+/* /\*  cotangent  *\/ */
+/* extern double cotan_rn(double); /\* to nearest  *\/ */
+/* extern double cotan_rd(double); /\* toward -inf *\/  */
+/* extern double cotan_ru(double); /\* toward +inf *\/  */
+/* extern double cotan_rz(double); /\* toward zero *\/  */
+
+/*  arctangent  */
+extern double atan_rn(double); /* to nearest  */
+extern double atan_rd(double); /* toward -inf */ 
+extern double atan_ru(double); /* toward +inf */ 
+extern double atan_rz(double); /* toward zero */ 
+
+/*  arctangentPi  */
+extern double atanpi_rn(double); /* to nearest  */
+extern double atanpi_rd(double); /* toward -inf */ 
+extern double atanpi_ru(double); /* toward +inf */ 
+extern double atanpi_rz(double); /* toward zero */ 
+
+/*  hyperbolic cosine*/
+extern double cosh_rn(double); /* to nearest */
+extern double cosh_rd(double); /* toward -inf */ 
+extern double cosh_ru(double); /* toward +inf */ 
+extern double cosh_rz(double); /* toward zero */ 
+
+/*  hyperbolic sine */
+extern double sinh_rn(double); /* to nearest */
+extern double sinh_rd(double); /* toward -inf */ 
+extern double sinh_ru(double); /* toward +inf */ 
+extern double sinh_rz(double); /* toward zero */ 
+
+
+/* base 2 logarithm */
+extern double log2_rn(double); /* to nearest  */
+extern double log2_rd(double); /* toward -inf */ 
+extern double log2_ru(double); /* toward +inf */ 
+extern double log2_rz(double); /* towards zero */ 
+
+/* base 10 logarithm */
+extern double log10_rn(double); /* to nearest  */
+extern double log10_rd(double); /* toward -inf */ 
+extern double log10_ru(double); /* toward +inf */ 
+extern double log10_rz(double); /* towards zero */ 
+
+/* arcsine */
+extern double asin_rn(double); /* to nearest */
+extern double asin_rd(double); /* toward -inf */
+extern double asin_ru(double); /* toward +inf */
+extern double asin_rz(double); /* toward zero */
+
+/* arccosine */
+extern double acos_rn(double); /* to nearest */
+extern double acos_rd(double); /* toward -inf */
+extern double acos_ru(double); /* toward +inf */
+#define acos_rz acos_rd        /* toward zero */ 
+
+/* arcsine/PI */
+extern double asinpi_rn(double); /* to nearest */
+extern double asinpi_rd(double); /* toward -inf */
+extern double asinpi_ru(double); /* toward +inf */
+extern double asinpi_rz(double); /* toward zero */
+
+/* arccosine/PI */
+extern double acospi_rn(double); /* to nearest */
+extern double acospi_rd(double); /* toward -inf */
+extern double acospi_ru(double); /* toward +inf */
+#define acospi_rz acospi_rd      /* toward zero */ 
+
+/* expm1 = e^x -1 */
+extern double expm1_rn(double); /* to nearest */
+extern double expm1_rd(double); /* toward -inf */
+extern double expm1_ru(double); /* toward +inf */
+extern double expm1_rz(double); /* toward zero */
+
+/* log1p = log(1 + x) */
+extern double log1p_rn(double); /* to nearest */
+extern double log1p_rd(double); /* toward -inf */
+extern double log1p_ru(double); /* toward +inf */
+extern double log1p_rz(double); /* toward zero */
+
+
+/* Unfinished functions */
+/* These functions provide correct rounding but are very slow
+   (typically 100 times slower that the standard libm) */
+
+extern double exp2_rn(double); /* to nearest  */
+extern double exp2_rd(double); /* toward -inf */ 
+extern double exp2_ru(double); /* toward +inf */ 
+
+/*  pow */
+/* ATTENTION: THIS FUNCTION IS UNDER DEVELOPMENT 
+   AND CURRENTLY NOT PROVEN CORRECTLY ROUNDED FOR ALL CASES
+
+   See the documentation
+
+*/
+extern double pow_rn(double, double); 
+
+
+/* fi_lib-compatible interval functions (EXPERIMENTAL) */ 
+
+#ifdef BUILD_INTERVAL_FUNCTIONS
+#include "interval.h"
+interval j_log(interval x);
+interval j_exp(interval x);
+#endif /* BUILD_INTERVAL_FUNCTIONS */
+
+#if defined (__cplusplus)
+
+}
+#endif
+
+#endif /* ifdef CRLIBM_H*/
diff --git a/src/crlibm/crlibm.spec b/src/crlibm/crlibm.spec
new file mode 100644
index 0000000..b89b71a
--- /dev/null
+++ b/src/crlibm/crlibm.spec
@@ -0,0 +1,42 @@
+Summary: cr-libm, a portable, efficient, correctly rounded mathematical library.
+Name: crlibm
+Version: 0.8
+Release: 1
+License: GNU LESSER GENERAL PUBLIC LICENSE
+Group: System/Mathematics
+URL: http://lipforge.ens-lyon.fr/projects/crlibm
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+%description The goal of the crlibm project is to design a
+mathematical library which offers proven correct rounding, with
+performance and memory usage comparable to current libraries.
+
+%prep
+%setup -q
+
+%build
+%configure
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%makeinstall
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_libdir}/*
+%{_includedir}/*
+
+
+
+
+%changelog
+* Thu Oct 28 2004 Philippe Defert <defert at lxcert-i386.cern.ch> 
+- Initial build.
+
+
diff --git a/src/crlibm/crlibm_config.h.in b/src/crlibm/crlibm_config.h.in
new file mode 100644
index 0000000..d6c26aa
--- /dev/null
+++ b/src/crlibm/crlibm_config.h.in
@@ -0,0 +1,168 @@
+/* crlibm_config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* Compile the filib-compatible interval functions */
+#undef BUILD_INTERVAL_FUNCTIONS
+
+/* architecture- and system-specific FPU control header file */
+#undef CRLIBM_HAS_FPU_CONTROL
+
+/* Processor type */
+#undef CRLIBM_TYPECPU_ALPHA
+
+/* Processor type */
+#undef CRLIBM_TYPECPU_AMD64
+
+/* Processor type */
+#undef CRLIBM_TYPECPU_ITANIUM
+
+/* Processor type */
+#undef CRLIBM_TYPECPU_POWERPC
+
+/* Processor type */
+#undef CRLIBM_TYPECPU_SPARC
+
+/* Processor type */
+#undef CRLIBM_TYPECPU_X86
+
+/* OS type */
+#undef CRLIBM_TYPEOS_BSD
+
+/* OS type */
+#undef CRLIBM_TYPEOS_CYGWIN
+
+/* OS type */
+#undef CRLIBM_TYPEOS_HPUX
+
+/* Use the sse2 operators */
+#undef HAS_SSE2
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#undef HAVE_FENV_H
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the <gmp.h> header file. */
+#undef HAVE_GMP_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `gmp' library (-lgmp). */
+#undef HAVE_LIBGMP
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the `mcr' library (-lmcr). */
+#undef HAVE_LIBMCR
+
+/* Define to 1 if you have the <libmcr.h> header file. */
+#undef HAVE_LIBMCR_H
+
+/* Define to 1 if you have the `mpfr' library (-lmpfr). */
+#undef HAVE_LIBMPFR
+
+/* Define to 1 if you have the `ultim' library (-lultim). */
+#undef HAVE_LIBULTIM
+
+/* Define to 1 if the type `long double' works and has more range or precision
+   than `double'. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if the type `long double' works and has more range or precision
+   than `double'. */
+#undef HAVE_LONG_DOUBLE_WIDER
+
+/* Define to 1 if you have the <MathLib.h> header file. */
+#undef HAVE_MATHLIB_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <mpfr.h> header file. */
+#undef HAVE_MPFR_H
+
+/* Define to 1 if you have the `sqrt' function. */
+#undef HAVE_SQRT
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Size of an SCS digit */
+#undef SCS_NB_BITS
+
+/* Number of digits in the SCS structure */
+#undef SCS_NB_WORDS
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+#  undef WORDS_BIGENDIAN
+# endif
+#endif
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
diff --git a/src/crlibm/crlibm_private.c b/src/crlibm/crlibm_private.c
new file mode 100644
index 0000000..1ca2167
--- /dev/null
+++ b/src/crlibm/crlibm_private.c
@@ -0,0 +1,397 @@
+/**
+ * Variables and common functions shared by many functions
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+
+/* I wish I could use C99 fenv.h, but as of 2004 it doesn't specify
+   anything about precision, only rounding direction. */
+
+#ifdef HAVE_FENV_H
+#include <fenv.h>
+#endif
+
+/* Tell the compiler that we're going to mess with FP status register */
+#ifdef FENV_H
+#pragma STDC FENV_ACCESS ON
+#endif
+
+
+
+
+
+/* TODO proper init and exit functions 
+
+- for Itanium, sf0 is set   to RNDouble, sf1 to RNdoubleExt, 
+ set sf2 and/or sf3 for
+ directed functions, one should be kept for saving the fpsr when
+ speculating, study operating systems)
+
+- for PowerPC: nothing to do usually, however if for some reason the
+  CPU was not in the default state then crlibm won't work
+
+ */
+
+
+
+/* An init function which sets FPU flags when needed */
+unsigned long long crlibm_init() {
+#ifndef CRLIBM_TYPEOS_BSD
+#if defined(CRLIBM_HAS_FPU_CONTROL) && (defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64))
+  unsigned short oldcw, cw;
+
+#if 1 /* gcc */
+  /* save old state */
+  _FPU_GETCW(oldcw);
+  /* Set FPU flags to use double, not double extended, 
+     with rounding to nearest */  
+  cw = (_FPU_DEFAULT & ~_FPU_EXTENDED)|_FPU_DOUBLE;
+  _FPU_SETCW(cw);
+  return (unsigned long long) oldcw;
+#else  /* Sun Studio  */
+  __asm__ ("movw    $639, -22(%ebp)");
+  __asm__ ("fldcw -22(%ebp)");
+#endif
+
+
+#elif defined(CRLIBM_TYPECPU_ITANIUM) 
+  /* On Itanium we assume that SF2 is used fo speculation, and use only SF3 */
+
+  unsigned long long int  old_fpsr;
+
+#if defined(__INTEL_COMPILER)
+  _Asm_fsetc( 0x00, 0x28, 3 /*_SF3*/ ); /* sf3 = round up, double-precision */
+
+  //  _Asm_mov_to_ar(40, 
+  //	 (old_fpsr & 0xfd000000FFFFFFFFULL) || ((0x18ULL<<32) + (0x28ULL<<45)) );
+#elif defined(__GNUC__)
+  __asm__ ("fsetc.s3 0, 40\n");
+#endif /* defined(__INTEL_COMPILER) */
+  old_fpsr = 0 ; /* TODO */
+  return old_fpsr;
+
+#else
+  return 0;
+#endif /* CRLIBM_TYPECPU_X86 || CRLIBM_TYPECPU_AMD64 */
+#else
+  return 0;
+#endif
+}
+
+/* An exit function which sets FPU flags to initial value */
+void crlibm_exit(unsigned long long int oldcw) {
+#ifndef CRLIBM_TYPEOS_BSD
+#if defined(CRLIBM_HAS_FPU_CONTROL) && (defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64))
+  /* Set FPU flags to use double, not double extended, 
+     with rounding to nearest */
+  unsigned short t = (unsigned short)oldcw;
+  _FPU_SETCW(t);
+#endif
+#endif
+}
+
+
+
+
+#if ADD22_AS_FUNCTIONS
+/*
+ * computes double-double addition: zh+zl = xh+xl + yh+yl
+ * relative error is smaller than 2^-103 
+ */
+  
+void Add22Cond(double *zh, double *zl,
+               double xh, double xl, double yh, double yl)
+{
+  double r,s;
+  r = xh+yh;
+  if ((ABS(xh)) > (ABS(yh))) 
+    {s=   ((((xh-r)+yh)+yl)+xl); }
+  else {s=((((yh-r)+xh)+xl)+yl);}
+  *zh = r+s;
+  *zl = r - (*zh) + s;
+}
+
+/*
+ * computes double-double addition: zh+zl = xh+xl + yh+yl
+ * knowing that xh>yh
+ * relative error is smaller than 2^-103 
+ */
+  
+void Add22(double *zh, double *zl, double xh, double xl, double yh, double yl)
+{
+double r,s;
+
+r = xh+yh;
+s = xh-r+yh+yl+xl;
+*zh = r+s;
+*zl = r - (*zh) + s;
+}
+
+#endif /*ADD22_AS_FUNCTIONS*/
+
+
+
+#if  DEKKER_AS_FUNCTIONS && (!defined PROCESSOR_HAS_FMA)
+/* else it is defined in crlibm_private.h */
+
+/*
+ * computes rh and rl such that rh + rl = a * b with rh = a @* b exactly
+ * under the conditions : a < 2^970 et b < 2^970 
+ */
+void  Mul12(double *rh, double *rl, double u, double v){
+  const double c = 134217729.;   /*  1+2^27 */ 
+  double up, u1, u2, vp, v1, v2;
+
+  up = u*c;        vp = v*c;
+  u1 = (u-up)+up;  v1 = (v-vp)+vp;
+  u2 = u-u1;       v2 = v-v1;
+  
+  *rh = u*v;
+  *rl = (((u1*v1-*rh)+(u1*v2))+(u2*v1))+(u2*v2);
+}
+
+/*
+ * Computes rh and rl such that rh + rl = a * b and rh = a @* b exactly
+ */
+void Mul12Cond(double *rh, double *rl, double a, double b){
+  const double two_970 = 0.997920154767359905828186356518419283e292;
+  const double two_em53 = 0.11102230246251565404236316680908203125e-15;
+  const double two_e53  = 9007199254740992.;
+  double u, v;
+
+  if (a>two_970)  u = a*two_em53; 
+  else            u = a;
+  if (b>two_970)  v = b*two_em53; 
+  else            v = b;
+
+  Mul12(rh, rl, u, v);
+
+  if (a>two_970) {*rh *= two_e53; *rl *= two_e53;} 
+  if (b>two_970) {*rh *= two_e53; *rl *= two_e53;} 
+}
+
+  
+/*
+ * computes double-double multiplication: zh+zl = (xh+xl) *  (yh+yl)
+ * under the conditions : xh < 2^970 et xl < 2^970 
+ * relative error is smaller than 2^-102
+ */
+
+void Mul22(double *zh, double *zl, double xh, double xl, double yh, double yl)
+{
+double mh, ml;
+
+  const double c = 134217729.;                /* 0x41A00000, 0x02000000 */ 
+  double up, u1, u2, vp, v1, v2;
+
+  up = xh*c;        vp = yh*c;
+  u1 = (xh-up)+up;  v1 = (yh-vp)+vp;
+  u2 = xh-u1;       v2 = yh-v1;
+  
+  mh = xh*yh;
+  ml = (((u1*v1-mh)+(u1*v2))+(u2*v1))+(u2*v2);
+
+  ml += xh*yl + xl*yh;
+  *zh = mh+ml;
+  *zl = mh - (*zh) + ml;
+}
+
+
+/*
+ * computes double-double division: pzh+pzl = (xh+xl) /  (yh+yl)
+ * relative error is smaller than 2^-104
+ */
+
+void Div22(double* pzh, double* pzl, double xh, double xl, double yh, double yl){
+  double _ch,_cl,_uh,_ul;  
+  _ch=(xh)/(yh);   Mul12(&_uh,&_ul,_ch,(yh));  
+  _cl=(((((xh)-_uh)-_ul)+(xl))-_ch*(yl))/(yh);   
+  *pzh=_ch+_cl;   *pzl=(_ch-(*pzh))+_cl;
+}
+
+#endif /* DEKKER_AS_FUNCTIONS && (!defined PROCESSOR_HAS_FMA)  */
+
+
+#if SQRT_AS_FUNCTIONS 
+
+/* 
+   Computes sqrt(x) with a result in double-double precision 
+   Should be provable to be exact to at least 100 bits.
+   
+   Only handles the following special cases:
+   - x == 0
+   - subnormal x 
+   The following cases are not handled:
+   - x < 0
+   - x = +/-Infty, NaN
+*/
+void sqrt12(double *resh, double *resl, double x) {
+  db_number xdb;
+  int E;
+  double m, r0, r1, r2, r3h, r3l, r4h, r4l, srtmh, srtml;
+  double r2PHr2h, r2PHr2l, r2Sqh, r2Sql;
+  double mMr2h, mMr2l, mMr2Ch, mMr2Cl;
+  double MHmMr2Ch, MHmMr2Cl;
+  double r3Sqh, r3Sql, mMr3Sqh, mMr3Sql;
+
+  /* Special case x = 0 */
+  if (x == 0) {
+    *resh = x;
+    *resl = 0;
+  } else {
+
+    E = 0;
+
+    /* Convert to integer format */
+    xdb.d = x;
+      
+    /* Handle subnormal case */
+    if (xdb.i[HI] < 0x00100000) {
+      E = -52;
+      xdb.d *= ((db_number) ((double) SQRTTWO52)).d; 	  /* make x a normal number */ 
+    }
+    
+    /* Extract exponent E and mantissa m */
+    E += (xdb.i[HI]>>20)-1023; 
+    xdb.i[HI] = (xdb.i[HI] & 0x000fffff) | 0x3ff00000;
+    m = xdb.d;
+    
+    /* Make exponent even */
+    if (E & 0x00000001) {
+      E++;
+      m *= 0.5;    /* Suppose now 1/2 <= m <= 2 */
+    }
+  
+    /* Construct sqrt(2^E) = 2^(E/2) */
+    xdb.i[HI] = (E/2 + 1023) << 20;
+    xdb.i[LO] = 0;
+    
+    /* Compute initial approximation to r = 1/sqrt(m) */
+    
+    r0 = SQRTPOLYC0 + m * (SQRTPOLYC1 + m * (SQRTPOLYC2 + m * (SQRTPOLYC3 + m * SQRTPOLYC4)));
+    
+    /* Iterate two times on double precision */
+    
+    r1 = 0.5 * r0 * (3 - m * (r0 * r0));
+    r2 = 0.5 * r1 * (3 - m * (r1 * r1));
+
+    /* Iterate two times on double-double precision */
+
+    Mul12(&r2Sqh, &r2Sql, r2, r2);    Add12(r2PHr2h, r2PHr2l, r2, 0.5 * r2);
+    Mul12(&mMr2h, &mMr2l, m, r2);
+    Mul22(&mMr2Ch, &mMr2Cl, mMr2h, mMr2l, r2Sqh, r2Sql);
+    
+    MHmMr2Ch = -0.5 * mMr2Ch;
+    MHmMr2Cl = -0.5 * mMr2Cl;
+
+    Add22(&r3h, &r3l, r2PHr2h, r2PHr2l, MHmMr2Ch, MHmMr2Cl);
+ 
+    Mul22(&r3Sqh, &r3Sql, r3h, r3l, r3h, r3l);
+    Mul22(&mMr3Sqh, &mMr3Sql, m, 0, r3Sqh, r3Sql);  /* To prove: mMr3Sqh = 1.0 in each case */ 
+    
+    Mul22(&r4h, &r4l, r3h, r3l, 1, -0.5 * mMr3Sql);
+
+    /* Multiply obtained reciprocal square root by m */
+    
+    Mul22(&srtmh,&srtml,m,0,r4h,r4l);
+
+    /* Multiply componentwise by sqrt(2^E), which is an integer power of 2 that may not produce a subnormal */
+    
+    *resh = xdb.d * srtmh;
+    *resl = xdb.d * srtml;
+    
+  } /* End: special case 0 */
+}
+
+#endif /* SQRT_AS_FUNCTIONS */
+
+
+
+
+  
+#if EVAL_PERF==1
+/* counter of calls to the second step (accurate step) */
+int crlibm_second_step_taken;
+#endif
+
+/* A debug functions */
+
+void printHexa(char* s, double x) {
+  db_number xdb;
+
+  xdb.d = x;
+  printf("%s = %08x%08x (%1.8e) exponent = %d exponent of ulp = %d\n",
+	 s,
+	 xdb.i[HI],
+	 xdb.i[LO],
+	 x,
+	 ((xdb.i[HI] & 0x7ff00000) >> 20) - 1023,
+	 ((xdb.i[HI] & 0x7ff00000) >> 20) - 1023 - 52);
+}
+
+
+
+
+#ifdef SCS_TYPECPU_SPARC
+ const scs
+/* 0   */
+   scs_zer ={{0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             {{0, 0}},  0,   1 },
+/* 1/2 */
+   scs_half={{0x02000000, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE, -1,   1 },
+/*  1  */  
+   scs_one ={{0x00000001, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE,  0,   1 },
+/*  2  */
+   scs_two ={{0x00000002, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE,  0,   1 },	
+
+/* ~1.666667e-01 */ 
+   scs_sixinv ={{0x0aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa},
+	     DB_ONE,  -1,   1 };
+
+#else
+ const struct scs
+/* 0   */
+   scs_zer ={{0x00000000, 0x00000000, 0x00000000, 0x00000000,
+             0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             {{0, 0}},  0,   1 },
+/* 1/2 */
+   scs_half={{0x20000000, 0x00000000, 0x00000000, 0x00000000,
+             0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE, -1,   1 },
+/*  1  */  
+   scs_one ={{0x00000001, 0x00000000, 0x00000000, 0x00000000,
+             0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE,  0,   1 },
+/*  2  */
+   scs_two ={{0x00000002, 0x00000000, 0x00000000, 0x00000000,
+             0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE,  0,   1 },
+/* 0.166666*/
+   scs_sixinv ={{0x0aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa, 
+	     0x2aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa},
+	     DB_ONE,  -1,   1 };
+
+#endif
diff --git a/src/crlibm/crlibm_private.h b/src/crlibm/crlibm_private.h
new file mode 100644
index 0000000..d3f1b88
--- /dev/null
+++ b/src/crlibm/crlibm_private.h
@@ -0,0 +1,1048 @@
+/*
+ *  crlibm_private.h
+ *  
+ * This file contains useful tools and data for the crlibm functions.
+ *
+ */
+
+#ifndef CRLIBM_PRIVATE_H
+#define CRLIBM_PRIVATE_H 1
+
+#include "scs_lib/scs.h"
+#include "scs_lib/scs_private.h"
+
+#ifdef HAVE_CONFIG_H
+#include "crlibm_config.h"
+#endif
+/* otherwise CMake is used, and defines all the useful variables using -D switch */
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+
+
+#if (defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64))
+# ifdef CRLIBM_HAS_FPU_CONTROL
+#  include <fpu_control.h>
+#  ifndef _FPU_SETCW
+#   define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
+#  endif
+#  ifndef _FPU_GETCW
+#   define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
+#  endif
+# endif
+#endif
+
+/* 64 bit arithmetic may be standardised, but people still do what they want */
+#ifdef HAVE_INTTYPES_H
+#define ULL(bits) 0x##bits##uLL
+#elif defined(_WIN32) 
+/*  Windows garbage there */
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#define ULL(bits) 0x##bits##i64
+/* Default, hoping it works, hopefully less and less relevant */
+#else
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#define ULL(bits) 0x##bits##uLL
+#endif
+
+#ifndef SCS_DEF_INT64
+#define SCS_DEF_INT64
+#ifdef CRLIBM_TYPEOS_HPUX
+#ifndef __LP64__ /* To solve the problem with 64 bits integer on HPPA */
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#define ULL(bits) 0x##bits##uLL
+#endif
+#endif
+#endif
+
+
+
+
+/* The Add22 and Add22 functions, as well as double-double
+multiplications of the Dekker family may be either defined as
+functions, or as #defines.  Which one is better depends on the
+processor/compiler/OS.  As #define has to be used with more care (not
+type-safe), the two following variables should  be set to 1 in the
+development/debugging phase, until no type warning remains.  
+
+*/
+
+#define ADD22_AS_FUNCTIONS 0
+#define DEKKER_AS_FUNCTIONS 0
+#define SQRT_AS_FUNCTIONS 0
+
+/* The conditional version of the Add12 can be implemented either
+   using 3 floating point additions, a absolute value test and 
+   a branch or using 6 floating point additions but no branch.
+   The Add22 sequence is similar. 
+   The branchless versions might be faster on some systems.
+
+   The function versions of Add12Cond and Add22Cond are not 
+   implemented in branchless versions.
+*/
+
+#define AVOID_BRANCHES 1
+
+
+/* setting the following variable adds variables and code for
+   monitoring the performance.
+   Note that sometimes only round to nearest is instrumented */
+#define EVAL_PERF  1
+
+
+#if EVAL_PERF==1
+/* counter of calls to the second step (accurate step) */
+extern int crlibm_second_step_taken;
+#endif
+
+
+
+/* The prototypes of the second steps */
+/* extern void exp_SC(scs_ptr res_scs, double x);*/
+
+
+ 
+
+
+/*
+ * i = d in rounding to nearest
+  The constant added is 2^52 + 2^51 
+ */
+#define DOUBLE2INT(_i, _d)       \
+  {db_number _t;              \
+   _t.d = (_d+6755399441055744.0);  \
+   _i = _t.i[LO];}
+
+
+/* Same idea but beware: works only for |_i| < 2^51 -1 */
+#define DOUBLE2LONGINT(_i, _d)                                        \
+  {                                                                   \
+    db_number _t;                                                     \
+    _t.d = (_d+6755399441055744.0);                                   \
+    if (_d >= 0) /* sign extend */                                    \
+      _i = _t.l & ULL(0007FFFFFFFFFFFF);                              \
+    else                                                              \
+      _i = (_t.l & ULL(0007FFFFFFFFFFFF)) |  (ULL(FFF8000000000000)); \
+  }
+
+
+
+
+
+/* Macros for the rounding tests in directed modes */
+/* After Evgeny Gvozdev pointed out a bug in the rounding procedures I
+   decided to centralize them here 
+
+Note that these tests launch the accurate phase when yl=0, in
+particular in the exceptional cases when the image of a double is a
+double. See the chapter about the log for an example
+
+All this does not work for denormals, of course
+*/
+
+
+#define TEST_AND_RETURN_RU(__yh__, __yl__, __eps__)                    \
+{                                                                      \
+  db_number __yhdb__, __yldb__, u53;  int yh_neg, yl_neg;                          \
+  __yhdb__.d = __yh__;    __yldb__.d = __yl__;                                     \
+  yh_neg = (__yhdb__.i[HI] & 0x80000000);                                    \
+  yl_neg = (__yldb__.i[HI] & 0x80000000);                                    \
+  __yhdb__.l = __yhdb__.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  __yldb__.l = __yldb__.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53.l     = (__yhdb__.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  if(__yldb__.d > __eps__ * u53.d){                                          \
+    if(!yl_neg) {  /* The case yl==0 is filtered by the above test*/   \
+      /* return next up */                                             \
+      __yhdb__.d = __yh__;                                                   \
+      if(yh_neg) __yhdb__.l--;  else __yhdb__.l++; /* Beware: fails for zero */    \
+      return __yhdb__.d ;                                                    \
+    }                                                                  \
+    else  return __yh__;                                               \
+  }                                                                    \
+}
+
+
+#define TEST_AND_RETURN_RD(__yh__, __yl__, __eps__)                    \
+{                                                                      \
+  db_number __yhdb__, __yldb__, u53;  int yh_neg, yl_neg;                          \
+  __yhdb__.d = __yh__;    __yldb__.d = __yl__;                                     \
+  yh_neg = (__yhdb__.i[HI] & 0x80000000);                                    \
+  yl_neg = (__yldb__.i[HI] & 0x80000000);                                    \
+  __yhdb__.l = __yhdb__.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  __yldb__.l = __yldb__.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53.l     = (__yhdb__.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  if(__yldb__.d > __eps__ * u53.d){                                          \
+    if(yl_neg) {   /* The case yl==0 is filtered by the above test*/   \
+      /* return next down */                                           \
+      __yhdb__.d = __yh__;                                                   \
+      if(yh_neg) __yhdb__.l++;  else __yhdb__.l--; /* Beware: fails for zero */    \
+      return __yhdb__.d ;                                                    \
+    }                                                                  \
+    else  return __yh__;                                               \
+  }                                                                    \
+}
+
+
+
+#define TEST_AND_RETURN_RZ(__yh__, __yl__, __eps__)                    \
+{                                                                      \
+  db_number __yhdb__, __yldb__, u53;  int yh_neg, yl_neg;                          \
+  __yhdb__.d = __yh__;    __yldb__.d = __yl__;                                     \
+  yh_neg = (__yhdb__.i[HI] & 0x80000000);                                    \
+  yl_neg = (__yldb__.i[HI] & 0x80000000);                                    \
+  __yhdb__.l = __yhdb__.l & ULL(7fffffffffffffff);  /* compute the absolute value*/\
+  __yldb__.l = __yldb__.l & ULL(7fffffffffffffff);  /* compute the absolute value*/\
+  u53.l     = (__yhdb__.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  if(__yldb__.d > __eps__ * u53.d){                                          \
+    if(yl_neg!=yh_neg) {                                               \
+      __yhdb__.d = __yh__;                                                   \
+      __yhdb__.l--;                          /* Beware: fails for zero */    \
+      return __yhdb__.d ;                                                    \
+    }                                                                  \
+    else  return __yh__;                                               \
+  }                                                                    \
+}
+
+
+
+#define TEST_AND_COPY_RU(__cond__, __res__, __yh__, __yl__, __eps__)   \
+{                                                                      \
+  db_number __yhdb__, __yldb__, u53;  int yh_neg, yl_neg;                          \
+  __yhdb__.d = __yh__;    __yldb__.d = __yl__;                                     \
+  yh_neg = (__yhdb__.i[HI] & 0x80000000);                                    \
+  yl_neg = (__yldb__.i[HI] & 0x80000000);                                    \
+  __yhdb__.l = __yhdb__.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  __yldb__.l = __yldb__.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53.l     = (__yhdb__.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  __cond__ = 0;                                                        \
+  if(__yldb__.d > __eps__ * u53.d){                                          \
+     __cond__ = 1;                                                     \
+    if(!yl_neg) {  /* The case yl==0 is filtered by the above test*/   \
+      /* return next up */                                             \
+      __yhdb__.d = __yh__;                                                   \
+      if(yh_neg) __yhdb__.l--;  else __yhdb__.l++; /* Beware: fails for zero */    \
+      __res__ = __yhdb__.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res__ = __yh__;                                                \
+    }                                                                  \
+  }                                                                    \
+}
+
+#define TEST_AND_COPY_RD(__cond__, __res__, __yh__, __yl__, __eps__)   \
+{                                                                      \
+  db_number __yhdb__, __yldb__, u53;  int yh_neg, yl_neg;                          \
+  __yhdb__.d = __yh__;    __yldb__.d = __yl__;                                     \
+  yh_neg = (__yhdb__.i[HI] & 0x80000000);                                    \
+  yl_neg = (__yldb__.i[HI] & 0x80000000);                                    \
+  __yhdb__.l = __yhdb__.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  __yldb__.l = __yldb__.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53.l     = (__yhdb__.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  __cond__ = 0;                                                        \
+  if(__yldb__.d > __eps__ * u53.d){                                          \
+    __cond__ = 1;                                                      \
+    if(yl_neg) {  /* The case yl==0 is filtered by the above test*/    \
+      /* return next down */                                           \
+      __yhdb__.d = __yh__;                                                   \
+      if(yh_neg) __yhdb__.l++;  else __yhdb__.l--; /* Beware: fails for zero */    \
+      __res__ = __yhdb__.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res__ = __yh__;                                                \
+    }                                                                  \
+  }                                                                    \
+}
+
+
+#define TEST_AND_COPY_RZ(__cond__, __res__, __yh__, __yl__, __eps__)   \
+{                                                                      \
+  db_number __yhdb__, __yldb__, u53;  int yh_neg, yl_neg;                          \
+  __yhdb__.d = __yh__;    __yldb__.d = __yl__;                                     \
+  yh_neg = (__yhdb__.i[HI] & 0x80000000);                                    \
+  yl_neg = (__yldb__.i[HI] & 0x80000000);                                    \
+  __yhdb__.l = __yhdb__.l & ULL(7fffffffffffffff);  /* compute the absolute value*/\
+  __yldb__.l = __yldb__.l & ULL(7fffffffffffffff);  /* compute the absolute value*/\
+  u53.l     = (__yhdb__.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  __cond__ = 0;                                                        \
+  if(__yldb__.d > __eps__ * u53.d){                                          \
+    if(yl_neg!=yh_neg) {                                               \
+      __yhdb__.d = __yh__;                                                   \
+      __yhdb__.l--;                          /* Beware: fails for zero */    \
+      __res__ = __yhdb__.d ;                                                 \
+      __cond__ = 1;                                                    \
+    }                                                                  \
+    else {                                                             \
+      __res__ = __yh__;                                                \
+      __cond__ = 1;                                                    \
+  }                                                                    \
+}
+
+
+
+/* If the processor has a FMA, use it !   **/
+
+/* All this probably works only with gcc. 
+   See Markstein book for the case of HP's compiler */
+
+#if defined(CRLIBM_TYPECPU_POWERPC) && defined(__GNUC__)
+#define PROCESSOR_HAS_FMA 1
+#define FMA(a,b,c)  /* r = a*b + c*/                   \
+({                                                     \
+  double _a, _b,_c,_r;                                 \
+  _a=a; _b=b;_c=c;                                     \
+  __asm__ ("fmadd %0, %1, %2, %3\n ;;\n"               \
+		       : "=f"(_r)                      \
+		       : "f"(_a), "f"(_b), "f"(_c)     \
+		       );                              \
+ _r;                                                   \
+})
+
+
+#define FMS(a,b,c)   /* r = a*b - c*/                 \
+({                                                    \
+  double _a, _b,_c,_r;                                \
+  _a=a; _b=b;_c=c;                                    \
+  __asm__ ("fmsub %0, %1, %2, %3\n ;;\n"              \
+		       : "=f"(_r)                     \
+		       : "f"(_a), "f"(_b), "f"(_c)    \
+		       );                             \
+  _r;                                                 \
+  })
+
+#endif /* defined(CRLIBM_TYPECPU_POWERPC) && defined(__GCC__) */
+
+
+
+
+/* On the Itanium 1 / gcc3.2 we lose 10 cycles when using the FMA !?! 
+   It probably breaks the scheduling algorithms somehow... 
+   To test again with higher gcc versions
+*/ 
+
+#if defined(CRLIBM_TYPECPU_ITANIUM) && defined(__GNUC__)  && !defined(__INTEL_COMPILER) && 0
+#define PROCESSOR_HAS_FMA 1
+#define FMA(a,b,c)  /* r = a*b + c*/                 \
+({                                                   \
+  double _a, _b,_c,_r;                               \
+  _a=a; _b=b;_c=c;                                   \
+  __asm__ ("fma %0 = %1, %2, %3\n ;;\n"              \
+		       : "=f"(_r)                    \
+		       : "f"(_a), "f"(_b), "f"(_c)   \
+		       );                            \
+  _r;                                                \
+})
+
+
+#define FMS(a,b,c)  /* r = a*b - c*/                 \
+({                                                   \
+  double _a, _b, _c, _r;                             \
+  _a=a; _b=b;_c=c;                                   \
+  __asm__ ("fms %0 = %1, %2, %3\n ;;\n"              \
+		       : "=f"(_r)                    \
+		       : "f"(_a), "f"(_b), "f"(_c)   \
+		       );                            \
+  _r;                                                \
+  })
+#endif /* defined(CRLIBM_TYPECPU_ITANIUM) && defined(__GCC__) && !defined(__INTEL_COMPILER) */
+
+
+
+
+#if defined(CRLIBM_TYPECPU_ITANIUM) && defined(__INTEL_COMPILER) 
+#define PROCESSOR_HAS_FMA 1
+#if 0 /* Commented out because it shouldn't be there: There should be
+	 a standard #include doing all this, but as of april 2005
+	 it doesn't exist, say intel people). Leave
+	 it as documentation, though, until it is replaced by #include
+*/
+/* Table 1-17: legal floating-point precision completers (.pc) */
+typedef enum {
+    _PC_S        = 1        /* single .s */
+   ,_PC_D        = 2        /* double .d */
+   ,_PC_NONE     = 3        /* dynamic   */
+} _Asm_pc;
+
+/* Table 1-22: legal getf/setf floating-point register access completers */
+typedef enum {
+    _FR_S        = 1        /* single form      .s   */
+   ,_FR_D        = 2        /* double form      .d   */
+   ,_FR_EXP      = 3        /* exponent form    .exp */
+   ,_FR_SIG      = 4        /* significand form .sig */
+} _Asm_fr_access;
+
+/* Table 1-24: legal floating-point FPSR status field completers (.sf) */
+typedef enum {
+    _SF0         = 0        /* FPSR status field 0 .s0 */
+   ,_SF1         = 1        /* FPSR status field 1 .s1 */
+   ,_SF2         = 2        /* FPSR status field 2 .s2 */
+   ,_SF3         = 3        /* FPSR status field 3 .s3 */
+} _Asm_sf;
+#endif
+
+#define FMA(a,b,c)  /* r = a*b + c*/                 \
+   _Asm_fma( 2/*_PC_D*/, a, b, c, 0/*_SF0*/ );              
+
+
+#define FMS(a,b,c)  /* r = a*b - c*/                 \
+   _Asm_fms( 2/*_PC_D*/, a, b, c, 0/*_SF0*/);              
+
+#endif /*defined(CRLIBM_TYPECPU_ITANIUM) && defined(__INTEL_COMPILER)*/
+
+
+
+
+
+
+
+
+#ifdef WORDS_BIGENDIAN
+ #define DB_ONE    {{0x3ff00000, 0x00000000}}
+#else
+ #define DB_ONE    {{0x00000000 ,0x3ff00000}}
+#endif
+
+
+
+
+
+
+extern const scs scs_zer, scs_half, scs_one, scs_two, scs_sixinv;
+
+
+#define SCS_ZERO    (scs_ptr)(&scs_zer)
+#define SCS_HALF    (scs_ptr)(&scs_half)
+#define SCS_ONE     (scs_ptr)(&scs_one)
+#define SCS_TWO     (scs_ptr)(&scs_two)
+#define SCS_SIXINV  (scs_ptr)(&scs_sixinv)
+
+
+
+
+#if defined(__GNUC__)
+#define ABS(x) (__builtin_fabs((x)))
+#else
+#define ABS(x) (((x)>0) ? (x) : (-(x)))
+#endif
+
+
+
+
+/*
+ * In the following, when an operator is preceded by a '@' it means that we
+ * are considering the IEEE-compliant machine operator, otherwise it
+ * is the mathematical operator.
+ *
+ */
+
+
+/*
+ * computes s and r such that s + r = a + b,  with s = a @+ b exactly 
+ */
+#if AVOID_BRANCHES
+#define Add12Cond(s, r, a, b)      \
+{                                  \
+    double _u1, _u2, _u3, _u4;     \
+    double  _a=a, _b=b;            \
+                                   \
+    s = _a + _b;                   \
+    _u1 = s - _a;                  \
+    _u2 = s - _u1;                 \
+    _u3 = _b - _u1;                \
+    _u4 = _a - _u2;                \
+    r = _u4 + _u3;                 \
+}
+
+#else
+#define Add12Cond(s, r, a, b)      \
+        {double _z, _a=a, _b=b;    \
+         s = _a + _b;              \
+         if (ABS(a) > ABS(b)){     \
+           _z = s - _a;            \
+           r = _b - _z;            \
+         }else {                   \
+           _z = s - _b;            \
+           r = _a - _z;}}                          
+#endif
+
+/*
+ *  computes s and r such that s + r = a + b,  with s = a @+ b exactly 
+ * under the condition  a >= b
+ */
+#define Add12(s, r, a, b)          \
+        {double _z, _a=a, _b=b;    \
+         s = _a + _b;              \
+         _z = s - _a;              \
+         r = _b - _z;   }            
+
+
+/*
+ * computes r1, r2, r3 such that r1 + r2 + r3 = a + b + c exactly 
+ */
+#define Fast3Sum(r1, r2, r3, a, b,  c) \
+        {double u, v, w;               \
+         Fast2Sum(u, v, b, c);         \
+         Fast2Sum(r1, w, a, u);        \
+         Fast2Sum(r2, r3, w, v); }
+
+
+
+
+
+
+
+/*
+ * Functions to computes double-double addition: zh+zl = xh+xl + yh+yl
+ * knowing that xh>yh
+ * relative error is smaller than 2^-103 
+ */
+
+
+#if ADD22_AS_FUNCTIONS
+extern void Add22(double *zh, double *zl, double xh, double xl, double yh, double yl);
+extern void Add22Cond(double *zh, double *zl, double xh, double xl, double yh, double yl);
+
+#else /* ADD22_AS_FUNCTIONS */
+
+#if AVOID_BRANCHES
+#define Add22Cond(zh,zl,xh,xl,yh,yl)                                                   \
+do {                                                                                   \
+  double _v1, _v2, _v3, _v4;                                                           \
+                                                                                       \
+  Add12Cond(_v1, _v2, (xh), (yh));                                                     \
+  _v3 = (xl) + (yl);                                                                   \
+  _v4 = _v2 + _v3;                                                                     \
+  Add12((*(zh)),(*(zl)),_v1,_v4);                                                      \
+} while (2+2==5) 
+#else
+#define Add22Cond(zh,zl,xh,xl,yh,yl)                                                   \
+do {                                                                                   \
+  double _r,_s;                                                                        \
+  _r = (xh)+(yh);                                                                      \
+  _s = ((ABS(xh)) > (ABS(yh)))? ((xh)-_r+(yh)+(yl)+(xl)) : ((yh)-_r+(xh)+(xl)+(yl));   \
+  *zh = _r+_s;                                                                         \
+  *zl = (_r - (*zh)) + _s;                                                             \
+} while(2+2==5)
+#endif
+  
+
+#define Add22(zh,zl,xh,xl,yh,yl)         \
+do {                                     \
+double _r,_s;                            \
+_r = (xh)+(yh);                          \
+_s = ((((xh)-_r) +(yh)) + (yl)) + (xl);  \
+*zh = _r+_s;                             \
+*zl = (_r - (*zh)) + _s;                 \
+} while(0)
+
+#endif /* ADD22_AS_FUNCTIONS */
+
+
+
+#ifdef PROCESSOR_HAS_FMA
+/* One of the nice things with the fused multiply-and-add is that it
+   greatly simplifies the double-double multiplications : */
+#define Mul12(rh,rl,u,v)                             \
+{                                                    \
+  *rh = u*v;                                         \
+  *rl = FMS(u,v, *rh);                               \
+}
+
+#define Mul22(pzh,pzl, xh,xl, yh,yl)                  \
+{                                                     \
+double ph, pl;                                        \
+  ph = xh*yh;                                         \
+  pl = FMS(xh, yh,  ph);                              \
+  pl = FMA(xh,yl, pl);                                \
+  pl = FMA(xl,yh,pl);                                 \
+  *pzh = ph+pl;					      \
+  *pzl = ph - (*pzh);                                 \
+  *pzl += pl;                                         \
+}
+
+
+/* besides we don't care anymore about overflows in the mult  */
+#define Mul12Cond Mul12    
+#define Mul22cond Mul22
+
+
+#else /* ! PROCESSOR_HAS_FMA */
+
+
+#if DEKKER_AS_FUNCTIONS
+extern void Mul12(double *rh, double *rl, double u, double v);
+extern void Mul12Cond(double *rh, double *rl, double a, double b);
+extern void Mul22(double *zh, double *zl, double xh, double xl, double yh, double yl);
+#else /* if DEKKER_AS_FUNCTIONS  */
+/*
+ * computes rh and rl such that rh + rl = a * b with rh = a @* b exactly
+ * under the conditions : a < 2^970 et b < 2^970 
+ */
+#if 1
+#define Mul12(rh,rl,u,v)                        \
+{                                               \
+  const double c  = 134217729.; /* 2^27 +1 */   \
+  double up, u1, u2, vp, v1, v2;                \
+  double _u=u, _v=v;                            \
+  up = _u*c;        vp = _v*c;                  \
+  u1 = (_u-up)+up;  v1 = (_v-vp)+vp;            \
+  u2 = _u-u1;       v2 = _v-v1;                 \
+                                                \
+  *rh = _u*_v;                                  \
+  *rl = (((u1*v1-*rh)+(u1*v2))+(u2*v1))+(u2*v2);\
+}
+#else 
+/* This works but is much slower. Problem:
+ SSE2 instructions are two-address, and intrinsincs are 3-address  */
+#include<emmintrin.h>
+#define Mul12(rh,rl,u,v)                        \
+{                                               \
+  const double c  = 134217729.; /* 2^27 +1 */   \
+ __m128d _u_v = _mm_set_pd (u,v);           \
+ __m128d c2=_mm_set1_pd(c);                    \
+         c2 = _mm_mul_pd(c2, _u_v);          \
+ __m128d u1v1 = _mm_sub_pd(_u_v, c2);        \
+         u1v1 = _mm_add_pd(u1v1, c2);        \
+ __m128d u2v2 = _mm_sub_pd(_u_v, u1v1);        \
+ __m128d _v_u = _mm_shuffle_pd(_u_v, _u_v, _MM_SHUFFLE2 (0,1));      \
+ __m128d rhrh = _mm_mul_pd(_v_u, _u_v);        \
+ _mm_store_sd (rh, rhrh);                      \
+ __m128d v2u2 = _mm_shuffle_pd(u2v2, u2v2, _MM_SHUFFLE2 (0,1));      \
+ __m128d u1v2u2v1 = _mm_mul_pd(u1v1, v2u2);          \
+ __m128d u2v1u1v2 = _mm_shuffle_pd(u1v2u2v1, u1v2u2v1, _MM_SHUFFLE2 (0,1));      \
+ __m128d uvmed = _mm_add_pd(u1v2u2v1, u2v1u1v2);      \
+ __m128d u1u2 = _mm_shuffle_pd(u1v1, u2v2, _MM_SHUFFLE2 (1,1));      \
+ __m128d v1v2 = _mm_shuffle_pd(u1v1, u2v2, _MM_SHUFFLE2 (0,0));      \
+ __m128d u1v1u2v2 = _mm_mul_pd(u1u2, v1v2);          \
+ __m128d tmp = _mm_sub_pd(u1v1u2v2, rhrh);        \
+         tmp = _mm_add_pd(tmp,  uvmed);        \
+ __m128d u2v2u2v2 = _mm_mul_pd(u2v2, v2u2);          \
+         tmp = _mm_add_pd(tmp,  u2v2u2v2);        \
+ _mm_store_sd (rl, tmp);                      \
+}
+#endif
+
+/*
+  double _u =u, _v=v;                           \
+ __m128d _u_v = _mm_set_pd(_u, _v);            \
+*/                                                \
+/*
+ * Computes rh and rl such that rh + rl = a * b and rh = a @* b exactly
+ */
+#define Mul12Cond(rh, rl, a,  b) \
+{\
+  const double two_em53 = 1.1102230246251565404e-16; /* 0x3CA00000, 0x00000000 */\
+  const double two_e53  = 9007199254740992.;         /* 0x43400000, 0x00000000 */\
+  double u, v;                                               \
+  db_number _a=a, _b=b;                                      \
+                                                             \
+  if (_a.i[HI]>0x7C900000) u = _a*two_em53;                  \
+  else            u = _a;                                    \
+  if (_b.i[HI]>0x7C900000) v = _b*two_em53;                  \
+  else            v = _b;                                    \
+                                                             \
+  Mul12(rh, rl, u, v);                                       \
+                                                             \
+  if (_a.i[HI]>0x7C900000) {*rh *= two_e53; *rl *= two_e53;} \
+  if (_b.i[HI]>0x7C900000) {*rh *= two_e53; *rl *= two_e53;} \
+}
+
+
+
+/*
+ * computes double-double multiplication: zh+zl = (xh+xl) *  (yh+yl)
+ * relative error is smaller than 2^-102
+ */
+  
+
+  
+#define Mul22(zh,zl,xh,xl,yh,yl)                      \
+{                                                     \
+double mh, ml;                                        \
+						      \
+  const double c = 134217729.;			      \
+  double up, u1, u2, vp, v1, v2;		      \
+						      \
+  up = (xh)*c;        vp = (yh)*c;		      \
+  u1 = ((xh)-up)+up;  v1 = ((yh)-vp)+vp;	      \
+  u2 = (xh)-u1;       v2 = (yh)-v1;                   \
+  						      \
+  mh = (xh)*(yh);				      \
+  ml = (((u1*v1-mh)+(u1*v2))+(u2*v1))+(u2*v2);	      \
+						      \
+  ml += (xh)*(yl) + (xl)*(yh);			      \
+  *zh = mh+ml;					      \
+  *zl = mh - (*zh) + ml;                              \
+}
+
+
+
+#endif /* DEKKER_AS_FUNCTIONS */
+
+#endif /* PROCESSOR_HAS_FMA */
+
+/* Additional double-double operators */
+
+/* Eps Mul122 <= 2^-102 */
+#define Mul122(resh,resl,a,bh,bl)                 \
+{                                                 \
+    double _t1, _t2, _t3, _t4;                    \
+                                                  \
+    Mul12(&_t1,&_t2,(a),(bh));                    \
+    _t3 = (a) * (bl);                             \
+    _t4 = _t2 + _t3;                              \
+    Add12((*(resh)),(*(resl)),_t1,_t4);           \
+}
+
+/* Eps MulAdd212 <= 2^-100 for |a * (bh + bl)| <= 1/4 * |ch + cl| */
+#define MulAdd212(resh,resl,ch,cl,a,bh,bl)           \
+{                                                    \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7, _t8;   \
+                                                     \
+    Mul12(&_t1,&_t2,(a),(bh));                       \
+    Add12(_t3,_t4,(ch),_t1);                         \
+    _t5 = (bl) * (a);                                \
+    _t6 = (cl) + _t2;                                \
+    _t7 = _t5 + _t6;                                 \
+    _t8 = _t7 + _t4;                                 \
+    Add12((*(resh)),(*(resl)),_t3,_t8);              \
+}
+
+/* Eps MulAdd212 <= 2^-100 
+   for |(ah + bh) * (bh + bl)| <= 1/4 * |ch + cl| 
+*/
+#define MulAdd22(resh,resl,ch,cl,ah,al,bh,bl)        \
+{                                                    \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7, _t8;   \
+    double _t9, _t10;                                \
+                                                     \
+    Mul12(&_t1,&_t2,(ah),(bh));                      \
+    Add12(_t3,_t4,(ch),_t1);                         \
+    _t5 = (ah) * (bl);                               \
+    _t6 = (al) * (bh);                               \
+    _t7 = _t2 + (cl);                                \
+    _t8 = _t4 + _t7;                                 \
+    _t9 = _t5 + _t6;                                 \
+    _t10 = _t8 + _t9;                                \
+    Add12((*(resh)),(*(resl)),_t3,_t10);             \
+}
+
+#define Add122(resh,resl,a,bh,bl)                    \
+{                                                    \
+    double _t1, _t2, _t3;                            \
+                                                     \
+    Add12(_t1,_t2,(a),(bh));                         \
+    _t3 = _t2 + (bl);                                \
+    Add12((*(resh)),(*(resl)),_t1,_t3);              \
+}    
+
+#define Add122Cond(resh,resl,a,bh,bl)                \
+{                                                    \
+    double _t1, _t2, _t3;                            \
+                                                     \
+    Add12Cond(_t1,_t2,(a),(bh));                     \
+    _t3 = _t2 + (bl);                                \
+    Add12((*(resh)),(*(resl)),_t1,_t3);              \
+}    
+
+
+#define Add212(resh,resl,ah,al,b)                    \
+{                                                    \
+    double _t1, _t2, _t3;                            \
+                                                     \
+    Add12(_t1,_t2,(ah),b);                           \
+    _t3 = _t2 + (al);                                \
+    Add12((*(resh)),(*(resl)),_t1,_t3);              \
+}
+
+
+/* In the following the one-line computation of _cl was split so that
+   icc(8.1) would compile it properly. It's a bug of icc */
+
+#if DEKKER_AS_FUNCTIONS
+extern void Div22(double *z, double *zz, double x, double xx, double y, double yy);
+#else
+#define  Div22(pzh,pzl,xh,xl,yh,yl)  {           \
+  double _ch,_cl,_uh,_ul;                        \
+  _ch=(xh)/(yh);   Mul12(&_uh,&_ul,_ch,(yh));    \
+  _cl=((xh)-_uh);                                \
+  _cl -= _ul;                                    \
+  _cl += (xl);                                   \
+  _cl -= _ch*(yl);                               \
+  _cl /= (yh);                                   \
+  *pzh=_ch+_cl;   *pzl=(_ch-(*pzh))+_cl;         \
+}
+#endif /* DEKKER_AS_FUNCTIONS */
+
+
+
+/* 
+   Coefficients for 1/sqrt(m) with 1/2 < m < 2
+   The corresponding relative polynomial approximation error is less than
+   eps < 2^(-8.3127) (cf. Maple file)
+   The Itanium instruction frsqrta is slightly more accurate; it can
+   therefore easily replace the polynomial evaluation.
+*/
+   
+#define SQRTPOLYC0 2.50385236695888790947606139525305479764938354492188e+00   
+#define SQRTPOLYC1 -3.29763389114324168005509818613063544034957885742188e+00  
+#define SQRTPOLYC2 2.75726076139124520736345402838196605443954467773438e+00   
+#define SQRTPOLYC3 -1.15233725777933848632983426796272397041320800781250e+00  
+#define SQRTPOLYC4 1.86900066679800969104974228685023263096809387207031e-01   
+#define SQRTTWO52 4.50359962737049600000000000000000000000000000000000e+15
+
+#if SQRT_AS_FUNCTIONS
+extern void sqrt12(double *resh, double *resl, double x);
+#else
+
+/* Concerning special case handling see crlibm_private.h */
+#define  sqrt12(resh, resl, x)  {                                                            \
+  db_number _xdb;                                                                            \
+  int _E;                                                                                    \
+  double _m, _r0, _r1, _r2, _r3h, _r3l, _r4h, _r4l, _srtmh, _srtml;                          \
+  double _r2PHr2h, _r2PHr2l, _r2Sqh, _r2Sql;                                                 \
+  double _mMr2h, _mMr2l, _mMr2Ch, _mMr2Cl;                                                   \
+  double _MHmMr2Ch, _MHmMr2Cl;                                                               \
+  double _r3Sqh, _r3Sql, _mMr3Sqh, _mMr3Sql;                                                 \
+  double _half;                                                                              \
+                                                                                             \
+  /* Special case x = 0 */                                                                   \
+  if ((x) == 0.0) {                                                                          \
+    (*(resh)) = (x);                                                                         \
+    (*(resl)) = 0.0;                                                                         \
+  } else {                                                                                   \
+                                                                                             \
+    _E = 0;                                                                                  \
+                                                                                             \
+    /* Convert to integer format */                                                          \
+    _xdb.d = (x);                                                                            \
+                                                                                             \
+    /* Handle subnormal case */                                                              \
+    if (_xdb.i[HI] < 0x00100000) {                                                           \
+      _E = -52;                                                                              \
+      _xdb.d *= ((db_number) ((double) SQRTTWO52)).d; 	                                     \
+                      /* make x a normal number */                                           \
+    }                                                                                        \
+                                                                                             \
+    /* Extract exponent E and mantissa m */                                                  \
+    _E += (_xdb.i[HI]>>20)-1023;                                                             \
+    _xdb.i[HI] = (_xdb.i[HI] & 0x000fffff) | 0x3ff00000;                                     \
+    _m = _xdb.d;                                                                             \
+                                                                                             \
+    _half = 0.5;                                                                             \
+    /* Make exponent even */                                                                 \
+    if (_E & 0x00000001) {                                                                   \
+      _E++;                                                                                  \
+      _m *= _half;    /* Suppose now 1/2 <= m <= 2 */                                        \
+    }                                                                                        \
+                                                                                             \
+    /* Construct sqrt(2^E) = 2^(E/2) */                                                      \
+    _xdb.i[HI] = (_E/2 + 1023) << 20;                                                        \
+    _xdb.i[LO] = 0;                                                                          \
+                                                                                             \
+    /* Compute initial approximation to r = 1/sqrt(m) */                                     \
+                                                                                             \
+    _r0 = SQRTPOLYC0 +                                                                       \
+         _m * (SQRTPOLYC1 + _m * (SQRTPOLYC2 + _m * (SQRTPOLYC3 + _m * SQRTPOLYC4)));        \
+                                                                                             \
+    /* Iterate two times on double precision */                                              \
+                                                                                             \
+    _r1 = _half * _r0 * (3.0 - _m * (_r0 * _r0));                                            \
+    _r2 = _half * _r1 * (3.0 - _m * (_r1 * _r1));                                            \
+                                                                                             \
+    /* Iterate two times on double-double precision */                                       \
+                                                                                             \
+    Mul12(&_r2Sqh, &_r2Sql, _r2, _r2);                                                       \
+    Add12(_r2PHr2h, _r2PHr2l, _r2, (_half * _r2));                                           \
+    Mul12(&_mMr2h, &_mMr2l, _m, _r2);                                                        \
+    Mul22(&_mMr2Ch, &_mMr2Cl, _mMr2h, _mMr2l, _r2Sqh, _r2Sql);                               \
+                                                                                             \
+    _MHmMr2Ch = -_half * _mMr2Ch;                                                            \
+    _MHmMr2Cl = -_half * _mMr2Cl;                                                            \
+                                                                                             \
+    Add22(&_r3h, &_r3l, _r2PHr2h, _r2PHr2l, _MHmMr2Ch, _MHmMr2Cl);                           \
+                                                                                             \
+    Mul22(&_r3Sqh, &_r3Sql, _r3h, _r3l, _r3h, _r3l);                                         \
+    Mul22(&_mMr3Sqh, &_mMr3Sql, _m, 0.0, _r3Sqh, _r3Sql);                                    \
+    /* To prove: mMr3Sqh = 1.0 in each case */                                               \
+                                                                                             \
+    Mul22(&_r4h, &_r4l, _r3h, _r3l, 1.0, (-_half * _mMr3Sql));                               \
+                                                                                             \
+    /* Multiply obtained reciprocal square root by m */                                      \
+                                                                                             \
+    Mul22(&_srtmh,&_srtml,_m,0.0,_r4h,_r4l);                                                 \
+                                                                                             \
+    /* Multiply componentwise by sqrt(2^E) */                                                \
+    /* which is an integer power of 2 that may not produce a subnormal */                    \
+                                                                                             \
+    (*(resh)) = _xdb.d * _srtmh;                                                             \
+    (*(resl)) = _xdb.d * _srtml;                                                             \
+                                                                                             \
+  } /* End: special case 0 */                                                                \
+}
+
+
+#define  sqrt12_64(resh, resl, x)  {                                                         \
+  db_number _xdb;                                                                            \
+  int _E;                                                                                    \
+  double _m, _r0, _r1, _r2, _r3h, _r3l, _r4h, _r4l, _srtmh, _srtml;                          \
+  double _r2PHr2h, _r2PHr2l, _r2Sqh, _r2Sql;                                                 \
+  double _mMr2h, _mMr2l, _mMr2Ch, _mMr2Cl;                                                   \
+  double _MHmMr2Ch, _MHmMr2Cl;                                                               \
+  double _r3Sqh, _r3Sql, _mMr3Sqh, _mMr3Sql;                                                 \
+  double _half;                                                                              \
+                                                                                             \
+  /* Special case x = 0 */                                                                   \
+  if ((x) == 0.0) {                                                                          \
+    (*(resh)) = (x);                                                                         \
+    (*(resl)) = 0.0;                                                                         \
+  } else {                                                                                   \
+                                                                                             \
+    _E = 0.0;                                                                                \
+                                                                                             \
+    /* Convert to integer format */                                                          \
+    _xdb.d = (x);                                                                            \
+                                                                                             \
+    /* Handle subnormal case */                                                              \
+    if (_xdb.i[HI] < 0x00100000) {                                                           \
+      _E = -52;                                                                              \
+      _xdb.d *= ((db_number) ((double) SQRTTWO52)).d; 	                                     \
+                      /* make x a normal number */                                           \
+    }                                                                                        \
+                                                                                             \
+    /* Extract exponent E and mantissa m */                                                  \
+    _E += (_xdb.i[HI]>>20)-1023;                                                             \
+    _xdb.i[HI] = (_xdb.i[HI] & 0x000fffff) | 0x3ff00000;                                     \
+    _m = _xdb.d;                                                                             \
+                                                                                             \
+    _half = 0.5;                                                                             \
+    /* Make exponent even */                                                                 \
+    if (_E & 0x00000001) {                                                                   \
+      _E++;                                                                                  \
+      _m *= _half;    /* Suppose now 1/2 <= m <= 2 */                                        \
+    }                                                                                        \
+                                                                                             \
+    /* Construct sqrt(2^E) = 2^(E/2) */                                                      \
+    _xdb.i[HI] = (_E/2 + 1023) << 20;                                                        \
+    _xdb.i[LO] = 0;                                                                          \
+                                                                                             \
+    /* Compute initial approximation to r = 1/sqrt(m) */                                     \
+                                                                                             \
+    _r0 = SQRTPOLYC0 +                                                                       \
+         _m * (SQRTPOLYC1 + _m * (SQRTPOLYC2 + _m * (SQRTPOLYC3 + _m * SQRTPOLYC4)));        \
+                                                                                             \
+    /* Iterate two times on double precision */                                              \
+                                                                                             \
+    _r1 = _half * _r0 * (3.0 - _m * (_r0 * _r0));                                            \
+    _r2 = _half * _r1 * (3.0 - _m * (_r1 * _r1));                                            \
+                                                                                             \
+    /* Iterate once on double-double precision */                                            \
+                                                                                             \
+    Mul12(&_r2Sqh, &_r2Sql, _r2, _r2);                                                       \
+    Add12(_r2PHr2h, _r2PHr2l, _r2, (_half * _r2));                                           \
+    Mul12(&_mMr2h, &_mMr2l, _m, _r2);                                                        \
+    Mul22(&_mMr2Ch, &_mMr2Cl, _mMr2h, _mMr2l, _r2Sqh, _r2Sql);                               \
+                                                                                             \
+    _MHmMr2Ch = -_half * _mMr2Ch;                                                            \
+    _MHmMr2Cl = -_half * _mMr2Cl;                                                            \
+                                                                                             \
+    Add22(&_r3h, &_r3l, _r2PHr2h, _r2PHr2l, _MHmMr2Ch, _MHmMr2Cl);                           \
+                                                                                             \
+    /* Multiply obtained reciprocal square root by m */                                      \
+                                                                                             \
+    Mul22(&_srtmh,&_srtml,_m,0.0,_r3h,_r3l);                                                 \
+                                                                                             \
+    /* Multiply componentwise by sqrt(2^E) */                                                \
+    /* which is an integer power of 2 that may not produce a subnormal */                    \
+                                                                                             \
+    (*(resh)) = _xdb.d * _srtmh;                                                             \
+    (*(resl)) = _xdb.d * _srtml;                                                             \
+                                                                                             \
+  } /* End: special case 0 */                                                                \
+}
+
+/* 
+   sqrt12_64_unfiltered = sqrt(x) * (1 + eps) where abs(eps) <= 2^(-64) 
+   
+   if x is neither subnormal nor 0
+
+*/
+#define  sqrt12_64_unfiltered(resh, resl, x)  {                                              \
+  db_number _xdb;                                                                            \
+  int _E;                                                                                    \
+  double _m, _r0, _r1, _r2, _r3h, _r3l, _srtmh, _srtml;                                      \
+  double _r2PHr2h, _r2PHr2l, _r2Sqh, _r2Sql;                                                 \
+  double _mMr2h, _mMr2l, _mMr2Ch, _mMr2Cl;                                                   \
+  double _MHmMr2Ch, _MHmMr2Cl;                                                               \
+  double _half;                                                                              \
+                                                                                             \
+                                                                                             \
+                                                                                             \
+    /* Convert to integer format */                                                          \
+    _xdb.d = (x);                                                                            \
+                                                                                             \
+                                                                                             \
+    /* Extract exponent E and mantissa m */                                                  \
+    _E = (_xdb.i[HI]>>20)-1023;                                                              \
+    _xdb.i[HI] = (_xdb.i[HI] & 0x000fffff) | 0x3ff00000;                                     \
+    _m = _xdb.d;                                                                             \
+                                                                                             \
+    _half = 0.5;                                                                             \
+    /* Make exponent even */                                                                 \
+    if (_E & 0x00000001) {                                                                   \
+      _E++;                                                                                  \
+      _m *= _half;    /* Suppose now 1/2 <= m <= 2 */                                        \
+    }                                                                                        \
+                                                                                             \
+    /* Construct sqrt(2^E) = 2^(E/2) */                                                      \
+    _xdb.i[HI] = (_E/2 + 1023) << 20;                                                        \
+    _xdb.i[LO] = 0;                                                                          \
+                                                                                             \
+    /* Compute initial approximation to r = 1/sqrt(m) */                                     \
+                                                                                             \
+    _r0 = SQRTPOLYC0 +                                                                       \
+         _m * (SQRTPOLYC1 + _m * (SQRTPOLYC2 + _m * (SQRTPOLYC3 + _m * SQRTPOLYC4)));        \
+                                                                                             \
+    /* Iterate two times on double precision */                                              \
+                                                                                             \
+    _r1 = _half * _r0 * (3.0 - _m * (_r0 * _r0));                                            \
+    _r2 = _half * _r1 * (3.0 - _m * (_r1 * _r1));                                            \
+                                                                                             \
+    /* Iterate once on double-double precision */                                            \
+                                                                                             \
+    Mul12(&_r2Sqh, &_r2Sql, _r2, _r2);                                                       \
+    Add12(_r2PHr2h, _r2PHr2l, _r2, (_half * _r2));                                           \
+    Mul12(&_mMr2h, &_mMr2l, _m, _r2);                                                        \
+    Mul22(&_mMr2Ch, &_mMr2Cl, _mMr2h, _mMr2l, _r2Sqh, _r2Sql);                               \
+                                                                                             \
+    _MHmMr2Ch = -_half * _mMr2Ch;                                                            \
+    _MHmMr2Cl = -_half * _mMr2Cl;                                                            \
+                                                                                             \
+    Add22(&_r3h, &_r3l, _r2PHr2h, _r2PHr2l, _MHmMr2Ch, _MHmMr2Cl);                           \
+                                                                                             \
+    /* Multiply obtained reciprocal square root by m */                                      \
+                                                                                             \
+    Mul122(&_srtmh,&_srtml,_m,_r3h,_r3l);                                                    \
+                                                                                             \
+    /* Multiply componentwise by sqrt(2^E) */                                                \
+    /* which is an integer power of 2 that may not produce a subnormal */                    \
+                                                                                             \
+    (*(resh)) = _xdb.d * _srtmh;                                                             \
+    (*(resl)) = _xdb.d * _srtml;                                                             \
+                                                                                             \
+}
+
+
+
+#endif /*SQRT_AS_FUNCTIONS*/
+
+/* Declaration of the debug function */
+
+void printHexa(char* s, double x);
+
+
+#endif /*CRLIBM_PRIVATE_H*/
diff --git a/src/crlibm/csh_fast.c b/src/crlibm/csh_fast.c
new file mode 100644
index 0000000..e489071
--- /dev/null
+++ b/src/crlibm/csh_fast.c
@@ -0,0 +1,721 @@
+/*
+ * Correctly rounded hyperbolic sine and cosine
+ *
+ * Author : Matthieu Gallet, Florent de Dinechin
+ * 
+ *  This file is part of the crlibm library, developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "csh_fast.h"
+#include "triple-double.h"
+
+void exp13(int *exponent, double *exp_h, double *exp_m, double *exp_l, double x);
+void expm1_13(double *exp_h, double *exp_m, double *exp_l, double x);
+
+/* switches on various printfs. Default 0 */
+#define DEBUG 0
+static const double largest_double = 0x1.fffffffffffffp1023;
+static const double tiniest_double = 0x1.0p-1074;
+
+enum{RN,RD,RU,RZ};
+ 
+static void do_cosh(double x, double* preshi, double* preslo){
+  int k;
+  db_number y;
+  double ch_hi, ch_lo, sh_hi, sh_lo;/* cosh(x) = (ch_hi + ch_lo)*(cosh(k*ln(2)) + (sh_hi + sh_lo)*(sinh(k*ln(2))) */
+  db_number  table_index_float;
+  int table_index;
+  double temp_hi, temp_lo, temp;/* some temporary variables */
+  double b_hi, b_lo,b_ca_hi, b_ca_lo, b_sa_hi, b_sa_lo;
+  double ca_hi, ca_lo, sa_hi, sa_lo; /*will be the tabulated values */
+  double tcb_hi, tsb_hi; /*results of polynomial approximations*/
+  double square_b_hi;
+  double ch_2_pk_hi, ch_2_pk_lo, ch_2_mk_hi, ch_2_mk_lo;
+  double sh_2_pk_hi, sh_2_pk_lo, sh_2_mk_hi, sh_2_mk_lo;
+  db_number two_p_plus_k, two_p_minus_k; /* 2^(k-1) + 2^(-k-1) */
+
+  /* First range reduction*/
+  DOUBLE2INT(k, x * inv_ln_2.d)
+    if (k != 0){ /* b_hi+b_lo =  x - (ln2_hi + ln2_lo) * k */
+      temp_hi = x - ln2_hi.d * k;                                         
+      temp_lo = -ln2_lo.d * k;                                          
+      Add12Cond(b_hi, b_lo, temp_hi, temp_lo); 
+    }
+    else {                                                         
+      b_hi = x;  b_lo = 0.;
+    }                                                               
+  /*we'll construct 2 constants for the last reconstruction */
+  two_p_plus_k.i[LO] = 0;
+  two_p_plus_k.i[HI] = (k-1+1023) << 20;
+  two_p_minus_k.i[LO] = 0;
+  two_p_minus_k.i[HI] = (-k-1+1023) << 20;
+
+  /* at this stage, we've done the first range reduction : we have b_hi + b_lo  between -ln(2)/2 and ln(2)/2 */
+  /* now we can do the second range reduction */
+  /* we'll get the 8 leading bits of b_hi */
+  table_index_float.d = b_hi + two_43_44.d;
+  /*this add do the float equivalent of a rotation to the right, since -0.5 <= b_hi <= 0.5*/
+  table_index = table_index_float.i[LO];/* -89 <= table_index <= 89 */
+  table_index_float.d -= two_43_44.d;
+  table_index += bias; /* to have only positive values */
+  b_hi -= table_index_float.d;/* to remove the 8 leading bits*/
+  /* since b_hi was between -2^-1 and 2^1, we now have b_hi between -2^-9 and 2^-9 */
+
+  
+  y.d = b_hi;
+  /*   first, y�  */
+  square_b_hi = b_hi * b_hi;
+  /* effective computation of the polynomial approximation */
+  
+  if (((y.i[HI])&(0x7FFFFFFF)) < (two_minus_30.i[HI])) {
+    tcb_hi = 0;
+    tsb_hi = 0;
+  }
+  else {
+    /*   second, cosh(y) = y� * (1/2 + y� * (1/24 + y� * 1/720)) */
+    tcb_hi = (square_b_hi)* (c2.d + square_b_hi * (c4.d + square_b_hi * c6.d));
+    tsb_hi = square_b_hi * (s3.d + square_b_hi * (s5.d + square_b_hi * s7.d));
+  }
+ 
+
+  if( table_index != bias) {
+    /* we get the tabulated the tabulated values */
+    ca_hi = cosh_sinh_table[table_index][0].d;
+    ca_lo = cosh_sinh_table[table_index][1].d;
+    sa_hi = cosh_sinh_table[table_index][2].d;
+    sa_lo = cosh_sinh_table[table_index][3].d;
+    
+    /* first reconstruction of the cosh (corresponding to the second range reduction) */
+    Mul12(&b_sa_hi,&b_sa_lo, sa_hi, b_hi);
+    temp =  ((((((ca_lo + (b_hi * sa_lo)) + b_lo * sa_hi) + b_sa_lo) + (b_sa_hi * tsb_hi)) + ca_hi * tcb_hi) + b_sa_hi);
+    Add12Cond(ch_hi, ch_lo, ca_hi, temp);
+      /* first reconstruction for the sinh (corresponding to the second range reduction) */
+  }
+  else {
+    Add12Cond(ch_hi, ch_lo, (double) 1, tcb_hi);
+  }
+
+  
+  if(k != 0) {
+    if( table_index != bias) {
+      /* first reconstruction for the sinh (corresponding to the second range reduction) */
+      Mul12(&b_ca_hi , &b_ca_lo, ca_hi, b_hi);
+      temp = (((((sa_lo + (b_lo * ca_hi)) + (b_hi * ca_lo)) + b_ca_lo) + (sa_hi*tcb_hi)) + (b_ca_hi * tsb_hi));
+      Add12(temp_hi, temp_lo, b_ca_hi, temp);
+      Add22Cond(&sh_hi, &sh_lo, sa_hi, (double) 0, temp_hi, temp_lo);
+    }
+    else {
+      Add12Cond(sh_hi, sh_lo, b_hi, tsb_hi * b_hi + b_lo);
+    }
+    if((k < 35) && (k > -35) )
+      {
+	ch_2_pk_hi = ch_hi * two_p_plus_k.d;
+	ch_2_pk_lo = ch_lo * two_p_plus_k.d;
+	ch_2_mk_hi = ch_hi * two_p_minus_k.d;
+	ch_2_mk_lo = ch_lo * two_p_minus_k.d;
+	sh_2_pk_hi = sh_hi * two_p_plus_k.d;
+	sh_2_pk_lo = sh_lo * two_p_plus_k.d;
+	sh_2_mk_hi = - sh_hi * two_p_minus_k.d;
+	sh_2_mk_lo = - sh_lo * two_p_minus_k.d;
+	
+	Add22Cond(preshi, preslo, ch_2_mk_hi, ch_2_mk_lo, sh_2_mk_hi, sh_2_mk_lo);
+	Add22Cond(&ch_2_mk_hi, &ch_2_mk_lo , sh_2_pk_hi, sh_2_pk_lo, *preshi, *preslo);
+	Add22Cond(preshi, preslo, ch_2_pk_hi, ch_2_pk_lo, ch_2_mk_hi, ch_2_mk_lo);
+      } 
+    else if (k >= 35) 
+      {
+	ch_2_pk_hi = ch_hi * two_p_plus_k.d;
+	ch_2_pk_lo = ch_lo * two_p_plus_k.d;
+	sh_2_pk_hi = sh_hi * two_p_plus_k.d;
+	sh_2_pk_lo = sh_lo * two_p_plus_k.d;
+	Add22Cond(preshi, preslo, ch_2_pk_hi, ch_2_pk_lo, sh_2_pk_hi, sh_2_pk_lo);
+      }
+    else /* if (k <= -35) */ 
+      {
+	ch_2_mk_hi = ch_hi * two_p_minus_k.d;
+	ch_2_mk_lo = ch_lo * two_p_minus_k.d;
+	sh_2_mk_hi = - sh_hi * two_p_minus_k.d;
+	sh_2_mk_lo = - sh_lo * two_p_minus_k.d;
+	Add22Cond(preshi, preslo, ch_2_mk_hi, ch_2_mk_lo, sh_2_mk_hi, sh_2_mk_lo);
+      }
+  }
+  else {
+    *preshi = ch_hi;
+    *preslo = ch_lo;
+  }
+
+  return;
+}
+
+
+
+static void do_cosh_accurate(int* pexponent, 
+			     double* presh, double* presm, double* presl, 
+			     double x){
+  double exph, expm, expl;
+  double expph, exppm, exppl;
+  int exponentm, deltaexponent;
+  db_number  expmh, expmm, expml;
+
+#if EVAL_PERF==1
+  crlibm_second_step_taken++;
+#endif
+
+  if(x<0)
+    x=-x;
+  if (x > 40.0) {  /* then exp(-x) < 2^-118 exp(x) */
+    exp13(pexponent, presh, presm, presl, x);
+  }
+  else { 
+    exp13(pexponent, &expph, &exppm, &exppl, x);
+    exp13(&exponentm, &(expmh.d), &(expmm.d), &(expml.d), -x);
+    /* align the mantissas. 
+       The exponent is increased but stays well below overflow threshold */
+    deltaexponent =  exponentm - *pexponent ; 
+    expmh.i[HI] += (deltaexponent) << 20;  
+    expmm.i[HI] += (deltaexponent) << 20;  
+    expml.i[HI] += (deltaexponent) << 20;  
+    Add33(&exph, &expm, &expl, expph, exppm, exppl,   expmh.d, expmm.d, expml.d);
+    Renormalize3(presh,presm,presl, exph, expm, expl);
+  }
+}
+
+
+
+double cosh_rn(double x){ 
+  db_number y;
+  int hx;
+  double rh, rl;
+    
+  y.d = x;
+  hx = y.i[HI] & 0x7FFFFFFF; 
+
+  /* Filter special cases */
+  if (hx > max_input_csh.i[HI]) { /* strictly greater, implies x > max_input_csh */
+    if (hx >= 0x7ff00000){  /* Infty or NaN */ 
+      if (((hx&0x000fffff)|y.i[LO])!=0)
+	return x+x;                                        /* Nan */ 
+      else {/* otherwise the result should be +infty */
+	y.i[HI] = 0x7FF00000; 
+	return (y.d);
+      }
+    }
+  }
+  if (x >= max_input_csh.d || x <= -max_input_csh.d) 
+    return largest_double * largest_double;     /* overflow  */ 
+  if (hx<0x3e500000) {
+    if(x==0) 
+      return 1.0; /* exact */
+    else 
+      return (1.0+tiniest_double); /* to raise inexact flag */
+  }
+
+  do_cosh(x, &rh, &rl);
+
+  
+  if (rh == (rh + (rl * round_cst_csh))) return rh;
+  else{
+    int exponent;
+    db_number res;
+    double  resh, resm, resl;
+
+    do_cosh_accurate(&exponent, &resh,&resm, &resl, x);
+    RoundToNearest3(&(res.d), resh, resm, resl);
+
+    /* Now we have to set the exponent of res as exponent -1 (division
+       by 2). However, as res may sometimes end up infinite, we first
+       set the exponent to exponent -11 and then multiply by 2^10,
+       which will cater for overflow  */  
+    res.i[HI] += (exponent-11) << 20;  
+    return 1024. * res.d;
+  }  
+}
+
+
+
+
+
+
+
+
+double cosh_ru(double x){ 
+  db_number y;
+  int hx;
+  double rh, rl;
+
+  y.d = x;
+  hx = y.i[HI] & 0x7FFFFFFF; 
+
+  if (hx > max_input_csh.i[HI]) {
+    /* if NaN, return it */
+    if (((hx&0x7FF00000) == 0x7FF00000) && (((y.i[HI] & 0x000FFFFF)!=0) || (y.i[LO]!=0)) )
+      return x;
+    else {/* otherwise the result should be +infty */
+      y.i[LO] = 0; y.i[HI] = 0x7FF00000; return (y.d);
+    }
+  }
+  
+  if (x >= max_input_csh.d || x <= -max_input_csh.d) 
+    return largest_double * largest_double;     /* overflow  */ 
+
+  if (hx<0x3e500000) { /* return the successor of 1 */
+    if(x==0.) return 1.0;
+    else{
+      y.l = 0x3ff0000000000001LL;
+      return y.d;
+    }
+  }
+
+  do_cosh(x, &rh, &rl);
+
+  TEST_AND_RETURN_RU(rh, rl, maxepsilon_csh);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  {
+    int exponent;
+    db_number res;
+    double resh, resm, resl;
+
+    do_cosh_accurate(&exponent, &resh,&resm, &resl, x);
+    RoundUpwards3(&(res.d), resh,resm,resl);
+
+    /* Now we have to set the exponent of res as exponent -1 (division
+       by 2). However, as res may sometimes end up infinite, we first
+       set the exponent to exponent -11 and then multiply by 2^10,
+       which will cater for overflow  */  
+    res.i[HI] += (exponent-11) << 20;  
+    return 1024. * res.d;
+  }  
+}
+
+
+
+double cosh_rd(double x){ 
+  db_number y;
+  int hx;
+  double rh, rl;
+
+  y.d = x;
+  hx = y.i[HI] & 0x7FFFFFFF; 
+
+
+  if (hx > max_input_csh.i[HI]) {
+    if (hx >= 0x7FF00000) {    /*particular cases : QNaN, SNaN, +- oo*/
+      if (((hx&0x7FF00000) == 0x7FF00000) && (((y.i[HI] & 0x000FFFFF)!=0) || (y.i[LO]!=0)) )
+	return x; /* NaN */
+      else { /* infinity */ 
+	y.i[HI] = hx;
+	return (y.d);
+      }
+    }
+  }
+
+  if (y.d >= max_input_csh.d || y.d  <= - max_input_csh.d) { /* out of range */
+    y.i[LO] = 0xFFFFFFFF; y.i[HI] = 0x7FEFFFFF ; return (y.d);
+  }
+    
+  if (hx<0x3e500000)
+    return (1.0); 
+
+  do_cosh(x, &rh, &rl);
+
+  TEST_AND_RETURN_RD(rh, rl, maxepsilon_csh);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  {
+    int exponent;
+    db_number res;
+    double resh, resm, resl;
+
+    do_cosh_accurate(&exponent, &resh,&resm, &resl, x);
+    RoundDownwards3(&(res.d), resh,resm,resl);
+
+    /* Now we have to set the exponent of res as exponent -1 (division
+       by 2). However, as res may sometimes end up infinite, we first
+       set the exponent to exponent -11 and then multiply by 2^10,
+       which will cater for overflow  */  
+    res.i[HI] += (exponent-11) << 20;  
+    return 1024. * res.d;
+  }  
+}
+
+
+
+double cosh_rz(double x){ 
+  return(cosh_rd(x));/* cosh is always positive, so rounding to -infinite is equivalent to rounding to zero */
+}
+
+
+
+
+
+
+
+
+
+
+static void do_sinh(double x, double* prh, double* prl){ 
+
+  int k;
+  db_number y;
+  double temp1;
+  double ch_hi, ch_lo, sh_hi, sh_lo;/* cosh(x) = (sh_hi + sh_lo)*(cosh(k*ln(2)) + (ch_hi + ch_lo)*(sinh(k*ln(2))) */
+  db_number  table_index_float;
+  int table_index;
+  double ch_2_pk_hi, ch_2_pk_lo, ch_2_mk_hi, ch_2_mk_lo;
+  double sh_2_pk_hi, sh_2_pk_lo, sh_2_mk_hi, sh_2_mk_lo;
+  double b_hi, b_lo;
+  double ca_b_hi, ca_b_lo, temp_hi, temp_lo, sa_b_hi, sa_b_lo;
+  double ca_hi, ca_lo, sa_hi, sa_lo; /*tabulated values */
+  double tcb_hi,  tsb_hi; /*results of polynomial approximations*/
+  db_number two_p_plus_k, two_p_minus_k; /* 2^(k-1) + 2^(-k-1) */
+  double square_y_hi;
+  
+  /* Now we can do the first range reduction*/
+  DOUBLE2INT(k, x * inv_ln_2.d)
+    if (k != 0){ /* b_hi + b_lo =  x - (ln2_hi + ln2_lo) * k */
+      temp_hi = x - ln2_hi.d * k;                                         
+      temp_lo = -ln2_lo.d * k;                                          
+      Add12Cond(b_hi, b_lo, temp_hi, temp_lo); 
+    }
+    else {                                                         
+      b_hi = x;  b_lo = 0.;
+    }                                                               
+
+  /*we'll construct 2 constants for the last reconstruction */
+  two_p_plus_k.i[LO] = 0;
+  two_p_plus_k.i[HI] = (k-1+1023) << 20;
+  two_p_minus_k.i[LO] = 0;
+  two_p_minus_k.i[HI] = (-k-1+1023) << 20;
+
+  /* at this stage, we've done the first range reduction : we have b_hi + b_lo  between -ln(2)/2 and ln(2)/2 */
+  /* now we can do the second range reduction */
+  /* we'll get the 8 leading bits of r_hi */
+  
+  table_index_float.d = b_hi + two_43_44.d;
+  /*this add do the float equivalent of a rotation to the right, since -0.5 <= b_hi <= 0.5*/
+  table_index = table_index_float.i[LO];/* -89 <= table_index <= 89 */
+  table_index_float.d -= two_43_44.d;
+  table_index += bias; /* to have only positive values */
+  b_hi -= table_index_float.d;/* to remove the 8 leading bits*/
+  /* since b_hi was between -2^-1 and 2^1, we now have b_hi between -2^-9 and 2^-9 */
+  
+  y.d = b_hi;
+  /*   first, y� = square_y_hi + square_y_lo  */
+  square_y_hi = b_hi * b_hi;
+  /* effective computation of the polyomial approximation */
+  if (((y.i[HI])&(0x7FFFFFFF)) <= (two_minus_30.i[HI])) {
+    tsb_hi = 0;
+    tcb_hi = 0;
+  }
+  else {
+    tsb_hi = square_y_hi * (s3.d + square_y_hi * (s5.d + square_y_hi * s7.d));
+    /*   second, cosh(y) = y� * (1/2 + y� * (1/24 + y� * 1/720)) */
+    tcb_hi = (square_y_hi)* (c2.d + square_y_hi * (c4.d + square_y_hi * c6.d));
+  }
+  
+  if( table_index != bias) {
+    /* we get the tabulated the tabulated values*/
+    ca_hi = cosh_sinh_table[table_index][0].d;
+    ca_lo = cosh_sinh_table[table_index][1].d;
+    sa_hi = cosh_sinh_table[table_index][2].d;
+    sa_lo = cosh_sinh_table[table_index][3].d;
+
+    /* first reconstruction for the sinh (corresponding to the second range reduction) */
+    temp1 = sa_lo;
+    temp1 += b_lo * ca_hi;
+    temp1 += b_hi * ca_lo;
+    Mul12(&ca_b_hi, &ca_b_lo, ca_hi, b_hi);
+    temp1 += ca_b_lo;
+    temp1 += sa_hi * tcb_hi;
+    temp1 += ca_b_hi * tsb_hi;
+    Add12Cond(temp_hi, temp_lo, ca_b_hi, temp1);
+    Add22Cond(&sh_hi, &sh_lo, sa_hi, (double) 0, temp_hi, temp_lo);
+    /* first reconstruction of the cosh (corresponding to the second range reduction) */
+    temp1 = ca_lo;
+    Mul12(&sa_b_hi,&sa_b_lo, sa_hi, b_hi);
+    temp1 += b_hi * sa_lo;
+    temp1 += b_lo * sa_hi;
+    temp1 += sa_b_lo;
+    temp1 += sa_b_hi * tsb_hi;
+    temp1 += ca_hi * tcb_hi;
+    temp1 += sa_b_hi;
+    Add12Cond(ch_hi, ch_lo, ca_hi, temp1);
+  }
+  else {
+    Add12Cond(sh_hi, sh_lo, b_hi, tsb_hi * b_hi + b_lo);
+    Add12Cond(ch_hi, ch_lo, (double) 1, tcb_hi);
+  }
+    
+  if(k != 0) {
+    if( (k < 35) && (k > -35) ) {
+	ch_2_pk_hi = ch_hi * two_p_plus_k.d;
+	ch_2_pk_lo = ch_lo * two_p_plus_k.d;
+	ch_2_mk_hi = - ch_hi * two_p_minus_k.d;
+	ch_2_mk_lo = - ch_lo * two_p_minus_k.d;
+	sh_2_pk_hi = sh_hi * two_p_plus_k.d;
+	sh_2_pk_lo = sh_lo * two_p_plus_k.d;
+	sh_2_mk_hi = sh_hi * two_p_minus_k.d;
+	sh_2_mk_lo = sh_lo * two_p_minus_k.d;
+
+	Add22Cond(prh, prl, ch_2_mk_hi, ch_2_mk_lo, sh_2_mk_hi, sh_2_mk_lo);
+	Add22Cond(&ch_2_mk_hi, &ch_2_mk_lo , sh_2_pk_hi, sh_2_pk_lo, *prh, *prl);
+	Add22Cond(prh, prl, ch_2_pk_hi, ch_2_pk_lo, ch_2_mk_hi, ch_2_mk_lo);
+    }
+    else if (k >= 35) 
+      {
+	ch_2_pk_hi = ch_hi * two_p_plus_k.d;
+	ch_2_pk_lo = ch_lo * two_p_plus_k.d;
+	sh_2_pk_hi = sh_hi * two_p_plus_k.d;
+	sh_2_pk_lo = sh_lo * two_p_plus_k.d;
+	Add22Cond(prh, prl, ch_2_pk_hi, ch_2_pk_lo, sh_2_pk_hi, sh_2_pk_lo);
+      }
+    else 
+      {
+	ch_2_mk_hi = - ch_hi * two_p_minus_k.d;
+	ch_2_mk_lo = - ch_lo * two_p_minus_k.d;
+	sh_2_mk_hi = sh_hi * two_p_minus_k.d;
+	sh_2_mk_lo = sh_lo * two_p_minus_k.d;
+	Add22Cond(prh, prl, ch_2_mk_hi, ch_2_mk_lo, sh_2_mk_hi, sh_2_mk_lo);
+      }
+  }
+  else {
+    *prh = sh_hi;
+    *prl = sh_lo;
+  }
+}
+
+
+
+
+
+static void do_sinh_accurate(int* pexponent, 
+			     double* presh, double* presm, double* presl, 
+			     double x){
+  double exph, expm, expl;
+  double expph, exppm, exppl, expmh, expmm, expml;
+
+#if EVAL_PERF==1
+  crlibm_second_step_taken++;
+#endif
+
+  if(x > 40.0) { /* then exp(-x) < 2^-129 exp(x) */ 
+    exp13(pexponent, presh, presm, presl, x);
+    return;
+  }
+  if(x < -40.0) { /* then exp(x) < 2^-129 exp(-x) */ 
+    exp13(pexponent, presh, presm, presl, -x);
+    *presh = -*presh;
+    *presm = -*presm;
+    *presl = -*presl;
+    return;
+  }
+  /* Otherwise we are between -40 and 40, and we also know that |x| > 2^-25 */
+  if(x>0.0) {
+    expm1_13(&expph, &exppm, &exppl, x);
+    expm1_13(&expmh, &expmm, &expml, -x);
+    /* The following is OK because expph and  -expmh have the same sign */
+    Add33(&exph, &expm, &expl, expph, exppm, exppl,   -expmh, -expmm, -expml);
+    Renormalize3(presh,presm,presl, exph, expm, expl);
+    *pexponent=0;
+    return;
+  }
+  else  { /* x<0 */
+    expm1_13(&expph, &exppm, &exppl, x);
+    expm1_13(&expmh, &expmm, &expml, -x);
+    /* The following is OK because expph and  -expmh have the same sign */
+    Add33(&exph, &expm, &expl,   -expmh, -expmm, -expml, expph, exppm, exppl);
+    Renormalize3(presh,presm,presl, exph, expm, expl);
+    *pexponent=0;
+    return;
+  }
+}
+
+
+
+
+double sinh_rn(double x){ 
+  db_number y;
+  int hx;
+  double rh, rl;
+    
+
+  y.d = x;
+  hx = y.i[HI] & 0x7FFFFFFF; 
+
+  /* Filter special cases */
+  if (hx > max_input_csh.i[HI]) { /* strictly greater, implies x > max_input_csh */
+    if (hx >= 0x7ff00000){ /* infinity or NaN */
+      if (((hx&0x000fffff)|y.i[LO])!=0)
+	return x+x;                                        /* NaN */ 
+      else {/* otherwise the result should be +infty */
+	return (y.d);
+      }
+    }
+    if (x > max_input_csh.d) 
+      return largest_double * largest_double;     /* overflow  */ 
+    if (x < -max_input_csh.d) 
+      return -largest_double * largest_double;     /* overflow  */ 
+  }
+
+  if (hx<0x3e500000) {
+      return x; /* exact, we should find some way of raising the inexact flag */
+  }
+
+  
+  do_sinh(x, &rh, &rl);
+
+  if (rh == (rh + (rl * round_cst_csh))) return rh;
+  else{
+    int exponent;
+    db_number res;
+    double  resh, resm, resl;
+
+    do_sinh_accurate(&exponent, &resh,&resm, &resl, x);
+    RoundToNearest3(&(res.d), resh, resm, resl);
+
+    /* Now we have to set the exponent of res as exponent -1 (division
+       by 2). However, as res may sometimes end up infinite, we first
+       set the exponent to exponent -11 and then multiply by 2^10,
+       which will cater for overflow  */  
+    res.i[HI] += (exponent-11) << 20;  
+    return 1024. * res.d;
+  }  
+
+}
+
+
+
+double sinh_ru(double x){ 
+  db_number y;
+  double rh, rl;
+
+
+  y.d = x;
+  y.i[HI] = y.i[HI] & 0x7FFFFFFF;     /* to get the absolute value of the input */
+  if ((y.i[HI] & 0x7FF00000) >= (0x7FF00000)) {    /*particular cases : QNaN, SNaN, +- oo*/
+   return (x);
+  }
+  if (y.d > max_input_csh.d) { /* out of range */
+    if(x>0) {
+      y.i[LO] = 0; y.i[HI] = 0x7FF00000; return (y.d);
+    }
+    else {
+      y.i[LO] = 0xFFFFFFFF; y.i[HI] = 0xFFEFFFFF ; return (y.d);
+    }
+  }
+
+  if(y.i[HI] < 0x3e500000) /* 2^(-26) */
+    { /* Add one ulp if x positive */
+      if(x>0) { 
+	y.l++;
+	return y.d;
+      }
+      else
+	return x;
+    }
+
+  do_sinh(x, &rh, &rl);
+
+  TEST_AND_RETURN_RU(rh, rl, maxepsilon_csh);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  {
+    int exponent;
+    db_number res;
+    double resh, resm, resl;
+
+    do_sinh_accurate(&exponent, &resh,&resm, &resl, x);
+    RoundUpwards3(&(res.d), resh,resm,resl);
+
+    /* Now we have to set the exponent of res as exponent -1 (division
+       by 2). However, as res may sometimes end up infinite, we first
+       set the exponent to exponent -11 and then multiply by 2^10,
+       which will cater for overflow  */  
+    res.i[HI] += (exponent-11) << 20;  
+    return 1024. * res.d;
+  }  
+}
+
+
+double sinh_rd(double x){ 
+  db_number y;
+  double rh, rl;
+
+  y.d = x;
+  y.i[HI] = y.i[HI] & 0x7FFFFFFF;     /* to get the absolute value of the input */
+  if ((y.i[HI] & 0x7FF00000) >= (0x7FF00000)) {    /*particular cases : QNaN, SNaN, +- oo*/
+    y.d = x;
+   return (y.d);
+  }
+  if (y.d > max_input_csh.d) { /* out of range */
+    if(x>0) {
+      y.i[LO] = 0xFFFFFFFF; y.i[HI] = 0x7FEFFFFF ; return (y.d);
+    }
+    else {
+      y.i[LO] = 0; y.i[HI] = 0xFFF00000; return (y.d);
+    }
+  }
+  if(y.i[HI] < 0x3e500000) /* 2^(-26) */
+    { /* Add one ulp and restore the sign if x negative */
+      if(x<0){
+	y.l = (y.l+1); 
+	return -y.d;
+      } 
+      else 
+	return x;      
+    }
+  do_sinh(x, &rh, &rl);
+  
+  TEST_AND_RETURN_RD(rh, rl, maxepsilon_csh);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  {
+    int exponent;
+    db_number res;
+    double resh, resm, resl;
+
+    do_sinh_accurate(&exponent, &resh,&resm, &resl, x);
+    RoundDownwards3(&(res.d), resh,resm,resl);
+
+    /* Now we have to set the exponent of res as exponent -1 (division
+       by 2). However, as res may sometimes end up infinite, we first
+       set the exponent to exponent -11 and then multiply by 2^10,
+       which will cater for overflow  */  
+    res.i[HI] += (exponent-11) << 20;  
+    return 1024. * res.d;
+  }  
+}
+
+
+
+
+double sinh_rz(double x){ 
+  if( x > 0) {
+    return(sinh_rd(x));
+  }
+  else {
+    return(sinh_ru(x));
+  }
+}
+
diff --git a/src/crlibm/csh_fast.h b/src/crlibm/csh_fast.h
new file mode 100644
index 0000000..251df8e
--- /dev/null
+++ b/src/crlibm/csh_fast.h
@@ -0,0 +1,771 @@
+
+ /* File generated by maple/csh.mpl */ 
+
+ static double maxepsilon_csh = 7.691977781471974651029816959786e-19 ;
+ static double round_cst_csh  = 1.014076581900344724984466743033e+00 ;
+
+#ifdef WORDS_BIGENDIAN  
+  static db_number const inv_ln_2 =     {{0x3FF71547,0x652B82FE}};     /*1.4426950409e+00*/  
+  static db_number const ln2_hi =       {{0x3FE62E42,0xFEFA3800}};     /*6.9314718056e-01*/  
+  static db_number const ln2_lo =       {{0x3D2EF357,0x93C76730}};     /*5.4979230187e-14*/  
+  static db_number const two_43_44 =    {{0x42B80000,0x00000000}};     /*2.6388279067e+13*/  
+  static db_number const two_minus_30 = {{0x3D700000,0x00000000}};     /*9.0949470177e-13*/  
+  static int const bias = 89 ;
+
+/* some bounds */ 
+  static db_number const max_input_csh =  {{0x408633CE,0x8FB9F87E}};     /*7.1047586007e+02*/  
+
+  static const db_number cosh_sinh_table[179][4] = { 
+	{{{0x3FF0FA08, 0xD2F35F97}}, {{0x3C9B39D1, 0x9DAB3AF1}},
+	  {{0xBFD6B36F, 0xBB84C928}}, {{0xBC68DAF8, 0xFEFE1E5F}}},
+	{{{0x3FF0F464, 0x73177841}}, {{0xBC97DF60, 0x29551C51}},
+	  {{0xBFD66F92, 0xE6A06FC9}}, {{0x3C70A785, 0xD9A66B42}}},
+	{{{0x3FF0EED1, 0x07A16DB4}}, {{0x3C988108, 0xD3E071F5}},
+	  {{0xBFD62BCC, 0x8150DBAB}}, {{0xBC7700BD, 0xF95D00CA}}},
+	{{{0x3FF0E94E, 0x8AFDD406}}, {{0xBC9330CB, 0xB0B14F49}},
+	  {{0xBFD5E81C, 0x47CFA1DB}}, {{0x3C791EC5, 0x4E7B2C63}}},
+	{{{0x3FF0E3DC, 0xF7AA2E1B}}, {{0x3C9C05BD, 0xF7FB3140}},
+	  {{0xBFD5A481, 0xF66C8331}}, {{0xBC6E8E0C, 0xCFF78DD1}}},
+	{{{0x3FF0DE7C, 0x4834E82E}}, {{0xBC877BEC, 0x5F430E44}},
+	  {{0xBFD560FD, 0x498D28AA}}, {{0x3C4F07B3, 0xCCEA8A26}}},
+	{{{0x3FF0D92C, 0x773D5255}}, {{0xBC84956C, 0x3D5D1DA2}},
+	  {{0xBFD51D8D, 0xFDACDFC5}}, {{0x3C419F0E, 0x98966B86}}},
+	{{{0x3FF0D3ED, 0x7F739B28}}, {{0xBC99722F, 0xEA8A9ED5}},
+	  {{0xBFD4DA33, 0xCF5C5703}}, {{0xBC7B1F07, 0x7BE71FBE}}},
+	{{{0x3FF0CEBF, 0x5B98CA6C}}, {{0x3C9E8080, 0x09B9F220}},
+	  {{0xBFD496EE, 0x7B415A78}}, {{0x3C51C3BA, 0xBDFE61F1}}},
+	{{{0x3FF0C9A2, 0x067EBBDA}}, {{0x3C813CD8, 0x803D61F3}},
+	  {{0xBFD453BD, 0xBE16906C}}, {{0xBC78D781, 0x45D8536E}}},
+	{{{0x3FF0C495, 0x7B0819E9}}, {{0x3C9A26E0, 0x6E52BA24}},
+	  {{0xBFD410A1, 0x54AB361D}}, {{0x3C78DCB6, 0xCF7DA2E8}}},
+	{{{0x3FF0BF99, 0xB42858B8}}, {{0xBC67AD83, 0x0B1F30A5}},
+	  {{0xBFD3CD98, 0xFBE2DC86}}, {{0x3C7D0A5E, 0x269038FC}}},
+	{{{0x3FF0BAAE, 0xACE3B0FC}}, {{0xBC93292F, 0x75521E77}},
+	  {{0xBFD38AA4, 0x70B52549}}, {{0x3C67F94B, 0x0B01B8A6}}},
+	{{{0x3FF0B5D4, 0x604F1B07}}, {{0x3C732C14, 0x07EECFA5}},
+	  {{0xBFD347C3, 0x702D7FA4}}, {{0xBC7435BE, 0x701422C8}}},
+	{{{0x3FF0B10A, 0xC99049DE}}, {{0xBC617C2D, 0x610FCC2E}},
+	  {{0xBFD304F5, 0xB76AE57E}}, {{0x3C75EB09, 0x42E4CA9C}}},
+	{{{0x3FF0AC51, 0xE3DDA65B}}, {{0x3C9B22C0, 0x9DACA977}},
+	  {{0xBFD2C23B, 0x039F9881}}, {{0xBC577301, 0x9B082732}}},
+	{{{0x3FF0A7A9, 0xAA7E4A68}}, {{0x3C71B296, 0x281520E0}},
+	  {{0xBFD27F93, 0x1210DF54}}, {{0x3C6EF999, 0x502A1E59}}},
+	{{{0x3FF0A312, 0x18C9FC41}}, {{0x3C885259, 0x09E044C2}},
+	  {{0xBFD23CFD, 0xA016C2D9}}, {{0x3C500762, 0x449D986B}}},
+	{{{0x3FF09E8B, 0x2A2929D1}}, {{0xBC9EE5F5, 0x535446B4}},
+	  {{0xBFD1FA7A, 0x6B1BCB8A}}, {{0xBC50621A, 0x5A4CB636}}},
+	{{{0x3FF09A14, 0xDA14E415}}, {{0xBC965668, 0x233B29C8}},
+	  {{0xBFD1B809, 0x309CBEE1}}, {{0xBC6E5B16, 0xBBB1CB75}}},
+	{{{0x3FF095AF, 0x2416DA9A}}, {{0x3C8024A0, 0x39DC7749}},
+	  {{0xBFD175A9, 0xAE285CD6}}, {{0x3C3DB749, 0xC4496E39}}},
+	{{{0x3FF0915A, 0x03C95705}}, {{0x3C78A8A6, 0x0BD1CD00}},
+	  {{0xBFD1335B, 0xA15F1D6C}}, {{0x3C53CE0F, 0x341ED7B6}}},
+	{{{0x3FF08D15, 0x74D738AC}}, {{0xBC984BD5, 0xC4A8C043}},
+	  {{0xBFD0F11E, 0xC7F2EE53}}, {{0xBC75BADF, 0xC5355AFC}}},
+	{{{0x3FF088E1, 0x72FBF041}}, {{0xBC9DE12F, 0x0D55140F}},
+	  {{0xBFD0AEF2, 0xDFA6F09B}}, {{0x3C414E60, 0xA7827088}}},
+	{{{0x3FF084BD, 0xFA037B8F}}, {{0xBC7D97E2, 0xE3C5EBFC}},
+	  {{0xBFD06CD7, 0xA64F3673}}, {{0xBC6370BA, 0x839871E4}}},
+	{{{0x3FF080AB, 0x05CA6146}}, {{0xBC723216, 0xFC66378F}},
+	  {{0xBFD02ACC, 0xD9D08102}}, {{0x3C5998B3, 0x20C03715}}},
+	{{{0x3FF07CA8, 0x923DACD6}}, {{0xBC9653A7, 0xE736D67A}},
+	  {{0xBFCFD1A4, 0x703FFC8F}}, {{0xBC59EA3B, 0xA8860819}}},
+	{{{0x3FF078B6, 0x9B5AEA5C}}, {{0xBC8880D6, 0x6B6D819B}},
+	  {{0xBFCF4DCE, 0xFE860E28}}, {{0xBC6883D4, 0xC6A2C678}}},
+	{{{0x3FF074D5, 0x1D3022A1}}, {{0x3C9E93F8, 0x2426EF93}},
+	  {{0xBFCECA18, 0xDA9DBA19}}, {{0x3C36D470, 0x491D8A98}}},
+	{{{0x3FF07104, 0x13DBD729}}, {{0x3C766560, 0xCA5328ED}},
+	  {{0xBFCE4681, 0x80D0D17F}}, {{0x3C605627, 0x658D0660}}},
+	{{{0x3FF06D43, 0x7B8CFE4D}}, {{0xBC73ADF7, 0xD1025E7E}},
+	  {{0xBFCDC308, 0x6D87EF96}}, {{0x3C6C0BD9, 0x2A97B34C}}},
+	{{{0x3FF06993, 0x5082FF6E}}, {{0x3C7685C4, 0xD7395A9F}},
+	  {{0xBFCD3FAD, 0x1D49F620}}, {{0x3C5DE851, 0x26ECE4F0}}},
+	{{{0x3FF065F3, 0x8F0DAF34}}, {{0xBC7821B3, 0xAF1520A9}},
+	  {{0xBFCCBC6F, 0x0CBB89ED}}, {{0xBC4B40A0, 0x51092884}}},
+	{{{0x3FF06264, 0x338D4BDC}}, {{0xBC90000F, 0xF34422A4}},
+	  {{0xBFCC394D, 0xB89E8F7F}}, {{0xBC646F77, 0x52292D2D}}},
+	{{{0x3FF05EE5, 0x3A727999}}, {{0x3C92512F, 0x6647668D}},
+	  {{0xBFCBB648, 0x9DD1A7CC}}, {{0x3C234425, 0x3ED3824D}}},
+	{{{0x3FF05B76, 0xA03E3F07}}, {{0x3C7CA615, 0x2B52E765}},
+	  {{0xBFCB335F, 0x394FAD1B}}, {{0xBC47F257, 0x34B51ACE}}},
+	{{{0x3FF05818, 0x618201A8}}, {{0xBC8BFA98, 0x5A557953}},
+	  {{0xBFCAB091, 0x082F3002}}, {{0x3C4B6626, 0x60BF022C}}},
+	{{{0x3FF054CA, 0x7ADF8277}}, {{0x3C89C0C1, 0x377A9F8C}},
+	  {{0xBFCA2DDD, 0x87A1F479}}, {{0xBC67E5CE, 0xF07409B2}}},
+	{{{0x3FF0518C, 0xE908DA8C}}, {{0x3C987D18, 0x25A535E2}},
+	  {{0xBFC9AB44, 0x34F46F10}}, {{0xBC1274BC, 0x57573053}}},
+	{{{0x3FF04E5F, 0xA8C077CC}}, {{0xBC9D8190, 0xECF07BF2}},
+	  {{0xBFC928C4, 0x8D8D4236}}, {{0xBC556048, 0x370EDF81}}},
+	{{{0x3FF04B42, 0xB6D919A9}}, {{0xBC9F2338, 0x92AA0A0B}},
+	  {{0xBFC8A65E, 0x0EECBBA5}}, {{0x3C6339DB, 0x0663DF15}}},
+	{{{0x3FF04836, 0x1035CDFA}}, {{0xBC9E50AA, 0xBBC5EC1C}},
+	  {{0xBFC82410, 0x36AC51DD}}, {{0xBC5A42DC, 0xDF8CB355}}},
+	{{{0x3FF04539, 0xB1C9EDDA}}, {{0x3C8D2224, 0xC7598281}},
+	  {{0xBFC7A1DA, 0x827E21C3}}, {{0xBC6CB79F, 0x06D46085}}},
+	{{{0x3FF0424D, 0x98991A9F}}, {{0x3C66BB23, 0xA130683D}},
+	  {{0xBFC71FBC, 0x702C6C4F}}, {{0xBC6BAA2A, 0x00C832DD}}},
+	{{{0x3FF03F71, 0xC1B73AD9}}, {{0xBC885168, 0xA8202E85}},
+	  {{0xBFC69DB5, 0x7D991458}}, {{0x3C69321C, 0x97B08BD2}}},
+	{{{0x3FF03CA6, 0x2A487769}}, {{0xBC9585FD, 0xB95A2E63}},
+	  {{0xBFC61BC5, 0x28BD1C73}}, {{0x3C625559, 0x2267ECEB}}},
+	{{{0x3FF039EA, 0xCF8138A4}}, {{0x3C8ACC0C, 0x8FE6098D}},
+	  {{0xBFC599EA, 0xEFA824F1}}, {{0x3C5F28E7, 0x2B9BA1A8}}},
+	{{{0x3FF0373F, 0xAEA6238A}}, {{0xBC73E9A1, 0x72989A92}},
+	  {{0xBFC51826, 0x507FE9EB}}, {{0x3C6AC219, 0x6946DA28}}},
+	{{{0x3FF034A4, 0xC50C1706}}, {{0xBC8A9076, 0x7ECC2F29}},
+	  {{0xBFC49676, 0xC97FC168}}, {{0x3C6B5D13, 0x93C07384}}},
+	{{{0x3FF0321A, 0x10182946}}, {{0x3C88FA5C, 0xFE5F3FF1}},
+	  {{0xBFC414DB, 0xD8F81999}}, {{0x3C3E1438, 0x0B2260AC}}},
+	{{{0x3FF02F9F, 0x8D3FA521}}, {{0xBC58A44A, 0x88A18235}},
+	  {{0xBFC39354, 0xFD4DF72A}}, {{0xBC4EAAC2, 0x64EC3B0C}}},
+	{{{0x3FF02D35, 0x3A080789}}, {{0xBC907780, 0xF6C7E6F8}},
+	  {{0xBFC311E1, 0xB4FA73A6}}, {{0x3C61065E, 0x4C87081D}}},
+	{{{0x3FF02ADB, 0x1406FD12}}, {{0x3C969329, 0x720D8336}},
+	  {{0xBFC29081, 0x7E8A3BEF}}, {{0x3C65A4E2, 0x8F21151D}}},
+	{{{0x3FF02891, 0x18E25F8B}}, {{0xBC9A7DA4, 0x524ABA66}},
+	  {{0xBFC20F33, 0xD89D0ECD}}, {{0x3C6557F7, 0x55A9198D}}},
+	{{{0x3FF02657, 0x4650339C}}, {{0xBC31EC5D, 0x0688DD52}},
+	  {{0xBFC18DF8, 0x41E53B8C}}, {{0xBC49852D, 0x50E682BB}}},
+	{{{0x3FF0242D, 0x9A16A685}}, {{0xBC7352FD, 0x295277DB}},
+	  {{0xBFC10CCE, 0x392720B0}}, {{0xBC55A291, 0x1E4C8E28}}},
+	{{{0x3FF02214, 0x120C0BDE}}, {{0xBC9456D2, 0x6B72974E}},
+	  {{0xBFC08BB5, 0x3D38AAB7}}, {{0xBC60FB6D, 0xD37D3177}}},
+	{{{0x3FF0200A, 0xAC16DB6F}}, {{0xBC809B4F, 0x99576FC1}},
+	  {{0xBFC00AAC, 0xCD00D2F1}}, {{0x3C53EA29, 0x146349DE}}},
+	{{{0x3FF01E11, 0x662DAF18}}, {{0xBC833F82, 0x3120653C}},
+	  {{0xBFBF1368, 0xCEEE3CC9}}, {{0x3C5213E7, 0x7BD924AB}}},
+	{{{0x3FF01C28, 0x3E5740C5}}, {{0x3C95D295, 0x9EC02117}},
+	  {{0xBFBE1197, 0x17463991}}, {{0xBC5E1FCA, 0x410E61A9}}},
+	{{{0x3FF01A4F, 0x32AA6878}}, {{0x3C833FDA, 0x67BCC8B5}},
+	  {{0xBFBD0FE3, 0x7137CF18}}, {{0x3C4AE71D, 0x698E234C}}},
+	{{{0x3FF01886, 0x414E1A5C}}, {{0x3C4976C5, 0xE0B191DA}},
+	  {{0xBFBC0E4C, 0xDB0F41D4}}, {{0x3C586525, 0xC9BFC58B}}},
+	{{{0x3FF016CD, 0x687964EF}}, {{0xBC9D38AB, 0x209297AD}},
+	  {{0xBFBB0CD2, 0x5335E625}}, {{0xBC480157, 0xFBDC145A}}},
+	{{{0x3FF01524, 0xA6736F36}}, {{0x3C930803, 0xC450FC30}},
+	  {{0xBFBA0B72, 0xD8311EBE}}, {{0xBC507AA8, 0x50193D71}}},
+	{{{0x3FF0138B, 0xF993770A}}, {{0xBC7502E0, 0xB809A4D7}},
+	  {{0xBFB90A2D, 0x68A15B27}}, {{0xBC5B1BE3, 0x7F556554}}},
+	{{{0x3FF01203, 0x6040CF67}}, {{0x3C9847C0, 0x422FB0BC}},
+	  {{0xBFB80901, 0x03411660}}, {{0xBC5DD342, 0x10739476}}},
+	{{{0x3FF0108A, 0xD8F2DEDB}}, {{0x3C93DC21, 0x53B40698}},
+	  {{0xBFB707EC, 0xA6E3D59B}}, {{0x3C5030B2, 0xF456FFFF}}},
+	{{{0x3FF00F22, 0x62311DF8}}, {{0x3C99322E, 0xA7C410F3}},
+	  {{0xBFB606EF, 0x5275270D}}, {{0x3C56910E, 0xE6EE4DC3}}},
+	{{{0x3FF00DC9, 0xFA9315DF}}, {{0xBC84D0E2, 0x602B4C56}},
+	  {{0xBFB50608, 0x04F7A0DD}}, {{0xBC239FF7, 0xEDAF37D2}}},
+	{{{0x3FF00C81, 0xA0C05ED4}}, {{0xBC7736A7, 0x7A57AC2E}},
+	  {{0xBFB40535, 0xBD83E026}}, {{0x3C4B9B73, 0x5F0B8AC5}}},
+	{{{0x3FF00B49, 0x53709EEA}}, {{0xBC9DF4D4, 0xF8CDACD0}},
+	  {{0xBFB30477, 0x7B47880C}}, {{0xBC517BE5, 0x3B77E1B2}}},
+	{{{0x3FF00A21, 0x116B88B6}}, {{0xBC71D458, 0xAAAEC5A4}},
+	  {{0xBFB203CC, 0x3D8440EF}}, {{0x3C1EF162, 0x41B5A4E1}}},
+	{{{0x3FF00908, 0xD988DA1B}}, {{0x3C9519B1, 0x94C96CA5}},
+	  {{0xBFB10333, 0x038EB7A7}}, {{0x3C044B95, 0x317BAEA7}}},
+	{{{0x3FF00800, 0xAAB05B20}}, {{0xBC936EB9, 0x9FEBDB21}},
+	  {{0xBFB002AA, 0xCCCD9CDD}}, {{0x3C53A7FD, 0xFAC9C47C}}},
+	{{{0x3FF00708, 0x83D9DCD5}}, {{0xBC9EC747, 0x430DE399}},
+	  {{0xBFAE0465, 0x317148DD}}, {{0x3C4B5DB1, 0x7929765A}}},
+	{{{0x3FF00620, 0x640D384F}}, {{0xBC97FCBC, 0x170FB049}},
+	  {{0xBFAC0392, 0xCDAF09CF}}, {{0x3C2B59CD, 0x7D4F7337}}},
+	{{{0x3FF00548, 0x4A624DAE}}, {{0x3C5D0575, 0x23E9C180}},
+	  {{0xBFAA02DC, 0x6D81EE12}}, {{0x3C2A5E3B, 0x7E00BA39}}},
+	{{{0x3FF00480, 0x36010336}}, {{0xBC89227D, 0x10BEB244}},
+	  {{0xBFA80240, 0x10336ABF}}, {{0x3C4941AF, 0xC229B627}}},
+	{{{0x3FF003C8, 0x26214474}}, {{0xBC4AE17A, 0x45DFB29B}},
+	  {{0xBFA601BB, 0xB526F7CF}}, {{0x3C39422F, 0x2DA1796B}}},
+	{{{0x3FF00320, 0x1A0B0179}}, {{0x3C9FA45B, 0xD21A4C9A}},
+	  {{0xBFA4014D, 0x5BD80F80}}, {{0xBC45A2E6, 0xA4813A5B}}},
+	{{{0x3FF00288, 0x11162E22}}, {{0x3C6F0E22, 0x2A930764}},
+	  {{0xBFA200F3, 0x03D82DD0}}, {{0xBC4BE9EF, 0x0CBDB96B}}},
+	{{{0x3FF00200, 0x0AAAC16C}}, {{0x3C88618F, 0x578DDD8D}},
+	  {{0xBFA000AA, 0xACCCD00D}}, {{0xBBFD9E59, 0x1EFF67C8}}},
+	{{{0x3FF00188, 0x0640B4E1}}, {{0x3C7FB10F, 0x8827C989}},
+	  {{0xBF9C00E4, 0xACDAE8F4}}, {{0xBBE94741, 0x22A0BAC6}}},
+	{{{0x3FF00120, 0x0360040D}}, {{0xBC884C57, 0x402EAB5F}},
+	  {{0xBF980090, 0x01033411}}, {{0xBC37E141, 0xDD340191}}},
+	{{{0x3FF000C8, 0x01A0AC06}}, {{0xBC7BD6C4, 0x673A2EEE}},
+	  {{0xBF940053, 0x55BD803E}}, {{0xBBD1997B, 0xCA73460D}}},
+	{{{0x3FF00080, 0x00AAAB06}}, {{0xBC93E2BE, 0x2ABAD90D}},
+	  {{0xBF90002A, 0xAACCCCDA}}, {{0x3C293021, 0x3AC1711C}}},
+	{{{0x3FF00048, 0x00360010}}, {{0x3C899AE6, 0xDB8F0A40}},
+	  {{0xBF880024, 0x00103337}}, {{0x3C250734, 0xAF88B300}}},
+	{{{0x3FF00020, 0x000AAAAC}}, {{0x3C76C186, 0x1862ADFD}},
+	  {{0xBF80000A, 0xAAACCCCD}}, {{0xBBBA01FC, 0x9193923E}}},
+	{{{0x3FF00008, 0x0000AAAB}}, {{0xBC93E93E, 0x8D68D67B}},
+	  {{0xBF700002, 0xAAAACCCD}}, {{0x3C093193, 0x17BFB4DB}}},
+	{{{0x3FF00000, 0x00000000}}, {{0x00000000, 0x00000000}},
+	  {{0x00000000, 0x00000000}}, {{0x00000000, 0x00000000}}},
+	{{{0x3FF00008, 0x0000AAAB}}, {{0xBC93E93E, 0x8D68D67B}},
+	  {{0x3F700002, 0xAAAACCCD}}, {{0xBC093193, 0x17BFB4DB}}},
+	{{{0x3FF00020, 0x000AAAAC}}, {{0x3C76C186, 0x1862ADFD}},
+	  {{0x3F80000A, 0xAAACCCCD}}, {{0x3BBA01FC, 0x9193923E}}},
+	{{{0x3FF00048, 0x00360010}}, {{0x3C899AE6, 0xDB8F0A40}},
+	  {{0x3F880024, 0x00103337}}, {{0xBC250734, 0xAF88B300}}},
+	{{{0x3FF00080, 0x00AAAB06}}, {{0xBC93E2BE, 0x2ABAD90D}},
+	  {{0x3F90002A, 0xAACCCCDA}}, {{0xBC293021, 0x3AC1711C}}},
+	{{{0x3FF000C8, 0x01A0AC06}}, {{0xBC7BD6C4, 0x673A2EEE}},
+	  {{0x3F940053, 0x55BD803E}}, {{0x3BD1997B, 0xCA73460D}}},
+	{{{0x3FF00120, 0x0360040D}}, {{0xBC884C57, 0x402EAB5F}},
+	  {{0x3F980090, 0x01033411}}, {{0x3C37E141, 0xDD340191}}},
+	{{{0x3FF00188, 0x0640B4E1}}, {{0x3C7FB10F, 0x8827C989}},
+	  {{0x3F9C00E4, 0xACDAE8F4}}, {{0x3BE94741, 0x22A0BAC6}}},
+	{{{0x3FF00200, 0x0AAAC16C}}, {{0x3C88618F, 0x578DDD8D}},
+	  {{0x3FA000AA, 0xACCCD00D}}, {{0x3BFD9E59, 0x1EFF67C8}}},
+	{{{0x3FF00288, 0x11162E22}}, {{0x3C6F0E22, 0x2A930764}},
+	  {{0x3FA200F3, 0x03D82DD0}}, {{0x3C4BE9EF, 0x0CBDB96B}}},
+	{{{0x3FF00320, 0x1A0B0179}}, {{0x3C9FA45B, 0xD21A4C9A}},
+	  {{0x3FA4014D, 0x5BD80F80}}, {{0x3C45A2E6, 0xA4813A5B}}},
+	{{{0x3FF003C8, 0x26214474}}, {{0xBC4AE17A, 0x45DFB29B}},
+	  {{0x3FA601BB, 0xB526F7CF}}, {{0xBC39422F, 0x2DA1796B}}},
+	{{{0x3FF00480, 0x36010336}}, {{0xBC89227D, 0x10BEB244}},
+	  {{0x3FA80240, 0x10336ABF}}, {{0xBC4941AF, 0xC229B627}}},
+	{{{0x3FF00548, 0x4A624DAE}}, {{0x3C5D0575, 0x23E9C180}},
+	  {{0x3FAA02DC, 0x6D81EE12}}, {{0xBC2A5E3B, 0x7E00BA39}}},
+	{{{0x3FF00620, 0x640D384F}}, {{0xBC97FCBC, 0x170FB049}},
+	  {{0x3FAC0392, 0xCDAF09CF}}, {{0xBC2B59CD, 0x7D4F7337}}},
+	{{{0x3FF00708, 0x83D9DCD5}}, {{0xBC9EC747, 0x430DE399}},
+	  {{0x3FAE0465, 0x317148DD}}, {{0xBC4B5DB1, 0x7929765A}}},
+	{{{0x3FF00800, 0xAAB05B20}}, {{0xBC936EB9, 0x9FEBDB21}},
+	  {{0x3FB002AA, 0xCCCD9CDD}}, {{0xBC53A7FD, 0xFAC9C47C}}},
+	{{{0x3FF00908, 0xD988DA1B}}, {{0x3C9519B1, 0x94C96CA5}},
+	  {{0x3FB10333, 0x038EB7A7}}, {{0xBC044B95, 0x317BAEA7}}},
+	{{{0x3FF00A21, 0x116B88B6}}, {{0xBC71D458, 0xAAAEC5A4}},
+	  {{0x3FB203CC, 0x3D8440EF}}, {{0xBC1EF162, 0x41B5A4E1}}},
+	{{{0x3FF00B49, 0x53709EEA}}, {{0xBC9DF4D4, 0xF8CDACD0}},
+	  {{0x3FB30477, 0x7B47880C}}, {{0x3C517BE5, 0x3B77E1B2}}},
+	{{{0x3FF00C81, 0xA0C05ED4}}, {{0xBC7736A7, 0x7A57AC2E}},
+	  {{0x3FB40535, 0xBD83E026}}, {{0xBC4B9B73, 0x5F0B8AC5}}},
+	{{{0x3FF00DC9, 0xFA9315DF}}, {{0xBC84D0E2, 0x602B4C56}},
+	  {{0x3FB50608, 0x04F7A0DD}}, {{0x3C239FF7, 0xEDAF37D2}}},
+	{{{0x3FF00F22, 0x62311DF8}}, {{0x3C99322E, 0xA7C410F3}},
+	  {{0x3FB606EF, 0x5275270D}}, {{0xBC56910E, 0xE6EE4DC3}}},
+	{{{0x3FF0108A, 0xD8F2DEDB}}, {{0x3C93DC21, 0x53B40698}},
+	  {{0x3FB707EC, 0xA6E3D59B}}, {{0xBC5030B2, 0xF456FFFF}}},
+	{{{0x3FF01203, 0x6040CF67}}, {{0x3C9847C0, 0x422FB0BC}},
+	  {{0x3FB80901, 0x03411660}}, {{0x3C5DD342, 0x10739476}}},
+	{{{0x3FF0138B, 0xF993770A}}, {{0xBC7502E0, 0xB809A4D7}},
+	  {{0x3FB90A2D, 0x68A15B27}}, {{0x3C5B1BE3, 0x7F556554}}},
+	{{{0x3FF01524, 0xA6736F36}}, {{0x3C930803, 0xC450FC30}},
+	  {{0x3FBA0B72, 0xD8311EBE}}, {{0x3C507AA8, 0x50193D71}}},
+	{{{0x3FF016CD, 0x687964EF}}, {{0xBC9D38AB, 0x209297AD}},
+	  {{0x3FBB0CD2, 0x5335E625}}, {{0x3C480157, 0xFBDC145A}}},
+	{{{0x3FF01886, 0x414E1A5C}}, {{0x3C4976C5, 0xE0B191DA}},
+	  {{0x3FBC0E4C, 0xDB0F41D4}}, {{0xBC586525, 0xC9BFC58B}}},
+	{{{0x3FF01A4F, 0x32AA6878}}, {{0x3C833FDA, 0x67BCC8B5}},
+	  {{0x3FBD0FE3, 0x7137CF18}}, {{0xBC4AE71D, 0x698E234C}}},
+	{{{0x3FF01C28, 0x3E5740C5}}, {{0x3C95D295, 0x9EC02117}},
+	  {{0x3FBE1197, 0x17463991}}, {{0x3C5E1FCA, 0x410E61A9}}},
+	{{{0x3FF01E11, 0x662DAF18}}, {{0xBC833F82, 0x3120653C}},
+	  {{0x3FBF1368, 0xCEEE3CC9}}, {{0xBC5213E7, 0x7BD924AB}}},
+	{{{0x3FF0200A, 0xAC16DB6F}}, {{0xBC809B4F, 0x99576FC1}},
+	  {{0x3FC00AAC, 0xCD00D2F1}}, {{0xBC53EA29, 0x146349DE}}},
+	{{{0x3FF02214, 0x120C0BDE}}, {{0xBC9456D2, 0x6B72974E}},
+	  {{0x3FC08BB5, 0x3D38AAB7}}, {{0x3C60FB6D, 0xD37D3177}}},
+	{{{0x3FF0242D, 0x9A16A685}}, {{0xBC7352FD, 0x295277DB}},
+	  {{0x3FC10CCE, 0x392720B0}}, {{0x3C55A291, 0x1E4C8E28}}},
+	{{{0x3FF02657, 0x4650339C}}, {{0xBC31EC5D, 0x0688DD52}},
+	  {{0x3FC18DF8, 0x41E53B8C}}, {{0x3C49852D, 0x50E682BB}}},
+	{{{0x3FF02891, 0x18E25F8B}}, {{0xBC9A7DA4, 0x524ABA66}},
+	  {{0x3FC20F33, 0xD89D0ECD}}, {{0xBC6557F7, 0x55A9198D}}},
+	{{{0x3FF02ADB, 0x1406FD12}}, {{0x3C969329, 0x720D8336}},
+	  {{0x3FC29081, 0x7E8A3BEF}}, {{0xBC65A4E2, 0x8F21151D}}},
+	{{{0x3FF02D35, 0x3A080789}}, {{0xBC907780, 0xF6C7E6F8}},
+	  {{0x3FC311E1, 0xB4FA73A6}}, {{0xBC61065E, 0x4C87081D}}},
+	{{{0x3FF02F9F, 0x8D3FA521}}, {{0xBC58A44A, 0x88A18235}},
+	  {{0x3FC39354, 0xFD4DF72A}}, {{0x3C4EAAC2, 0x64EC3B0C}}},
+	{{{0x3FF0321A, 0x10182946}}, {{0x3C88FA5C, 0xFE5F3FF1}},
+	  {{0x3FC414DB, 0xD8F81999}}, {{0xBC3E1438, 0x0B2260AC}}},
+	{{{0x3FF034A4, 0xC50C1706}}, {{0xBC8A9076, 0x7ECC2F29}},
+	  {{0x3FC49676, 0xC97FC168}}, {{0xBC6B5D13, 0x93C07384}}},
+	{{{0x3FF0373F, 0xAEA6238A}}, {{0xBC73E9A1, 0x72989A92}},
+	  {{0x3FC51826, 0x507FE9EB}}, {{0xBC6AC219, 0x6946DA28}}},
+	{{{0x3FF039EA, 0xCF8138A4}}, {{0x3C8ACC0C, 0x8FE6098D}},
+	  {{0x3FC599EA, 0xEFA824F1}}, {{0xBC5F28E7, 0x2B9BA1A8}}},
+	{{{0x3FF03CA6, 0x2A487769}}, {{0xBC9585FD, 0xB95A2E63}},
+	  {{0x3FC61BC5, 0x28BD1C73}}, {{0xBC625559, 0x2267ECEB}}},
+	{{{0x3FF03F71, 0xC1B73AD9}}, {{0xBC885168, 0xA8202E85}},
+	  {{0x3FC69DB5, 0x7D991458}}, {{0xBC69321C, 0x97B08BD2}}},
+	{{{0x3FF0424D, 0x98991A9F}}, {{0x3C66BB23, 0xA130683D}},
+	  {{0x3FC71FBC, 0x702C6C4F}}, {{0x3C6BAA2A, 0x00C832DD}}},
+	{{{0x3FF04539, 0xB1C9EDDA}}, {{0x3C8D2224, 0xC7598281}},
+	  {{0x3FC7A1DA, 0x827E21C3}}, {{0x3C6CB79F, 0x06D46085}}},
+	{{{0x3FF04836, 0x1035CDFA}}, {{0xBC9E50AA, 0xBBC5EC1C}},
+	  {{0x3FC82410, 0x36AC51DD}}, {{0x3C5A42DC, 0xDF8CB355}}},
+	{{{0x3FF04B42, 0xB6D919A9}}, {{0xBC9F2338, 0x92AA0A0B}},
+	  {{0x3FC8A65E, 0x0EECBBA5}}, {{0xBC6339DB, 0x0663DF15}}},
+	{{{0x3FF04E5F, 0xA8C077CC}}, {{0xBC9D8190, 0xECF07BF2}},
+	  {{0x3FC928C4, 0x8D8D4236}}, {{0x3C556048, 0x370EDF81}}},
+	{{{0x3FF0518C, 0xE908DA8C}}, {{0x3C987D18, 0x25A535E2}},
+	  {{0x3FC9AB44, 0x34F46F10}}, {{0x3C1274BC, 0x57573053}}},
+	{{{0x3FF054CA, 0x7ADF8277}}, {{0x3C89C0C1, 0x377A9F8C}},
+	  {{0x3FCA2DDD, 0x87A1F479}}, {{0x3C67E5CE, 0xF07409B2}}},
+	{{{0x3FF05818, 0x618201A8}}, {{0xBC8BFA98, 0x5A557953}},
+	  {{0x3FCAB091, 0x082F3002}}, {{0xBC4B6626, 0x60BF022C}}},
+	{{{0x3FF05B76, 0xA03E3F07}}, {{0x3C7CA615, 0x2B52E765}},
+	  {{0x3FCB335F, 0x394FAD1B}}, {{0x3C47F257, 0x34B51ACE}}},
+	{{{0x3FF05EE5, 0x3A727999}}, {{0x3C92512F, 0x6647668D}},
+	  {{0x3FCBB648, 0x9DD1A7CC}}, {{0xBC234425, 0x3ED3824D}}},
+	{{{0x3FF06264, 0x338D4BDC}}, {{0xBC90000F, 0xF34422A4}},
+	  {{0x3FCC394D, 0xB89E8F7F}}, {{0x3C646F77, 0x52292D2D}}},
+	{{{0x3FF065F3, 0x8F0DAF34}}, {{0xBC7821B3, 0xAF1520A9}},
+	  {{0x3FCCBC6F, 0x0CBB89ED}}, {{0x3C4B40A0, 0x51092884}}},
+	{{{0x3FF06993, 0x5082FF6E}}, {{0x3C7685C4, 0xD7395A9F}},
+	  {{0x3FCD3FAD, 0x1D49F620}}, {{0xBC5DE851, 0x26ECE4F0}}},
+	{{{0x3FF06D43, 0x7B8CFE4D}}, {{0xBC73ADF7, 0xD1025E7E}},
+	  {{0x3FCDC308, 0x6D87EF96}}, {{0xBC6C0BD9, 0x2A97B34C}}},
+	{{{0x3FF07104, 0x13DBD729}}, {{0x3C766560, 0xCA5328ED}},
+	  {{0x3FCE4681, 0x80D0D17F}}, {{0xBC605627, 0x658D0660}}},
+	{{{0x3FF074D5, 0x1D3022A1}}, {{0x3C9E93F8, 0x2426EF93}},
+	  {{0x3FCECA18, 0xDA9DBA19}}, {{0xBC36D470, 0x491D8A98}}},
+	{{{0x3FF078B6, 0x9B5AEA5C}}, {{0xBC8880D6, 0x6B6D819B}},
+	  {{0x3FCF4DCE, 0xFE860E28}}, {{0x3C6883D4, 0xC6A2C678}}},
+	{{{0x3FF07CA8, 0x923DACD6}}, {{0xBC9653A7, 0xE736D67A}},
+	  {{0x3FCFD1A4, 0x703FFC8F}}, {{0x3C59EA3B, 0xA8860819}}},
+	{{{0x3FF080AB, 0x05CA6146}}, {{0xBC723216, 0xFC66378F}},
+	  {{0x3FD02ACC, 0xD9D08102}}, {{0xBC5998B3, 0x20C03715}}},
+	{{{0x3FF084BD, 0xFA037B8F}}, {{0xBC7D97E2, 0xE3C5EBFC}},
+	  {{0x3FD06CD7, 0xA64F3673}}, {{0x3C6370BA, 0x839871E4}}},
+	{{{0x3FF088E1, 0x72FBF041}}, {{0xBC9DE12F, 0x0D55140F}},
+	  {{0x3FD0AEF2, 0xDFA6F09B}}, {{0xBC414E60, 0xA7827088}}},
+	{{{0x3FF08D15, 0x74D738AC}}, {{0xBC984BD5, 0xC4A8C043}},
+	  {{0x3FD0F11E, 0xC7F2EE53}}, {{0x3C75BADF, 0xC5355AFC}}},
+	{{{0x3FF0915A, 0x03C95705}}, {{0x3C78A8A6, 0x0BD1CD00}},
+	  {{0x3FD1335B, 0xA15F1D6C}}, {{0xBC53CE0F, 0x341ED7B6}}},
+	{{{0x3FF095AF, 0x2416DA9A}}, {{0x3C8024A0, 0x39DC7749}},
+	  {{0x3FD175A9, 0xAE285CD6}}, {{0xBC3DB749, 0xC4496E39}}},
+	{{{0x3FF09A14, 0xDA14E415}}, {{0xBC965668, 0x233B29C8}},
+	  {{0x3FD1B809, 0x309CBEE1}}, {{0x3C6E5B16, 0xBBB1CB75}}},
+	{{{0x3FF09E8B, 0x2A2929D1}}, {{0xBC9EE5F5, 0x535446B4}},
+	  {{0x3FD1FA7A, 0x6B1BCB8A}}, {{0x3C50621A, 0x5A4CB636}}},
+	{{{0x3FF0A312, 0x18C9FC41}}, {{0x3C885259, 0x09E044C2}},
+	  {{0x3FD23CFD, 0xA016C2D9}}, {{0xBC500762, 0x449D986B}}},
+	{{{0x3FF0A7A9, 0xAA7E4A68}}, {{0x3C71B296, 0x281520E0}},
+	  {{0x3FD27F93, 0x1210DF54}}, {{0xBC6EF999, 0x502A1E59}}},
+	{{{0x3FF0AC51, 0xE3DDA65B}}, {{0x3C9B22C0, 0x9DACA977}},
+	  {{0x3FD2C23B, 0x039F9881}}, {{0x3C577301, 0x9B082732}}},
+	{{{0x3FF0B10A, 0xC99049DE}}, {{0xBC617C2D, 0x610FCC2E}},
+	  {{0x3FD304F5, 0xB76AE57E}}, {{0xBC75EB09, 0x42E4CA9C}}},
+	{{{0x3FF0B5D4, 0x604F1B07}}, {{0x3C732C14, 0x07EECFA5}},
+	  {{0x3FD347C3, 0x702D7FA4}}, {{0x3C7435BE, 0x701422C8}}},
+	{{{0x3FF0BAAE, 0xACE3B0FC}}, {{0xBC93292F, 0x75521E77}},
+	  {{0x3FD38AA4, 0x70B52549}}, {{0xBC67F94B, 0x0B01B8A6}}},
+	{{{0x3FF0BF99, 0xB42858B8}}, {{0xBC67AD83, 0x0B1F30A5}},
+	  {{0x3FD3CD98, 0xFBE2DC86}}, {{0xBC7D0A5E, 0x269038FC}}},
+	{{{0x3FF0C495, 0x7B0819E9}}, {{0x3C9A26E0, 0x6E52BA24}},
+	  {{0x3FD410A1, 0x54AB361D}}, {{0xBC78DCB6, 0xCF7DA2E8}}},
+	{{{0x3FF0C9A2, 0x067EBBDA}}, {{0x3C813CD8, 0x803D61F3}},
+	  {{0x3FD453BD, 0xBE16906C}}, {{0x3C78D781, 0x45D8536E}}},
+	{{{0x3FF0CEBF, 0x5B98CA6C}}, {{0x3C9E8080, 0x09B9F220}},
+	  {{0x3FD496EE, 0x7B415A78}}, {{0xBC51C3BA, 0xBDFE61F1}}},
+	{{{0x3FF0D3ED, 0x7F739B28}}, {{0xBC99722F, 0xEA8A9ED5}},
+	  {{0x3FD4DA33, 0xCF5C5703}}, {{0x3C7B1F07, 0x7BE71FBE}}},
+	{{{0x3FF0D92C, 0x773D5255}}, {{0xBC84956C, 0x3D5D1DA2}},
+	  {{0x3FD51D8D, 0xFDACDFC5}}, {{0xBC419F0E, 0x98966B86}}},
+	{{{0x3FF0DE7C, 0x4834E82E}}, {{0xBC877BEC, 0x5F430E44}},
+	  {{0x3FD560FD, 0x498D28AA}}, {{0xBC4F07B3, 0xCCEA8A26}}},
+	{{{0x3FF0E3DC, 0xF7AA2E1B}}, {{0x3C9C05BD, 0xF7FB3140}},
+	  {{0x3FD5A481, 0xF66C8331}}, {{0x3C6E8E0C, 0xCFF78DD1}}},
+	{{{0x3FF0E94E, 0x8AFDD406}}, {{0xBC9330CB, 0xB0B14F49}},
+	  {{0x3FD5E81C, 0x47CFA1DB}}, {{0xBC791EC5, 0x4E7B2C63}}},
+	{{{0x3FF0EED1, 0x07A16DB4}}, {{0x3C988108, 0xD3E071F5}},
+	  {{0x3FD62BCC, 0x8150DBAB}}, {{0x3C7700BD, 0xF95D00CA}}},
+	{{{0x3FF0F464, 0x73177841}}, {{0xBC97DF60, 0x29551C51}},
+	  {{0x3FD66F92, 0xE6A06FC9}}, {{0xBC70A785, 0xD9A66B42}}},
+	{{{0x3FF0FA08, 0xD2F35F97}}, {{0x3C9B39D1, 0x9DAB3AF1}},
+	  {{0x3FD6B36F, 0xBB84C928}}, {{0x3C68DAF8, 0xFEFE1E5F}}},
+}; 
+/* the coefficients for the cosh-approximations */ 
+  static const db_number c0 =   {{0x3FF00000,0x00000000}};     /*1.0000000000e+00*/  
+  static const db_number c2 =   {{0x3FE00000,0x00000000}};     /*5.0000000000e-01*/  
+  static const db_number c4 =   {{0x3FA55555,0x55555555}};     /*4.1666666667e-02*/  
+  static const db_number c6 =   {{0x3F56C16C,0x16C16C17}};     /*1.3888888889e-03*/  
+  static const db_number c8 =   {{0x3EFA01A0,0x1A01A01A}};     /*2.4801587302e-05*/  
+/* the coefficients for the sinh-approximations */
+  static  const db_number s1 =   {{0x3FF00000,0x00000000}};     /*1.0000000000e+00*/  
+  static  const db_number s3 =   {{0x3FC55555,0x55555555}};     /*1.6666666667e-01*/  
+  static  const db_number s5 =   {{0x3F811111,0x11111111}};     /*8.3333333333e-03*/  
+  static  const db_number s7 =   {{0x3F2A01A0,0x1A01A01A}};     /*1.9841269841e-04*/  
+#else  
+  static db_number const inv_ln_2 =     {{0x652B82FE,0x3FF71547}};     /*1.4426950409e+00*/  
+  static db_number const ln2_hi =       {{0xFEFA3800,0x3FE62E42}};     /*6.9314718056e-01*/  
+  static db_number const ln2_lo =       {{0x93C76730,0x3D2EF357}};     /*5.4979230187e-14*/  
+  static db_number const two_43_44 =    {{0x00000000,0x42B80000}};     /*2.6388279067e+13*/  
+  static db_number const two_minus_30 = {{0x00000000,0x3D700000}};     /*9.0949470177e-13*/  
+  static int const bias = 89 ;
+
+/* some bounds */ 
+  static db_number const max_input_csh =  {{0x8FB9F87E,0x408633CE}};     /*7.1047586007e+02*/  
+
+  static const db_number cosh_sinh_table[179][4] = { 
+	{{{0xD2F35F97, 0x3FF0FA08}}, {{0x9DAB3AF1, 0x3C9B39D1}},
+	  {{0xBB84C928, 0xBFD6B36F}}, {{0xFEFE1E5F, 0xBC68DAF8}}},
+	{{{0x73177841, 0x3FF0F464}}, {{0x29551C51, 0xBC97DF60}},
+	  {{0xE6A06FC9, 0xBFD66F92}}, {{0xD9A66B42, 0x3C70A785}}},
+	{{{0x07A16DB4, 0x3FF0EED1}}, {{0xD3E071F5, 0x3C988108}},
+	  {{0x8150DBAB, 0xBFD62BCC}}, {{0xF95D00CA, 0xBC7700BD}}},
+	{{{0x8AFDD406, 0x3FF0E94E}}, {{0xB0B14F49, 0xBC9330CB}},
+	  {{0x47CFA1DB, 0xBFD5E81C}}, {{0x4E7B2C63, 0x3C791EC5}}},
+	{{{0xF7AA2E1B, 0x3FF0E3DC}}, {{0xF7FB3140, 0x3C9C05BD}},
+	  {{0xF66C8331, 0xBFD5A481}}, {{0xCFF78DD1, 0xBC6E8E0C}}},
+	{{{0x4834E82E, 0x3FF0DE7C}}, {{0x5F430E44, 0xBC877BEC}},
+	  {{0x498D28AA, 0xBFD560FD}}, {{0xCCEA8A26, 0x3C4F07B3}}},
+	{{{0x773D5255, 0x3FF0D92C}}, {{0x3D5D1DA2, 0xBC84956C}},
+	  {{0xFDACDFC5, 0xBFD51D8D}}, {{0x98966B86, 0x3C419F0E}}},
+	{{{0x7F739B28, 0x3FF0D3ED}}, {{0xEA8A9ED5, 0xBC99722F}},
+	  {{0xCF5C5703, 0xBFD4DA33}}, {{0x7BE71FBE, 0xBC7B1F07}}},
+	{{{0x5B98CA6C, 0x3FF0CEBF}}, {{0x09B9F220, 0x3C9E8080}},
+	  {{0x7B415A78, 0xBFD496EE}}, {{0xBDFE61F1, 0x3C51C3BA}}},
+	{{{0x067EBBDA, 0x3FF0C9A2}}, {{0x803D61F3, 0x3C813CD8}},
+	  {{0xBE16906C, 0xBFD453BD}}, {{0x45D8536E, 0xBC78D781}}},
+	{{{0x7B0819E9, 0x3FF0C495}}, {{0x6E52BA24, 0x3C9A26E0}},
+	  {{0x54AB361D, 0xBFD410A1}}, {{0xCF7DA2E8, 0x3C78DCB6}}},
+	{{{0xB42858B8, 0x3FF0BF99}}, {{0x0B1F30A5, 0xBC67AD83}},
+	  {{0xFBE2DC86, 0xBFD3CD98}}, {{0x269038FC, 0x3C7D0A5E}}},
+	{{{0xACE3B0FC, 0x3FF0BAAE}}, {{0x75521E77, 0xBC93292F}},
+	  {{0x70B52549, 0xBFD38AA4}}, {{0x0B01B8A6, 0x3C67F94B}}},
+	{{{0x604F1B07, 0x3FF0B5D4}}, {{0x07EECFA5, 0x3C732C14}},
+	  {{0x702D7FA4, 0xBFD347C3}}, {{0x701422C8, 0xBC7435BE}}},
+	{{{0xC99049DE, 0x3FF0B10A}}, {{0x610FCC2E, 0xBC617C2D}},
+	  {{0xB76AE57E, 0xBFD304F5}}, {{0x42E4CA9C, 0x3C75EB09}}},
+	{{{0xE3DDA65B, 0x3FF0AC51}}, {{0x9DACA977, 0x3C9B22C0}},
+	  {{0x039F9881, 0xBFD2C23B}}, {{0x9B082732, 0xBC577301}}},
+	{{{0xAA7E4A68, 0x3FF0A7A9}}, {{0x281520E0, 0x3C71B296}},
+	  {{0x1210DF54, 0xBFD27F93}}, {{0x502A1E59, 0x3C6EF999}}},
+	{{{0x18C9FC41, 0x3FF0A312}}, {{0x09E044C2, 0x3C885259}},
+	  {{0xA016C2D9, 0xBFD23CFD}}, {{0x449D986B, 0x3C500762}}},
+	{{{0x2A2929D1, 0x3FF09E8B}}, {{0x535446B4, 0xBC9EE5F5}},
+	  {{0x6B1BCB8A, 0xBFD1FA7A}}, {{0x5A4CB636, 0xBC50621A}}},
+	{{{0xDA14E415, 0x3FF09A14}}, {{0x233B29C8, 0xBC965668}},
+	  {{0x309CBEE1, 0xBFD1B809}}, {{0xBBB1CB75, 0xBC6E5B16}}},
+	{{{0x2416DA9A, 0x3FF095AF}}, {{0x39DC7749, 0x3C8024A0}},
+	  {{0xAE285CD6, 0xBFD175A9}}, {{0xC4496E39, 0x3C3DB749}}},
+	{{{0x03C95705, 0x3FF0915A}}, {{0x0BD1CD00, 0x3C78A8A6}},
+	  {{0xA15F1D6C, 0xBFD1335B}}, {{0x341ED7B6, 0x3C53CE0F}}},
+	{{{0x74D738AC, 0x3FF08D15}}, {{0xC4A8C043, 0xBC984BD5}},
+	  {{0xC7F2EE53, 0xBFD0F11E}}, {{0xC5355AFC, 0xBC75BADF}}},
+	{{{0x72FBF041, 0x3FF088E1}}, {{0x0D55140F, 0xBC9DE12F}},
+	  {{0xDFA6F09B, 0xBFD0AEF2}}, {{0xA7827088, 0x3C414E60}}},
+	{{{0xFA037B8F, 0x3FF084BD}}, {{0xE3C5EBFC, 0xBC7D97E2}},
+	  {{0xA64F3673, 0xBFD06CD7}}, {{0x839871E4, 0xBC6370BA}}},
+	{{{0x05CA6146, 0x3FF080AB}}, {{0xFC66378F, 0xBC723216}},
+	  {{0xD9D08102, 0xBFD02ACC}}, {{0x20C03715, 0x3C5998B3}}},
+	{{{0x923DACD6, 0x3FF07CA8}}, {{0xE736D67A, 0xBC9653A7}},
+	  {{0x703FFC8F, 0xBFCFD1A4}}, {{0xA8860819, 0xBC59EA3B}}},
+	{{{0x9B5AEA5C, 0x3FF078B6}}, {{0x6B6D819B, 0xBC8880D6}},
+	  {{0xFE860E28, 0xBFCF4DCE}}, {{0xC6A2C678, 0xBC6883D4}}},
+	{{{0x1D3022A1, 0x3FF074D5}}, {{0x2426EF93, 0x3C9E93F8}},
+	  {{0xDA9DBA19, 0xBFCECA18}}, {{0x491D8A98, 0x3C36D470}}},
+	{{{0x13DBD729, 0x3FF07104}}, {{0xCA5328ED, 0x3C766560}},
+	  {{0x80D0D17F, 0xBFCE4681}}, {{0x658D0660, 0x3C605627}}},
+	{{{0x7B8CFE4D, 0x3FF06D43}}, {{0xD1025E7E, 0xBC73ADF7}},
+	  {{0x6D87EF96, 0xBFCDC308}}, {{0x2A97B34C, 0x3C6C0BD9}}},
+	{{{0x5082FF6E, 0x3FF06993}}, {{0xD7395A9F, 0x3C7685C4}},
+	  {{0x1D49F620, 0xBFCD3FAD}}, {{0x26ECE4F0, 0x3C5DE851}}},
+	{{{0x8F0DAF34, 0x3FF065F3}}, {{0xAF1520A9, 0xBC7821B3}},
+	  {{0x0CBB89ED, 0xBFCCBC6F}}, {{0x51092884, 0xBC4B40A0}}},
+	{{{0x338D4BDC, 0x3FF06264}}, {{0xF34422A4, 0xBC90000F}},
+	  {{0xB89E8F7F, 0xBFCC394D}}, {{0x52292D2D, 0xBC646F77}}},
+	{{{0x3A727999, 0x3FF05EE5}}, {{0x6647668D, 0x3C92512F}},
+	  {{0x9DD1A7CC, 0xBFCBB648}}, {{0x3ED3824D, 0x3C234425}}},
+	{{{0xA03E3F07, 0x3FF05B76}}, {{0x2B52E765, 0x3C7CA615}},
+	  {{0x394FAD1B, 0xBFCB335F}}, {{0x34B51ACE, 0xBC47F257}}},
+	{{{0x618201A8, 0x3FF05818}}, {{0x5A557953, 0xBC8BFA98}},
+	  {{0x082F3002, 0xBFCAB091}}, {{0x60BF022C, 0x3C4B6626}}},
+	{{{0x7ADF8277, 0x3FF054CA}}, {{0x377A9F8C, 0x3C89C0C1}},
+	  {{0x87A1F479, 0xBFCA2DDD}}, {{0xF07409B2, 0xBC67E5CE}}},
+	{{{0xE908DA8C, 0x3FF0518C}}, {{0x25A535E2, 0x3C987D18}},
+	  {{0x34F46F10, 0xBFC9AB44}}, {{0x57573053, 0xBC1274BC}}},
+	{{{0xA8C077CC, 0x3FF04E5F}}, {{0xECF07BF2, 0xBC9D8190}},
+	  {{0x8D8D4236, 0xBFC928C4}}, {{0x370EDF81, 0xBC556048}}},
+	{{{0xB6D919A9, 0x3FF04B42}}, {{0x92AA0A0B, 0xBC9F2338}},
+	  {{0x0EECBBA5, 0xBFC8A65E}}, {{0x0663DF15, 0x3C6339DB}}},
+	{{{0x1035CDFA, 0x3FF04836}}, {{0xBBC5EC1C, 0xBC9E50AA}},
+	  {{0x36AC51DD, 0xBFC82410}}, {{0xDF8CB355, 0xBC5A42DC}}},
+	{{{0xB1C9EDDA, 0x3FF04539}}, {{0xC7598281, 0x3C8D2224}},
+	  {{0x827E21C3, 0xBFC7A1DA}}, {{0x06D46085, 0xBC6CB79F}}},
+	{{{0x98991A9F, 0x3FF0424D}}, {{0xA130683D, 0x3C66BB23}},
+	  {{0x702C6C4F, 0xBFC71FBC}}, {{0x00C832DD, 0xBC6BAA2A}}},
+	{{{0xC1B73AD9, 0x3FF03F71}}, {{0xA8202E85, 0xBC885168}},
+	  {{0x7D991458, 0xBFC69DB5}}, {{0x97B08BD2, 0x3C69321C}}},
+	{{{0x2A487769, 0x3FF03CA6}}, {{0xB95A2E63, 0xBC9585FD}},
+	  {{0x28BD1C73, 0xBFC61BC5}}, {{0x2267ECEB, 0x3C625559}}},
+	{{{0xCF8138A4, 0x3FF039EA}}, {{0x8FE6098D, 0x3C8ACC0C}},
+	  {{0xEFA824F1, 0xBFC599EA}}, {{0x2B9BA1A8, 0x3C5F28E7}}},
+	{{{0xAEA6238A, 0x3FF0373F}}, {{0x72989A92, 0xBC73E9A1}},
+	  {{0x507FE9EB, 0xBFC51826}}, {{0x6946DA28, 0x3C6AC219}}},
+	{{{0xC50C1706, 0x3FF034A4}}, {{0x7ECC2F29, 0xBC8A9076}},
+	  {{0xC97FC168, 0xBFC49676}}, {{0x93C07384, 0x3C6B5D13}}},
+	{{{0x10182946, 0x3FF0321A}}, {{0xFE5F3FF1, 0x3C88FA5C}},
+	  {{0xD8F81999, 0xBFC414DB}}, {{0x0B2260AC, 0x3C3E1438}}},
+	{{{0x8D3FA521, 0x3FF02F9F}}, {{0x88A18235, 0xBC58A44A}},
+	  {{0xFD4DF72A, 0xBFC39354}}, {{0x64EC3B0C, 0xBC4EAAC2}}},
+	{{{0x3A080789, 0x3FF02D35}}, {{0xF6C7E6F8, 0xBC907780}},
+	  {{0xB4FA73A6, 0xBFC311E1}}, {{0x4C87081D, 0x3C61065E}}},
+	{{{0x1406FD12, 0x3FF02ADB}}, {{0x720D8336, 0x3C969329}},
+	  {{0x7E8A3BEF, 0xBFC29081}}, {{0x8F21151D, 0x3C65A4E2}}},
+	{{{0x18E25F8B, 0x3FF02891}}, {{0x524ABA66, 0xBC9A7DA4}},
+	  {{0xD89D0ECD, 0xBFC20F33}}, {{0x55A9198D, 0x3C6557F7}}},
+	{{{0x4650339C, 0x3FF02657}}, {{0x0688DD52, 0xBC31EC5D}},
+	  {{0x41E53B8C, 0xBFC18DF8}}, {{0x50E682BB, 0xBC49852D}}},
+	{{{0x9A16A685, 0x3FF0242D}}, {{0x295277DB, 0xBC7352FD}},
+	  {{0x392720B0, 0xBFC10CCE}}, {{0x1E4C8E28, 0xBC55A291}}},
+	{{{0x120C0BDE, 0x3FF02214}}, {{0x6B72974E, 0xBC9456D2}},
+	  {{0x3D38AAB7, 0xBFC08BB5}}, {{0xD37D3177, 0xBC60FB6D}}},
+	{{{0xAC16DB6F, 0x3FF0200A}}, {{0x99576FC1, 0xBC809B4F}},
+	  {{0xCD00D2F1, 0xBFC00AAC}}, {{0x146349DE, 0x3C53EA29}}},
+	{{{0x662DAF18, 0x3FF01E11}}, {{0x3120653C, 0xBC833F82}},
+	  {{0xCEEE3CC9, 0xBFBF1368}}, {{0x7BD924AB, 0x3C5213E7}}},
+	{{{0x3E5740C5, 0x3FF01C28}}, {{0x9EC02117, 0x3C95D295}},
+	  {{0x17463991, 0xBFBE1197}}, {{0x410E61A9, 0xBC5E1FCA}}},
+	{{{0x32AA6878, 0x3FF01A4F}}, {{0x67BCC8B5, 0x3C833FDA}},
+	  {{0x7137CF18, 0xBFBD0FE3}}, {{0x698E234C, 0x3C4AE71D}}},
+	{{{0x414E1A5C, 0x3FF01886}}, {{0xE0B191DA, 0x3C4976C5}},
+	  {{0xDB0F41D4, 0xBFBC0E4C}}, {{0xC9BFC58B, 0x3C586525}}},
+	{{{0x687964EF, 0x3FF016CD}}, {{0x209297AD, 0xBC9D38AB}},
+	  {{0x5335E625, 0xBFBB0CD2}}, {{0xFBDC145A, 0xBC480157}}},
+	{{{0xA6736F36, 0x3FF01524}}, {{0xC450FC30, 0x3C930803}},
+	  {{0xD8311EBE, 0xBFBA0B72}}, {{0x50193D71, 0xBC507AA8}}},
+	{{{0xF993770A, 0x3FF0138B}}, {{0xB809A4D7, 0xBC7502E0}},
+	  {{0x68A15B27, 0xBFB90A2D}}, {{0x7F556554, 0xBC5B1BE3}}},
+	{{{0x6040CF67, 0x3FF01203}}, {{0x422FB0BC, 0x3C9847C0}},
+	  {{0x03411660, 0xBFB80901}}, {{0x10739476, 0xBC5DD342}}},
+	{{{0xD8F2DEDB, 0x3FF0108A}}, {{0x53B40698, 0x3C93DC21}},
+	  {{0xA6E3D59B, 0xBFB707EC}}, {{0xF456FFFF, 0x3C5030B2}}},
+	{{{0x62311DF8, 0x3FF00F22}}, {{0xA7C410F3, 0x3C99322E}},
+	  {{0x5275270D, 0xBFB606EF}}, {{0xE6EE4DC3, 0x3C56910E}}},
+	{{{0xFA9315DF, 0x3FF00DC9}}, {{0x602B4C56, 0xBC84D0E2}},
+	  {{0x04F7A0DD, 0xBFB50608}}, {{0xEDAF37D2, 0xBC239FF7}}},
+	{{{0xA0C05ED4, 0x3FF00C81}}, {{0x7A57AC2E, 0xBC7736A7}},
+	  {{0xBD83E026, 0xBFB40535}}, {{0x5F0B8AC5, 0x3C4B9B73}}},
+	{{{0x53709EEA, 0x3FF00B49}}, {{0xF8CDACD0, 0xBC9DF4D4}},
+	  {{0x7B47880C, 0xBFB30477}}, {{0x3B77E1B2, 0xBC517BE5}}},
+	{{{0x116B88B6, 0x3FF00A21}}, {{0xAAAEC5A4, 0xBC71D458}},
+	  {{0x3D8440EF, 0xBFB203CC}}, {{0x41B5A4E1, 0x3C1EF162}}},
+	{{{0xD988DA1B, 0x3FF00908}}, {{0x94C96CA5, 0x3C9519B1}},
+	  {{0x038EB7A7, 0xBFB10333}}, {{0x317BAEA7, 0x3C044B95}}},
+	{{{0xAAB05B20, 0x3FF00800}}, {{0x9FEBDB21, 0xBC936EB9}},
+	  {{0xCCCD9CDD, 0xBFB002AA}}, {{0xFAC9C47C, 0x3C53A7FD}}},
+	{{{0x83D9DCD5, 0x3FF00708}}, {{0x430DE399, 0xBC9EC747}},
+	  {{0x317148DD, 0xBFAE0465}}, {{0x7929765A, 0x3C4B5DB1}}},
+	{{{0x640D384F, 0x3FF00620}}, {{0x170FB049, 0xBC97FCBC}},
+	  {{0xCDAF09CF, 0xBFAC0392}}, {{0x7D4F7337, 0x3C2B59CD}}},
+	{{{0x4A624DAE, 0x3FF00548}}, {{0x23E9C180, 0x3C5D0575}},
+	  {{0x6D81EE12, 0xBFAA02DC}}, {{0x7E00BA39, 0x3C2A5E3B}}},
+	{{{0x36010336, 0x3FF00480}}, {{0x10BEB244, 0xBC89227D}},
+	  {{0x10336ABF, 0xBFA80240}}, {{0xC229B627, 0x3C4941AF}}},
+	{{{0x26214474, 0x3FF003C8}}, {{0x45DFB29B, 0xBC4AE17A}},
+	  {{0xB526F7CF, 0xBFA601BB}}, {{0x2DA1796B, 0x3C39422F}}},
+	{{{0x1A0B0179, 0x3FF00320}}, {{0xD21A4C9A, 0x3C9FA45B}},
+	  {{0x5BD80F80, 0xBFA4014D}}, {{0xA4813A5B, 0xBC45A2E6}}},
+	{{{0x11162E22, 0x3FF00288}}, {{0x2A930764, 0x3C6F0E22}},
+	  {{0x03D82DD0, 0xBFA200F3}}, {{0x0CBDB96B, 0xBC4BE9EF}}},
+	{{{0x0AAAC16C, 0x3FF00200}}, {{0x578DDD8D, 0x3C88618F}},
+	  {{0xACCCD00D, 0xBFA000AA}}, {{0x1EFF67C8, 0xBBFD9E59}}},
+	{{{0x0640B4E1, 0x3FF00188}}, {{0x8827C989, 0x3C7FB10F}},
+	  {{0xACDAE8F4, 0xBF9C00E4}}, {{0x22A0BAC6, 0xBBE94741}}},
+	{{{0x0360040D, 0x3FF00120}}, {{0x402EAB5F, 0xBC884C57}},
+	  {{0x01033411, 0xBF980090}}, {{0xDD340191, 0xBC37E141}}},
+	{{{0x01A0AC06, 0x3FF000C8}}, {{0x673A2EEE, 0xBC7BD6C4}},
+	  {{0x55BD803E, 0xBF940053}}, {{0xCA73460D, 0xBBD1997B}}},
+	{{{0x00AAAB06, 0x3FF00080}}, {{0x2ABAD90D, 0xBC93E2BE}},
+	  {{0xAACCCCDA, 0xBF90002A}}, {{0x3AC1711C, 0x3C293021}}},
+	{{{0x00360010, 0x3FF00048}}, {{0xDB8F0A40, 0x3C899AE6}},
+	  {{0x00103337, 0xBF880024}}, {{0xAF88B300, 0x3C250734}}},
+	{{{0x000AAAAC, 0x3FF00020}}, {{0x1862ADFD, 0x3C76C186}},
+	  {{0xAAACCCCD, 0xBF80000A}}, {{0x9193923E, 0xBBBA01FC}}},
+	{{{0x0000AAAB, 0x3FF00008}}, {{0x8D68D67B, 0xBC93E93E}},
+	  {{0xAAAACCCD, 0xBF700002}}, {{0x17BFB4DB, 0x3C093193}}},
+	{{{0x00000000, 0x3FF00000}}, {{0x00000000, 0x00000000}},
+	  {{0x00000000, 0x00000000}}, {{0x00000000, 0x00000000}}},
+	{{{0x0000AAAB, 0x3FF00008}}, {{0x8D68D67B, 0xBC93E93E}},
+	  {{0xAAAACCCD, 0x3F700002}}, {{0x17BFB4DB, 0xBC093193}}},
+	{{{0x000AAAAC, 0x3FF00020}}, {{0x1862ADFD, 0x3C76C186}},
+	  {{0xAAACCCCD, 0x3F80000A}}, {{0x9193923E, 0x3BBA01FC}}},
+	{{{0x00360010, 0x3FF00048}}, {{0xDB8F0A40, 0x3C899AE6}},
+	  {{0x00103337, 0x3F880024}}, {{0xAF88B300, 0xBC250734}}},
+	{{{0x00AAAB06, 0x3FF00080}}, {{0x2ABAD90D, 0xBC93E2BE}},
+	  {{0xAACCCCDA, 0x3F90002A}}, {{0x3AC1711C, 0xBC293021}}},
+	{{{0x01A0AC06, 0x3FF000C8}}, {{0x673A2EEE, 0xBC7BD6C4}},
+	  {{0x55BD803E, 0x3F940053}}, {{0xCA73460D, 0x3BD1997B}}},
+	{{{0x0360040D, 0x3FF00120}}, {{0x402EAB5F, 0xBC884C57}},
+	  {{0x01033411, 0x3F980090}}, {{0xDD340191, 0x3C37E141}}},
+	{{{0x0640B4E1, 0x3FF00188}}, {{0x8827C989, 0x3C7FB10F}},
+	  {{0xACDAE8F4, 0x3F9C00E4}}, {{0x22A0BAC6, 0x3BE94741}}},
+	{{{0x0AAAC16C, 0x3FF00200}}, {{0x578DDD8D, 0x3C88618F}},
+	  {{0xACCCD00D, 0x3FA000AA}}, {{0x1EFF67C8, 0x3BFD9E59}}},
+	{{{0x11162E22, 0x3FF00288}}, {{0x2A930764, 0x3C6F0E22}},
+	  {{0x03D82DD0, 0x3FA200F3}}, {{0x0CBDB96B, 0x3C4BE9EF}}},
+	{{{0x1A0B0179, 0x3FF00320}}, {{0xD21A4C9A, 0x3C9FA45B}},
+	  {{0x5BD80F80, 0x3FA4014D}}, {{0xA4813A5B, 0x3C45A2E6}}},
+	{{{0x26214474, 0x3FF003C8}}, {{0x45DFB29B, 0xBC4AE17A}},
+	  {{0xB526F7CF, 0x3FA601BB}}, {{0x2DA1796B, 0xBC39422F}}},
+	{{{0x36010336, 0x3FF00480}}, {{0x10BEB244, 0xBC89227D}},
+	  {{0x10336ABF, 0x3FA80240}}, {{0xC229B627, 0xBC4941AF}}},
+	{{{0x4A624DAE, 0x3FF00548}}, {{0x23E9C180, 0x3C5D0575}},
+	  {{0x6D81EE12, 0x3FAA02DC}}, {{0x7E00BA39, 0xBC2A5E3B}}},
+	{{{0x640D384F, 0x3FF00620}}, {{0x170FB049, 0xBC97FCBC}},
+	  {{0xCDAF09CF, 0x3FAC0392}}, {{0x7D4F7337, 0xBC2B59CD}}},
+	{{{0x83D9DCD5, 0x3FF00708}}, {{0x430DE399, 0xBC9EC747}},
+	  {{0x317148DD, 0x3FAE0465}}, {{0x7929765A, 0xBC4B5DB1}}},
+	{{{0xAAB05B20, 0x3FF00800}}, {{0x9FEBDB21, 0xBC936EB9}},
+	  {{0xCCCD9CDD, 0x3FB002AA}}, {{0xFAC9C47C, 0xBC53A7FD}}},
+	{{{0xD988DA1B, 0x3FF00908}}, {{0x94C96CA5, 0x3C9519B1}},
+	  {{0x038EB7A7, 0x3FB10333}}, {{0x317BAEA7, 0xBC044B95}}},
+	{{{0x116B88B6, 0x3FF00A21}}, {{0xAAAEC5A4, 0xBC71D458}},
+	  {{0x3D8440EF, 0x3FB203CC}}, {{0x41B5A4E1, 0xBC1EF162}}},
+	{{{0x53709EEA, 0x3FF00B49}}, {{0xF8CDACD0, 0xBC9DF4D4}},
+	  {{0x7B47880C, 0x3FB30477}}, {{0x3B77E1B2, 0x3C517BE5}}},
+	{{{0xA0C05ED4, 0x3FF00C81}}, {{0x7A57AC2E, 0xBC7736A7}},
+	  {{0xBD83E026, 0x3FB40535}}, {{0x5F0B8AC5, 0xBC4B9B73}}},
+	{{{0xFA9315DF, 0x3FF00DC9}}, {{0x602B4C56, 0xBC84D0E2}},
+	  {{0x04F7A0DD, 0x3FB50608}}, {{0xEDAF37D2, 0x3C239FF7}}},
+	{{{0x62311DF8, 0x3FF00F22}}, {{0xA7C410F3, 0x3C99322E}},
+	  {{0x5275270D, 0x3FB606EF}}, {{0xE6EE4DC3, 0xBC56910E}}},
+	{{{0xD8F2DEDB, 0x3FF0108A}}, {{0x53B40698, 0x3C93DC21}},
+	  {{0xA6E3D59B, 0x3FB707EC}}, {{0xF456FFFF, 0xBC5030B2}}},
+	{{{0x6040CF67, 0x3FF01203}}, {{0x422FB0BC, 0x3C9847C0}},
+	  {{0x03411660, 0x3FB80901}}, {{0x10739476, 0x3C5DD342}}},
+	{{{0xF993770A, 0x3FF0138B}}, {{0xB809A4D7, 0xBC7502E0}},
+	  {{0x68A15B27, 0x3FB90A2D}}, {{0x7F556554, 0x3C5B1BE3}}},
+	{{{0xA6736F36, 0x3FF01524}}, {{0xC450FC30, 0x3C930803}},
+	  {{0xD8311EBE, 0x3FBA0B72}}, {{0x50193D71, 0x3C507AA8}}},
+	{{{0x687964EF, 0x3FF016CD}}, {{0x209297AD, 0xBC9D38AB}},
+	  {{0x5335E625, 0x3FBB0CD2}}, {{0xFBDC145A, 0x3C480157}}},
+	{{{0x414E1A5C, 0x3FF01886}}, {{0xE0B191DA, 0x3C4976C5}},
+	  {{0xDB0F41D4, 0x3FBC0E4C}}, {{0xC9BFC58B, 0xBC586525}}},
+	{{{0x32AA6878, 0x3FF01A4F}}, {{0x67BCC8B5, 0x3C833FDA}},
+	  {{0x7137CF18, 0x3FBD0FE3}}, {{0x698E234C, 0xBC4AE71D}}},
+	{{{0x3E5740C5, 0x3FF01C28}}, {{0x9EC02117, 0x3C95D295}},
+	  {{0x17463991, 0x3FBE1197}}, {{0x410E61A9, 0x3C5E1FCA}}},
+	{{{0x662DAF18, 0x3FF01E11}}, {{0x3120653C, 0xBC833F82}},
+	  {{0xCEEE3CC9, 0x3FBF1368}}, {{0x7BD924AB, 0xBC5213E7}}},
+	{{{0xAC16DB6F, 0x3FF0200A}}, {{0x99576FC1, 0xBC809B4F}},
+	  {{0xCD00D2F1, 0x3FC00AAC}}, {{0x146349DE, 0xBC53EA29}}},
+	{{{0x120C0BDE, 0x3FF02214}}, {{0x6B72974E, 0xBC9456D2}},
+	  {{0x3D38AAB7, 0x3FC08BB5}}, {{0xD37D3177, 0x3C60FB6D}}},
+	{{{0x9A16A685, 0x3FF0242D}}, {{0x295277DB, 0xBC7352FD}},
+	  {{0x392720B0, 0x3FC10CCE}}, {{0x1E4C8E28, 0x3C55A291}}},
+	{{{0x4650339C, 0x3FF02657}}, {{0x0688DD52, 0xBC31EC5D}},
+	  {{0x41E53B8C, 0x3FC18DF8}}, {{0x50E682BB, 0x3C49852D}}},
+	{{{0x18E25F8B, 0x3FF02891}}, {{0x524ABA66, 0xBC9A7DA4}},
+	  {{0xD89D0ECD, 0x3FC20F33}}, {{0x55A9198D, 0xBC6557F7}}},
+	{{{0x1406FD12, 0x3FF02ADB}}, {{0x720D8336, 0x3C969329}},
+	  {{0x7E8A3BEF, 0x3FC29081}}, {{0x8F21151D, 0xBC65A4E2}}},
+	{{{0x3A080789, 0x3FF02D35}}, {{0xF6C7E6F8, 0xBC907780}},
+	  {{0xB4FA73A6, 0x3FC311E1}}, {{0x4C87081D, 0xBC61065E}}},
+	{{{0x8D3FA521, 0x3FF02F9F}}, {{0x88A18235, 0xBC58A44A}},
+	  {{0xFD4DF72A, 0x3FC39354}}, {{0x64EC3B0C, 0x3C4EAAC2}}},
+	{{{0x10182946, 0x3FF0321A}}, {{0xFE5F3FF1, 0x3C88FA5C}},
+	  {{0xD8F81999, 0x3FC414DB}}, {{0x0B2260AC, 0xBC3E1438}}},
+	{{{0xC50C1706, 0x3FF034A4}}, {{0x7ECC2F29, 0xBC8A9076}},
+	  {{0xC97FC168, 0x3FC49676}}, {{0x93C07384, 0xBC6B5D13}}},
+	{{{0xAEA6238A, 0x3FF0373F}}, {{0x72989A92, 0xBC73E9A1}},
+	  {{0x507FE9EB, 0x3FC51826}}, {{0x6946DA28, 0xBC6AC219}}},
+	{{{0xCF8138A4, 0x3FF039EA}}, {{0x8FE6098D, 0x3C8ACC0C}},
+	  {{0xEFA824F1, 0x3FC599EA}}, {{0x2B9BA1A8, 0xBC5F28E7}}},
+	{{{0x2A487769, 0x3FF03CA6}}, {{0xB95A2E63, 0xBC9585FD}},
+	  {{0x28BD1C73, 0x3FC61BC5}}, {{0x2267ECEB, 0xBC625559}}},
+	{{{0xC1B73AD9, 0x3FF03F71}}, {{0xA8202E85, 0xBC885168}},
+	  {{0x7D991458, 0x3FC69DB5}}, {{0x97B08BD2, 0xBC69321C}}},
+	{{{0x98991A9F, 0x3FF0424D}}, {{0xA130683D, 0x3C66BB23}},
+	  {{0x702C6C4F, 0x3FC71FBC}}, {{0x00C832DD, 0x3C6BAA2A}}},
+	{{{0xB1C9EDDA, 0x3FF04539}}, {{0xC7598281, 0x3C8D2224}},
+	  {{0x827E21C3, 0x3FC7A1DA}}, {{0x06D46085, 0x3C6CB79F}}},
+	{{{0x1035CDFA, 0x3FF04836}}, {{0xBBC5EC1C, 0xBC9E50AA}},
+	  {{0x36AC51DD, 0x3FC82410}}, {{0xDF8CB355, 0x3C5A42DC}}},
+	{{{0xB6D919A9, 0x3FF04B42}}, {{0x92AA0A0B, 0xBC9F2338}},
+	  {{0x0EECBBA5, 0x3FC8A65E}}, {{0x0663DF15, 0xBC6339DB}}},
+	{{{0xA8C077CC, 0x3FF04E5F}}, {{0xECF07BF2, 0xBC9D8190}},
+	  {{0x8D8D4236, 0x3FC928C4}}, {{0x370EDF81, 0x3C556048}}},
+	{{{0xE908DA8C, 0x3FF0518C}}, {{0x25A535E2, 0x3C987D18}},
+	  {{0x34F46F10, 0x3FC9AB44}}, {{0x57573053, 0x3C1274BC}}},
+	{{{0x7ADF8277, 0x3FF054CA}}, {{0x377A9F8C, 0x3C89C0C1}},
+	  {{0x87A1F479, 0x3FCA2DDD}}, {{0xF07409B2, 0x3C67E5CE}}},
+	{{{0x618201A8, 0x3FF05818}}, {{0x5A557953, 0xBC8BFA98}},
+	  {{0x082F3002, 0x3FCAB091}}, {{0x60BF022C, 0xBC4B6626}}},
+	{{{0xA03E3F07, 0x3FF05B76}}, {{0x2B52E765, 0x3C7CA615}},
+	  {{0x394FAD1B, 0x3FCB335F}}, {{0x34B51ACE, 0x3C47F257}}},
+	{{{0x3A727999, 0x3FF05EE5}}, {{0x6647668D, 0x3C92512F}},
+	  {{0x9DD1A7CC, 0x3FCBB648}}, {{0x3ED3824D, 0xBC234425}}},
+	{{{0x338D4BDC, 0x3FF06264}}, {{0xF34422A4, 0xBC90000F}},
+	  {{0xB89E8F7F, 0x3FCC394D}}, {{0x52292D2D, 0x3C646F77}}},
+	{{{0x8F0DAF34, 0x3FF065F3}}, {{0xAF1520A9, 0xBC7821B3}},
+	  {{0x0CBB89ED, 0x3FCCBC6F}}, {{0x51092884, 0x3C4B40A0}}},
+	{{{0x5082FF6E, 0x3FF06993}}, {{0xD7395A9F, 0x3C7685C4}},
+	  {{0x1D49F620, 0x3FCD3FAD}}, {{0x26ECE4F0, 0xBC5DE851}}},
+	{{{0x7B8CFE4D, 0x3FF06D43}}, {{0xD1025E7E, 0xBC73ADF7}},
+	  {{0x6D87EF96, 0x3FCDC308}}, {{0x2A97B34C, 0xBC6C0BD9}}},
+	{{{0x13DBD729, 0x3FF07104}}, {{0xCA5328ED, 0x3C766560}},
+	  {{0x80D0D17F, 0x3FCE4681}}, {{0x658D0660, 0xBC605627}}},
+	{{{0x1D3022A1, 0x3FF074D5}}, {{0x2426EF93, 0x3C9E93F8}},
+	  {{0xDA9DBA19, 0x3FCECA18}}, {{0x491D8A98, 0xBC36D470}}},
+	{{{0x9B5AEA5C, 0x3FF078B6}}, {{0x6B6D819B, 0xBC8880D6}},
+	  {{0xFE860E28, 0x3FCF4DCE}}, {{0xC6A2C678, 0x3C6883D4}}},
+	{{{0x923DACD6, 0x3FF07CA8}}, {{0xE736D67A, 0xBC9653A7}},
+	  {{0x703FFC8F, 0x3FCFD1A4}}, {{0xA8860819, 0x3C59EA3B}}},
+	{{{0x05CA6146, 0x3FF080AB}}, {{0xFC66378F, 0xBC723216}},
+	  {{0xD9D08102, 0x3FD02ACC}}, {{0x20C03715, 0xBC5998B3}}},
+	{{{0xFA037B8F, 0x3FF084BD}}, {{0xE3C5EBFC, 0xBC7D97E2}},
+	  {{0xA64F3673, 0x3FD06CD7}}, {{0x839871E4, 0x3C6370BA}}},
+	{{{0x72FBF041, 0x3FF088E1}}, {{0x0D55140F, 0xBC9DE12F}},
+	  {{0xDFA6F09B, 0x3FD0AEF2}}, {{0xA7827088, 0xBC414E60}}},
+	{{{0x74D738AC, 0x3FF08D15}}, {{0xC4A8C043, 0xBC984BD5}},
+	  {{0xC7F2EE53, 0x3FD0F11E}}, {{0xC5355AFC, 0x3C75BADF}}},
+	{{{0x03C95705, 0x3FF0915A}}, {{0x0BD1CD00, 0x3C78A8A6}},
+	  {{0xA15F1D6C, 0x3FD1335B}}, {{0x341ED7B6, 0xBC53CE0F}}},
+	{{{0x2416DA9A, 0x3FF095AF}}, {{0x39DC7749, 0x3C8024A0}},
+	  {{0xAE285CD6, 0x3FD175A9}}, {{0xC4496E39, 0xBC3DB749}}},
+	{{{0xDA14E415, 0x3FF09A14}}, {{0x233B29C8, 0xBC965668}},
+	  {{0x309CBEE1, 0x3FD1B809}}, {{0xBBB1CB75, 0x3C6E5B16}}},
+	{{{0x2A2929D1, 0x3FF09E8B}}, {{0x535446B4, 0xBC9EE5F5}},
+	  {{0x6B1BCB8A, 0x3FD1FA7A}}, {{0x5A4CB636, 0x3C50621A}}},
+	{{{0x18C9FC41, 0x3FF0A312}}, {{0x09E044C2, 0x3C885259}},
+	  {{0xA016C2D9, 0x3FD23CFD}}, {{0x449D986B, 0xBC500762}}},
+	{{{0xAA7E4A68, 0x3FF0A7A9}}, {{0x281520E0, 0x3C71B296}},
+	  {{0x1210DF54, 0x3FD27F93}}, {{0x502A1E59, 0xBC6EF999}}},
+	{{{0xE3DDA65B, 0x3FF0AC51}}, {{0x9DACA977, 0x3C9B22C0}},
+	  {{0x039F9881, 0x3FD2C23B}}, {{0x9B082732, 0x3C577301}}},
+	{{{0xC99049DE, 0x3FF0B10A}}, {{0x610FCC2E, 0xBC617C2D}},
+	  {{0xB76AE57E, 0x3FD304F5}}, {{0x42E4CA9C, 0xBC75EB09}}},
+	{{{0x604F1B07, 0x3FF0B5D4}}, {{0x07EECFA5, 0x3C732C14}},
+	  {{0x702D7FA4, 0x3FD347C3}}, {{0x701422C8, 0x3C7435BE}}},
+	{{{0xACE3B0FC, 0x3FF0BAAE}}, {{0x75521E77, 0xBC93292F}},
+	  {{0x70B52549, 0x3FD38AA4}}, {{0x0B01B8A6, 0xBC67F94B}}},
+	{{{0xB42858B8, 0x3FF0BF99}}, {{0x0B1F30A5, 0xBC67AD83}},
+	  {{0xFBE2DC86, 0x3FD3CD98}}, {{0x269038FC, 0xBC7D0A5E}}},
+	{{{0x7B0819E9, 0x3FF0C495}}, {{0x6E52BA24, 0x3C9A26E0}},
+	  {{0x54AB361D, 0x3FD410A1}}, {{0xCF7DA2E8, 0xBC78DCB6}}},
+	{{{0x067EBBDA, 0x3FF0C9A2}}, {{0x803D61F3, 0x3C813CD8}},
+	  {{0xBE16906C, 0x3FD453BD}}, {{0x45D8536E, 0x3C78D781}}},
+	{{{0x5B98CA6C, 0x3FF0CEBF}}, {{0x09B9F220, 0x3C9E8080}},
+	  {{0x7B415A78, 0x3FD496EE}}, {{0xBDFE61F1, 0xBC51C3BA}}},
+	{{{0x7F739B28, 0x3FF0D3ED}}, {{0xEA8A9ED5, 0xBC99722F}},
+	  {{0xCF5C5703, 0x3FD4DA33}}, {{0x7BE71FBE, 0x3C7B1F07}}},
+	{{{0x773D5255, 0x3FF0D92C}}, {{0x3D5D1DA2, 0xBC84956C}},
+	  {{0xFDACDFC5, 0x3FD51D8D}}, {{0x98966B86, 0xBC419F0E}}},
+	{{{0x4834E82E, 0x3FF0DE7C}}, {{0x5F430E44, 0xBC877BEC}},
+	  {{0x498D28AA, 0x3FD560FD}}, {{0xCCEA8A26, 0xBC4F07B3}}},
+	{{{0xF7AA2E1B, 0x3FF0E3DC}}, {{0xF7FB3140, 0x3C9C05BD}},
+	  {{0xF66C8331, 0x3FD5A481}}, {{0xCFF78DD1, 0x3C6E8E0C}}},
+	{{{0x8AFDD406, 0x3FF0E94E}}, {{0xB0B14F49, 0xBC9330CB}},
+	  {{0x47CFA1DB, 0x3FD5E81C}}, {{0x4E7B2C63, 0xBC791EC5}}},
+	{{{0x07A16DB4, 0x3FF0EED1}}, {{0xD3E071F5, 0x3C988108}},
+	  {{0x8150DBAB, 0x3FD62BCC}}, {{0xF95D00CA, 0x3C7700BD}}},
+	{{{0x73177841, 0x3FF0F464}}, {{0x29551C51, 0xBC97DF60}},
+	  {{0xE6A06FC9, 0x3FD66F92}}, {{0xD9A66B42, 0xBC70A785}}},
+	{{{0xD2F35F97, 0x3FF0FA08}}, {{0x9DAB3AF1, 0x3C9B39D1}},
+	  {{0xBB84C928, 0x3FD6B36F}}, {{0xFEFE1E5F, 0x3C68DAF8}}},
+}; 
+/* the coefficients for the cosh-approximations */ 
+  static const db_number c0 =   {{0x00000000,0x3FF00000}};     /*1.0000000000e+00*/  
+  static const db_number c2 =   {{0x00000000,0x3FE00000}};     /*5.0000000000e-01*/  
+  static const db_number c4 =   {{0x55555555,0x3FA55555}};     /*4.1666666667e-02*/  
+  static const db_number c6 =   {{0x16C16C17,0x3F56C16C}};     /*1.3888888889e-03*/  
+  static const db_number c8 =   {{0x1A01A01A,0x3EFA01A0}};     /*2.4801587302e-05*/  
+/* the coefficients for the sinh-approximations */
+  static  const db_number s1 =   {{0x00000000,0x3FF00000}};     /*1.0000000000e+00*/  
+  static  const db_number s3 =   {{0x55555555,0x3FC55555}};     /*1.6666666667e-01*/  
+  static  const db_number s5 =   {{0x11111111,0x3F811111}};     /*8.3333333333e-03*/  
+  static  const db_number s7 =   {{0x1A01A01A,0x3F2A01A0}};     /*1.9841269841e-04*/  
+#endif  
diff --git a/src/crlibm/docs/latex/0_getting-started.tex b/src/crlibm/docs/latex/0_getting-started.tex
new file mode 100644
index 0000000..de6b718
--- /dev/null
+++ b/src/crlibm/docs/latex/0_getting-started.tex
@@ -0,0 +1,223 @@
+\section{What is \crlibm?}
+
+The \crlibm\ project aims at developing a portable, proven, correctly rounded,
+and efficient mathematical library (\texttt{libm}) for double precision. 
+
+\begin{description}
+\item[correctly rounded] Current \texttt{libm} implementation do not
+  always return the floating-point number that is closest to the exact
+  mathematical result. As a consequence, different \texttt{libm}
+  implementation will return different results for the same input,
+  which prevents full portability of floating-point applications. In
+  addition, few libraries support but the round-to-nearest mode of the
+  IEEE754/IEC 60559 standard for floating-point arithmetic (hereafter
+  usually referred to as the IEEE-754 standard). \crlibm\ provides the
+  four rounding modes: To nearest, to $+\infty$, to $-\infty$ and to
+  zero.
+
+\item[portable] \crlibm\ is written in C and will be compiled by any
+  compiler fulfilling basic requirements of the ISO/IEC 9899:1999
+  (hereafter referred to as C99) standard.  This is the case of
+  \texttt{gcc} version 3 and higher which is available on most
+  computer systems. It also requires a floating-point implementation
+  respecting the IEEE-754 standard, which is also available on
+  most modern systems. \crlibm\ has been tested on a large range of
+  systems.
+
+\item[proven] Other libraries attempt to provide correctly-rounded
+  result. For theoretical and practical reasons, this behaviour is
+  difficult to prove, and in extreme cases termination is not even
+  guaranteed. \crlibm\ intends to provide a comprehensive proof of the
+  theoretical possibility of correct rounding, the algorithms used,
+  and the implementation, assuming C99 and IEEE-754 compliance.
+
+\item[efficient] performance and resource usage of \crlibm\ should be
+  comparable to existing \texttt{libm} implementations, both in
+  average and in the worst case. In contrast, other correctly-rounded
+  libraries have worst case performance and memory consumption several
+  order of magnitude larger than standard \texttt{libm}s.
+
+\end{description}
+
+The ultimate goal of the \crlibm\ project is to push towards the
+standardization of correctly-rounded elementary functions.
+
+\section{Compilation and installation}
+See the \texttt{INSTALL} file in the main directory. This library is
+developed using the GNU autotools, and can therefore be compiled on
+most Unix-like systems by \texttt{./configure; make}. 
+
+
+The command \texttt{make check} will launch the selftest.
+For more advanced testing you will need to have MPFR installed (see
+\url{www.mpfr.org}) and to pass the \texttt{--enable-mpfr} flag to
+\texttt{configure}. For other flags, see \texttt{./configure --help} .
+
+\section{Using \texttt{crlibm} functions in your program}
+
+Currently \texttt{crlibm} functions have different names from the
+standard \texttt{math.h} functions. For example, for the sine function
+(\texttt{double sin(double)} in the standard \texttt{math.h}), you
+have four different functions in \texttt{crlibm} for the four
+different rounding modes. These functions are named \texttt{sin\_rn},
+\texttt{sin\_ru}, \texttt{sin\_rd} and \texttt{sin\_rz} for round to the
+nearest, round up, round down and round to zero respectively. These
+functions are declared in the C header file \texttt{crlibm.h}.
+
+The \texttt{crlibm} library relies on double-precision IEEE-754
+compliant floating-point operations.  For some processors and some
+operating systems (most notably IA32 and IA64 processors under
+GNU/Linux), the default precision is set to double-extended.  On such
+systems you will need to call the \texttt{crlibm\_init()} function
+before using any \texttt{crlibm} function to ensure such compliance.
+This has the effect of setting the processor flags to IEEE-754
+double-precision with rounding to the nearest mode.  This function
+returns the previous processor status, so that previous mode can be
+restored using the function \texttt{crlibm\_exit()}. Note that you
+probably only need one call to \texttt{crlibm\_init()} at the beginning
+of your program, not one call before each call to a mathematical
+function.
+
+Here is a non-exhaustive list of systems on which
+\texttt{crlibm\_init()} is NOT needed, and which can therefore use
+\crlibm\ as a transparent replacement of the standard \texttt{libm}:
+
+\begin{itemize}
+\item Most Power/PowerPC based systems, including those from Apple or from IBM;
+\item All the 64-bit Linux versions: the reason is that all
+  x86-compatible processors (by AMD and Intel) supporting 64-bit
+  addressing also feature SSE2 FP instructions, which are cleaner and
+  more efficient than the legacy x87 FPU. On such systems, SSE2 is
+  therefore used by default by \texttt{gcc} for double-precision FP
+  computing.
+\item On recent 32-bit x86 processors also featuring SSE2 extensions
+  (including pentium 4 and later, and generally most processors
+  produced after 2005), you can try to force the use of SSE2
+  instructions using \texttt{configure --enable-sse2}. Beware, the
+  code produced will not run on older hardware.
+\end{itemize}
+
+Here's an example function named \texttt{compare.c} using the cosine
+function from \texttt{crlibm} library.
+
+\begin{lstlisting}[label={chap0:lst:prog_example},caption={compare.c},firstnumber=1]
+#include<stdio.h>
+#include<math.h>
+#include<crlibm.h>
+
+int main(void){
+  double x, res_libm, res_crlibm;
+
+  printf("Enter a floating point number: ");
+  scanf("%lf", &x);
+  res_libm = cos(x);
+  crlibm_init(); /* no need here to save the old processor state returned by crlibm_init() */ 
+  res_crlibm = cos_rn(x);
+  printf("\n x=%.25e \n", x);
+  printf("\n cos(x) with the system : %.25e \n", res_libm);
+  printf("\n cos(x) with crlibm     : %.25e \n", res_crlibm);
+  return 0;
+}
+\end{lstlisting}
+
+This example will be compiled with \texttt{gcc compare.c -lm -lcrlibm -o compare}
+
+
+\section{Currently available functions}
+
+The currently available functions are summarized in
+Table~\ref{tab:currentstate}.
+\begin{table}[t]
+  \begin{center}
+\renewcommand{\arraystretch}{1.2}
+\begin{tabular}{|c|c|c|c|c||c|c|}    \hline
+ & \multicolumn{4}{c||}{\crlibm\ name} &\multicolumn{2}{c|}{State of the proof} \\ \cline{2-7}
+ \raisebox{5pt}{C99} & to nearest & to $+ \infty$ & to $- \infty$ & to zero
+ & Worst cases & Proof of the code \\ \hline\hline
+    exp & exp\_rn & exp\_ru & exp\_rd & exp\_rz & complete& complete (formal)\\ \hline
+    expm1 & expm1\_rn & expm1\_ru & expm1\_rd & expm1\_rz & complete & partial\\ \hline
+    log & log\_rn & log\_ru & log\_rd & log\_rz & complete& complete\\ \hline
+    log1p & log1p\_rn & log1p\_ru & log1p\_rd & log1p\_rz & complete& partial \\ \hline
+    log2 & log2\_rn & log2\_ru & log2\_rd & log2\_rz & complete& partial\\ \hline
+    log10 & log10\_rn & log10\_ru & log10\_rd & log10\_rz& complete& partial \\ \hline
+    sin & sin\_rn & sin\_ru & sin\_rd & sin\_rz & $[-\pi, \pi]$& complete (paper+formal)\\ \hline
+    cos & cos\_rn & cos\_ru & cos\_rd & cos\_rz & $[-\pi/2, \pi/2]$& complete (paper+formal)\\ \hline
+    tan & tan\_rn & tan\_ru & tan\_rd & tan\_rz & $[-\pi/2, \pi/2]$& complete (paper+formal)\\ \hline
+    asin & asin\_rn & asin\_ru & asin\_rd & asin\_rz & complete & partial \\ \hline
+    acos & acos\_rn & acos\_ru & acos\_rd & acos\_rz & complete & partial\\ \hline
+    atan & atan\_rn & atan\_ru & atan\_rd & atan\_rz & complete & complete (paper)\\ \hline
+    sinh & sinh\_rn & sinh\_ru & sinh\_rd & sinh\_rz & complete & complete (paper)\\ \hline
+    cosh & cosh\_rn & cosh\_ru & cosh\_rd & cosh\_rz & complete & complete (paper)\\ \hline
+    sinpi & sinpi\_rn & sinpi\_ru & sinpi\_rd & sinpi\_rz & complete & complete (formal)\\ \hline
+    cospi & cospi\_rn & cospi\_ru & cospi\_rd & cospi\_rz & complete & complete (formal)\\ \hline
+    tanpi & tanpi\_rn & tanpi\_ru & tanpi\_rd & tanpi\_rz & $[2^{-25},2^{-5}]$& complete (formal)\\ \hline
+%    asinpi & asinpi\_rn & asinpi\_ru & asinpi\_rd & asinpi\_rz & complete & partial \\ \hline
+%    acospi & acospi\_rn & acospi\_ru & acospi\_rd & acospi\_rz & complete & partial\\ \hline
+    atanpi & atanpi\_rn & atanpi\_ru & atanpi\_rd & atanpi\_rz & $[\tan(2^{-25}\pi),\tan(2^{-5}\pi)]$ & complete (paper)\\ \hline
+    pow & pow\_rn &  &  &  & see chapter \ref{chap:pow} & see chapter \ref{chap:pow}\\ \hline
+\end{tabular}
+\end{center}
+  
+\caption{Current state of \crlibm.}
+\label{tab:currentstate}
+\end{table}
+
+Here are some comments on this table:
+\begin{itemize}
+\item Every function takes a double-precision number and returns a
+  double-precision number.
+\item For trigonometric functions the angles are
+  expressed in radian.
+\item The two last columns describe the state of the
+  proof:
+  \begin{itemize}
+  \item The first indicates the state of the search for worst cases
+    for correct rounding \cite{LMT98,Lef2000}. If it indicates
+    ``complete'', it means that the function is guaranteed to return
+    correct rounding on its whole floating-point input range.
+    Otherwise, it mentions the interval on which the function is
+    guaranteed to return correct rounding. Note that \crlibm\ is
+    designed in such a way that there is a very high probability that it
+    is correctly rounded everywhere, however this is not yet proven
+    formally. This question is explained in details in section
+    \ref{section:crlibm-presentation}.
+
+  \item The second indicates the state of the proof of the code
+    itself. Some (older) functions have a lengthy paper proof in this
+    document, some other have a partial or complete formal proof using
+    the Gappa proof assistant \cite{Melqu05,DinLauMel2005}.
+  \end{itemize}
+\end{itemize}
+
+
+\section{Writing portable floating-point programs}
+
+Here are some rules to help you design programs which have to
+produce exactly the same results on different architectures and
+different operating systems.
+\begin{itemize}
+\item Try to use the same compiler on all the systems.
+\item Demand C99 compliance (pass the \texttt{-C99},
+  \texttt{-std=c99}, or similar flag to the compiler). For Fortran,
+  demand F90 compliance.
+\item Call \texttt{crlibm\_init()} before you begin floating-point
+  computation. This ensures that the computations will all be done in
+  IEEE-754 double-precision with round to nearest mode, which is the
+  largest precision well supported by most systems. On IA32
+  processors, problems may still occur for extremely large or
+  extremely small values.
+\item Do not hesitate to rely heavily on parentheses (the compiler
+  should respect them according to the standards, although of course some
+  won't). Many times, wondering where the parentheses should go in an
+  expression like \texttt{a+b+c+d} will even help you improve the
+  accuracy of your code.
+\item Use \texttt{crlibm} functions in place of \texttt{math.h} functions.
+\end{itemize}
+
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
+
diff --git a/src/crlibm/docs/latex/0_intro.tex b/src/crlibm/docs/latex/0_intro.tex
new file mode 100644
index 0000000..3946d5d
--- /dev/null
+++ b/src/crlibm/docs/latex/0_intro.tex
@@ -0,0 +1,558 @@
+
+
+
+
+\section{Correct rounding and elementary functions}
+\label{sect:intro}
+
+The need for accurate elementary functions is important in many
+critical programs.  Methods for computing these functions include
+table-based methods\cite{Far81,Tan91}, polynomial approximations and
+mixed methods\cite{DauMor2k}. See the books by Muller\cite{Muller97} or
+Markstein\cite{Markstein2000} for recent surveys on the subject.
+
+The IEEE-754 standard for floating-point arithmetic\cite{IEEE754}
+defines the usual floating-point formats (single and double
+precision). It also specifies the behavior of the four basic operators
+($+,-,\times,\div$) and the square root in four rounding modes (to the
+nearest, towards $+\infty$, towards $-\infty$ and towards $0$). Its
+adoption and widespread use have increased the numerical quality of,
+and confidence in floating-point code. In particular, it has improved
+\emph{portability} of such code and allowed construction of
+\emph{proofs} on its numerical behavior. Directed rounding modes
+(towards $+\infty$, $-\infty$ and $0$) also enabled efficient
+\emph{interval arithmetic}\cite{Moore66,KKLRW93}.
+
+However, the IEEE-754 standard specifies nothing about elementary
+functions, which limits these advances to code excluding such
+functions.  Currently, several options exist: on one hand, one can use
+today's mathematical libraries that are efficient but without any
+warranty on the correctness of the results. To be fair, most modern
+libraries are \emph{accurate-faithful}: trying to round to nearest,
+they return a number that is one of the two FP numbers surrounding the
+exact mathematical result, and indeed return the correctly rounded
+result most of the time. This behaviour is sometimes described using
+phrases like \emph{99\% correct rounding} or \emph{0.501 ulp accuracy}.
+
+When stricter guarantees are needed, some multiple-precision packages
+like MPFR \cite{MPFRweb} offer correct rounding in all rounding modes,
+but are several orders of magnitude slower than the usual mathematical
+libraries for the same precision. Finally, there are are currently
+three attempts to develop a correctly-rounded \texttt{libm}. The first
+was IBM's \texttt{libultim}\cite{IBMlibultimweb} which is both
+portable and fast, if bulky, but lacks directed rounding modes needed
+for interval arithmetic. The second was Ar\'enaire's \texttt{crlibm},
+which was first distributed in 2003. The third is Sun
+correctly-rounded mathematical library called \texttt{libmcr}, whose
+first beta version appeared in 2004.  These libraries are reviewed in
+\ref{section:lib-overview}.
+
+The goal of the \crlibm\ project is to build on a combination of
+several recent theoretical and algorithmic advances to design a proven
+correctly rounded mathematical library, with an overhead  in terms of
+performance and resources acceptable enough to replace existing
+libraries transparently. 
+
+More generally, the \crlibm\ project serves as an open-source
+framework for research on software elementary functions. As a side
+effect, it may be used as a tutorial on elementary function
+development.
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{A methodology for efficient correctly-rounded functions}
+\label{section:methodology}
+
+
+\subsection{The Table Maker's Dilemma}
+
+With a few exceptions, the image $\hat{y}$ of a floating-point number $x$ by
+a transcendental function $f$ is a transcendental number, and can
+therefore not be represented exactly in standard numeration systems.
+The only hope is to compute the floating-point number that is closest
+to (resp.  immediately above or immediately below) the mathematical
+value, which we call the result \emph{correctly rounded} to the
+nearest (resp.  towards $+\infty$ or towards $-\infty$).
+
+It is only possible to compute an approximation ${y}$ to the real
+number $\hat{y}$ with precision $\maxeps{}$. This ensures that the real value
+$\hat{y}$ belongs to the interval $[{y}(1-\maxeps{}) , {y}(1+\maxeps{})]$.
+Sometimes however, this information is not enough to decide correct
+rounding. For example, if $[{y}(1-\maxeps{}) , {y}(1+\maxeps{})]$
+contains the middle of two consecutive floating-point numbers, it is
+impossible to decide which of these two numbers is the correctly
+rounded to the nearest of $\hat{y}$. This is known as the Table Maker's
+Dilemma (TMD). For example, if we consider a numeration system in radix $2$ with $n$-bit mantissa floating point number and $m$ the number of significant bit in $y$ such that $\maxeps{} \leq 2^m$, then the TMD occurs:
+
+\begin{itemize}
+\item for rounding toward $+\infty$, $-\infty$, $0$, when the result is of the form:
+
+$$\overbrace{\underbrace{1.xxx...xx}_{n~bits}111111...11}^{m~bits}xxx...$$
+or:
+$$\overbrace{\underbrace{1.xxx...xx}_{n~bits}000000...00}^{m~bits}xxx...$$
+\item for rounding to nearest, when the result is of the form:
+$$\overbrace{\underbrace{1.xxx...xx}_{n~bits}011111...11}^{m~bits}xxx...$$
+or :
+$$\overbrace{\underbrace{1.xxx...xx}_{n~bits}100000...00}^{m~bits}xxx...$$
+\end{itemize}
+
+
+\subsection{The onion peeling strategy}
+
+A method described by Ziv \cite{Ziv91} is to increase the precision
+$\maxeps$ of the approximation until the correctly rounded value can
+be decided.  Given a function $f$ and an argument $x$, the value of
+$f(x)$ is first evaluated using a quick approximation of precision
+$\maxeps_1$.  Knowing $\maxeps_1$, it is possible to decide if
+rounding is possible, or if more precision is required, in which case
+the computation is restarted using a slower approximation of precision
+$\maxeps_2$ greater than $\maxeps_1$, and so on. This approach makes
+sense even in terms of average performance, as the slower steps are
+rarely taken.
+
+However there was until recently no practical bound on the termination
+time of such an algorithm. This iteration has been proven to
+terminate, but the actual maximal precision required in the worst case
+is unknown.  This might prevent using this method in critical
+application.
+
+
+
+
+\section{The Correctly Rounded Mathematical Library}
+\label{section:crlibm-presentation}
+
+Our own library, called \crlibm\ for \emph{correctly rounded
+  mathematical library}, is based on the work of
+Lef\`evre and Muller \cite{LMT98,Lef2000} who computed the worst-case $\maxeps$
+required for correctly rounding several functions in double-precision
+over selected intervals in the four IEEE-754 rounding modes. For
+example, they proved that 157 bits are enough to ensure correct rounding
+of the exponential function on all of its domain for the four IEEE-754
+rounding modes.
+
+\subsection{Two steps are enough}
+Thanks to such results, we are able to guarantee correct rounding in
+two iterations only, which we may then optimize separately. The first
+of these iterations is relatively fast and provides between 60 and 80
+bits of accuracy (depending on the function), which is sufficient in
+most cases. It will be referred throughout this document as the \quick\ 
+phase of the algorithm. The second phase, referred to as the
+\accurate\ phase, is dedicated to challenging cases. It is slower but
+has a reasonably bounded execution time, tightly targeted at
+Lef\`evre's worst cases.
+
+Having a proven worst-case execution time lifts the last obstacle to a
+generalization of correctly rounded transcendentals. Besides, having
+only two steps allows us to publish, along with each function, a proof
+of its correctly rounding behavior.
+
+
+\subsection{Portable IEEE-754 FP for a fast first step}
+The computation of a tight bound on the approximation error of the
+first step ($\maxeps_1$) is crucial for the efficiency of the onion
+peeling strategy: overestimating $\maxeps_1$ means going more often
+than needed through the second step, as will be detailed below in
+\ref{sec:error-accuracy-perf}. As we want the proof to be portable as
+well as the code, our first steps are written in strict IEEE-754
+arithmetic. On some systems, this means preventing the
+compiler/processor combination to use advanced floating-point features
+such as fused multiply-and-add or extended double precision. It also
+means that the performance of our portable library will be lower than
+optimized libraries using these features (see \cite{DinErshGast2005} for
+recent research on processor-specific correct-rounding).
+
+To ease these proofs, our first steps make wide use of classical, well
+proven results like Sterbenz' lemma or other floating-point theorems.
+When a result is needed in a precision higher than double precision
+(as is the case of $y_1$, the result of the first step), it is
+represented as as the sum of two floating-point numbers, also called a
+\emph{double-double} number.  There are well-known algorithms for
+computing on double-doubles, and they are presented in the next
+chapter. An advantage of properly encapsulating double-double
+arithmetic is that we can actually exploit fused multiply-and-add
+operators in a transparent manner (this experimental feature is
+currently available for the Itanium and PowerPC platforms, when using
+the \texttt{gcc} compiler).
+
+At the end of the \quick\ phase, a sequence of simple tests on
+$y_1$ knowing $\maxeps_1$ allows to decide whether to go for
+the second step. The sequence corresponding to each rounding mode is
+shared by most functions and is also carefully proven in the next
+chapter.
+
+
+\subsection{Ad-hoc, fast multiple precision for  accurate second step}
+For the second step, we may use two specific multiple-precision libraries:
+
+\begin{itemize}
+\item We first designed an ad-hoc multiple-precision library called Software
+  Carry-Save library \emph{(scslib)} which is lighter and faster than
+  other available libraries for this specific application
+  \cite{DefDin2002,DinDef2003}. This choice is motivated by
+  considerations of code size and performance, but also by the need to
+  be independent of other libraries: Again, we need a library on which
+  we may rely at the proof level. This library is included in \crlibm,
+  but also distributed separately \cite{SCSweb}. This library is
+  described in more details in \ref{sec:SCSLib}.
+\item More recently, we have been using redundant triple-double
+  arithmetic for the second step. This approach is lighter, about ten
+  times faster, and has the advantage of making it easier to reuse
+  information from the fast step in the accurate one. The drawback is
+  that it is more difficult to master. The basic triple-double
+  procedures, and associated usage theorems, are described in a
+  separate document (\texttt{tripledoubleprocedures.pdf}) also
+  available in this distribution.
+\end{itemize}
+
+
+\subsection{Relaxing portability}
+
+The \crlibm\ framework has been used to study the performance
+advantage of using double-extended (DE) arithmetic when available.
+More specifically, the first case may be implemented fully in DE
+precision, and the second step may be implemented fully in double-DE
+arithmetic. Experiments have been performed on the logarithm and
+arctangent functions \cite{DinErshGast2005}. On some systems (mostly
+Linux on an IA32 processor) the logarithm will by default use this
+technology.
+
+Another useful, non-portable hardware feature is the fused
+multiply-and-add available on Power/PowerPC and Itanium. The \crlibm\
+code does its best to use it when available.
+
+
+\subsection{Proving the correct rounding property}
+
+Throughout this document, what we call ``proving'' a function mostly
+means proving a tight bound on the total relative error of our
+evaluation scheme. The actual proof of the correct rounding property
+is then dependent on the availability of an actual worst-case accuracy
+for correctly rounding this function, as computed by Lef\`evre and
+Muller. Three cases may happen:
+\begin{itemize}
+\item The worst case have been computed over the whole domain of the
+  function. In this case the correct rounding property for this
+  function is fully proven. The state of this search for worst cases
+  is described in Table~\ref{tab:currentstate}
+  page~\pageref{tab:currentstate}.
+
+\item The worst cases have been computed only over a subdomain of the
+  function. Then the correct rounding property is proven on this
+  subdomain. Outside of this domain \texttt{crlibm} offers
+  ``astronomical confidence'' that the function is correctly rounded:
+  to the best of current knowledge \cite{Gal86, DinErshGast2005}, the
+  probability of the existence of a misrounded value in the function's
+  domain is lower than $2^{-40}$. This is
+  the case of the trigonometric functions, for instance. The
+  actual domain on which the proof is complete is mentionned in the
+  respective chapter of this document, and summed up in Table~\ref{tab:currentstate}.
+\item The search for worst cases hasn't begun yet.
+\end{itemize}
+
+We acknowledge that the notion of astronomical confidence breaks the
+objective of guaranteed correct rounding, and we sidestep this problem
+by publishing along with the library (in this document) the domain of
+full confidence, which will only expand as time goes.  Such behaviour
+has been proposed as a standard in \cite{DefHanLefMulRevZim2004}.  The
+main advantage of this approach is that it ensures bounded and
+consistent worst-case execution time (within a factor 100 of that of
+the best available faithful \texttt{libm}s), which we believe is
+crucial to the generalization of correctly rounded functions.
+
+The alternative to our approach would be to implement a
+multi-layer onion-peeling strategy, as do GNU MPFR and Sun's
+\texttt{libmcr}. There are however many drawbacks to this approach, too:
+
+\begin{itemize}
+
+\item One may argue that, due to the finite nature of computers, it
+  only pushes the bounds of astronomy a little bit further.
+
+\item The multilayer approach is only proven to terminate on
+  elementary functions: the termination proof needs a theorem stating
+  for example that the image of a rational by the function (with some
+  well-known exceptions) will not be a rational. For other library
+  functions like  special functions, we have no such theorem.
+  For these functions, we prefer take the risk of a misrounded
+  value than the risk of an infinite loop.
+
+\item Similarly, the multilayer approach has potentially unbounded
+  execution time and memory consumption which make it unsuitable for
+  real-time or safety-critical applications, whereas crlibm will only
+  be unsuitable if the safety depends on correct rounding, which is
+  much less likely.
+
+\item Multilayer code is probably much more complex and error prone.
+  One important problem is that it contains code that, according all
+  probabilities, will never be run. Therefore, testing this code can
+  not be done on the final production executable, but on a different
+  executable in which previous layers have been disabled. This
+  introduces the possibility of undetected bugs in the final
+  production executable.
+
+\end{itemize}
+
+In the future, we will add, to those \texttt{crlibm} functions for
+which the required worst-case accuracy is unknown, a misround
+detection test at the end of the second step. This test will either
+print out on standard error a lengthy warning inviting to report this
+case, or launch MPFR computation, depending on a compilation switch.
+
+% TODO
+
+
+
+\subsection{Error analysis and the accuracy/performance tradeoff
+  \label{sec:error-accuracy-perf}}
+
+As there are two steps on the evaluation, the proof also usually
+consists of two parts. The code of the second, accurate step is
+usually very simple and straightforward:
+\begin{itemize}
+\item Performance is not that much of an issue, since this step is rarely taken.
+\item All the special cases have already been filtered by the first step.
+\item The \texttt{scslib} library provides an overkill of precision.
+\end{itemize}
+
+Therefore, the error analysis of the second step, which ultimately
+proves the correct rounding property, is not very difficult.
+
+For the first step, however, things are more complicated:
+\begin{itemize}
+\item We have to handle special cases (infinities, NaNs, signed
+  zeroes, over- and underflows).
+\item Performance is a primary concern, sometimes leading to ``dirty
+  tricks'' obfuscating the code.
+\item We have to compute a \emph{tight} error bound, as explained below.
+\end{itemize}
+
+Why do we need a tight error bound? Because the decision to launch the
+second step is taken by a \emph{rounding test}  depending on
+\begin{itemize}
+\item the approximation $y_h+y_l$ computed in the first step, and
+\item this error bound $\maxeps_1$, which is computed statically.
+\end{itemize}
+
+The various rounding tests are detailed and proven in
+\ref{section:testrounding}.  The important notion here is that
+\emph{the probability of launching the second, slower step will be
+  proportional to the error bound $\maxeps_1$ computed for the first step}.
+
+This defines the main performance tradeoff one has to manage when
+designing a correctly-rounded function: The average evaluation time
+will be
+\begin{equation}
+  T_{\mbox{\small avg}} = T_1 + p_2T_2 \label{eq:Tavg}
+\end{equation}
+where $T_1$ and $T_2$ are the execution time of the first and second
+phase respectively (with $T_2\approx 100T_1$ in \crlibm), and $p_2$ is
+the probability of launching the second phase (typically we aim at
+$p_2=1/1000$ so that the average cost of the second step is less than
+$10\%$ of the total.  
+
+As $p_2$ is almost proportional to $\maxeps_1$, to minimise the average
+time, we have to
+\begin{itemize}
+\item balance $T_1$ and $p_2$: this is a performance/precision
+  tradeoff (the faster the first step, the less accurate)
+\item and compute a tight bound on the overall error  $\maxeps_1$.
+\end{itemize}
+
+Computing this tight bound is the most time-consuming part in the
+design of a correctly-rounded elementary function. The proof of the
+correct rounding property only needs a proven bound, but a loose bound
+will mean a larger $p_2$ than strictly required, which directly
+impacts average performance. Compare $p_2=1/1000$ and $p_2=1/500$ for
+$T_2=100T_1$, for instance. As a consequence, when there are multiple
+computation paths in the algorithm, it makes sense to precompute
+different values of $\maxeps_1$ on these different paths (see for
+instance the arctangent and the logarithm).
+
+
+
+
+
+
+Apart from these considerations, computing the errors is mostly
+textbook science. Care must be taken that only \emph{absolute} error
+terms (noted $\delta$) can be added, although some error terms (like
+the rounding error of an IEEE operation) are best expressed as
+\emph{relative} (noted $\epsilon$). Remark also that the error needed
+for the theorems in \ref{section:testrounding} is a \emph{relative}
+error.  Managing the relative and absolute error terms is very
+dependent on the function, and usually involves keeping upper and
+lower bounds on the values manipulated along with the error terms.
+
+Error terms to consider are the following:
+\begin{itemize}
+\item approximation errors  (minimax or Taylor),
+\item rounding error, which fall into two categories:
+  \begin{itemize}
+  \item roundoff errors in values tabulated as doubles or
+    double-doubles (with the exception of roundoff errors on the coefficient
+    of a polynomial, which are counted in the appproximation error),
+  \item roundoff errors in IEEE-compliant operations.
+  \end{itemize}
+\end{itemize}
+
+
+
+
+\section{An overview of other  available mathematical libraries\label{section:lib-overview}}
+
+Many high-quality mathematical libraries are freely available and have
+been a source of inspiration for this work.
+
+Most mathematical libraries do not offer correct rounding. They can be classified as 
+\begin{itemize}
+\item portable libraries  assuming IEEE-754
+  arithmetic, like \emph{fdlibm}, written by Sun\cite{FDLIBMweb};
+\item  Processor-specific libraries, by
+  Intel\cite{HarKubStoTan99,IntelOpenSource} and
+  HP\cite{Markstein2000,Markstein2001} among other.
+\end{itemize}
+
+Operating systems often include several mathematical libraries, some of which are derivatives of one
+of the previous.
+
+To our knowledge, three libraries currently offer correct rounding:
+\begin{itemize}
+\item The \emph{libultim} library, also called MathLib, is developed
+  at IBM by Ziv and others \cite{IBMlibultimweb}. It provides correct
+  rounding, under the assumption that 800 bits are enough in all case.
+  This approach suffers two weaknesses. The first is the absence of
+  proof that 800 bits are enough: all there is is a very high
+  probability.  The second is that, as we will see in the sequel, for
+  challenging cases, 800 bits are much of an overkill, which can
+  increase the execution time up to 20,000 times a normal execution.
+  This will prevent such a library from being used in real-time
+  applications.  Besides, to prevent this worst case from degrading
+  average performance, there is usually some intermediate levels of
+  precision in MathLib's elementary functions, which makes the code
+  larger, more complex, and more difficult to prove (and indeed this
+  library is scarcely documented).
+  
+  In addition this library provides correct rounding only to nearest.
+  This is the most used rounding mode, but it might not be the most
+  important as far as correct rounding is concerned: correct rounding
+  provides a precision improvement over current mathematical libraries
+  of only a fraction of a {unit in the last place} \emph{(ulp)}.
+  Conversely, the three other rounding modes are needed to guarantee
+  intervals in interval arithmetic.  Without correct rounding in these
+  directed rounding modes, interval arithmetic looses up to one
+  \emph{ulp} of precision in each computation.
+  
+\item \emph{MPFR} is a multiprecision package safer than
+  \emph{libultilm} as it uses arbitrary multiprecision. It provides
+  most of elementary functions for the four rounding modes defined by
+  the IEEE-754 standard. However this library is not optimized for
+  double precision arithmetic. In addition, as its exponent range is
+  much wider than that of IEEE-754, the subtleties of subnormal numbers
+  are difficult to handle properly using such a multiprecision
+  package.
+
+\item The \texttt{libmcr} library, by K.C. Ng, Neil Toda and others at
+  Sun Microsystems, had its first beta version published in december
+  2004. Its purpose is to be a reference implementation for correctly
+  rounded functions in double precision. It has very clean code,
+  offers arbitrary multiple precision unlike \texttt{libultim}, at the
+  expense of slow performance (due to, for example dynamic allocation
+  of memory). It offers the directed rounding modes, and rounds in the
+  mode read from the processor status flag.
+\end{itemize}
+
+
+\section{Various policies in \crlibm}
+
+\subsection{Naming the functions}
+Current \crlibm\ doesn't by default replace your existing \texttt{libm}: the
+functions in \crlibm\ have the C99 name, suffixed with \texttt{\_rn},
+\texttt{\_ru}, \texttt{\_rd}, and \texttt{\_rz} for rounding to the
+nearest, up, down and to zero respectively. They require the processor
+to be in round to nearest mode. Starting with version 0.9 we should
+provide a compile-time flag which will overload the default
+\texttt{libm} functions with the crlibm ones with rounding to nearest.
+
+It is interesting to compare this to the behaviour of Sun's library:
+First, Sun's \texttt{libmcr} provides only one function for each C99
+function instead of four in \crlibm, and rounds according to the
+processor's current mode. This is probably closer to the expected
+long-term behaviour of a correctly-rounded mathematical library, but
+with current processors it may have a tremendous impact on
+performance. Besides, the notion of ``current processor rounding
+mode'' is no longer relevant on recent processors like the Itanium
+family, which have up to four different modes at the same time.  A
+second feature of \texttt{libmcr} is that it overloads by default the
+system \texttt{libm}.
+
+The policy implemented in current \crlibm\ intends to provide best
+performance to the two classes of users who will be requiring correct
+rounding: Those who want predictible, portable behaviour of
+floating-point code, and those who implement interval arithmetic. Of course, we
+appreciate any feedback on this subject.
+
+\subsection{Policy concerning IEEE-754 flags}
+
+Currently, the \crlibm\ functions try to raise the Overflow and
+Underflow flags properly. Raising the other flags (especially the
+Inexact flag) is possible but considered too costly for the expected
+use, and will usually not be implemented. We also appreciate feedback
+on this subject.
+
+\subsection{Policy concerning conflicts between correct rounding and
+  expected mathematical properties}
+As remarked in \cite{DefHanLefMulRevZim2004}, it may happen that the
+requirement of correct rounding conflicts with a basic mathematical
+property of the function, such as its domain and range. A typical
+example is the arctangent of a very large number which, rounded up,
+will be a number larger than $\pi/2$ (fortunately, $\round(\pi/2) <
+\pi/2$). The policy that will be implemented in \crlibm\ will be
+\begin{itemize}
+\item to give priority to the mathematical property in round to
+  nearest mode (so as not to hurt the innocent user who may expect
+  such a property to be respected), and 
+\item to give priority to correct rounding in the directed rounding
+  modes, in order to provide trustful bounds to interval arithmetic.
+\end{itemize}
+
+Again, this policy is open to discussion.
+
+\section{Organization of the source code}
+
+For recent functions implemented using triple-double arithmetic, both
+quick and accurate phase are provided in a single source file,
+\emph{e.g.} \texttt{exp-td.c}.
+
+For older functions using the SCS library, each function is
+implemented as two files, one with the \texttt{\_accurate} suffix (for
+instance \texttt{trigo\_accurate.c}), the other named with the
+\texttt{\_fast} suffix (for instance \texttt{trigo\_fast.c}).
+
+The \emph{software carry-save} multiple-precision library is contained
+in a subdirectory called \texttt{scs\_lib}.
+
+The common C routines that are detailed in Chapter~\ref{chap:common} of
+this document are defined in \texttt{crlibm\_private.c} and
+\texttt{crlibm\_private.h}.
+
+Many of the constants used in the C code have been computed thanks to
+Maple procedures which are contained in the \texttt{maple}
+subdirectory. Some of these procedures are explained in
+Chapter~\ref{chap:common}. For some functions, a Maple procedure
+mimicking the C code, and used for debugging or optimization purpose,
+is also available.
+
+
+The code also includes programs to test the \texttt{crlibm} functions
+against MPFR, \texttt{libultim} or \texttt{libmcr}, in terms of correctness and
+performance. They are located in the \texttt{tests} directory.
+
+Gappa proof scripts are located in the \texttt{gappa} directory.
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
diff --git a/src/crlibm/docs/latex/1_common.tex b/src/crlibm/docs/latex/1_common.tex
new file mode 100644
index 0000000..7e877fa
--- /dev/null
+++ b/src/crlibm/docs/latex/1_common.tex
@@ -0,0 +1,2180 @@
+% Common notations, theorems and procedures
+
+\section{Notations\label{section:notations}}
+
+
+The following notations will be used throughout this document:
+\begin{itemize}
+
+\item  $+$, $-$ and  $\times$ denote the usual
+mathematical operations.
+
+\item $\oplus$, $\ominus$ and $\otimes$ denote the
+corresponding floating-point operations in IEEE-754 double precision,
+in the IEEE-754 \emph{round to nearest} mode.
+
+\item $\round(x)$, $\roundup(x)$ and $\rounddown(x)$ denote the value
+  of $x$ rounded to the nearest, resp. rounded up and down.
+  
+\item $\epsilon$ (usually with some index) denotes a relative error,
+  $\delta$ denotes an absolute error. Upper bounds on the absolute value of these errors
+  will be denoted $\maxeps$ and $\maxdelta$.
+
+\item $\maxeps_{-k}$ -- with a negative index -- represents an error $e$ such that $|e| \leq 2^{-k}$.
+  
+\item For a floating-point number $x$, the value of the least
+  significant bit of its mantissa is classically denoted $\ulp(x)$.
+
+\end{itemize}
+
+
+
+
+\section{Common C procedures for double-precision numbers\label{section:commonCdouble}}
+
+\subsection{Sterbenz Lemma \label{sec:sterbenz}}
+
+\begin{theorem}[Sterbenz Lemma~\cite{Ste74,Gol91}]
+\label{sterbenz}
+If $x$ and $y$ are floating-point numbers, and if ${y}/{2} \leq x \leq
+2y$ then $x\ominus y$ is computed exactly, without any rounding error.
+\end{theorem}
+
+
+\subsection{Double-precision numbers in memory\label{section:memory}}
+
+A double precision floating-point number uses $64$ bits. The unit of
+memory in most current architectures is a 32-bit word. The order in
+which the two $32$ bits words of a double are stored in memory depends
+on the architecture. An architecture is said \emph{Little Endian} if
+the lower part of the number is stored in memory at the smallest
+address; It is the case of the x86 processors. Conversely, an
+architecture with the high part of the number stored in memory at the
+smallest address is said \emph{Big Endian}; It is the case of the
+PowerPC processors.
+
+In \crlibm, we extract the higher and lower parts of a double by using
+an union in memory: the type \texttt{db\_number}. The following code
+extracts the upper and lower part from a double precision number $x$.
+
+\begin{lstlisting}[label={chap0:lst:endian},
+  caption={Extract upper and lower part of a double precision number $x$},firstnumber=1]
+  /* HI and LO are defined automatically by autoconf/automake.  */
+
+db_number xx;
+int x_hi, x_lo;
+xx.d = x;
+x_hi = xx.i[HI]
+x_lo = xx.i[LO]
+\end{lstlisting}
+
+
+
+
+\subsection{Conversion from floating-point to integer \label{sec:double2int}}
+
+\begin{theorem}[Conversion floating-point to integer]
+  The following algorithm, taken from \cite{AMDoptim2001}, converts a
+  double-precision floating-point number $d$ into a 32-bit
+  integer $i$ with rounding to nearest mode.
+
+  It works for all the doubles whose nearest integer fits on a 32-bit machine signed integer.
+
+\begin{lstlisting}[label={chap0:lst:conversion2},caption={Conversion from FP to int},firstnumber=1]
+#define DOUBLE2INT(i, d)   \
+  {double t=(d+6755399441055744.0); i=LO(t);}
+\end{lstlisting}
+\end{theorem}
+
+This algorithm adds the constant $2^{52}+2^{51}$ to the floating-point
+number to put the integer part of $x$, in the lower part of the
+floating-point number.  We use $2^{52}+2^{51}$ and not $2^{52}$,
+because the value $2^{51}$ is used to contain possible carry
+propagations with negative numbers.
+
+
+\subsection{Conversion from floating-point to 64-bit integer \label{sec:double2longint}}
+
+\begin{theorem}[Conversion floating-point to a long long integer]
+  The following algorithm, is derived from the previous.
+
+  It works for any double whose nearest integer is smaller than $2^{51} -1$.
+
+\begin{lstlisting}[label={chap0:lst:conversion3},caption={Conversion from FP to long long int},firstnumber=1]
+#define DOUBLE2LONGINT(i, d)                                      \
+  {                                                               \
+    db_number t;                                                  \
+    t.d = (d+6755399441055744.0);                                 \
+    if (d >= 0) /* sign extend */                                 \
+      i = t.l & 0x0007FFFFFFFFFFFFLL;                             \
+    else                                                          \
+      i = (t.l & 0x0007FFFFFFFFFFFFLL) |  (0xFFF8000000000000LL); \
+  }
+\end{lstlisting}
+
+\end{theorem}
+
+
+
+
+\subsection{Methods to raise IEEE-754 flags}
+
+The IEEE standard imposes, in certain cases, to raise flags and/or
+exceptions for the $4$ operators ($+$, $\times$, $\div$, $\sqrt{~}$).
+Therefore, it is legitimate to require the same for elementary
+functions.
+
+In ISO C99, the following instructions raise exceptions and
+flags:
+
+\begin{itemize}
+\item {\bf underflow} : the multiplication $\pm smallest \times smallest$ where $smallest$ correspond to the smallest subnormal number,
+\item {\bf overflow} : the multiplication  $\pm largest \times largest$ where $largest$ correspond to the largest normalized number,
+\item {\bf division by zero} : the division $\pm 1.0/0.0$,
+\item {\bf inexact} : the addition $(x + smallest) - smallest$ where $x$ is the result and  $smallest$ the smallest subnormal number,
+\item {\bf invalid} : the division $\pm 0.0/0.0$.
+\end{itemize}
+
+
+
+
+
+
+
+
+\section{Common C procedures for double-double arithmetic\label{section:commonCdoubledouble}}
+Hardware operators are usualy limited to double precision. To perform
+operations with more precision, then software solutions need to be
+used. One among them is to represent a floating point number as the
+sum of two non-overlapping floating-point numbers (or
+\emph{double-double} numbers). 
+
+The algorithms are given as plain C functions, but it may be
+preferable, for performance issue, to implement them as macros, as in
+\texttt{libultim}.  The code offers both versions,
+selected by the \texttt{DEKKER\_AS\_FUNCTIONS} constant which is set
+by default to 1 (functions).
+
+A more recent proof is available in \cite{Lauter2005LIP:tripledouble}.
+
+\subsection{Exact sum algorithm {Add12}}
+
+This algorithm is also known as the Fast2Sum algorithm in the
+litterature.
+\begin{theorem}[Exact sum~\cite{Knu73, Boldo2001}]
+  Let $a$ and $b$ be floating-point numbers, then the following method
+  computes two floating-point numbers $s$ and $r$, such that $s+r =
+  a+b$ exactly, and $s$ is the floating-point number which is closest
+  to $a+b$.
+
+\begin{lstlisting}[label={lst:Add12Cond},caption={Add12Cond},firstnumber=1]
+void Add12Cond(double *s, double *r, a, b) 
+{
+  double z;
+  s = a + b;            
+  if (ABS(a) > ABS(b)){  
+    z = s - a;           
+    r = b - z;           
+  }else {                 
+    z = s - b;           
+    r = a - z;           
+  } 
+}                         
+\end{lstlisting}
+Here ABS is a macro that returns the absolute value of a
+floating-point number. This algorithm requires $4$ floating-point additions and $2$ floating
+point tests (some of which are hidden in the ABS macro). 
+
+Note that if it is more efficient on a given architecture, the test can be replaced
+with a test on the exponents of $a$ and $b$.
+
+\end{theorem}
+
+
+If we are able to prove that  the exponent of $a$ is always greater than that
+of $b$, then the previous algorithm to perform an exact addition of 2
+floating-point numbers becomes :
+\begin{lstlisting}[label={lst:Add12},caption={Add12},firstnumber=1]
+void Add12(double *s, double *r, a, b) 
+{
+  double z;
+  s = a + b;            
+  z = s - a;  
+  r = b - z; 
+}            
+\end{lstlisting}
+The cost of this algorithm is $3$ floating-point additions.
+
+
+
+
+
+
+\subsection{Exact product algorithm {Mul12}}
+
+This algorithm is sometimes also known as the Dekker algorithm
+\cite{Dek71}. It was proven by Dekker but the proof predates the
+IEEE-754 standard and is difficult to read. An easier proof is
+available in \cite{Gol91} (see Th. 14).
+
+\begin{theorem}[Restricted exact product]
+  Let $a$ and $b$ be two double-precision floating-point numbers, with
+  53 bits of mantissa. Let $c=2^{\lceil\frac{ 53}{2} \rceil}+1$.
+  Assuming that $a<2^{970}$ and $b<2^{970}$, the following procedure
+  computes the two floating-point numbers $rh$ and $rl$ such that $rh
+  + rl = a + b$ with $rh = a \otimes b$:
+\begin{lstlisting}[label={lst:Mul12},caption={Mul12},firstnumber=1]
+void  Mul12(double *rh, double *rl, double u, double v){
+  const double c = 134217729.;   /*  1+2^27 */ 
+  double up, u1, u2, vp, v1, v2;
+
+  up = u*c;        vp = v*c;
+  u1 = (u-up)+up;  v1 = (v-vp)+vp;
+  u2 = u-u1;       v2 = v-v1;
+  
+  *rh = u*v;
+  *rl = (((u1*v1-*rh)+(u1*v2))+(u2*v1))+(u2*v2);
+}
+\end{lstlisting}
+\end{theorem}
+
+The cost of this algorithm is $10$ floating-point
+additions and $7$ floating-point multiplications.
+
+
+
+The condition $a<2^{970}$ and $b<2^{970}$ prevents overflows when
+multiplying by $c$. If it cannot be proved statically, then we have to
+first test $a$ and $b$, and prescale them so that the condition is
+true.
+
+
+\begin{theorem}[Exact product]
+  Let $a$ and $b$ be two double-precision floating-point numbers, with
+  53 bits of mantissa. Let $c=2^{\lceil\frac{ 53 }{2}\rceil}+1$.
+  The following procedure
+  computes the two floating-point numbers $rh$ and $rl$ such that $rh
+  + rl = a + b$ with $rh = a \otimes b$:
+
+\begin{lstlisting}[label={lst:Mul12Cond},caption={Mul12Cond},firstnumber=1]
+void Mul12Cond(double *rh, double *rl, double a, double b){
+  const double two_970 = 0.997920154767359905828186356518419283e292;
+  const double two_em53 = 0.11102230246251565404236316680908203125e-15;
+  const double two_e53  = 9007199254740992.;
+  double u, v;
+
+  if (a>two_970)  u = a*two_em53; 
+  else            u = a;
+  if (b>two_970)  v = b*two_em53; 
+  else            v = b;
+
+  Mul12(rh, rl, u, v);
+
+  if (a>two_970) {*rh *= two_e53; *rl *= two_e53;} 
+  if (b>two_970) {*rh *= two_e53; *rl *= two_e53;} 
+}\end{lstlisting}
+\end{theorem}
+
+The cost in the worst case is then $4$ tests over integers,
+$10$ floating-point additions and $13$ floating-point multiplications.
+
+
+Finally, note that a fused multiply-and-add provides the Mul12 and
+Mul12Cond in only two instructions \cite{CorneaHarrisonTang2002}. Here
+is the example code for the Itanium processor.
+
+\begin{lstlisting}[label={lst:Mul12CondFMA},caption={Mul12 on the Itanium},firstnumber=1]
+#define Mul12Cond(rh,rl,u,v)                          \
+{                                                     \
+  *rh = u*v;                                          \
+  /* The following means: *rl = FMS(u*v-*rh) */       \
+  __asm__ __volatile__("fms %0 = %1, %2, %3\n ;;\n"   \
+                       : "=f"(*rl)                    \
+                       : "f"(u), "f"(v), "f"(*rh)     \
+                       );                             \
+}
+#define Mul12 Mul12Cond
+\end{lstlisting}
+
+The \crlibm\ distribution attempts to use the FMA for systems on which
+it is availables (currently Itanium and PowerPC).
+
+
+
+
+\subsection{Double-double addition {Add22}}
+  
+This algorithm, also due to Dekker \cite{Dek71}, computes the sum of
+two double-double numbers as a double-double, with a relative error
+smaller than $2^{-103}$ (there is a proof in \cite{Dek71}, a more recent one can be found in in \cite{Lauter2005LIP:tripledouble}).
+
+
+\begin{lstlisting}[label={Add22Cond},caption={Add22Cond},firstnumber=1]
+void Add22Cond(double *zh, double *zl, double xh, double xl, double yh, double yl)
+{
+double r,s;
+
+r = xh+yh;
+s = (ABS(xh) > ABS(yh))? (xh-r+yh+yl+xl) : (yh-r+xh+xl+yl);
+*zh = r+s;
+*zl = r - (*zh) + s;
+}
+\end{lstlisting}
+
+Here ABS is a macro that returns the absolute value of a
+floating-point number. Again, if this test can be resolved at
+compile-time, we get the faster \texttt{Add22} procedure:
+
+\begin{lstlisting}[label={Add22},caption={Add22},firstnumber=1]
+void Add22(double *zh, double *zl, double xh, double xl, double yh, double yl)
+{
+double r,s;
+
+r = xh+yh;
+s = xh-r+yh+yl+xl;
+*zh = r+s;
+*zl = r - (*zh) + s;
+}
+\end{lstlisting}
+
+
+
+
+\subsection{Double-double multiplication {Mul22}}
+  
+This algorithm, also due to Dekker \cite{Dek71}, computes the product of
+two double-double numbers as a double-double, with a relative error
+smaller than $2^{-102}$, under the condition $x_h<2^{970}$ and $y_h<2^{970}$  (there is a proof in \cite{Dek71}, a more recent one can be found in in \cite{Lauter2005LIP:tripledouble}). 
+
+\begin{lstlisting}[label={Mul22},caption={Mul22},firstnumber=1]
+void Mul22(double *zh, double *zl, double xh, double xl, double yh, double yl)
+{
+double mh, ml;
+
+  const double c        = 134217729.;                /* 0x41A00000, 0x02000000 */ 
+  double up, u1, u2, vp, v1, v2;
+
+  up = xh*c;        vp = yh*c;
+  u1 = (xh-up)+up;  v1 = (yh-vp)+vp;
+  u2 = xh-u1;       v2 = yh-v1;
+  
+  mh = xh*yh;
+  ml = (((u1*v1-mh)+(u1*v2))+(u2*v1))+(u2*v2);
+
+  ml += xh*yl + xl*yh;
+  *zh = mh+ml;
+  *zl = mh - (*zh) + ml;
+}  
+\end{lstlisting}
+
+Note that the bulk of this algorithm is a \texttt{Mul12(mh,ml,xh,yh)}.
+Of course there is a conditional version of this procedure but we have not needed it so far.
+
+%Our algorithms will sometimes need to multiply a double by a
+%double-double. In this case we use \texttt{Mul22} with one of the
+%arguments set to zero, which only performs one useless multiplication
+%by zero and one useless addition: a specific procedure is not needed.
+
+
+\subsection{The multiplication procedure \MuldDD}
+\begin{algorithm}[\MuldDD] \label{muldDDref} ~ \\
+{\bf In:} a double precision number $a$ and a double-double number $b_\hi + b_\lo$ \\
+{\bf Out:} a double-double number $r_\hi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert b_\hi \right \vert 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{60mm}
+$\left( t_1, t_2 \right) \gets \mMul\left( a, b_\hi \right)$ \\
+$t_3 \gets a \otimes b_\lo$ \\
+$t_4 \gets t_2 \oplus t_3$ \\
+$\left( r_\hi, r_\lo \right) \gets \mAdd\left( t_1, t_4 \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{muldDDref} \MuldDD] ~ \\
+Let be $a$ and $b_\hi + b_\lo$ the values taken by 
+the arguments of algorithm \ref{muldDDref} \MuldDD \\
+So the following holds for the values returned $r_\hi$ and $r_\lo$:
+$$r_\hi + r_\lo = 
+\left( a \cdot \left( b_\hi + b_\lo \right)\right) \cdot 
+\left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq 2^{-102}$$
+The values returned $r_\hi$ and $r_\lo$ will not overlap at all. 
+\end{theorem}
+
+\subsection{Double-double Horner step procedures\label{sec:double-double-horner}}
+
+\subsubsection{The multiply-and-add operator \MulAddDdD}
+
+\begin{algorithm}[\MulAddDdD] \label{MulAddDdDref} ~ \\
+{\bf In:} a double-double number $c_\hi + c_\lo$, a double precision number $a$ and 
+a double-double number $b_\hi + b_\lo$ \\
+{\bf Out:} a double-double number $r_\hi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert b_\hi \right \vert \\
+\left \vert c_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert c_\hi \right \vert \\
+\left \vert a \cdot \left( b_\hi + b_\lo \right) \right \vert & \leq & 2^{-2} \cdot \left \vert c_\hi + c_\lo \right \vert 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left(t_1, t_2 \right) \gets \mMul\left( a , b_\hi \right)$ \\
+$\left(t_3, t_4 \right) \gets \mAdd\left( c_\hi , t_1 \right)$ \\
+$t_5 \gets b_\lo \otimes a$ \\
+$t_6 \gets c_\lo \oplus t_2$ \\
+$t_7 \gets t_5 \oplus t_6$ \\
+$t_8 \gets t_7 \oplus t_4$ \\
+$\left(r_\hi, r_\lo \right) \gets \mAdd\left( t_3 , t_8 \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{MulAddDdDref} \MulAddDdD\label{theoMulAddDdDref}] ~ \\
+Let be $c_\hi + c_\lo$, $a$ and $b_\hi + b_\lo$ the 
+arguments of algorithm \ref{MulAddDdDref} \MulAddDdD~ verifying the given 
+preconditions.\\
+So the following egality will hold for the returned values $r_\hi$ and $r_\lo$ 
+$$r_\hi + r_\lo = \left( \left( c_\hi + c_\lo \right) + a \cdot \left( b_\hi + b_\lo \right) \right) \cdot 
+\left( 1 + \epsilon \right)$$
+where $\epsilon$ is bounded by:
+$$\left \vert \epsilon \right \vert \leq 2^{-100}$$
+The returned values $r_\hi$ and $r_\lo$ will not overlap at all.
+\end{theorem}
+
+\subsubsection{The multiply-and-add operator \MulAddDD}
+
+\begin{algorithm}[\MulAddDD] \label{MulAddDDref} ~ \\
+{\bf In:} three double-double numbers $c_\hi + c_\lo$, $a_\hi + a_\lo$ and 
+$b_\hi + b_\lo$ \\
+{\bf Out:} a double-double number $r_\hi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert b_\hi \right \vert \\
+\left \vert c_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert c_\hi \right \vert \\
+\left \vert \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right) \right \vert & 
+\leq & 2^{-2} \cdot \left \vert c_\hi + c_\lo \right \vert 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left(t_1, t_2 \right) \gets \mMul\left( a_\hi , b_\hi \right)$ \\
+$\left(t_3, t_4 \right) \gets \mAdd\left( c_\hi , t_1 \right)$ \\
+$t_5 \gets a_\hi \otimes b_\lo$ \\
+$t_6 \gets a_\lo \otimes b_\hi$ \\
+$t_7 \gets t_2 \oplus c_\lo$ \\
+$t_8 \gets t_4 \oplus t_7$ \\
+$t_9 \gets t_5 \oplus t_6$ \\
+$t_{10} \gets t_8 \oplus t_9$ \\
+$\left(r_\hi, r_\lo \right) \gets \mAdd\left( t_3 , t_{10} \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{MulAddDDref} \MulAddDD\label{theoMulAddDDref}] ~ \\
+Let be $c_\hi + c_\lo$, $a_\hi + a_\lo$ and $b_\hi + b_\lo$ the 
+arguments of algorithm \ref{MulAddDDref} \MulAddDD~ verifying the given 
+preconditions.\\
+So the following egality will hold for the returned values $r_\hi$ and $r_\lo$ 
+$$r_\hi + r_\lo = \left( \left( c_\hi + c_\lo \right) + 
+\left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right) \right) \cdot 
+\left( 1 + \epsilon \right)$$
+where $\epsilon$ is bounded by:
+$$\left \vert \epsilon \right \vert \leq 2^{-100}$$
+The returned values $r_\hi$ and $r_\lo$ will not overlap at all.
+\end{theorem}
+
+\subsection{Multiplication of a double-double by an integer}
+
+
+Use Cody and Waite algorithm. See for instance the $\log$ and the
+trigonometric argument reduction (chapter \ref{chap:log}, p.
+\pageref{chap:log}).
+
+
+\section{Common C procedures for triple-double arithmetic\label{section:commonCtripledouble}}
+
+These procedures are used to reach accuracies of about 150 bits. They
+are detailed and proven in \cite{Lauter2005LIP:tripledouble}.
+ 
+
+\begin{algorithm}[Renormalization] \label{renormalg}~\\
+{\bf In: $a_\hi, a_\mi, a_\lo \in \F$} verifying the following preconditions:\\
+{\bf Preconditions: }
+\begin{itemize}
+\item None of the numbers $a_\hi, a_\mi, a_\lo$ is subnormal
+\item $a_\hi$ et $a_\mi$ do not overlap in more than $51$ bits
+\item $a_\mi$ et $a_\lo$ do not overlap in more than $51$ bits
+\end{itemize}
+which means formally:
+\begin{eqnarray*}
+\left \vert a_\mi \right \vert & \leq & 2^{-2} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-2} \cdot \left \vert a_\mi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-4} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+{\bf Out: $r_\hi, r_\mi, r_\lo \in \F$}
+\begin{eqnarray*}
+\left(t_{1\hi}, t_{1\lo}\right) & \gets & \mAdd\left(a_\mi,a_\lo\right) \\
+\left(r_\hi, t_{2\lo}\right) & \gets & \mAdd\left(a_\hi, t_{1\hi}\right) \\
+\left(r_\mi, r_\lo\right) & \gets & \mAdd\left(t_{2\lo}, t_{1\lo}\right)
+\end{eqnarray*}
+\end{algorithm}
+\begin{theorem}[Correctness of the renormalization algorithm \ref{renormalg} \Renormalize] ~\\
+For all arguments verifying the preconditions of procedure \Renormalize, 
+the values returned 
+$r_\hi$, $r_\mi$ and $r_\lo$ will not overlap 
+unless they are all equal to $0$ and their sum will be exactly the sum of the
+values in argument $a_\hi$, $a_\mi$ et $a_\lo$.
+This implies:
+$$\left \vert r_\mi \right \vert \leq 2^{-52} \cdot \left \vert r_\hi \right \vert$$
+$$\left \vert r_\lo \right \vert \leq 2^{-53} \cdot \left \vert r_\mi \right \vert$$
+\end{theorem}
+
+
+
+\subsection{The addition operator \AddTT}
+\begin{algorithm}[\AddTT] \label{addTTref} ~ \\
+{\bf In:} two triple-double numbers, $a_\hi + a_\mi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\hi \right \vert & \leq & \frac{3}{4} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\mi \right \vert & \leq & 2^{-\alpha_o} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-\alpha_u} \cdot \left \vert a_\mi \right \vert \\
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert \\
+\alpha_o & \geq & 4 \\
+\alpha_u & \geq & 1 \\
+\beta_o & \geq & 4 \\
+\beta_u & \geq & 1 \\
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left(r_\hi, t_1 \right) \gets \mAdd\left( a_\hi, b_\hi \right)$ \\
+$\left(t_2, t_3 \right) \gets \mAdd\left( a_\mi, b_\mi \right)$ \\
+$\left(t_7, t_4 \right) \gets \mAdd\left( t_1, t_2 \right)$ \\
+$t_6 \gets a_\lo \oplus b_\lo$ \\
+$t_5 \gets t_3 \oplus t_4$ \\
+$t_8 \gets t_5 \oplus t_6$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAdd\left( t_7, t_8 \right)$
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{addTTref} \AddTT\label{theoAddTT}] ~ \\
+Let be $a_\hi + a_\mi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ the triple-double
+arguments of algorithm \ref{addTTref} \AddTT~ verifying the given 
+preconditions.\\
+So the following egality will hold for the returned values $r_\hi$, $r_\mi$ and $r_\lo$ 
+$$r_\hi + r_\mi + r_\lo = \left(\left(a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded by:
+$$\left \vert \epsilon \right \vert \leq 2^{-\min\left(\alpha_o + \alpha_u,\beta_o + \beta_u\right) - 47} + 
+2^{-\min\left( \alpha_o, \beta_o\right) - 98}$$
+The returned values $r_\mi$ and $r_\lo$ will not overlap at all and the
+overlap of $r_\hi$ and $r_\mi$ will be bounded by the following expression:
+$$\left \vert r_\mi \right \vert \leq 2^{-\min\left( \alpha_o, \beta_o \right) + 5} \cdot \left \vert r_\hi \right \vert$$
+\end{theorem}
+
+\subsection{The addition operator \AddDTT}
+\begin{algorithm}[\AddDTT] \label{addDTTref} ~ \\
+{\bf In:} a double-double number $a_\hi + a_\lo$ and a triple-double number $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\hi \right \vert & \leq & 2^{-2} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( r_\hi, t_1 \right) \gets \mAdd\left( a_\hi, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mAdd\left( a_\lo, b_\mi \right)$ \\
+$\left( t_4, t_5 \right) \gets \mAdd\left( t_1, t_2 \right)$ \\
+$t_6 \gets t_3 \oplus b_\lo$ \\
+$t_7 \gets t_6 \oplus t_5$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAdd\left( t_4, t_7 \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{addDTTref} \AddDTT] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ the values taken in argument of algorithm \ref{addDTTref} \AddDTT. 
+Let the preconditions hold for this values.\\
+So the following holds for the values returned by the algorithm $r_\hi$, $r_\mi$ and $r_\lo$ 
+$$r_\hi + r_\mi + r_\lo = \left(\left(a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded by
+$$\left \vert \epsilon \right \vert \leq 2^{-\beta_o - \beta_u - 52} + 2^{-\beta_o - 104} + 2^{-153}$$
+The values $r_\mi$ and $r_\lo$ will not overlap at all and the overlap of $r_\hi$ and $r_\mi$ will be bounded by:
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+with
+$$\gamma \geq \min\left( 45, \beta_o - 4, \beta_o + \beta_u - 2 \right)$$
+\end{theorem}
+
+\subsection{The addition operator \AdddTT}
+\begin{algorithm}[\AdddTT] \label{adddTTref} ~ \\
+{\bf In:} a double precision number $a$ and a triple-double number $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\hi \right \vert & \leq & 2^{-2} \cdot \left \vert a \right \vert \\
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( r_\hi, t_1 \right) \gets \mAdd\left( a, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mAdd\left( t_1, b_\mi \right)$ \\
+$t_4 \gets t_3 \oplus b_\lo$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAdd\left( t_2, t_4 \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{adddTTref} \AdddTT] ~ \\
+Let be $a$ and $b_\hi + b_\mi + b_\lo$ the values taken in argument of algorithm \ref{adddTTref} \AdddTT. 
+Let the preconditions hold for this values.\\
+So the following holds for the values returned by the algorithm $r_\hi$, $r_\mi$ and $r_\lo$ 
+$$r_\hi + r_\mi + r_\lo = \left(a + \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded by
+$$\left \vert \epsilon \right \vert \leq 2^{-\beta_o - \beta_u - 52} + 2^{-154}$$
+The values $r_\mi$ and $r_\lo$ will not overlap at all and the overlap of $r_\hi$ and $r_\mi$ will be bounded by:
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+with
+$$\gamma \geq \min\left( 47, \beta_o - 2, \beta_o + \beta_u - 1 \right)$$
+\end{theorem}
+
+\subsection{The multiplication procedure \MulTT}
+\begin{algorithm}[\MulTT] \label{mulTTref} ~ \\
+{\bf In:} two triple-double numbers $a_\hi + a_\mi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert a_\mi \right \vert & \leq & 2^{-\alpha_o} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-\alpha_u} \cdot \left \vert a_\mi \right \vert \\
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert 
+\end{eqnarray*}
+with
+\begin{eqnarray*}
+\alpha_o & \geq & 2 \\
+\alpha_u & \geq & 2 \\
+\beta_o & \geq & 2 \\
+\beta_u & \geq & 2 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{60mm}
+$\left( r_\hi, t_1 \right) \gets \mMul\left( a_\hi, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mMul\left( a_\hi, b_\mi \right)$ \\
+$\left( t_4, t_5 \right) \gets \mMul\left( a_\mi, b_\hi \right)$ \\
+$\left( t_6, t_7 \right) \gets \mMul\left( a_\mi, b_\mi \right)$ \\
+$t_8 \gets a_\hi \otimes b_\lo$ \\
+$t_9 \gets a_\lo \otimes b_\hi$ \\
+$t_{10} \gets a_\mi \otimes b_\lo$ \\
+$t_{11} \gets a_\lo \otimes b_\mi$ \\
+$t_{12} \gets t_8 \oplus t_9$ \\
+$t_{13} \gets t_{10} \oplus t_{11}$ \\
+$\left( t_{14}, t_{15} \right) \gets \mAdd\left( t_1, t_6 \right)$ \\
+$t_{16} \gets t_7 \oplus t_{15}$ \\
+$t_{17} \gets t_{12} \oplus t_{13}$ \\
+$t_{18} \gets t_{16} \oplus t_{17}$ \\
+$\left( t_{19}, t_{20} \right) \gets \mAdd\left( t_{14}, t_{18} \right)$ \\
+$\left( t_{21}, t_{22} \right) \gets \mAddDD\left( t_2, t_3, t_4, t_5 \right)$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAddDD\left( t_{21}, t_{22}, t_{19}, t_{20} \right)$ 
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{mulTTref} \MulTT] ~ \\
+Let be $a_\hi + a_\mi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ the values taken by 
+the arguments of algorithm \ref{mulTTref} \MulTT \\
+So the following holds for the values returned $r_\hi$, $r_\mi$ and $r_\lo$:
+$$r_\hi + r_\mi + r_\lo = 
+\left(\left(a_\hi + a_\mi + a_\lo \right) \cdot \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot 
+\left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+\begin{eqnarray*}
+\left \vert \epsilon \right \vert & \leq & 2^{-151} \\
+& + & 2^{-99-\alpha_o} \\
+& + & 2^{-99-\beta_o} \\
+& + & 2^{-49-\alpha_o-\alpha_u} \\
+& + & 2^{-49-\beta_o-\beta_u} \\
+& + & 2^{-50-\alpha_o-\beta_o-\beta_u} \\
+& + & 2^{-50-\alpha_o-\alpha_u-\beta_o} \\
+& + & 2^{-101-\alpha_o-\beta_o} \\
+& + & 2^{-52-\alpha_o-\alpha_u-\beta_o-\beta_u}
+\end{eqnarray*}
+The values returned $r_\mi$ and $r_\lo$ will not overlap at all and the overlap of $r_\hi$ and $r_\mi$ will be bounded as
+follows:
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma_o} \cdot \left \vert r_\hi \right \vert$$
+with
+$$\gamma_o \geq \min\left( 48, \alpha_o-4, \beta_o-4,\alpha_o+\alpha_u-4,\beta_o+\beta_u-4,\alpha_o+\alpha_o-4 \right)$$
+\end{theorem}
+
+
+
+\subsection{The multiplication procedure \MulDT}
+\begin{algorithm}[\MulDT] \label{mulDTref} ~ \\
+{\bf In:} two double-double numbers $a_\hi + a_\lo$ and $b_\hi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert b_\hi \right \vert \\
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( r_\hi, t_1 \right) \gets \mMul\left( a_\hi, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mMul\left( a_\hi, b_\lo \right)$ \\
+$\left( t_4, t_5 \right) \gets \mMul\left( a_\lo, b_\hi \right)$ \\
+$t_6 \gets a_\lo \otimes b_\lo$ \\
+$\left( t_7, t_8 \right) \gets \mAddDD\left( t_2, t_3, t_4, t_5 \right)$ \\
+$\left( t_9, t_{10} \right) \gets \mAdd\left( t_1, t_6 \right)$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAddDD\left( t_7, t_8, t_9, t_{10} \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{mulDTref} \MulDT] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\lo$ the values taken by arguments of algorithm \ref{mulDTref} \MulDT \\
+So the following holds for the values returned $r_\hi$, $r_\mi$ and $r_\lo$:
+$$r_\hi + r_\mi + r_\lo = \left(\left(a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq 2^{-149}$$
+The values returned $r_\mi$ and $r_\lo$ will not overlap at all and the overlap of $r_\hi$ and $r_\mi$ will be bounded as
+follows:
+$$\left \vert r_\mi \right \vert \leq 2^{-48} \cdot \left \vert r_\hi \right \vert$$
+\end{theorem}
+
+\subsection{The multiplication procedure \MulDTT}
+\begin{algorithm}[\MulDTT] \label{mulDTTref} ~ \\
+{\bf In:} a double-double number $a_\hi + a_\lo$  and a triple-double number $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert 
+\end{eqnarray*}
+with
+\begin{eqnarray*}
+\beta_o & \geq & 2 \\
+\beta_u & \geq & 1 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{60mm}
+$\left( r_\hi, t_1 \right) \gets \mMul\left( a_\hi, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mMul\left( a_\hi, b_\mi \right)$ \\
+$\left( t_4, t_5 \right) \gets \mMul\left( a_\hi, b_\lo \right)$ \\
+$\left( t_6, t_7 \right) \gets \mMul\left( a_\lo, b_\hi \right)$ \\
+$\left( t_8, t_9 \right) \gets \mMul\left( a_\lo, b_\mi \right)$ \\
+$t_{10} \gets a_\lo \otimes b_\lo$ \\
+$\left( t_{11}, t_{12} \right) \gets \mAddDD\left( t_2, t_3, t_4, t_5 \right)$ \\
+$\left( t_{13}, t_{14} \right) \gets \mAddDD\left( t_6, t_7, t_8, t_9 \right)$ \\
+$\left( t_{15}, t_{16} \right) \gets \mAddDD\left( t_{11}, t_{12}, t_{13}, t_{14} \right)$ \\
+$\left( t_{17}, t_{18} \right) \gets \mAdd\left( t_1, t_{10} \right)$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAddDD\left( t_{17}, t_{18}, t_{15}, t_{16} \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{mulDTTref} \MulDTT] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ the values in argument of algorithm \ref{mulDTTref} \MulDTT~ such that 
+the given preconditions hold.\\
+So the following will hold for the values $r_\hi$, $r_\mi$ and $r_\lo$ returned
+$$r_\hi + r_\mi + r_\lo = \left(\left(a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq \frac{2^{-99 - \beta_o} + 2^{-99 - \beta_o - \beta_u} + 2^{-152}}
+                                              {1 - 2^{-53} - 2^{-\beta_o + 1} - 2^{-\beta_o - \beta_u + 1}}
+                                    \leq 2^{-97 - \beta_o} + 2^{-97 - \beta_o - \beta_u} + 2^{-150}$$
+The values $r_\mi$ and  $r_\lo$ will not overlap at all and the following bound will be verified for the overlap of 
+$r_\hi$ and $r_\mi$:
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+where
+$$\gamma \geq \min\left( 48, \beta_o - 4, \beta_o + \beta_u - 4 \right)$$
+\end{theorem}
+
+\subsection{The multiplication procedure \MuldTT}
+\begin{algorithm}[\MuldTT] \label{muldTTref} ~ \\
+{\bf In:} a double number $a$  and a triple-double number $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert 
+\end{eqnarray*}
+with
+\begin{eqnarray*}
+\beta_o & \geq & 2 \\
+\beta_u & \geq & 2 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{60mm}
+$\left( r_\hi, t_2 \right) \gets \mMul\left( a, b_\hi \right)$ \\
+$\left( t_3, t_4 \right) \gets \mMul\left( a, b_\mi \right)$ \\
+$t_5 \gets a \otimes b_\lo$ \\
+$\left( t_9, t_7 \right) \gets \mAdd\left( t_2, t_3 \right)$ \\
+$t_8 \gets t_4 \oplus t_5$ \\
+$t_{10} \gets t_7 \oplus t_8$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAdd\left( t_9, t_{10} \right)$ 
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{muldTTref} \MuldTT] ~ \\
+Let be $a$ and $b_\hi + b_\mi + b_\lo$ the values in argument of algorithm \ref{muldTTref} \MuldTT~ such that 
+the given preconditions hold.\\
+So the following will hold for the values $r_\hi$, $r_\mi$ and $r_\lo$ returned
+$$r_\hi + r_\mi + r_\lo = \left( a \cdot \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq 2^{-101 - \beta_o} + 2^{-49 - \beta_o - \beta_u} + 2^{-156}$$
+The values $r_\mi$ and  $r_\lo$ will not overlap at all and the following bound will be verified for the overlap of 
+$r_\hi$ and $r_\mi$:
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+where
+$$\gamma \geq \min\left( 47, \beta_o - 5, \beta_o + \beta_u - 5 \right)$$
+\end{theorem}
+
+\subsection{The multiplication procedure \MuldDT}
+\begin{algorithm}[\MuldDT] \label{muldDTref} ~ \\
+{\bf In:} a double number $a$  and a double-double number $b_\hi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert b_\hi \right \vert 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{60mm}
+$\left( r_\hi, t_1 \right) \gets \mMul\left( a, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mMul\left( a, b_\lo \right)$ \\
+$\left( t_5, t_4 \right) \gets \mAdd\left( t_1, t_2 \right)$ \\
+$t_6 \gets t_3 \otimes t_4$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAdd\left( t_5, t_6 \right)$ 
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{muldDTref} \MuldDT] ~ \\
+Let be $a$ and $b_\hi + b_\lo$ the values in argument of algorithm \ref{muldDTref} \MuldDT~ such that 
+the given preconditions hold.\\
+So the following will hold for the values $r_\hi$, $r_\mi$ and $r_\lo$ returned
+$$r_\hi + r_\mi + r_\lo = \left( a \cdot \left( b_\hi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq 2^{-154}$$
+The values $r_\mi$ and  $r_\lo$ will not overlap at all and the following bound will be verified for the overlap of 
+$r_\hi$ and $r_\mi$:
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+where
+$$\gamma \geq 47$$
+\end{theorem}
+
+
+\subsection{Final rounding to the nearest even}
+
+\begin{algorithm}[Final rounding to the nearest (even)] \label{algarrpres} ~ \\
+{\bf In:} a triple-double number $x_\hi + x_\mi + x_\lo$ \\
+{\bf Out:} a double precision number $x^\prime$ returned by the algorithm \\
+{\bf Preconditions on the arguments:}
+\begin{itemize}
+\item $x_\hi$ and $x_\mi$ as well as $x_\mi$ and $x_\lo$ do not overlap
+\item $x_\mi = \circ \left( x_\mi + x_\lo \right)$
+\item $x_\hi \not = 0$, $x_\mi \not = 0$ and $x_\lo \not = 0$  
+\item $\circ \left( x_\hi + x_\mi \right) \not \in \left \lbrace x_\hi^-, x_\hi, x_\hi^+ \right \rbrace \Rightarrow 
+\left \vert \left( x_\hi + x_\mi \right) - \circ\left( x_\hi + x_\mi \right) \right \vert \not = 
+\frac{1}{2} \cdot \mUlp\left( \circ \left( x_\hi + x_\mi \right) \right)$
+\end{itemize}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{80mm}
+$t_1 \gets x_\hi^-$ \\
+$t_2 \gets x_\hi \ominus t_1$ \\
+$t_3 \gets t_2 \otimes \frac{1}{2}$ \\
+$t_4 \gets x_\hi^+$ \\
+$t_5 \gets t_4 \ominus x_\hi$ \\
+$t_6 \gets t_5 \otimes \frac{1}{2}$ 
+\\ ~ \\
+{\bf if} $\left( x_\mi \not = -t_3 \right)$ {\bf and} $\left( x_\mi \not = t_6 \right)$ {\bf then} 
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{70mm}
+\vspace{-2.4mm}
+{\bf return } $\left( x_\hi \oplus x_\mi \right)$
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf else} 
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{70mm}
+{\bf if} $\left( x_\mi \otimes x_\lo > 0.0 \right)$ {\bf then} 
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{60mm}
+{\bf if} $\left( x_\hi \otimes x_\lo > 0.0 \right)$ {\bf then} 
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{50mm}
+\vspace{-2.4mm}
+{\bf return } $x_\hi^+ $
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf else}
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{50mm}
+\vspace{-2.4mm}
+{\bf return } $x_\hi^- $
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf end if} 
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf else}
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{60mm}
+\vspace{-2.4mm}
+{\bf return } $x_\hi $
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf end if} 
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf end if} 
+\end{minipage}
+\end{center}
+\end{algorithm}
+
+\begin{theorem}[Correctness of the final rounding procedure \ref{algarrpres}]\label{corralgpluspres} ~\\
+Let be {\bf A} the algorithm \ref{algarrpres} said `` Final rounding to the nearest (even)''.
+Let be $x_\hi + x_\mi + x_\lo$ triple-double number for which the preconditions of algorithm {\bf A} hold.
+Let us notate $x^\prime$ the double precision number returned by the procedure. \\
+So
+$$x^\prime = \circ \left( x_\hi + x_\mi + x_\lo \right)$$
+i.e. {\bf A} is a correct rounding procedure for round-to-nearest-ties-to-even mode.
+\end{theorem}
+
+\subsection{Final rounding for the directed modes}
+
+\begin{theorem}[Directed final rounding of a triple-double number] \label{arrdir} ~ \\
+Let be $x_\hi + x_\mi + x_\lo \in \F + \F + \F$ a non-overlapping triple-double number. \\
+Let be $\diamond$ a directed rounding mode.\\
+Let be {\bf A} the following instruction sequence:
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( t_1, t_2 \right) \gets \mAdd\left( x_\hi, x_\mi \right)$ \\
+$t_3 \gets t_2 \oplus x_\lo$ \\
+{\bf return } $\diamond\left( t_1 + t_3 \right)$
+\end{minipage}
+\end{center}
+So {\bf A} is a correct rounding procedure for the rounding mode $\diamond$.
+\end{theorem}
+
+\section{Horner polynomial approximations \label{sec:Horner}}
+
+Most function evaluation schemes include some kind of polynomial
+evaluation over a small interval. Classically, we use the Horner
+scheme, which is the best suited in this case. 
+
+For a polynomial of degree $d$, noting $c_i$ its coefficients, the
+Horner scheme consists in computing $S_0$ using the following
+recursion:
+
+  $$ \left\{
+    \begin{array}{rl}
+      S_d(x)  &\ = \ c_d\\
+      S_k(x)  &\  =\ c_k+xS_{k+1}(x) \quad \mathrm{for}\quad 0\le k <d\\
+    \end{array}
+  \right.
+  $$
+
+
+  
+  In the \quick\ phase, the evaluation always begins in
+  double-precision, but it may end with double-double arithmetic in
+  order to compute the result as a double-double (from a performance
+  point of view it is a less costly to begin the double-double part
+  with a double-double addition rather than with a double-double
+  multiplication).  In this section only, $\oplus$ and $\otimes$
+  therefore denote either a double, or a double-double, or an SCS
+  operation.
+
+
+  For fast and accurate function evaluation, we try to have $\maxx$
+  small with respect to the coefficients.  In this case the error in
+  one step is scaled down for the next step by the multiplication by
+  $x$, allowing for an accumulated overall error which is actually
+  close to that of the last operation. 
+
+  
+  
+In addition we note 
+\begin{itemize}
+  
+\item $\delta_\oplus$ and $\delta_\otimes$ the absolute error when
+  performing an atomic $\oplus$ or $\otimes$, and $\epsilon_\oplus$
+  and $\epsilon_\otimes$ the corresponding relative error (we use
+  whichever allows the finer error analysis, as detailed below).  It
+  can change during a Horner evaluation, typically if the evaluation
+  begins in double-precision
+  ($\maxeps_\oplus=\maxeps_\otimes=2^{-53}$) and ends in double-double
+  ($\maxeps_\oplus=\maxeps_\otimes=2^{-102}$).
+
+\item $c_j$ the coefficient of $P$ of degree $j$, considered exactly
+  representable (if $c_j$ is an approximation to some exact value
+  $\hat{c_j}$, the corresponding error is taken into account in the
+  computation of the approximation error for this polynomial)
+
+\item $\maxx$ the maximum value of $|x|$ over the considered interval
+  
+\item $\maxeps_x$  a bound on the relative error of the input $x$
+  with respect to the exact mathematical value $\hat{x}$ it
+  represents. Note that sometimes argument reduction is exact, and
+  will yield $\maxeps_x=0$ (see for instance the logarithm). Also
+  note that $\maxeps_x$ may change during the evaluation: Typically,
+  if $\hat{x}$ is approximated as a double-double
+  $x_h+x_l=\hat{x}(1+\epsilon)$, then the first iterations will be
+  computed in double-precision only, and the error will be
+  $\maxeps_x=2^{-53}$ if one is able to prove that
+  $x_h=\round(\hat{x})$. For the last steps of the evaluation, using
+  double-double arithmetic on $x_h+x_l$, the error will be improved to
+  $\maxeps_x=\maxeps$.
+  
+\item $p_k = x \otimes s_k $ the result of a multiplication step in
+  the Horner scheme. We recursively evaluate its relative and absolute
+  error $\maxeps^\times_j$ and $\maxdelta^\times_j$ with respect to
+  the exact mathematical value $P_j(\hat{x})=xS_{j+1}(\hat{x})$.
+
+\item $s_k = c_k \oplus p_{k+1}$ (with $s_d = c_d$)  the result of
+  an addition step in the Horner scheme. We recursively evaluate its absolute
+  error $\maxeps^+_j$ with respect to the exact mathematical value $S_k(\hat{x})$.
+
+\item $\maxs{k}$ the  maximum value that $s_k$ may take for $|x|
+  \le \maxx$.
+
+\item $\infnorm{S_k}$ the infinite norm of $S_k$ for $|x| \leq \maxx$.
+
+\end{itemize}
+
+Given $ |x| \leq \maxx$, we want to compute by recurrence
+  $$ \left\{
+    \begin{array}{rl}
+      p_{k}  &= x \otimes s_{k+1}
+             \ = \ \hat{x}S_{k+1}(\hat{x}) (1+\maxeps^\times_k)\\
+      s_{k}  &=  c_k \oplus p_k
+             \ = \ S_{k}(\hat{x}) + \maxdelta^+_k\\
+      \end{array}
+  \right.
+  $$
+
+
+The following computes tight bounds on $\epsilon^\times_k$ and on $\delta^+_k$.
+
+\begin{itemize}
+\item Initialization/degree 0 polynomial: 
+  $$ \left\{
+    \begin{array}{rl}
+      s_d & \ = \ c_d\\
+      \maxs{d} & \ = \ \mins{d} \ = \ |c_d|\\
+      \maxeps^+_d &\ = \ 0\\
+    \end{array}
+  \right.
+  $$
+
+
+\item Horner steps: 
+  \begin{itemize}
+  \item multiplication step:%  $p_{k}  \ = \ x \otimes s_{k+1} \ = \ P_{k}(\hat{x})(1+\epsilon^\times_k)$
+    \begin{eqnarray*}
+      p_{k}  &=& x \otimes s_{k+1} \\
+             &=& \hat{x}(1+\epsilon_x)\ \otimes \ (S_{k+1}(\hat{x}) + \delta^+_{k+1})\\
+             &=& \hat{x} S_{k+1}(\hat{x})(1+\epsilon_x)(1 + \frac{\delta^+_{k+1}}{S_{k+1}(\hat{x})})(1+\epsilon_\otimes)\\
+    \end{eqnarray*}
+    We therefore get 
+    \begin{equation}
+      p_{k} \ = \ P_{k}(\hat{x})(1+\epsilon^\times_k)\label{eq:pk}
+    \end{equation}
+    with 
+    \begin{equation}
+      \maxeps^\times_k \ = \ (1+\maxeps_x)(1 + \maxeps^+_{k+1})(1+\maxeps_\otimes) - 1 \label{eq:maxepsp}
+    \end{equation}
+    Here we will take $\maxeps'_\otimes = 2^{-53}$ or
+    $\maxeps'_\otimes = 2^{-102}$ or $\maxeps'_\otimes = 2^{-205}$
+    respectively for double, double-double, or SCS operations.
+    
+  \item addition step 
+      \begin{eqnarray*}
+        s_{k} &=&  c_k \oplus p_k \\
+              &=& c_k + p_k + \delta_\oplus\\
+              &=&  c_k + P_k(\hat{x})(1+\epsilon^\times_k) + \delta_\oplus\\
+              &=&  c_k + P_k(\hat{x}) + \epsilon^\times_k P_k(\hat{x})  + \delta_\oplus\\
+              &=&  S_{k}(\hat{x})\  +\  \epsilon^\times_k P_k(\hat{x}) +  \delta_\oplus \\
+      \end{eqnarray*}
+
+    We therefore get 
+      \begin{equation}
+        s_{k} \ = \  S_{k}(\hat{x}) + \delta^+_k \label{eq:sk}
+      \end{equation}
+      
+      \begin{equation}
+        \maxdelta^+_k  \ = \  \maxeps^\times_k\infnorm{P_{k}} + \maxdelta_\oplus\label{eq:maxdelta}
+      \end{equation}
+      
+      Here $\maxdelta_\oplus$ will be computed for double-precision operations as 
+      $$\maxdelta_\oplus = \frac{1}{2}\ulp(\infnorm{S_{k}} + \maxeps^\times_k\infnorm{P_{k}})\quad .$$
+      For double-double or SCS operations, $\maxdelta_\oplus$ will be computed as
+      $$\maxdelta_\oplus=2^{-\nu}(\infnorm{S_{k}} + \maxeps^\times_k\infnorm{P_{k}})$$
+      with $\nu=102$ and $\nu=205$ respectively.
+    \end{itemize}
+  \end{itemize}
+  
+
+  To compute a  relative error out of the absolute error
+  $\maxdelta^+_0$, there are two cases to consider.
+\begin{itemize}
+\item If $c_0\ne 0$, for small values of $x$, a good bound on the
+  overall relative error is to divide $\delta_0$ by the minimum of
+  $|s_0|$, which -- provided $\maxx$ is sufficiently small compared to
+  $c_0$ -- is well approximated by
+  $$\mins{0}=|c_0| - \maxx . \maxs{1}$$ 
+  where $\maxs{1}=\infnorm{S_1} + \delta_1$.
+  An upper bound on the total
+  relative error is then
+  $$\rho = \frac{\delta^+_0}{|c_0| - \maxx . \maxs{1}}$$
+  
+  When computing on double-precision numbers we want the error bound
+  to be as tight as possible, as it directly impacts the performance
+  as explained in Section~\ref{sec:error-accuracy-perf}. We may
+  therefore check that $c_k \oplus p_k$ has a constant exponent for
+  all the values of $p_k$. In which case, the above approximation is
+  the tightest possible. If it is not the case (which is unlikely, as
+  $p_k$ is small w.r.t $c_k$), then the $\ulp$ above may take two
+  different values. We divide the interval of $p_k$ into two
+  sub-intervals, and we compute $\delta^+_k$, $\mins{0}$ and $\rho$ on
+  both to take the max.
+  
+\emph{This is currently not implemented.}
+
+\item If $c_0=0$, then the last addition is exact in double as well as
+  double-double, and an efficient implementation will skip it anyway.
+  The overall relative error is that of the last multiplication, and is given as $\maxeps'_0$.
+\end{itemize}
+
+\section{Helper functions \label{section:helperfunctions}}
+
+\subsection{High accuracy square roots \label{subsection:sqrt}}
+
+\input{sqrt.tex}
+
+
+\section{Test if rounding is possible
+\label{section:testrounding}}
+
+We assume here that an evaluation of $y=f(x)$ has been computed with a
+total relative error smaller than $\maxeps$, and that the result is
+available as the sum of two non-overlapping floating-point numbers
+$y_h$ and $y_l$ (as is the case if computed by the previous
+algorithms). This section gives and proves algorithms for testing if
+$y_h$ is the correctly rounded value of $y$ according to the relative
+error $\maxeps$. This correspond to detect whether we are in a hard
+to round case.
+
+
+
+
+\subsection{Rounding to the nearest}
+
+\begin{theorem}[Correct rounding of a double-double to the nearest
+  double, avoiding subnormals]
+\label{th:roundingRN1}
+~\\
+Let $y$ be a real number, and  $\maxeps$, $e$, $y_h$ and $y_l$ be
+  double-precision floating-point numbers such that 
+  \begin{itemize}
+  \item $y_h=y_h\oplus y_l$
+  \item none of $y_h$ and $y_l$ is a  NaN or $\pm \infty$,
+  \item $|y_h|\ge 2^{-1022+54}$ (i.e. $\frac{1}{4}\ulp(y_h)$ is not subnormal), 
+  \item $|y_h+y_l - y| <\maxeps.|y|$ (i.e. the total relative error of
+    $y_h+y_l$ with respect to $y$ is bounded by $\maxeps$),
+  \item $0<\maxeps \le 2^{-53-k}$ with $ k \ge 3$ integer,
+  \item $e\ge 
+  (1-2^{-53})^{-1}\left(
+     1+ \dfrac{2^{54}\maxeps}{1 - \maxeps - 2^{-k+1}}
+    \right)
+\quad $ and $\quad e\le 2$.
+\end{itemize}
+
+The following test determines whether $y_h$ is the
+  correctly rounded value of $y$ in  round to nearest mode.
+
+\begin{lstlisting}[caption={Test for rounding to the nearest},
+  firstnumber=1]
+if( (*@$y_h$@*) == ((*@$y_h$@*) + ((*@$y_l$@*)*e)) )
+  return (*@$y_h$@*);
+else /* more accuracy is needed, launch accurate phase */
+\end{lstlisting}
+\end{theorem}
+
+\begin{proof}
+
+%  \paragraph{Sketch of the proof} 
+
+  Remark that the condition $|y_h|\ge 2^{-1022+54}$ implies that $y_h$
+  is a normal number. 
+
+  The implication we need to prove is: if the test is true, then $y_h
+  = \round(y)$ (failure of the test does not necessary mean that $y_h
+  \ne \round(y)$). 
+
+  Let us note $u=\ulp(y_h)$ and consider only the case when $y_h$ is
+  positive (as the other case is symmetrical). 
+
+  We have
+  to consider separately the following two cases.\\
+  \begin{tabular}{c||c}
+
+    \begin{minipage}[t]{7.5cm}
+      \textbf{If $y_h$ is not a power of two or $y_l\ge 0$}    
+
+       In this case we will always assume that $y_l\ge 0$, as the case
+      $y_l\le 0$ is symmetrical when $y_h$ is not a power of two.
+   \end{minipage}
+    &
+    \begin{minipage}[t]{7.5cm}
+      \textbf{If $y_h$ is a power of two and $y_l<0$}
+    \end{minipage}
+\end{tabular}\\  
+\begin{tabular}{c||c}
+    \begin{minipage}[t]{7.5cm}
+            
+      To prove that $y_h = \round(y)$, it is enough to prove that
+      $|y_h-y|\le u/2$. As $|y_h+y_l - y| <\maxeps.|y|$ (fourth
+      hypothesis) it is enough to prove that $u/2-y_l > \maxeps y$.
+
+      By definition of the \ulp\ of a positive normal
+      number, we have $y_h \in [2^{52}u, (2^{53}-1)u]$.
+
+    \end{minipage}
+  &
+  \begin{minipage}[t]{7.5cm}
+
+    To prove that $y_h = \round(y)$, it is enough to prove that
+    $|y_h-y|\le u/4$. As $y_l\le 0$, we have $y\le y_h$ and $|y_h-y| =
+    y-y_h$.
+
+    From fourth hypothesis, it is enough to prove that $u/4 + y_l >
+    \maxeps y$.
+    
+    By our definition of the \ulp\ of a normal
+    number, we have $y_h = 2^{52}u$ in this case.
+  \end{minipage}
+\end{tabular}\\  
+\begin{tabular}{c||c}
+    \begin{minipage}[t]{7.5cm}
+
+      From the first hypothesis we have 
+      \begin{equation}
+        y_l\le\frac{1}{2}u 
+        \label{eq:prooftest1}
+      \end{equation}
+      
+      Therefore $y_h+y_l \le (2^{53}-1)u + \frac{1}{2}u$, and\\
+      $y < (y_h+y_l)/(1-\maxeps)$. Hence \\
+        $y <\ \dfrac{2^{53}-\frac{1}{2}}{1-\maxeps}  u$
+        
+      As a consequence, since $\maxeps \le 2^{-56}$, 
+      \begin{equation}
+        y < 2^{53}  u
+        \label{eq:prooftest3}
+      \end{equation}
+    \end{minipage}
+  &
+  \begin{minipage}[t]{7.5cm}
+
+    We have $y_h = 2^{52}u$ and $y_l\le 0$, therefore\\ $y_h+y_l \le
+    2^{52}u$, and
+    \begin{equation}
+      y < \frac{2^{52}u}{1-\maxeps}
+      \label{eq:prooftest3p2}
+    \end{equation}
+  \end{minipage}
+\end{tabular}\\  
+\begin{tabular}{c||c}
+    \begin{minipage}[t]{7.5cm}
+      The easy case is when we have $y_h = \round(y)$ regardless of
+      the result of the test. This is true as soon as $y_l$ is
+      sufficiently distant from $u/2$. More specifically, if $0 \le
+      y_l < \left(\frac{1}{2} - 2^{-k}\right)u$, we combine (\ref{eq:prooftest3}) with
+      the fifth hypothesis to get $\maxeps y < 2^{-k}u$. From $y_l <
+      \left(\frac{1}{2} - 2^{-k}\right)u$ we deduce\\ 
+      $u/2 -y_l > 2^{-k}u  >  \maxeps y$,
+      which proves that $y_h=\round(y)$.
+    \end{minipage}
+  &
+  \begin{minipage}[t]{7.5cm}
+    The easy case is when we have $y_h = \round(y)$ regardless of the
+    result of the test. This is true as soon as $y_l$ is sufficiently
+    distant from $-u/4$. More specifically, if $ - \left(\frac{1}{4} -
+      \frac{2^{-k-1}}{1-\maxeps}\right)u < y_l \le 0 $, after combining
+    (\ref{eq:prooftest3p2}) with the fifth hypothesis to get $\maxeps
+    y < \frac{2^{-k-1} u}{1-\maxeps}$,  we deduce\\
+    $y_l + \frac{u}{4}> \frac{2^{-k-1}}{1-\maxeps}u > \maxeps y$, which proves that
+    $y_h=\round(y)$.
+  \end{minipage}
+\end{tabular}\\  
+\begin{tabular}{c||c}
+
+    \begin{minipage}[t]{7.5cm}
+      Now consider the case when $y_l \ge \left(\frac{1}{2} -
+        2^{-k}\right)u$.  The condition $|y_h|\ge 2^{-1022+54}$
+      ensures that $u/4$ is a normal number, and now $y_l > u/4$, so
+      in this case $y_l$ is a normal number. As $1<e\le 2$, the result
+      is also normal, therefore
+      $$y_l\times e(1-2^{-53})\ \le\ y_l \otimes e\ \le\ y_l\times e(1+2^{-53})$$
+      
+    \end{minipage}
+  &
+  \begin{minipage}[t]{7.5cm}
+
+
+      Now consider the case when $-y_l \ge \left(\frac{1}{4} -
+      \frac{2^{-k-1}}{1-\maxeps}\right)u$.  The condition $|y_h|\ge 2^{-1022+54}$
+      ensures that $u/8$ is a normal number, and now $y_l > u/8$, so
+      in this case $y_l$ is a normal number. As $1<e\le 2$, the result
+      is also normal, therefore
+      $$-y_l\times e(1-2^{-53})\ \le\ -y_l \otimes e\ \le\ -y_l\times e(1+2^{-53})$$
+
+  \end{minipage}
+  \\
+    \begin{minipage}[t]{7.5cm}
+  Suppose that the test is true ($y_h \oplus y_l \otimes e = y_h$).
+  With IEEE-54 compliant rounding to nearest, this implies $|y_l
+  \otimes e| \le \dfrac{u}{2}$, which in turn implies \\ $y_l \times e
+  (1-2^{-53}) \le \dfrac{u}{2}$ (as $y_l$ is a normal number and
+  $1<e\le 2$). This is rewritten
+  $$ \frac{u}{2} -y_l\ \ge \ y_l \left(e\left(1-2^{-53}\right) -1\right) $$
+    \end{minipage}
+  &
+  \begin{minipage}[t]{7.5cm}
+  Suppose that the test is true ($y_h \oplus y_l \otimes e = y_h$).
+  For this value of $y_h$ and this sign of $y_l$, this implies $|y_l
+  \otimes e| \le \dfrac{u}{4}$, which in turn implies \\ $-y_l \times e
+  (1-2^{-53}) \le \dfrac{u}{4}$.
+
+  This is rewritten
+  $$ \frac{u}{4}  + y_l\ \ge \ - y_l \left(e\left(1-2^{-53}\right) - 1\right) $$
+  \end{minipage}
+\end{tabular}\\  
+\begin{tabular}{c||c}
+
+  \begin{minipage}[t]{7.5cm}
+    Using $y_l \ge
+    (\frac{1}{2} - 2^{-k})u$,  we get \\
+  $$ \frac{u}{2} -y_l\ \ge \ \left(\frac{1}{2} - 2^{-k}\right)u \left(e\left(1-2^{-53}\right) -1\right) $$
+    \end{minipage}
+  &
+  \begin{minipage}[t]{7.5cm}
+    Using  $-y_l \ge \left(\frac{1}{4} -
+      \frac{2^{-k-1}}{1-\maxeps}\right)u$,  we get \\
+  $$ \frac{u}{4} + y_l\ \ge \ \left(\frac{1}{4} - \frac{2^{-k-1}}{1-\maxeps} \right)u \left(e\left(1-2^{-53}\right) -1\right) $$
+  \end{minipage}
+\end{tabular}\\  
+\begin{tabular}{c||c}
+    \begin{minipage}[t]{7.5cm}
+      We want to ensure that $\dfrac{u}{2} -y_l \ge \maxeps y$, we will
+      again use (\ref{eq:prooftest3}) and ensure that $\dfrac{u}{2} -y_l \ge
+      2^{53} \maxeps u$. This provides the condition that must be
+      fullfilled by $e$ for the theorem to hold in this case: we need
+
+$$\left(\frac{1}{2} - 2^{-k}\right)u \left(e(1-2^{-53}) -1\right)
+\ \ge \ 2^{53} \maxeps u $$
+    \end{minipage}
+  &
+  \begin{minipage}[t]{7.5cm}
+      To ensure that $\dfrac{u}{4} + y_l \ge \maxeps y$, we 
+      again use (\ref{eq:prooftest3p2}) and ensure that $\dfrac{u}{4} + y_l \ge
+      \dfrac{2^{52}u}{1-\maxeps}  \maxeps $. This provides the condition that must be
+      fullfilled by $e$ for the theorem to hold in this case: we need
+
+$$\left(\frac{1}{4} - \frac{2^{-k-1}}{1-\maxeps} \right)u \left(e(1-2^{-53}) -1\right)
+\ \ge \ \dfrac{2^{52}u}{1-\maxeps}  \maxeps $$
+  \end{minipage}
+\end{tabular}\\  
+\begin{tabular}{c||c}
+    \begin{minipage}[t]{7.5cm}
+  rewritten as:
+
+  $$  e\ge 
+   (1-2^{-53})^{-1}\left(
+     1+ \dfrac{2^{54}\maxeps}{1 - 2^{-k+1}}
+     \right)   $$
+    \end{minipage}
+  &
+  \begin{minipage}[t]{7.5cm}
+  rewritten as:
+
+  $$  e\ge 
+   (1-2^{-53})^{-1}\left(
+     1+ \dfrac{2^{54}\maxeps}{1 - \maxeps - 2^{-k+1}}
+     \right)   $$
+  \end{minipage}
+  \\
+\end{tabular}\\
+
+Taking for contraint on $e$ the max of these values completes the proof of the theorem.
+
+\end{proof}
+
+
+\subsubsection*{Notes}
+
+\begin{itemize}
+\item In general we will target values of $\maxeps$ in the order of
+  $2^{-53-10}$ to balance the execution times of the quick and
+  accurate phases.
+
+\item A similar theorem could be written for $y_h$ subnormal. In most
+  cases, there will be a property such as $\round(f(x))=x$, deduced
+  from the Taylor theorem. For the rare functions that come close to
+  zero without such a property (an example is \texttt{exp}), it is
+  simpler and safer to launch the accurate phase systematically in
+  this case.
+
+\item These theorems are not proven for $y_h = \pm \infty$ (an
+  implementation would depend on the correct behaviour of the
+  double-double arithmetic in the neighborhood of $\pm \infty$
+  anyway).  This is not a problem in practice, because an
+  implementation will fall into one of the following cases:
+\begin{itemize}
+\item It can be proven statically that the function is bounded well
+  below the largest representable double-precision number. This will
+  be the case of the logarithm and tangent functions in their
+  respective chapters.
+\item The function comes close to infinity, but monotonicity or
+  another mathematical property allows to prove that $\pm \infty$
+  should be returned for $x$ above or below some statically-defined
+  threshold, and never otherwise. This will be the case of exponential
+  and hyperbolic functions, for instance.
+\end{itemize}
+In both cases, returning a value close to infinity won't require a
+rounding test.
+
+
+\item A fused multiply-and-add should probably not be used for the
+  computation of $y_h+y_l\times e$. Studying this question is on the
+  TODO list.
+
+\end{itemize}
+
+
+
+\subsection{Directed rounding modes}
+
+Directed rounding is much easier to achieve than round to the nearest:
+The difficult cases are the cases when the exact value $y$ is very
+close to a machine number, and we have in $y_h+y_l$ an approximation to
+$y$ with a relative error smaller than the half-ulp of $y_h$.
+Therefore we have in $|y_l|$ an approximation to the distance of
+$y_h$ to the closest machine number, with a known approximation error.
+
+
+
+We use in \crlibm\ the following macro which does the test and then the rounding. 
+It should be used as follows (example taken from \texttt{atan\_fast.c}):
+
+\begin{lstlisting}[caption={An occurence of the test for rounding up},
+  firstnumber=1]
+  TEST_AND_RETURN_RU(atanhi, atanlo, maxepsilon);
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_atan_ru(x);
+\end{lstlisting}
+
+
+
+\begin{theorem}[Test for correct rounding up of a double-double to a double]
+\label{th:roundingDirected}
+~\\
+Let $y$ be a real number, and $y_h$, $y_l$ and $\maxeps$ be
+floating-point numbers such that
+  \begin{itemize}
+  \item $y_h=y_h\oplus y_l$,
+  \item $y_h$ is neither a NaN, a subnormal, $\pm 0$ or $\pm \infty$.
+  \item $y_l$ is neither a NaN or $\pm \infty$.
+  \item $|y_h+y_l - y| <\maxeps.|y|$
+\end{itemize}
+
+The following test determines whether $y_h$ is the
+  correctly rounded value of $y$ in round up mode.
+
+\begin{lstlisting}[caption={Test for directed rounding},
+  firstnumber=1]
+#define TEST_AND_RETURN_RU(__yh__, __yl__, __eps__)                    \
+{                                                                      \
+  db_number yh, yl, u53;  int yh_neg, yl_neg;                          \
+  yh.d = __yh__;    yl.d = __yl__;                                     \
+  yh_neg = (yh.i[HI] & 0x80000000);                                    \
+  yl_neg = (yl.i[HI] & 0x80000000);                                    \
+  yh.l = yh.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl.l = yl.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53.l     = (yh.l & 0x7ff0000000000000LL) +  0x0010000000000000LL;   \
+  if(yl.d > __eps__ * u53.d){                                          \
+    if(!yl_neg) {  /* The case yl==0 is filtered by the above test*/   \
+      /* return next up */                                             \
+      yh.d = __yh__;                                                   \
+      if(yh_neg) yh.l--;  else yh.l++; /* Beware: Fails for zero */    \
+      return yh.d ;                                                    \
+    }                                                                  \
+    else  return __yh__;                                               \
+  }                                                                    \
+}
+\end{lstlisting}
+\end{theorem}
+
+\begin{proof}
+  The first lines compute $|y_h|$, $|y_l|$, boolean values holding the
+  sign information of $y_h$ and $y_l$, and $u_{53}=2^{53}\ulp(y_h)$.
+  Here we use integer 64-bit arithmetic for readability, but other
+  implementations may be more efficient on some systems. Note that
+  these computations don't work for infinities, zeroes or subnormals.
+  
+  As previously, by definition of the \ulp, we have  $y<2^{53}u$.
+  
+  The main test which determines whether correct rounding is possible
+  is line 10. If this test is true, then $y_l>(2^{53}u)\otimes\maxeps
+  = 2^{53}\maxeps u $ (the multiplication by $u_{53}$, a power of two,
+  is exact), hence $y_l>\maxeps y$ so we are in an easy case for
+  directed rounding.
+
+  The remaining computations and tests (lines 11 and following)
+  compute \texttt{nextafter(yh,inf)} in an efficient way since an
+  integer representation of $y_h$ is already available. For the other
+  directed rounding modes, only these lines change in a
+  straightforward way.
+\end{proof}
+
+
+
+
+
+\paragraph*{Notes}
+\begin{itemize}
+\item Rounding down and to zero are identical to the previous, except
+  for the computation of the rounded value itself.
+
+\item These tests launch the accurate phase when yl=0, in particular
+  in the exceptional cases when the image of a double is a double. See
+  the chapter \ref{chap:log}
+% (page \pageref{pageref:log_of_one}) % TODO: still true? 
+for  an example where it may introduce a misround.
+
+\item These tests don't work if $y_h$ is a subnormal. If one cannot
+  prove statically that this case doesn't appear, a sensible solution
+  is to test for subnormals and launch the accurate phase.
+
+\item Finally, remark that for some functions, the tests on the sign of
+  $y_h$ are statically predictable to be true because the function is
+  always positive. We shall use this macro anyway for safety. Tanks to
+  branch predictor logic in modern processors, it will make little
+  difference from a performance point of view.
+\end{itemize}
+
+
+
+
+
+
+
+
+
+\section{The Software Carry Save library
+\label{sec:SCSLib}}
+
+The software carry-save internal representation of multiple-precision
+numbers was designed specifically for simple and fast implementations
+of addition and multiplication in the 100-500 bit precision range, as
+required by the \accurate\ phase of our algorithms. More details on
+software carry-save are available in \cite{DefDin2002,DinDef2003}.
+
+The parameters of \scslib\ are set up so that all the operators offer
+a relative error better than $2^{-208}$.  This is a large overkill for
+all the functions in \crlibm, as the worst cases computed by Lefevre
+never require more than 158 bits of accuracy. This enables simple
+proofs for the second steps, assuming the operators in \scslib\ are
+correct.
+
+Another feature that makes accuracy proofs simple when using \scslib\ 
+is the following: The range of SCS numbers includes the range of IEEE
+double-precision numbers, including subnormals and exceptional cases.
+Conversions between SCS format and IEEE-754 doubles, as well as
+arithmetic operations, follow the IEEE rules concerning the
+exceptional cases. SCS doesn't ensure correct rounding, but provides
+conversions to doubles in the four IEEE-754 rounding modes, which is
+enough for the purpose of \crlibm.
+
+However, a formal proof of correctness of the \scslib\ operators
+remains to be done. Currently there is nothing more than good
+confidence based on the simplicity of the code.
+
+
+\subsection{The SCS format}
+
+ A MP number is represented in the proposed format as a
+\emph{Software Carry Save} (SCS) structure $R$, depicted on
+Figure~\ref{fig:scsrepresentation} and composed of the following
+fields:
+\begin{description}
+\item[\emph{R.digits[$n_r$]}] A table of $n_r$ digits with $m_r$ bits
+  of precision. These digits can in principle be either integer or FP
+  machine numbers, however integer is always faster and simpler. We
+  will not mention FP digits anymore here, the interested reader is
+  referred to \cite{DefDin2002,DinDef2003}.
+\item[\emph{R.index}] An integer storing the index of the first digit
+  in the range of representable numbers, as depicted on
+  Figure~\ref{fig:scsrepresentation};
+ \item[\emph{R.sign}] A sign information.  
+\end{description}
+
+\begin{figure}[h]
+\begin{center}
+\includegraphics[width=0.7\textwidth]{fig_scs/exponent_representation} % image file name
+\caption{The proposed format \label{fig:scsrepresentation}}
+\end{center}
+\end{figure}
+  
+In other words, the value  $x$ of a representation $R$  is:
+\begin{equation}
+\label{eqn4}
+x = R.sign \times \sum_{j=1}^{n_r} R.digits[j] \times 2^{m_r * (R.index - j)}
+\end{equation}
+
+In such a \emph{normal} SCS number $R$, the bits from $m_I$ to $m_r$
+of the $R.digits$ fields are thus set to zero. They will be exploited
+by the algorithms to store temporary \emph{carry} information, and are
+therefore called \emph{carry-save} bits. An SCS number where these
+bits are non-zero is said to be non-normal.
+
+The values of the parameters for use in \crlibm\ is $n_r=8$ digits of
+$m_i=30$ bits stored on $m_r=32$-bit words. The worst-case precision
+that this format may hold is when the most significant digit is equal
+to $1$, meaning that an SCS numbers holds only $1+7\times 30=211$
+significant digits.
+
+
+\subsection{Arithmetic operations\label{sec:ops}}
+
+
+\subsubsection{Conversion from double to SCS}
+ A first method for converting a double precision floating
+point number $d$ into an SCS representation is to extract the
+exponent $d_{exp}$ from $d$, and then determine the corresponding
+$R.index$ as the integer part of
+$\frac{d_{exp}}{2^{m_r}}$.
+
+Another method uses a variable number of multiplications by
+$2^{m_r}$ or $2^{-m_r}$. This method is faster than the previous one
+when the exponent of $d$ is close to $0$.
+
+After testing both methods in \crlibm, the first method was preferred.
+
+
+\subsubsection{Addition and subtraction}
+
+The addition of two SCS numbers of the same sign consists in aligning,
+then adding digits of the same order. Thanks to the carry-save bits,
+all these additions will be \emph{exact} and \emph{independent}.
+However the result will usually not be a normal SCS number: the sums
+will have overflown in the carry-save bits. A \emph{renormalization}
+procedure is presented in section \ref{renorm} to propagate these
+carry bits and get again a normal SCS number.  However, the advantage
+of SCS representation is that many SCS numbers can be summed before
+needing to perform this expensive step (up to 7 with the choice of
+parameters made in \crlibm).
+
+The subtraction (addition of two numbers of opposite signs) is very
+similar to the addition algorithm. It may also classically lead to a
+cancellation, which may need an update of the index of the result.
+However, as in other floating-point formats, a subtraction involving a
+a cancellation is exact.
+
+Although all the digit operations are exact, the addition or
+subtraction of two numbers also classically involves a rounding error,
+due to aligning the digits of same magnitude. For performance reason
+this rounding is a truncation, so the worst-case relative error is one
+ulp of the least accurate representable number, or $2^{-211}$.
+
+
+
+
+%---------------- 
+% MULTIPLICATION
+%----------------
+\subsubsection{Multiplication}
+
+The multiplication of two normal SCS numbers involves the operations
+depicted on the Figure \ref{fig:scsmultiplication}: The partial
+products are computed (in parallel) and summed in columns. The
+parameters are set up so that none of these operation overflow. Again,
+the result is not a normal SCS number, and a renormalization procedure
+(described below) has to be applied to empty the carry bits. However,
+a few additions may follow a multiplication before this
+renormalization, which allows for further optimization of algorithms
+using SCS arithmetic. For instance, a polynomial evaluation can be
+implemented with a renormalization after one multiplication and one
+addition.
+
+\begin{figure}[h]
+\begin{center}
+\includegraphics[width=0.7\textwidth]{fig_scs/multiplication}
+\caption{SCS multiplication \label{fig:scsmultiplication}}
+\end{center}
+\end{figure}
+
+Here also, a rounding error is involved when two $n_r$-digit numbers
+are multiplied if the result is to fit on $n_r$ digits. The actual
+implementation tests if the most significant digit ($z_1$ on
+Figure~\ref{fig:scsmultiplication}) is null, in which case the index of
+the result is that of $z_2$.
+
+If the whole of the computations of
+Figure~\ref{fig:scsmultiplication} are implemented, the worst case
+for relative accuracy is again $2^{-211}$. However a further
+optimization is to avoid computing the columns of lower magnitude, at
+the expense of an increase in the rounding error. More specifically,
+we compute 9 columns instead of 16.  The wors case is now when $z_1$
+is null, in which case the relative error correspond to the truncation
+of the 8 leftmost columns, whose maximum value is smaller than 3 ulps
+of the SCS result. Therefore the relative error of the multiplication
+is bounded by $2^{-208}$ with this optimization, which is still a
+large overkill for the purpose of \crlibm.
+
+This optimization is therefore implemented if the loop are hand-unrolled.
+If they are not, the increased control complexity actually degrades
+performance.
+
+
+\subsubsection{Renormalization (carry propagation) \label{renorm}}
+
+Renormalization is a carry propagation from the low order to high
+order digits: Starting with an initially null carry, at each step, the
+previous carry is added to the current digit, and this sum is then
+split into two parts using masks. The low $m_r$ bits are a digit of
+the normalized result, and the upper part is the next carry.
+
+The actual algorithm is a little bit more complex. The initial
+non-normal number may not be representable exactly as a normal SCS
+number, therefore the index of the normalized result may have to be
+increased by one or two.  Normalization thus again involves a rounding
+error. Note that this error was already taken into account in the previous
+discussions of addition and multiplication.
+
+
+
+
+%-----------------
+% CONVERSION BACK
+%-----------------
+\subsubsection{Conversion from SCS to floating-point}
+
+A few (4 in the worst case) multiplications and additions suffice to
+get the FP number closest to a SCS number.  For instance, for $m_I=53$
+and $m_r=26$, we need to compute $d = A.sign \times 2^{A.index \times
+  m_r} \times ( A.digits[0]+ 2^{-m_r} \times A.digits[1]+ 2^{-2.m_r}
+\times A.digits[2]+ 2^{-3.m_r} \times A.digits[3])$. The number
+$2^{A.index \times m_r}$ is build using integer masks. The actual
+implementation of this formula is slightly less simple, but this
+conversion is still very fast.
+
+
+\subsubsection{Mixed 32- and 64-bit arithmetics}
+
+An improvement implemented in \scslib\ was the combined use of integer 32- and 64-bit
+arithmetics as follows: 
+
+\begin{itemize}
+\item MP digits are stored as 32-bit numbers where only a few bits are
+  reserved for carries. This removes the main problem of the initial
+implementation \cite{DefDin2002}, namely its memory inefficiency.
+
+\item Addition uses 32-bit arithmetic. 
+
+\item In the MP multiplication, the partial products are products of
+  two 32-bit digits, which are 64-bit numbers. The column sums need
+  thus to be computed using 64-bit arithmetic. This can be expressed
+  in the C language in a non-ISO-C99, but de-facto standard way, as
+  follows: 32-bit numbers have the \texttt{unsigned int} type; 64-bit
+  numbers have the \texttt{unsigned long long int} type. When
+  multiplying two digits, one is first cast into this 64-bit type.
+  
+  For UltraSPARC architectures (detected at build time) the
+  conversion is to floating-point, but we will not detail this
+  peculiarity further.
+\end{itemize}
+
+
+This works well because all modern processors either have 64-bit
+integer units, or offer instructions which store the 64-bit product of
+two 32-bit integers into two 32-bit registers. The compiler does the
+rest well, because it is conceptually simple: casting unsigned 32-bit
+into unsigned 64-bit is trivial; 64-bit addition is translated
+straightforwardly into one 32-bit \emph{add} followed by one 32-bit
+\emph{add-with carry}.
+
+
+
+
+\subsubsection{Implementation considerations}
+
+For portability purposes, the implemention uses C as defined by
+the ISO C99 standard, and tries to use a recent version of \texttt{gcc}.
+We could not exhibit a case where a native compiler from the processor
+vendor (Intel or Sun) gave significantly better results than
+\texttt{gcc}, which is probably a consequence of the simplicity of our
+code.
+
+However, when tuning for performance, we observed that the same code
+which was efficient on one processor could lead to very poor results
+on another.  Usually, this difference can be traced down to the
+capabilities of the processor itself. The typical example is the
+knowingly poor integer multiplication on UltraSPARC II. Sometimes
+however, the processor should be able to perform well, and it is the
+processor-specific backend of the compiler which is to blame, which
+can be checked by observing the assembly code produced.  A typical
+example is the casting of 32-bits digits to 64-bit arithmetic (or to
+an FP number in the case of the UltraSPARC) in the multiplication
+algorithm. In these cases we tried to change the programming style in
+a way that works well on all processors. Sometimes it wasn't possible,
+in which case the code contains, along with a generic version, several
+processor-specific tricky versions of the problematic operation,
+selected at compile time thanks to the GNU \texttt{automake/autoconf}
+tools.
+
+
+More surprisingly, we were disappointed by the higher-level
+capabilities of the compilers, especially at unrolling loops. Our code
+exhibits many small \texttt{for} loops whose size is known at
+compile-time (usually $n$). This is the ideal situation for loop
+unrolling, a technique well known and described in most textbooks on
+compiler design. Options exist in most compilers to turn on this
+optimisation. Unfortunately, leaving loop unrolling to the compiler
+gives very poor results, even when compared to the non-unrolled case.
+Since unrolling the loops by hand in the C code takes a few minutes,
+we did it for the version of the library which we use ($m=30$, $n=8$).
+It marginally increases the code sizes for this small $n$, and
+sometimes provides a twofold improvement on speed, depending of the
+processor. Of course, this is not satisfactory: We don't want to do it
+for all values of $n$, nor do we want to study for each processor the
+tradeoffs involved as $n$ increase. We expect however future compilers
+to handle unrolling better, and we were surprised that no compiler had
+a clear edge on the other in this respect. Some argue, however, that
+this issue is pointless, as superscalarity, along with register
+renaming and branch prediction inside modern processors, sum up to the
+equivalent of dynamic unrolling of the code. In our tests (in 2003), it
+doesn't: unrolling does bring a speed-up.
+
+
+
+
+
+
+
+
+\section{Common Maple procedures \label{section:commonMaple}}
+
+
+\subsection{Conversions}
+
+
+
+
+
+Procedure \texttt{ieeedouble} returns the sign, the exponent and the
+mantissa of the IEEE-754 double-precision number closest to input
+value \texttt{x}.
+
+\begin{lstlisting}[caption={ieeedouble},firstnumber=1]
+ieeedouble:=proc(xx)
+local x, sgn, logabsx, exponent, mantissa, infmantissa,powermin,powermax,expmin,expmax,expmiddle,powermiddle;
+Digits := 100;
+x := evalf(xx);
+if (x=0) then sgn, exponent, mantissa := 1, -1022, 0
+else
+  if (x < 0) then sgn := -1
+  else sgn := 1
+  fi:
+  x := abs(x);
+  if x >=  2^(1023)*(2-2^(-53)) then mantissa := infinity; exponent := 1023
+  else if x <= 2^(-1075) then mantissa := 0; exponent := -1022
+      else
+         if x <= 2^(-1022) then exponent := -1022
+         else
+# x is between 2^(-1022) and 2^(1024)
+         powermin := 2^(-1022); expmin := -1022;
+         powermax := 2^1024; expmax := 1024;
+         while (expmax-expmin > 1) do
+            expmiddle := round((expmax+expmin)/2);
+            powermiddle := 2^expmiddle;
+            if x >= powermiddle then
+                powermin := powermiddle;
+                expmin := expmiddle
+            else
+                powermax := powermiddle;
+                expmax := expmiddle
+            fi
+          od;
+# now, expmax - expmin = 1 and powermin <= x < powermax,
+# powermin = 2^expmin and powermax = 2^expmax, so expmin is the exponent of x
+         exponent := expmin;
+         fi;
+         infmantissa := x*2^(52-exponent);
+	 if frac(infmantissa) <> 0.5 then mantissa := round(infmantissa)
+            else
+              mantissa := floor(infmantissa);
+               if type(mantissa,odd) then mantissa := mantissa+1 fi
+            fi;
+         mantissa := mantissa*2^(-52);
+      fi;
+  fi;
+fi;
+sgn,exponent,mantissa;
+end:
+\end{lstlisting}
+
+
+Procedure \texttt{ieeehexa} returns the hexadecimal representation of the nearest double to its input \texttt{x}.
+
+\begin{lstlisting}[caption={ieeehexa},firstnumber=1]
+ieeehexa:= proc(x)
+local  hex2, xx, longint, expo, sgn, frac, resultat;
+    if(x=0) then resultat:=["00000000","00000000"];
+    elif(x=-0) then resultat:=["80000000","00000000"]; # nice try
+    else
+        xx:=ieeedouble(x);
+        sgn:=xx[1]:
+        expo:=xx[2]:
+        frac:=xx[3]:
+        if (expo = -1023) then
+            longint := (frac)*2^51 ;   # subnormal
+        else
+            longint := (frac-1)*2^52 +   (expo+1023)*2^52;
+        fi:
+        if (sgn=-1) then
+            longint := longint + 2^63;
+        fi:
+        longint := longint + 2^64:  # to get all the hexadecimal digits when we'll convert to string
+        hex2:=convert(longint, hex);
+        hex2:=convert(hex2, string):
+
+        resultat:=[substring(hex2,2..9), substring(hex2,10..18)]:
+    fi:
+    resultat;
+end proc:
+\end{lstlisting}
+
+Procedure \texttt{hexa2ieee} performs the reciprocal conversion.
+
+
+
+
+
+Procedure \texttt{hi\_lo} returns two IEEE-double numbers $x\_hi$ and
+$x\_lo$ so that $x = x\_hi + x\_lo + \epsilon_{-103}$.
+
+\begin{lstlisting}[caption={hi\_lo},firstnumber=1]
+hi_lo:= proc(x)
+local x_hi, x_lo, res:
+x_hi:= nearest(evalf(x)):
+res:=x-x_hi:
+if (res = 0) then
+  x_lo:=0:
+else
+  x_lo:=nearest(evalf(res)):
+end if;
+x_hi,x_lo;
+end:
+\end{lstlisting}
+\vspace{0.5cm}
+
+
+
+
+Procedure \texttt{showHowDifficultToRound} takes a real number, and prints
+the bits after the 53th of its nearest IEEE floating-point number.
+
+
+\begin{lstlisting}[caption={showHowDifficultToRound},firstnumber=1]
+showHowDifficultToRound:=proc(x)
+local xb,xs,s,e,m:
+    Digits:=200:
+    s,e,m := ieeedouble(x):
+    xb:=convert(evalf(x*2^(-e)),binary):
+    xs:=convert(xb, string):
+    substring(xs,55..153)
+end proc:
+\end{lstlisting}
+
+
+\subsection{Procedures for polynomial approximation}
+
+
+Procedure \texttt{Poly\_exact2} takes in arguments a polynomial
+\texttt{P} and a integer \texttt{n}. It returns a truncated
+polynomial, of which coefficients are exactly IEEE-double numbers. The
+\texttt{n} first coefficients are written over 2 IEEE-double numbers.
+
+\begin{lstlisting}[caption={poly\_exact2},firstnumber=1]
+poly_exact2:=proc(P,n)
+local deg,i, coef, coef_hi, coef_lo, Q:
+Q:= 0:
+convert(Q, polynom):
+deg:=degree(P,x):
+  for i from 0 to deg do
+    coef :=coeff(P,x,i):
+    coef_hi, coef_lo:=hi_lo(coef):
+    Q:= Q + coef_hi*x^i:
+    if(i<n) then
+        Q := Q + coef_lo*x^i:
+    fi:
+  od:
+  return(Q);
+end:
+\end{lstlisting}
+\vspace{0.5cm}
+
+
+We also have procedures for computing good truncated polynomial
+approximation for a function. As they are useless to the proof, we do
+not describe them here, the interested reader is referred to file
+\texttt{maple/common-procedures.mpl} for more details.
+
+
+
+
+
+
+
+
+
+
+\subsection{Accumulated rounding error in Horner evaluation
+ \label{sec:Horner-maple}}
+
+
+
+The following Maple procedures implement the error analysis described
+in Section~\ref{sec:Horner}.
+
+Procedure \texttt{compute\_abs\_rounding\_error} computes a bound on
+the accumulated rounding error caused by the Horner evaluation of a
+truncated polynomial. \texttt{poly} is the polynomial, \texttt{xmax} is the max value of
+$|x|$, \texttt{nn} is the degree when \texttt{poly} is computed in double double, and the
+first double-double operation is an addition.
+
+This procedure returns the maximum absolute error, and safe bounds on the
+minimum and maximum values of the function. It also checks on the fly
+that the fast (test-free) versions of the double-double addition can
+be used, and prints warnings if it not the case.
+
+\begin{lstlisting}[caption={compute\_abs\_rounding\_error},firstnumber=1]
+compute_abs_rounding_error:=proc(poly,xmax, nn)
+local n, deg, delta, deltap, i, S, P, Snorm, Smin, Smax, prec:
+deltap:=0:
+delta:=0:
+deg:=degree(poly):
+
+prec:=53; # precision of the first iterations
+
+S:=coeff(poly, x, deg):
+Smax:=abs(S):
+Smin:=Smax:
+
+if nn<0 then n:=0: else n:=nn: fi:# sometimes called by compute_rel_rounding_error with n=-1
+
+for i from (deg-1) to 0 by -1 do
+  P:= convert(S*x, polynom):
+  Smin := abs(coeff(poly,x,i)) - xmax*Smax : 
+  if(Smin<=0) then 
+    printf("Warning! in compute_abs_rounding_error, Smin<=0 at iteration %d, consider decreasing xmax\n",i);
+  fi:
+  delta:= evalf(xmax*deltap + 2**(-prec)*xmax*Smax):
+  if i<n then 
+    # fast Add22 ?    
+    if abs(coeff(poly,x,i)) < xmax*Smax  # may be improved to xmax*Smax/2
+    then printf("WARNING Add22 cannot be used at step %d, use Add22Cond\n" , i  );   
+         printf("    coeff=%1.20e,  xmax*Smax=%1.20e"  ,  abs(coeff(poly,x,i)),  xmax*Smax );
+    fi:
+  fi:
+  S:=convert(P+coeff(poly,x,i), polynom):
+  Snorm:=evalf(infnorm(S, x=-xmax..xmax)):
+  if i=n-1 then prec:=100: fi:  # from the addition of the n-1-th iteration
+  deltap:= evalf(delta + 2**(-prec)*(delta + Snorm)): 
+  Smax := Snorm + deltap:  
+od:
+deltap, Smin, Smax;
+end proc:
+\end{lstlisting}
+\vspace{0.5cm}
+
+Procedure \texttt{compute\_rel\_rounding\_error} computes a bound on
+the total relative rounding error of a Horner polynomial evaluation,
+in the same condition as the previous procedure.
+
+\begin{lstlisting}[caption={compute\_abs\_rounding\_error},firstnumber=1]
+compute_rel_rounding_error:=proc(poly,xmax, n)
+local deg, p, rho, deltap, Smin, Smax:
+
+deg:=degree(poly):
+if(n>0) then p:=100: else p:=53: fi: 
+
+if coeff(poly,x, 0) = 0 then
+   deltap, Smin, Smax := compute_abs_rounding_error(poly/x,xmax, n-1):
+   rho :=  (2^(-p)*(Smax+deltap) +deltap ) / Smin :
+else
+   deltap, Smin, Smax := compute_abs_rounding_error(poly,xmax, n):
+   rho := deltap /  Smin:
+fi:
+rho;
+end proc:
+\end{lstlisting}
+\vspace{0.5cm}
+
+Procedures \texttt{compute\_abs\_rounding\_error\_firstmult} and
+\texttt{compute\_abs\_rounding\_error\_firstmult} are similar to the
+previous, but in the case when the first double-double operation is a
+multiplication.
+
+
+
+\subsection{Rounding}
+
+Procedure \texttt{compute\_rn\_constant} computes a good constant for
+the round-to-nearest test of Theorem~\ref{th:roundingRN1}. Its input
+is a bound of the overall relative error of the approximation scheme.
+
+
+
+
+\subsection{Using double-extended}
+
+The file \texttt{maple/double-extended.mpl} contains procedures
+similar to those previously described to handle double-extended
+precision (64 bits of mantissa and 15 bits of exponent). This is
+currently used in experimental code only: The \crlibm\ CVS repository
+at \url{http://lipforge.ens-lyon.fr/} contains such code for
+exponential and arctangent on Itanium, and arctangent on IA32
+processors. For more details see \cite{DinDefLau2004LIP,DinErshGast2005}.
+
+
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
diff --git a/src/crlibm/docs/latex/acos.tex b/src/crlibm/docs/latex/acos.tex
new file mode 100644
index 0000000..2e0e7d3
--- /dev/null
+++ b/src/crlibm/docs/latex/acos.tex
@@ -0,0 +1,4 @@
+TODO. This function was completely rewritten using machine-generated
+polynomials. Gappa proofs were automatically generated, too, and are
+available in the \texttt{gappa/asin} directory. This chapter will be
+updated soon.
diff --git a/src/crlibm/docs/latex/asin.tex b/src/crlibm/docs/latex/asin.tex
new file mode 100644
index 0000000..30f6e3a
--- /dev/null
+++ b/src/crlibm/docs/latex/asin.tex
@@ -0,0 +1,922 @@
+This chapter is contributed by Ch. Q. Lauter.
+
+WARNING: This chapter is out-of-sync with the code. The function was
+completely rewritten using machine-generated polynomials. Gappa proofs
+were automatically generated, too, and are available in the
+\texttt{gappa/asin} directory. This chapter will be updated soon.
+
+\section{Overview of the algorithm\label{sec:asin-overview}}
+The arcsine $\arcsin\left( x \right) = \sum\limits_{i=0}^{\infty}
+\frac{\left( 2i - 1 \right)!!}{\left(2i+1\right) \cdot \left( 2i
+\right)!!} \cdot x^{2i+1}$ is defined on the domain $x \in \left[ -1;
+1 \right]$. It is a odd function: $\arcsin\left(-x\right) =
+-\arcsin\left( x \right)$. Its value in $0$ is $\arcsin\left( 0
+\right) = 0$. Its derivative tends to infinity when $x$ tends to $1$:
+$\lim\limits_{x \rightarrow 1} \left( \frac{d}{dx} \arcsin
+\right)\left(x\right) = \infty$; the function's value in $1$ is
+nevertheless finite: $\arcsin\left( 1 \right) = \frac{\pi}{2}$.  There
+is no simple additive or multiplicative decomposition of this
+function.
+
+A correctly rounded implementation of $\arcsin$ must provide an
+accuracy of at least $126$ bits for $\left \vert x \right \vert \leq
+2^{-18}$ and of at least $118$ bits for the rest of the definition
+domain in the accurate phase \cite{DinDefLau2004LIP}.
+
+The algorithm chosen principally consists of a piecewise polynomial
+approximation either of the function itself or of a asymptotic
+development of the function. More precisely, the following is done:
+\begin{itemize}
+\item Special cases, such as $\left \vert x \right \vert > 1$, $x = \pm \infty$, $x = \nan$, are handled.
+\item The sign of the argument $x$ is stripped off because
+$\arcsin\left(x\right) = \sgn\left(x\right) \cdot \arcsin\left( \left
+\vert x \right \vert \right)$. We will suppose in the following, that
+$x$ stands for a positive argument, $x \geq 0$.
+\item The argument is classified in one of $10$ subdomains of $\left[
+0; 1 \right]$.  This means an integer $i \in \left[0\dots9\right]$ is
+computed such that $x \in I_i$ where
+$$\bigcup\limits_{i=0}^9 I_i = \left[0; 1 \right]$$
+$$i \not= j \Rightarrow I_i \cap I_j = \emptyset$$
+$$i < j \Rightarrow \forall x_i \in I_i, x_j \in I_j \mbox{ . } x_i < x_j$$
+\item If $i = 0$, $\arcsin$ is directly approximated as 
+$$\arcsin\left( x \right) \approx x + x^3 \cdot p_0\left( x^2 \right)$$
+\item If $1 \leq i \leq 8$, an interval midpoint value $m_i
+\approx \frac{\inf I_i + \sup I_i}{2}$ is read in a table.  The function is
+then approximated as
+$$\arcsin\left( x \right) \approx \arcsin\left( m_i \right) +  \left(x - m_i \right) \cdot p_i\left( x - m_i \right)$$
+\item If $i = 9$, $\arcsin$ is approximated as 
+$$\arcsin\left( x \right) \approx p_9\left( 1 - x \right) \cdot \sqrt{2 - 2\cdot x} + \frac{\pi}{2}$$
+\end{itemize}
+The polynomials $p_i$, $1 \leq i \leq 8$, for the middle intervals are
+all of the same degree and, loaded from a table, can be evaluated in
+the same computation path. The polynomials $p_0$ and $p_9$ are of
+different degree. So there are three distinct paths in the code. In
+the following, they are referred to as the low, middle and high path.
+
+Concerning the quick and accurate phase of the implementation, it must
+mentioned that code and cache size considerations do not allow for
+using different coefficient tables for the quick phase polynomials
+$p_{i\mbox{\tiny ~quick}}$ as for the accurate phase polynomials
+$p_{i\mbox{\tiny ~accurate}}$ that are obviously longer and must contain
+more accurately stored coefficients. So the quick phase polynomials are
+simply the accurate phase polynomials truncated to some degree and simplified 
+by omitting low significance components of the coefficients.
+
+The double precision midpoint values $m_i \in \F$ for the middle path
+intervals $I_i$, $1 \leq i \leq 8$, are chosen such that a
+double-double approximation $asinm_{i\hi} + asinm_{i\lo}$ of
+$\arcsin\left( m_i \right)$ is accurate to at least $121$ bits. This
+allows for saving up memory in the tables used.
+
+The intervals $I_i$ are not uniformly distributed. This has the
+disadvantage that the computation of $i$ cannot be done by simple
+bitmasks on the arcsine's argument $x$ but that a dichotomy must be
+performed. On the other hand, this is the only way of using
+polynomials for the same degree for all middle intervals without
+wasting accuracy for the lower ones. In fact, the derivative of
+$\arcsin$ grows over-polynomially, which means that the polynomial
+degrees must increase for equally sized reduced arguments in order to
+achieve the same approximation error. 
+
+The decomposition of the domain $\left[0;1\right]$ into the $I_i$s is
+relatively ad-hoc. The given implementation uses:
+$$I_i = \left[bound_i;bound_{i+1}\right]$$
+with
+\begin{eqnarray*}
+bound_0 & = & 0 \\
+bound_1 & = & 0.184999942779541015625  \\
+bound_2 & = & 0.2997171878814697265625  \\
+bound_3 & = & 0.40296268463134765625  \\
+bound_4 & = & 0.4932067394256591796875  \\
+bound_5 & = & 0.5696849822998046875  \\
+bound_6 & = & 0.639662265777587890625  \\
+bound_7 & = & 0.696256160736083984375 \\
+bound_8 & = & 0.741760730743408203125  \\
+bound_9 & = & 0.77999973297119140625  \\
+bound_{10} & = & 1 
+\end{eqnarray*}
+One remarks that in order to simplify the dichotomy for computing $i$,
+the bounds of the intervals are chosen all such that the low order
+word of the double precision numbers they are stored in are $0$. See
+\ref{sec:asinargred}, page \pageref{sec:asinargred} for more precise
+considerations on that subject.
+
+Let be
+$$z_i = \left \lbrace \begin{array}{ll} x & \mbox{ if } i = 0 \\
+x - m_i & \mbox{ if } 1 \leq i \leq 8 \\
+1 - x & \mbox{ if } i = 9 \end{array} \right.$$
+This value $z_i$ is the argument to the polynomial $p_i$. With the given interval bounds, it is bounded by 
+
+$$\left \vert z_1 \right \vert  \leq  2^{-2.434403}$$
+$$\left \vert z_2 \right \vert  \leq  2^{-4.123846}$$
+$$\left \vert z_3 \right \vert  \leq  2^{-4.275849}$$
+$$\left \vert z_4 \right \vert  \leq  2^{-4.470024}$$
+$$\left \vert z_5 \right \vert  \leq  2^{-4.708807}$$
+$$\left \vert z_6 \right \vert  \leq  2^{-4.836970}$$
+$$\left \vert z_7 \right \vert  \leq  2^{-5.143210}$$
+$$\left \vert z_8 \right \vert  \leq  2^{-5.457845}$$
+$$\left \vert z_9 \right \vert  \leq  2^{-5.708811}$$
+$$\left \vert z_{10} \right \vert  \leq  2^{-2.184423}$$
+
+The degrees of the polynomials $p_i$ and the number of double (D),
+double-double (DD) and triple-double (TD) coefficients stored in the
+table are listed below. Here the degree of the polynomial is the
+highest exponent of the monomial whose coefficient is not equal to
+$0$. We repeat that the $p_i$ are such that
+$$\arcsin\left( x \right) \approx x + x^3 \cdot p_0\left( x^2 \right)$$
+$$\arcsin\left( x \right) \approx \arcsin\left( m_i \right) + \left(x
+- m_i \right) \cdot p_i\left( x - m_i \right), \mbox{~~} 1 \leq i \leq
+8$$
+$$\arcsin\left( x \right) \approx p_9\left( 1 - x \right) \cdot \sqrt{2 - 2\cdot x} + \frac{\pi}{2}$$
+
+\begin{center}
+\begin{tabular}{|l|l|l|l|l|l|l|l|}
+\hline
+$i$ & quick phase & accurate phase & D quick & DD quick & D accur. & DD accur. & TD accur. \\
+\hline
+\hline
+$0$ & 8 & 17 & 5 & 4 & 7 & 6 & 5 \\ 
+\hline
+$1\dots8$ & 13 & 34 & 8 & 6 & 20 & 9 & 6 \\ 
+\hline
+$9$ & 18 & 28 & 10 & 8 & 12 & 9 & 8 \\ 
+\hline
+\end{tabular}
+\end{center}
+Remark that the listing does not account neither for the $8$
+double-double values representing approximations to $\arcsin\left( m_i
+\right)$ nor for the $8$ double precision numbers $m_i$.
+
+Taking into account also these values, the overall table size for both
+quick and accurate phase is 4640 bytes. Some additional values, for
+example the triple-double $PiHalf_\hi + PiHalf_\mi + PiHalf_\lo
+\approx \frac{\pi}{2}$, interval bounds or table indices, are directly
+compiled into the code. Their overall size is 100 bytes.
+
+\section{Special case handling, interval discrimination and argument reduction}\label{sec:asinargred}
+As already mentioned, $\arcsin$ is only defined on the domain $\left[
+  -1; 1 \right]$. For other arguments, including $\pm \infty$ and
+$\nan$, $\nan$ must be returned. This is implemented in the code as
+follows: the sign of $x$ is stripped off by integer computations and
+stored in variable {\tt sign}. Than, $\left \vert x \right \vert$ is
+compared to $1$ by integer comparisons.
+\begin{lstlisting}[caption={Handling special cases - definition domain},firstnumber=1]
+/* Transform the argument into integer */
+xdb.d = x;
+
+/* Special case handling */
+
+/* Strip off the sign of argument x */
+if (xdb.i[HI] & 0x80000000) sign = -1; else sign = 1;
+xdb.i[HI] &= 0x7fffffff;
+
+/* asin is defined on -1 <= x <= 1, elsewhere it is NaN */
+if ((xdb.i[HI] > 0x3ff00000) || ((xdb.i[HI] == 0x3ff00000) && (xdb.i[LO] != 0x00000000))) {
+  return (x-x)/0.0;    /* return NaN */
+}
+\end{lstlisting}
+
+Concerning subnormals in argument and in result of the function, the
+following is to be mentioned.  The Taylor series of $\arcsin$
+developed in $0$ is $$\arcsin\left( x \right) = x \cdot \left( 1 +
+\frac{1}{6} \cdot x^2 + \sum\limits_{n=2}^\infty \frac{\left( 2n - 1
+\right)!!}{\left(2n\right)!! \cdot \left( 2n + 1 \right)} \cdot
+x^{2n}\right)$$ It is easy to check that $\sum\limits_{n=2}^\infty
+\frac{\left( 2n - 1 \right)!!}{\left(2n\right)!! \cdot \left( 2n + 1
+\right)} \cdot x^{2n} < \frac{1}{3} \cdot x^2$ for $\left \vert x
+\right \vert < \frac{1}{2}$. So for $\left \vert x \right \vert \leq
+2^{-28}$, one gets $\arcsin\left( x \right) \leq x \cdot \left( 1 +
+\frac{1}{2} \cdot x^2 \right) \leq x \cdot \left( 1 + 2^{-57} \right)
+< x + \frac{1}{2} \mUlp\left(x\right)$. So the rounding can be decided
+without even computing the cubic term of the Taylor
+development. Thus subnormals in argument and in result can be avoided
+by performing a simple test on the absolute value of $x$. In
+particular, since $\sum\limits_{n=1}^\infty \frac{\left( 2n - 1
+\right)!!}{\left(2n\right)!! \cdot \left( 2n + 1 \right)} \cdot
+x^{2n}$ is an even function, the sign of the truncation rest is known,
+which allows for simplifications in the directed rounding modes. Here,
+only some special care is needed for the case where $x$ is exactly
+equal to $0$.  
+
+The test and the rounding are implemented as follows. Let us first
+consider the round-to-nearest case:
+\begin{lstlisting}[caption={Handling special cases - rounding (to nearest)},firstnumber=1]
+if (xdb.i[HI] < 0x3e300000) {
+  return x;
+}
+\end{lstlisting}
+In the round-upward case, a correction of $x$ is potentially
+necessary. We implement:
+\begin{lstlisting}[caption={Handling special cases - rounding (upwards)},firstnumber=1]
+/* If x == 0 then we got the algebraic result arcsin(0) = 0
+   If x < 0 then the truncation rest is negative but less than 
+   1 ulp; we round upwards by returning x
+*/
+if (x <= 0) return x;
+/* Otherwise the rest is positive, less than 1 ulp and the
+   image is not algebraic 
+   We return x + 1ulp
+*/
+xdb.l++;
+return xdb.d;
+\end{lstlisting}
+The other directed rounding cases are analogous to the round-upwards
+case.
+
+For the discrimination of the argument $\left \vert x \right \vert$ in
+the 10 possible approximation intervals $I_i$, the following technique
+is used. The intervals at the definition domain borders $I_0$ and
+$I_9$ are first filtered out by tests checking the high order word of
+$x$ against the corresponding bounds. If $x$ is found to be in one of
+these two intervals, the function is approximated in quick and if
+needed in accurate phase and the correctly rounded value is
+returned. In any case, the two intervals have particular properties in
+comparison to the other 8 middle intervals, so this technique should
+not be considered as a performance disadvantage. The polynomial
+coefficients' indices in the main coefficient table are fixed in this
+case and directly compiled into the code via macros.
+
+If $x$ does not fall in one of the both border intervals $I_0$ and
+$I_9$, the corresponding interval $I_i$, $1 \leq i \leq 8$ is computed
+by a 3-level dichotomy on the bounds $bound_2 \dots bound_8$.  Its
+result is not a number $i$ in $1 \leq i \leq 8$ but an index {\tt i}
+to the main coefficient table. Beginning at the point indexed, the
+table reads the midpoint value $m_i$ and the polynomial coefficients
+for the corresponding interval $I_i$. 
+
+The correponding code is the following:
+\begin{lstlisting}[caption={Interval discrimination},firstnumber=1]
+/* Recast x */
+x = xdb.d;
+
+/* Find correspondant interval and compute index to the table
+   We start by filtering the two special cases around 0 and 1
+*/
+
+if (xdb.i[HI] < BOUND1) {
+
+(*@-- Compute quick and potentially accurate phase polynomial approximation $p_0$ and return --@*)
+
+}
+
+if (xdb.i[HI] > BOUND9) {
+
+(*@-- Reduce the argument, compute quick and potentially accurate
+phase approximation using $p_9$, reconstruct and return --@*)
+}
+
+/* General 8 main intervals 
+   We can already suppose that BOUND1 <= x <= BOUND9
+*/
+
+if (xdb.i[HI] < BOUND5) {
+  if (xdb.i[HI] < BOUND3) {
+    if (xdb.i[HI] < BOUND2) i = TBLIDX2; else i = TBLIDX3;
+  } else {
+    if (xdb.i[HI] < BOUND4) i = TBLIDX4; else i = TBLIDX5;
+  }
+} else {
+  if (xdb.i[HI] < BOUND7) {
+    if (xdb.i[HI] < BOUND6) i = TBLIDX6; else i = TBLIDX7;
+  } else {
+    if (xdb.i[HI] < BOUND8) i = TBLIDX8; else i = TBLIDX9;
+  }
+}
+
+(*@-- Reduce the argument, compute quick and potentially accurate~
+phase polynomial approximation $p_i$ and return --@*)
+\end{lstlisting}
+
+In the case of $x$ being classified in either the middle or the higher
+intervals $I_i$, $1 \leq i \leq 9$, an argument reduction is to be
+performed. Let us consider it first for the high path interval $I_9$
+and then for the middle path intervals $I_i$, $1 \leq i \leq 8$. In
+both cases, we will show that the argument reduction is mathematically
+exact and that it may not produce a subnormal different from $0$.
+
+In the high path, we know that $1 \geq x > bound_9 > 0.77$. The
+argument reduction to be performed is $z = 1 - x$. Since $\frac{1}{2}
+\leq x \leq 2$ is verified, we can implement it exactly thanks to
+Sterbenz' lemma. If $x$ is exactly equal to $1$ is produces exactly
+$0$. Otherwise, it may not produce a subnormal, because $x \leq 1 -
+\frac{1}{2} \cdot \mUlp\left( 1 \right) \leq 1 - 2^{-53}$. Thus $z = 1
+- x > 2^{-53} > 2^{-1021}$.
+
+In the middle path intervals, the argument reduction to be performed
+is $z_i = x - m_i$. Since $\left \vert z \right \vert \leq 0.058$ and
+$x \geq 0.18$, Sterbenz' lemma is verified in each interval $I_i$ and
+we can still implement the argument reduction exactly in double
+precision arithmetic. Since, $x > 0.18 > \frac{1}{8}$, a similar
+argument as the one given above shows that the result of the reduction
+is either exactly $0$ or a non-subnormal double precision number.
+
+The value $m_i$ is read in the main table at the index {\tt i}
+computed by the interval discrimination phase. We implement thus:
+\begin{lstlisting}[caption={Argument reduction},firstnumber=1]
+/* Argument reduction 
+   i points to the interval midpoint value in the table
+*/
+z = x - tbl[i];
+\end{lstlisting}
+
+Concerning the higher path interval $I_9$ where $\arcsin$ is
+approximated as
+$$\arcsin\left( x \right) \approx p_9\left( 1 - x \right) \cdot
+\sqrt{2 - 2\cdot x} + \frac{\pi}{2}$$ let us remark that $2 - 2\cdot x
+= 2 \cdot z$ can also be computed exactly. Trivially, since $z$ less
+than $2^{1023}$, the multiplication by a positive integer power of $2$
+is errorfree. If $z$ is not exactly $0$, its result may not be
+subnormal because $z$ cannot.
+
+Since the argument reduction has been shown to be exact, its result
+can clearly be reused in the accurate phase.
+
+\section{Polynomial approximation and reconstruction}\label{sec:asinpolynomial}
+\subsection{Quick phase polynomial approximation and reconstruction}\label{subsec:asinquickpolynomial}
+As already mentioned, the quick phase polynomials $p_{i\mbox{\tiny ~quick}}$ 
+are truncated versions of the accurate phase polynomials
+$p_{i\mbox{\tiny ~accurate}}$ with coefficients rounded from
+triple-double to double-double or from double-double to double. This
+means simply that not all coefficients are read and used.
+\subsubsection{Low path - interval $I_0$}
+The polynomial $p_{0\mbox{\tiny ~quick}}$ approximates $\arcsin$ in the interval $I_0$ as follows:
+$$\arcsin\left( x \right) \approx x + x^3 \cdot p_{0\mbox{\tiny ~quick}}\left( x^2 \right)$$
+It is of degree $8$ with $5$ double-double and $4$ double precision
+coefficients. 
+
+For arguments $\left \vert x \right \vert \leq 2^{-10}$, the
+polynomial needs not be evaluated fully to provide enough accuracy. 
+Here, only its constant and linear term are evaluated. So we get in this case
+$$\arcsin\left( x \right) \approx x + x^3 \cdot \left( \left( c_{0\hi} + c_{0\lo} \right) + 
+  x^2 \cdot \left( c_{1\hi} + c_{1\lo} \right) \right)$$ This special
+path yields to a significant performance gain on average. In fact,
+since floating point numbers are not equispaced but distributed
+logarithmatically around $0$, speeding up a function for low arguments
+is worth it.
+
+The square of $x$, $x^2$ can be computed exactly by use of a \Mul~
+sequence, which will produce a double-double $xSq_\hi + xSq_\lo =
+x^2$. The polynomial $p_{0\mbox{\tiny ~quick}}\left( xSq_\hi + xSq_\lo
+\right)$ is evaluated using Horner's scheme and neglecting $xSq_\lo$
+for the $8$ higher degree coefficients if these need to be evaluated. 
+
+The double-double precision Horner steps are implemented the
+double-double multiply-and-add macros \MulAddDD~ and \MulAddDdD~ (see
+section \ref{sec:double-double-horner}, page
+\pageref{sec:double-double-horner}). It is easy to check that the
+preconditions on the arguments of these macros are verified: $x^2$ is
+bounded by $x^2 \leq \left(2^{-2.434403}\right)^2 \leq 2^{-4}$ in this
+path. Further, in the order of the Horner evaluation, the coefficients
+$c_i$ of the polynomial are stricly increasing in magnitude and all
+less than $1$.  Concerning the accuracy of this operations, see
+section \ref{subsec:asinquickphaseaccu}, page
+\pageref{subsec:asinquickphaseaccu}.
+
+Including the test $\left \vert x \right \vert \stackrel{?}{\leq} 2^{-10}$, the code computing 
+an approximation $t_{5\hi} + t_{5\lo} \approx p_{0\mbox{\tiny ~quick}}\left( x^2 \right)$ reads:
+\begin{lstlisting}[caption={Low path quick phase polynomial approximation (higher degrees)},firstnumber=1]
+Mul12(&xSqh,&xSql,x,x);
+
+tmp4 = tbl[3];
+tmp5 = tbl[4];
+t4h = tmp4;
+t4l = tmp5;
+if (xdb.i[HI] > EXTRABOUND) {
+  /* Double precision evaluation */
+  highPoly = tbl[15] + xSqh * (tbl[17] + xSqh * (tbl[19] + xSqh * (tbl[21] + xSqh * tbl[23])));
+
+  /* Double-double precision evaluation */
+  Mul12(&tt1h,&tt1l,xSqh,highPoly);
+  Add22(&t1h,&t1l,tbl[12],tbl[13],tt1h,tt1l);
+  
+  MulAdd212(&t2h,&t2l,tbl[9],tbl[10],xSqh,t1h,t1l);
+  MulAdd212(&t3h,&t3l,tbl[6],tbl[7],xSqh,t2h,t2l);
+  MulAdd22(&t4h,&t4l,tmp4,tmp5,xSqh,xSql,t3h,t3l);
+}
+
+MulAdd22(&t5h,&t5l,tbl[0],tbl[1],xSqh,xSql,t4h,t4l);
+\end{lstlisting}
+Once $t_{5\hi} + t_{5\lo}$ are computed, they must be multiplied by
+$x^3$ and the result must be added to $x$.  The value $x^3$ is
+computed approximatively as a double-double $xCube_\hi + xCube_\lo$ by
+multiplying $x$ by $xSq_\hi + xSq_\lo = x^2$. This value $xCube_\hi +
+xCube_\lo$ is than multiplied by $t_{5\hi} + t_{5\lo}$, yielding to
+$tt_{6\hi} + tt_{6\lo}$. The last addition implying $x$ and $tt_{6\hi}
++ tt_{6\lo}$ is implemented in an ad-hoc way by means of two exact
+additions and a double precision addition on the lower part of the
+addition of the higher significant parts. The code reads:
+\begin{lstlisting}[caption={Low path quick phase polynomial approximation (lower degrees)},firstnumber=1]
+Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+Mul22(&tt6h,&tt6l,xCubeh,xCubel,t5h,t5l);
+
+Add12(tmp1,tmp2,x,tt6h);
+tmp3 = tmp2 + tt6l;
+Add12(polyh,polyl,tmp1,tmp3);
+\end{lstlisting} 
+The obtained polynomial approximation value is then multiplied by the
+sign of $x$ the argument reduction had stripped off and the rounding
+test is performed.  If it fails, the accurate phase is launched; see
+section \ref{sec:asinacculowpath}, page \pageref{sec:asinacculowpath},
+for its implementation.  The code for the last steps in
+round-to-nearest mode is given below. The code for the direct rounding
+modes is analogous. One remarks that the rounding test constants,
+computed by the corresponding Maple scripts in function of the
+relative error bounds to be shown in section
+\ref{subsec:asinquickphaseaccu}, page
+\pageref{subsec:asinquickphaseaccu}, are stored also in double
+precision and also read from the main table.
+\begin{lstlisting}[caption={Low path quick phase rounding test},firstnumber=1]
+/* Multiply by sign */
+asinh = sign * polyh;
+asinm = sign * polyl;
+
+/* Rounding test 
+   The RN rounding constant is at tbl[34]
+*/
+if(asinh == (asinh + (asinm * tbl[34]))) 
+  return asinh;
+
+/* Launch accurate phase */
+\end{lstlisting} 
+
+\subsubsection{Middle path - interval $I_i$, $1 \leq i \leq 8$}
+In the quick phase middle path, i.e. for arguments $x \in I_i$, $1
+\leq i \leq 8$, $\arcsin$ is approximated by the polynomial
+$p_{i\mbox{\tiny ~quick}}$ as follows:
+$$\arcsin\left( x \right) \approx \arcsin\left( m_i \right) + z_i \cdot p_{i\mbox{\tiny ~quick}}\left( z_i \right)$$
+where $z_i = x - m_i$ is a double precision number.  Further an
+approximation $asm_{i\hi} + asm_{i\lo}$ to $\arcsin\left( m_i \right)$
+is used. It is read in the main table at {\tt tbl[i+1]} and {\tt
+  tbl[i+2]} where {\tt i} is the index computed at the interval
+discrimination phase.  The polynomial $p_{i\mbox{\tiny ~quick}}$ is of
+degree $13$ with $6$ double-double and $8$ double coefficients.  It is
+always evaluated completely by means of Horner's scheme. Once again,
+the \MulAddDdD~ operator allows for evaluating the $5$ last
+double-double steps. The first double-double step is evaluated in a
+more ad-hoc way because of the entering only double precision current
+intermediate result. The preconditions for the \MulAddDdD~ operator
+can again be checked easily: $z_i$ is bounded in magnitude by
+$2^{-4.123846}$, the coefficients increase in the order of Horner's
+scheme evaluation and are all less than $1$. So in each step, the
+product of $z_i$ and the current value is less than $\frac{1}{4}$ the
+next coefficient as asked for by the precondition.  The multiplication
+of the result of the polynomial $p_{i\mbox{\tiny ~quick}}$ by $z_i$
+and the addition of $asm_{i\hi} + asm_{i\lo}$ can also be considered
+as a Horner step and are therefore implemented using the \MulAddDdD~
+macro, too. 
+
+The corresponding evaluation code reads thus:
+\begin{lstlisting}[caption={Middle path quick phase polynomial approximation},firstnumber=1]
+highPoly = tbl[i+21] + z * (tbl[i+23] + z * (tbl[i+25] + z * (
+           tbl[i+27] + z * (tbl[i+29] + z * (tbl[i+31] + z * ( 
+           tbl[i+33] + z *  tbl[i+35]))))));
+  
+Mul12(&tt1h,&tt1l,z,highPoly);
+Add22(&t1h,&t1l,tbl[i+18],tbl[i+19],tt1h,tt1l);
+
+MulAdd212(&t2h,&t2l,tbl[i+15],tbl[i+16],z,t1h,t1l);
+MulAdd212(&t3h,&t3l,tbl[i+12],tbl[i+13],z,t2h,t2l);
+MulAdd212(&t4h,&t4l,tbl[i+9],tbl[i+10],z,t3h,t3l);
+MulAdd212(&t5h,&t5l,tbl[i+6],tbl[i+7],z,t4h,t4l);
+MulAdd212(&t6h,&t6l,tbl[i+3],tbl[i+4],z,t5h,t5l);
+MulAdd212(&polyh,&polyl,tbl[i+1],tbl[i+2],z,t6h,t6l);
+\end{lstlisting} 
+One remarks that in this case, since the polynomial evaluation code is
+the same for all intervals $I_i$, $1 \leq i \leq 8$, the coefficients
+read in the table are not at fixed indices but indexed by {\tt i},
+value computed in the interval discrimination phase. 
+
+The result of this approximation whose accuracy will be analysed in
+section \ref{subsec:asinquickphaseaccu}, page
+\pageref{subsec:asinquickphaseaccu}, is then multiplied by the sign of
+the the original argument and submitted to the rounding test whose
+rounding constant is read in the main table dependingly on the
+interval $I_i$. The corresponding code for round-to-nearest is given
+below. The directed rounding cases are analogous.
+\begin{lstlisting}[caption={Middle path quick phase rounding test},firstnumber=1]
+asinh = sign * polyh;
+asinm = sign * polyl;
+
+/* Rounding test 
+   The RN rounding constant is at tbl[i+59]
+*/
+if(asinh == (asinh + (asinm * tbl[i+59]))) 
+  return asinh;
+
+/* Launch accurate phase */
+\end{lstlisting} 
+
+\subsubsection{High path - interval $I_9$}
+In the high path $\arcsin$ is approximated as 
+$$\arcsin\left( x \right) \approx p_{9\mbox{\tiny ~quick}}\left( z \right) \cdot \sqrt{2 \cdot z} + \frac{\pi}{2}$$
+Herein, $z = 1 - x$ is the exactly computed double precision reduced
+argument. The constant $\frac{\pi}{2}$ is approximated by the
+double-double number $PiHalf_\hi + PiHalf_\mi = \frac{\pi}{2} \cdot
+\left( 1 + \epsilon \right)$ with $\left \vert \epsilon \right \vert
+\leq 2^{-109}$. It has already been shown that $z$ and $twoZ = 2 \cdot
+z$ can be computed exactly. The square root $\sqrt{2 \cdot z}$ is
+approximated in double-double precision using the \SqrtD~ macro
+operator described in section \ref{subsection:sqrt}, page
+\pageref{subsection:sqrt}. 
+
+The polynomial $p_{9\mbox{\tiny ~quick}}$ has degree $18$ with $9$
+double-double and $10$ double precision coefficients. Its constant
+term is exactly $-1$, so this coefficient is not stored in the table.
+It is always evaluated completely. Horner's scheme is used and
+implemented by means of the \MulAddDdD~ operator whose precodnitions
+can once again easily be verified by an analogous argument as the one
+given above for low and middle paths. 
+
+The corresponding code reads:
+\begin{lstlisting}[caption={High path quick phase polynomial approximation},firstnumber=1]
+highPoly = tbl[TBLIDX10+24] + z * (tbl[TBLIDX10+26] + z * (tbl[TBLIDX10+28] + z * (
+           tbl[TBLIDX10+30] + z * (tbl[TBLIDX10+32] + z * (tbl[TBLIDX10+34] + z * (
+           tbl[TBLIDX10+36] + z * (tbl[TBLIDX10+38] + z * (tbl[TBLIDX10+40] + z * 
+           tbl[TBLIDX10+42]))))))));
+
+Mul12(&tt1h,&tt1l,z,highPoly);
+Add22(&t1h,&t1l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tt1h,tt1l);
+
+MulAdd212(&t2h,&t2l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],z,t1h,t1l);
+MulAdd212(&t3h,&t3l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],z,t2h,t2l);
+MulAdd212(&t4h,&t4l,tbl[TBLIDX10+12],tbl[TBLIDX10+13],z,t3h,t3l);
+MulAdd212(&t5h,&t5l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],z,t4h,t4l);
+MulAdd212(&t6h,&t6l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],z,t5h,t5l);
+MulAdd212(&t7h,&t7l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],z,t6h,t6l);
+MulAdd212(&t8h,&t8l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],z,t7h,t7l);
+MulAdd212(&polyh,&polyl,-1,0,z,t8h,t8l);
+\end{lstlisting} 
+
+The result $poly_\hi + poly_\lo$ of the polynomial approximation is
+multiplied by $sqrtz_\hi + sqrtz_\lo$, the double-double approximation
+of $\sqrt{2 \cdot z}$ by the double-double multiplication
+operator \MulDD~ and then added to $PiHalf_\hi + PiHalf_\mi$ using the
+double-double addition operator \AddDD. In this addition no
+catastrophic cancellation can occur: since $x > 0.78 >
+\frac{\sqrt{2}}{2}$ in this interval, the result of the addition, a
+good approximation to $\arcsin\left( x \right)$ will always be greater
+than $\frac{\pi}{4}$ as per the monotony of arcsine.  So $pTimesS_\hi
++ pTimesS_\lo \approx p_{9\mbox{\tiny ~quick}}\left( z \right) \cdot
+\sqrt{2 \cdot z}$ will always be less than $\frac{1}{2} \cdot \left(
+  PiHalf_\hi + PiHalf_\mi \right)$. In this argumentation,
+approximation errors can be neglected since the bound to be shown is
+not tight at all.
+
+The corresponding implementation is the following:
+\begin{lstlisting}[caption={High path: square root extraction and reconstruction},firstnumber=1]
+twoZ = 2 * z;
+sqrt12(&sqrtzh,&sqrtzl,twoZ);                                                         
+
+/* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+Mul22(&pTimesSh,&pTimesSl,polyh,polyl,sqrtzh,sqrtzl);                    
+Add22(&allh,&alll,PIHALFH,PIHALFM,pTimesSh,pTimesSl);       
+\end{lstlisting} 
+
+In this path, too, the obtained result is multiplied by the sign which
+had stripped off from the function's argument $x$ and submitted to the
+rounding test using a rounding constant read in the main table. The
+code reads for round-to-nearest mode:
+\begin{lstlisting}[caption={Multiplication of the function's sign, rounding test (round-to-nearest)},firstnumber=1]
+asinh = sign * allh;
+asinm = sign * alll;
+
+/* Rounding test 
+   The RN rounding constant is at tbl[TBLIDX10+54]
+*/
+if(asinh == (asinh + (asinm * tbl[TBLIDX10+54]))) 
+  return asinh;
+
+/* Launch accurate phase */
+\end{lstlisting} 
+\subsection{Accurate phase polynomial approximation and reconstruction}\label{subsec:asinaccupolynomial}
+As already mentioned, in the accurate phase, the polynomials
+$p_{i\mbox{\tiny ~accurate}}$ for the different intervals $I_i$ whose
+coefficient are stored in the main table, are evaluated completely.
+This evaluation is done in double, double-double and triple-double
+precision using mainly Horner's scheme.
+
+The accurate phase is implemented in three different {\tt C} functions
+corresponding to the low, middle and high paths. These functions
+return a triple-double approximate $asin_\hi + asin_\mi + asin_\lo$ to
+$\arcsin$ which is accurate enough that the correct rounded result for
+$\arcsin$ is obtained when rounding the approximate.  The final
+rounding for itself is implemented in the four functions containing
+the quick phase code and the call to the accurate phase for the four
+possible rounding modes. In round-to-nearest mode, for the high path
+the code reads:
+\begin{lstlisting}[caption={Final rounding of the accurate phase result (RN)},firstnumber=1]
+/* Launch accurate phase */
+
+asin_accurate_higher(&asinh,&asinm,&asinl,z,sign);
+
+ReturnRoundToNearest3(asinh,asinm,asinl); 
+\end{lstlisting}
+For the other rounding modes and evaluation paths the code is
+completely analogous.
+
+\subsubsection{Low path - interval $I_0$\label{sec:asinacculowpath}}
+For the low path, the polynomial $p_{0\mbox{\tiny ~accurate}}$
+approximates $\arcsin$ as follows:
+$$\arcsin\left( x \right) \approx x + x^3 \cdot p_{0\mbox{\tiny ~accurate}}\left( x^2 \right)$$
+is of degree $17$ with $7$ double precision coefficients and Horner
+steps, $6$ double-double coefficients and steps and $5$ triple-double
+coefficients and steps. It reuses the value $xSq_\hi + xSq_\lo = x^2$
+which has already been computed in the quick phase. The lower
+significant term $xSq_\lo$ is neglected for the first $8$ double
+precision (and early double-double precision) steps. The double-double
+Horner steps are implemented using the \MulAddDD~ sequence. The
+triple-double steps used separate \AddTT~ and \MulTT~ macros. The
+value $x^3$ is computed out of $x$ and $x^2$ in triple-double
+precision using the \MuldDT~ operator. It is multiplied by the
+polynomial's result in triple-double by a \MulTT. The resulting
+triple-double is added to $x$ using the \AdddTT~ macro.
+
+In addition to the final renormalization which is needed before
+correct rounding to double precision is performed, one intermediate
+renormalization is necessary. Otherwise overlap in the triple-double
+intermediate values would deteriorate the accuracy to much. See
+section \ref{subsec:asinaccuratephaseaccu}, page
+\pageref{subsec:asinaccuratephaseaccu} for the overlap bounding.
+
+The code of the low path accurate phase polynomial approximation is
+the following:
+\begin{lstlisting}[caption={Low path accurate phase polynomial approximation},firstnumber=1]
+highPoly = tbl[28] + xSqh * (tbl[29] + xSqh * (tbl[30] + xSqh * (tbl[31] + xSqh * (tbl[32] + xSqh * tbl[33]))));
+
+/* Double-double computations */
+
+Mul12(&tt1h,&tt1l,xSqh,highPoly);
+Add22(&t1h,&t1l,tbl[27],0,tt1h,tt1l);
+
+MulAdd22(&t2h,&t2l,tbl[25],tbl[26],xSqh,xSql,t1h,t1l);
+MulAdd22(&t3h,&t3l,tbl[23],tbl[24],xSqh,xSql,t2h,t2l);
+MulAdd22(&t4h,&t4l,tbl[21],tbl[22],xSqh,xSql,t3h,t3l);
+MulAdd22(&t5h,&t5l,tbl[19],tbl[20],xSqh,xSql,t4h,t4l);
+MulAdd22(&t6h,&t6l,tbl[17],tbl[18],xSqh,xSql,t5h,t5l);
+MulAdd22(&t7h,&t7l,tbl[15],tbl[16],xSqh,xSql,t6h,t6l);
+
+/* Triple-double computations */
+
+Mul23(&tt8h,&tt8m,&tt8l,xSqh,xSql,t7h,t7l);                            
+Add33(&t8h,&t8m,&t8l,tbl[12],tbl[13],tbl[14],tt8h,tt8m,tt8l);          
+Mul233(&tt9h,&tt9m,&tt9l,xSqh,xSql,t8h,t8m,t8l);                       
+Add33(&t9h,&t9m,&t9l,tbl[9],tbl[10],tbl[11],tt9h,tt9m,tt9l);           
+Mul233(&tt10h,&tt10m,&tt10l,xSqh,xSql,t9h,t9m,t9l);                    
+Add33(&t10h,&t10m,&t10l,tbl[6],tbl[7],tbl[8],tt10h,tt10m,tt10l);       
+Mul233(&tt11hover,&tt11mover,&tt11lover,xSqh,xSql,t10h,t10m,t10l);     
+
+Renormalize3(&tt11h,&tt11m,&tt11l,tt11hover,tt11mover,tt11lover);      
+
+Add33(&t11h,&t11m,&t11l,tbl[3],tbl[4],tbl[5],tt11h,tt11m,tt11l);       
+Mul233(&tt12h,&tt12m,&tt12l,xSqh,xSql,t11h,t11m,t11l);                 
+Add33(&t12h,&t12m,&t12l,tbl[0],tbl[1],tbl[2],tt12h,tt12m,tt12l);       
+
+Mul123(&xCubeh,&xCubem,&xCubel,x,xSqh,xSql);                           
+
+Mul33(&tt13h,&tt13m,&tt13l,xCubeh,xCubem,xCubel,t12h,t12m,t12l);       
+Add133(&t13h,&t13m,&t13l,x,tt13h,tt13m,tt13l);                         
+
+Renormalize3(&polyh,&polym,&polyl,t13h,t13m,t13l);                     
+*asinh = sign * polyh;
+*asinm = sign * polym;
+*asinl = sign * polyl;
+\end{lstlisting} 
+
+\subsubsection{Middle path - interval $I_i$, $1 \leq i \leq 8$}
+For the middle path for $x \in I_i$, $1 \leq i \leq 8$, we use the
+following polynomial approximation by $p_{i \mbox{\tiny ~accurate}}$:
+$$\arcsin\left( x \right) \approx \left( asm_{i\hi} + asm_{i\lo} \right) + 
+z_i \cdot p_{i \mbox{\tiny ~accurate}}\left( z_i\right)$$ where $z_i =
+x - m_i$ and $asm_{i\hi} + asm_{i\lo} = \arcsin\left( m_i \right)
+\cdot \left( 1 + \epsilon \right)$ with $\left \vert \epsilon \right
+\vert \leq 2^{-121}$ by construction of $m_i$. 
+
+The polynomial $p_{i \mbox{\tiny ~accurate}}$ is of degree $34$. In
+order of decreasing monomial degrees, its coefficients are stored on
+$20$ double precision numbers, $9$ double-double precision numbers and
+$6$ triple-double precision numbers. It is completely evaluated using
+Horner's scheme using the same intermediate precision for the
+computation as the one used for the coefficients. The last
+multiplication by $z$ and the addition of $asm_{i\hi} + asm_{i\lo}$
+can be considered as an additional Horner step and is of course
+performed in triple-double precision.
+
+The double-double precision steps are implemented using the
+\MulAddDdD~ macro. The triple-double steps use separate addition and
+multiplication operators. In particular, \AddTT~ and \MuldTT~ come at
+hand. Overall, two triple-double renormalizations are necessary: one
+before final rounding can be performed and one other for avoiding a
+too great overlap in the components of the intermediate triple-double
+values. See section \ref{subsec:asinaccuratephaseaccu}, page
+\pageref{subsec:asinaccuratephaseaccu} for the overlap bounding.
+
+The coefficients of the polynomial $p_{i \mbox{\tiny ~accurate}}$ and
+the value $asm_{i\hi} + asm_{i\lo}$ are read in the main table using
+the index {\tt i} computated at the interval discrimination phase. The
+reduced argument $z_i$ has already been computed exactly at the quick
+phase and can be reused.
+
+The implementation of the accurate phase middle path polynomial approximation reads:
+\begin{lstlisting}[caption={Middle path accurate phase polynomial approximation},firstnumber=1]
+highPoly = tbl[i+39] + z * (tbl[i+40] + z * (tbl[i+41] + z * (tbl[i+42] + z * (
+           tbl[i+43] + z * (tbl[i+44] + z * (tbl[i+45] + z * (tbl[i+46] + z * (
+           tbl[i+47] + z * (tbl[i+48] + z * (tbl[i+49] + z * (tbl[i+50] + z * (
+           tbl[i+51] + z * (tbl[i+52] + z * (tbl[i+53] + z * (tbl[i+54] + z * (
+           tbl[i+55] + z * (tbl[i+56] + z * (tbl[i+57] + z * tbl[i+58]))))))))))))))))));
+
+
+/* Double-double computations */
+
+Mul12(&tt1h,&tt1l,z,highPoly);
+Add22(&t1h,&t1l,tbl[i+37],tbl[i+38],tt1h,tt1l);
+
+MulAdd212(&t2h,&t2l,tbl[i+35],tbl[i+36],z,t1h,t1l);
+MulAdd212(&t3h,&t3l,tbl[i+33],tbl[i+34],z,t2h,t2l);
+MulAdd212(&t4h,&t4l,tbl[i+31],tbl[i+32],z,t3h,t3l);
+MulAdd212(&t5h,&t5l,tbl[i+29],tbl[i+30],z,t4h,t4l);
+MulAdd212(&t6h,&t6l,tbl[i+27],tbl[i+28],z,t5h,t5l);
+MulAdd212(&t7h,&t7l,tbl[i+25],tbl[i+26],z,t6h,t6l);
+MulAdd212(&t8h,&t8l,tbl[i+23],tbl[i+24],z,t7h,t7l);
+MulAdd212(&t9h,&t9l,tbl[i+21],tbl[i+22],z,t8h,t8l);
+
+/* Triple-double computations */
+
+Mul123(&tt10h,&tt10m,&tt10l,z,t9h,t9l);                                    
+Add33(&t10h,&t10m,&t10l,tbl[i+18],tbl[i+19],tbl[i+20],tt10h,tt10m,tt10l);  
+Mul133(&tt11h,&tt11m,&tt11l,z,t10h,t10m,t10l);                             
+Add33(&t11h,&t11m,&t11l,tbl[i+15],tbl[i+16],tbl[i+17],tt11h,tt11m,tt11l);  
+Mul133(&tt12h,&tt12m,&tt12l,z,t11h,t11m,t11l);                             
+Add33(&t12h,&t12m,&t12l,tbl[i+12],tbl[i+13],tbl[i+14],tt12h,tt12m,tt12l);  
+Mul133(&tt13hover,&tt13mover,&tt13lover,z,t12h,t12m,t12l);                 
+
+Renormalize3(&tt13h,&tt13m,&tt13l,tt13hover,tt13mover,tt13lover);          
+
+Add33(&t13h,&t13m,&t13l,tbl[i+9],tbl[i+10],tbl[i+11],tt13h,tt13m,tt13l);   
+Mul133(&tt14h,&tt14m,&tt14l,z,t13h,t13m,t13l);                             
+Add33(&t14h,&t14m,&t14l,tbl[i+6],tbl[i+7],tbl[i+8],tt14h,tt14m,tt14l);     
+Mul133(&tt15h,&tt15m,&tt15l,z,t14h,t14m,t14l);                             
+Add33(&t15h,&t15m,&t15l,tbl[i+3],tbl[i+4],tbl[i+5],tt15h,tt15m,tt15l);     
+Mul133(&tt16h,&tt16m,&tt16l,z,t15h,t15m,t15l);                             
+Add233(&t16h,&t16m,&t16l,tbl[i+1],tbl[i+2],tt16h,tt16m,tt16l);             
+
+Renormalize3(&polyh,&polym,&polyl,t16h,t16m,t16l);                         
+*asinh = sign * polyh;
+*asinm = sign * polym;
+*asinl = sign * polyl;
+\end{lstlisting} 
+
+\subsubsection{High path - interval $I_9$}
+On the high path interval $I_9$, computing the approximation for
+$\arcsin$ means evaluating the polynomial $p_{9 \mbox{\tiny~accurate}}\left( z \right)$ 
+and calculating a triple-double approximation to $\sqrt{2 \cdot z}$ 
+where $z$ is the reduced argument. The function can then be 
+reconstructed as follows:
+$$\arcsin\left( x \right) \approx p_{9 \mbox{\tiny~accurate}}\left( z \right) \cdot \sqrt{2\cdot z} + 
+\left( PiHalf_\hi + PiHalf_\mi + PiHalf_\lo \right)$$ where
+$PiHalf_\hi + PiHalf_\mi + PiHalf_\lo = \frac{\pi}{2} \cdot \left( 1 +
+  \epsilon \right)$, $\left \vert \epsilon \right \vert \leq 2^{-164}$
+
+The polynomial $p_{9 \mbox{\tiny~accurate}}\left( z \right)$ is of
+degree $28$ with $12$ double precision, $9$ double-double precision
+and $8$ triple-double precision coefficients. The intermediate
+precisions used correspond to the precision the coefficients are
+stored in. The polynomial is completely evaluated in Horner's scheme.
+Once again, for doing so, the \MulAddDdD~ macro is used for the
+double-double steps whilst the triple-double stage is implemented by
+means of separate additions and multiplications mainly expressed with
+\AddTT~ and \MuldTT~ operators. 
+
+The square root extraction yielding to the triple-double approximate
+$sqrtz_\hi + sqrtz_\mi + sqrtz_\lo = \sqrt{2 \cdot z } \cdot
+\left( 1 + \epsilon \right)$ is implemented using the \SqrtT~ macro.
+Unfortunately, this means recomputing some steps of the square root
+extraction already computed in the quick phase in the \SqrtD~ macro.
+The choice made is motivated by implementatory reasons.
+
+The multiplication of the polynomial's value and of the square root is
+performed in triple-double precision by means of the \MulTT~ macro.
+The following addition with the triple-double approximate of
+$\frac{\pi}{2}$ is implemented using the \AddTT~ operator. 
+
+Overall, three renormalizations are needed. One of them renormalizes
+the final result, two allow for sufficient overlap bounding. Remark
+that the square root extraction by \SqrtT~ comprises an additional
+renormalization; see section \ref{subsection:sqrt}, page
+\pageref{subsection:sqrt} for further details.  The overlap bounds
+will be given in section \ref{subsec:asinaccuratephaseaccu}, page
+\pageref{subsec:asinaccuratephaseaccu}.
+
+The code implementing this accurate phase path is the following:
+\begin{lstlisting}[caption={High path accurate phase polynomial approximation},firstnumber=1]
+highPoly = tbl[TBLIDX10+42] + z * (tbl[TBLIDX10+43] + z * (tbl[TBLIDX10+44] + z * (
+           tbl[TBLIDX10+45] + z * (tbl[TBLIDX10+46] + z * (tbl[TBLIDX10+47] + z * (
+           tbl[TBLIDX10+48] + z * (tbl[TBLIDX10+49] + z * (tbl[TBLIDX10+50] + z * (
+           tbl[TBLIDX10+51] + z * (tbl[TBLIDX10+52] + z *  tbl[TBLIDX10+53]))))))))));
+
+/* Double-double computations */
+
+Mul12(&tt1h,&tt1l,z,highPoly);
+Add22(&t1h,&t1l,tbl[TBLIDX10+40],tbl[TBLIDX10+41],tt1h,tt1l);
+
+MulAdd212(&t2h,&t2l,tbl[TBLIDX10+38],tbl[TBLIDX10+39],z,t1h,t1l);
+MulAdd212(&t3h,&t3l,tbl[TBLIDX10+36],tbl[TBLIDX10+37],z,t2h,t2l);
+MulAdd212(&t4h,&t4l,tbl[TBLIDX10+34],tbl[TBLIDX10+35],z,t3h,t3l);
+MulAdd212(&t5h,&t5l,tbl[TBLIDX10+32],tbl[TBLIDX10+33],z,t4h,t4l);
+MulAdd212(&t6h,&t6l,tbl[TBLIDX10+30],tbl[TBLIDX10+31],z,t5h,t5l);
+MulAdd212(&t7h,&t7l,tbl[TBLIDX10+28],tbl[TBLIDX10+29],z,t6h,t6l);
+MulAdd212(&t8h,&t8l,tbl[TBLIDX10+26],tbl[TBLIDX10+27],z,t7h,t7l);
+MulAdd212(&t9h,&t9l,tbl[TBLIDX10+24],tbl[TBLIDX10+25],z,t8h,t8l);
+
+/* Triple-double computations */
+
+Mul123(&tt10h,&tt10m,&tt10l,z,t9h,t9l);                                                        
+Add33(&t10h,&t10m,&t10l,tbl[TBLIDX10+21],tbl[TBLIDX10+22],tbl[TBLIDX10+23],tt10h,tt10m,tt10l); 
+Mul133(&tt11h,&tt11m,&tt11l,z,t10h,t10m,t10l);                                                 
+Add33(&t11h,&t11m,&t11l,tbl[TBLIDX10+18],tbl[TBLIDX10+19],tbl[TBLIDX10+20],tt11h,tt11m,tt11l); 
+Mul133(&tt12h,&tt12m,&tt12l,z,t11h,t11m,t11l);                                                 
+Add33(&t12h,&t12m,&t12l,tbl[TBLIDX10+15],tbl[TBLIDX10+16],tbl[TBLIDX10+17],tt12h,tt12m,tt12l); 
+Mul133(&tt13h,&tt13m,&tt13l,z,t12h,t12m,t12l);                                                 
+Add33(&t13hover,&t13mover,&t13lover,
+                        tbl[TBLIDX10+12],tbl[TBLIDX10+13],tbl[TBLIDX10+14],tt13h,tt13m,tt13l); 
+
+Renormalize3(&t13h,&t13m,&t13l,t13hover,t13mover,t13lover);                                    
+
+Mul133(&tt14h,&tt14m,&tt14l,z,t13h,t13m,t13l);                                                 
+Add33(&t14h,&t14m,&t14l,tbl[TBLIDX10+9],tbl[TBLIDX10+10],tbl[TBLIDX10+11],tt14h,tt14m,tt14l);  
+Mul133(&tt15h,&tt15m,&tt15l,z,t14h,t14m,t14l);                                                 
+Add33(&t15h,&t15m,&t15l,tbl[TBLIDX10+6],tbl[TBLIDX10+7],tbl[TBLIDX10+8],tt15h,tt15m,tt15l);    
+Mul133(&tt16h,&tt16m,&tt16l,z,t15h,t15m,t15l);                                                 
+Add33(&t16h,&t16m,&t16l,tbl[TBLIDX10+3],tbl[TBLIDX10+4],tbl[TBLIDX10+5],tt16h,tt16m,tt16l);     
+Mul133(&tt17hover,&tt17mover,&tt17lover,z,t16h,t16m,t16l);                                     
+
+Renormalize3(&tt17h,&tt17m,&tt17l,tt17hover,tt17mover,tt17lover);                              
+
+Add33(&t17h,&t17m,&t17l,tbl[TBLIDX10+0],tbl[TBLIDX10+1],tbl[TBLIDX10+2],tt17h,tt17m,tt17l);    
+
+Mul133(&tt18h,&tt18m,&tt18l,z,t17h,t17m,t17l);                                                 
+Add133(&polyh,&polym,&polyl,-1,tt18h,tt18m,tt18l);                                             
+
+/* Compute sqrt(2*z) as a triple-double */
+
+twoZ = 2 * z;
+sqrt13(&sqrtzh,&sqrtzm,&sqrtzl,twoZ);                                                           
+
+/* Multiply p(z) by sqrt(2*z) and add Pi/2 */
+
+Mul33(&pTimesSh,&pTimesSm,&pTimesSl,polyh,polym,polyl,sqrtzh,sqrtzm,sqrtzl);                    
+Add33(&allhover,&allmover,&alllover,PIHALFH,PIHALFM,PIHALFL,pTimesSh,pTimesSm,pTimesSl);        
+
+/* Renormalize and multiply by sign */
+Renormalize3(&allh,&allm,&alll,allhover,allmover,alllover);                                     
+*asinh = sign * allh;
+*asinm = sign * allm;
+*asinl = sign * alll;
+\end{lstlisting} 
+
+\section{Accuracy bounds}\label{sec:asinaccuracy}
+
+\subsection{Quick phase accuracy}\label{subsec:asinquickphaseaccu}
+
+TODO: see possibly available Gappa files meanwhile
+
+
+\subsection{Accurate phase accuracy}\label{subsec:asinaccuratephaseaccu}
+
+TODO: see possibly available Gappa files meanwhile
+
+
+\section{Timings and memory consumption}\label{sec:asintimingmemory}
+The given implementation of the arcsine uses tables and constants that
+consume 4740 bytes of memory. This values are fully shared between
+quick and accurate phase. The code size, including the tables, is
+about 22 kbytes when compiled to PowerPC machine code. The quick phase
+code for one rounding mode needs about 1.5 kbytes without the table.
+This means that there are about 12 kbytes of code for the accurate
+phase, which is shared between all rounding modes.
+
+Concerning the timing, we compare our implementation to IBM's {\tt
+  libultim} and to MPFR. The values are given in arbitrary units and
+obtained on a IBM Power 5 processor with gcc 3.3.3 on a Linux Kernel
+2.6.5. The timings on other systems are comparable.
+\begin{center}
+\begin{tabular}{|l|r|r|}
+ \hline
+  Library                       &     avg time  & max time \\
+ \hline
+ \hline
+ \texttt{MPFR}   &   6322    & 83415        \\ 
+ \hline
+ \texttt{crlibm} portable using triple-double      &        45    & 300        \\ 
+ \hline
+ default \texttt{libm} (IBM's {\tt libultim})  &        23    & 206239      \\ 
+ \hline
+\end{tabular}
+\end{center}
+It is worth mentioning that IBM's library uses about 20 kbytes of
+tables for its mere quick phase.
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm" 
+%%% End: 
diff --git a/src/crlibm/docs/latex/atan.tex b/src/crlibm/docs/latex/atan.tex
new file mode 100644
index 0000000..53a734f
--- /dev/null
+++ b/src/crlibm/docs/latex/atan.tex
@@ -0,0 +1,628 @@
+This chapter is contributed by Nicolas Gast under the supervision of
+F. de~Dinechin.  
+
+\newcommand{\xred}{X_{\mathrm{red}}}
+\newcommand{\xredhi}{{\mathrm{Xredhi}}}
+\newcommand{\xredlo}{{\mathrm{Xredlo}}}
+
+\section{Overview}
+
+For the arctangent, the quick phase has a precision of 64 bits, and
+the accurate phase computes to a precision of 136 bits.
+
+\subsubsection{Definition interval and exceptional cases}
+
+The inverse tangent is defined over all real numbers.
+
+\begin{itemize}
+\item If $x = NaN$ , then $\arctan(x)$ should return $NaN$
+\item If $x = \pm\infty$ , then $\arctan(x)$ should return
+$\pm\round(\pi/2) = \pm\rounddown(\pi/2)$ in rounding to nearest mode. In
+directed rounding modes, we may return $\pm\roundup(\pi/2)$ which
+invalidates the inequation $|\arctan(x)|<\frac{\pi}{2}$ but respects the
+rounding.
+\item  For $2^{54}<|x|<+\infty$ we choose to return $\pm\round(\pi/2)$
+  in all rounding modes.
+\item For $|x|<2^{-27}$ we have $|\arctan(x)-x|<2^{-53}x$ and
+  $|\arctan(x)|<|x|$, which allows to decide to return either $x$ or the
+  FP number next to $x$ towards zero.
+\end{itemize}
+
+
+
+
+
+\section{Quick phase}
+
+The code of the quick phase is organized in  five
+functions. The function (\texttt{atan\_quick})  returns two doubles
+($atanhi$ and $atanlo$) that represent $\arctan(x)$ with a precision
+of about 64 bits. Four other functions compute the correct rounding :
+\texttt{atan\_rn}, \texttt{atan\_ru}, \texttt{atan\_rd} and
+\texttt{atan\_rz}. 
+
+
+\subsection{Overview of the algorithm for the quick phase.}
+
+This phase is computed in double or double-double. There are two steps
+in the algorithm: an argument reduction and a polynomial approximation
+with a polynomial of degree 9.
+
+We compute $\arctan(x)$ as 
+\begin{equation}
+\arctan(x) = \arctan( b_i ) + \arctan(\frac{x-b_i}{1+x.b_i}) \label{eq:arctan_redu}
+\end{equation}
+
+The $b_i$ are exact doubles and the $\arctan(b_i)$ are stored in
+double-double.
+
+We define $\xred = \dfrac{x-b_i}{1+x.b_i}$ for the rest of this chapter.
+
+We tabulate intervals bounds $a_i$ and values $b_i$ such
+that 
+\begin{equation}
+ x \in [a_i;a_{i+1}] \Rightarrow \dfrac{x-b_i}{1+x.b_i} < e \quad .
+\label{atan_ineq_interval}
+\end{equation}
+
+The $i$ such that $x \in [a_i;a_{i+1}]$ will be found by dichotomy.
+Therefore we choose a power of two for the number of intervals: 64
+intervals ensure $e=2^{-6.3}$.
+
+Then we use a polynomial of degree 9 for the approximation of $\arctan(\xred)$
+which ensures 66 bits of precision:
+
+\begin{equation}
+\begin{split} \arctan(x)& \approx x - \dfrac{1}{3} .x^3 + \frac{1}{5}.x^5
+- \frac{1}{7}.x^7 + \frac{1}{9}.x^9 \nonumber \\ 
+  & \approx x . + x.Q(x^2)
+\end{split}
+\label{eq:poly_eval1}
+\end{equation}
+ 
+Q is evaluated thanks to a Horner scheme:
+$ Q(z) = z. (-\frac{1}{3} + z.(\frac{1}{5} + z.(-\frac{1}{7} +
+z.\frac{1}{9}))) $
+where each operation is computed in double.
+
+As $|z| \leq e$, $Q(z) \leq e^2$
+
+At the end, the reconstruction implements equation
+(\ref{eq:poly_eval1}) and (\ref{eq:arctan_redu}) in double-double
+arithmetic.
+
+
+\subsection{Error analysis on atan\_quick}
+
+We choose four rounding constant: two when there is a argument
+reduction, two in the other case. For each case, we use two constants
+on order to improve performances.
+
+The error analysis presented here is implemented in
+\texttt{maple/atan.mpl}
+
+\paragraph{Notes on $b_i$, $a_i$ and $\arctan(b_i)$}
+The $b_i$ and $a_i$ are computed thanks to the \texttt{allbi} maple
+procedure (see \texttt{maple/atan.mpl}). There is no approximation
+error on the $b_i$ since we chose them to be FP numbers. The $\arctan
+(b_i)$ are stored in double-double so there is an approximation of
+$2^{-105}$ on them. The value of $e$ is fixed, then the $a_i$ are also
+chosen as FP numbers such that inequation (\ref{atan_ineq_interval})
+is true.
+
+\subsubsection{Argument reduction}
+
+\begin{lstlisting}[caption={Reduction part 1},firstnumber=1]
+  if (x > MIN_REDUCTION_NEEDED) /* test if reduction is necessary : */ 
+  {
+    double xmBIhi,xmBIlo;      
+
+      if (x > arctan_table[61][B].d) {
+        i=61;
+        Add12( xmBihi , xmBilo , x , -arctan_table[61][B].d);
+      }
+      else
+        {
+          /* compute i so that a[i] < x < a[i+1] */
+          i=31;
+          if (x < arctan_table[i][A].d) i-= 16;
+          else i+=16;
+          if (x < arctan_table[i][A].d) i-= 8;
+          else i+= 8;
+          if (x < arctan_table[i][A].d) i-= 4;
+          else i+= 4;
+          if (x < arctan_table[i][A].d) i-= 2;
+          else i+= 2;
+          if (x < arctan_table[i][A].d) i-= 1;
+          else i+= 1;
+          if (x < arctan_table[i][A].d) i-= 1
+          xmBihi = x-arctan_table[i][B].d;
+          xmBilo = 0.0;
+        }
+      
+\end{lstlisting}
+
+\begin{tabular}{ll}
+Lines  1 & test if $x > 2^{-6.3}$ and so need to be reduced\\
+Line 5 & test if $x>b[61]$ because when $i \in [0;60] : b_i/2 < x <
+b_i$ (or $ x/2 < b_i < x$) and then \\&$x-b_i$ is computed exactly
+thanks to Sterbenz lemma.\\
+Line 10...21 & compute $i$ so that $\frac{x-b_i}{1+x.b_i} < 2^{-6.3} $\\
+Line 7 and 23 & compute $xmBIhi + xmBIlo = x - b_i$
+
+\end{tabular}
+
+We have no rounding error in the computation of $x-b_i$.
+
+\begin{lstlisting}[caption={Reduction part 2},firstnumber=1]
+      Mul12(&tmphi,&tmplo, x, arctan_table[i][B].d);
+
+      if (x > 1)
+        Add22(&x0hi,&x0lo,tmphi,tmplo, 1.0,0.0);
+      else {Add22( &x0hi , &x0lo , 1.0,0.0,tmphi,tmplo);}
+
+      Div22( &Xredhi, &Xredlo, xmBihi , xmBilo , x0hi,x0lo);
+\end{lstlisting}
+
+\begin{tabular}{ll}
+Line 1 & compute $x.b_i$ exactly as a double-double\\
+Line 3-5 & We need to have a Add22Comp but as we know that $x.b_i > 0$ (so
+$tmphi>0$), we test if\\& $tmphi$ is greater than 1 in order to be
+faster. The Add22 makes an error of $\epsilon_{Add22}=\epsilon_{103}$\\
+Line 7 & We compute $\xred = \dfrac{x-b_i}{1+x.b_i}$. The Div22 makes $\epsilon_{104}$ (according to Ziv \cite{Ziv91}) error so we have :
+\end{tabular}
+\bigskip
+
+\begin{equation}
+\begin{split}
+   \round\big(\xred\big) & = \frac{(x-b_i).(1+\epsilon_{105})}{(1+x.b_i).(1+\epsilon_{105})
+          .(1+\epsilon_{105}) )}.(1+\epsilon_{105}) \\
+         & =
+          \frac{x-b_i}{1+x.b_i}.(1+\epsilon_{105})(1+\epsilon_{105}+\epsilon_{105}+\epsilon_{104})\\
+         & = \xred . (1+\epsilon_{101.9})\nonumber
+\end{split}
+\end{equation}
+So: 
+\begin{equation}
+\epsilon_{\xred} = \epsilon_{102.6} \label{eps:equation}
+\end{equation}
+
+
+
+\subsubsection{Polynomial evaluation}
+
+The error due to the polynomial approximation is $\delta_{approx} =
+\infnorm{ \arctan(x) - x.(1+q)}= \delta_{72.38}$ 
+
+\begin{lstlisting}[caption={Polynomial Evaluation},firstnumber=1]
+      Xred2 = Xredhi*Xredhi;
+      
+      q = Xred2*(coef_poly[3]+Xred2*
+                 (coef_poly[2]+Xred2*
+                  (coef_poly[1]+Xred2*
+                   coef_poly[0]))) ;
+
+\end{lstlisting}
+\begin{tabular}{ll}
+Line 1 & The error between $\mathrm{Xred2}$ and the ideal value of $\xred^2$ comes from\\
+       & $\bullet$~ the error $\epsilon_{\xred}$  on $\xredhi+\xredlo$\\
+       & $\bullet$~ the truncation of $\xredlo$ adds $\epsilon_{53}$\\
+       & $\bullet$~ then the FP multiplication squares this term and adds a rounding error of $\epsilon_{53}$\\
+       & which sum up to  $\epsilon_\mathrm{Xred2} = ((1+2^{-53}+2^{-105})^2)(1+2^{-53}) 
+          \approx \epsilon_{51.4}$ \\
+Line 3 & Horner approximation with error on $\mathrm{Xred2}$:
+      Maple computes an error around $\epsilon_{50.7}$\\
+      & or $\delta_{q}=\delta_{63.3}$\\ 
+\end{tabular}
+
+\subsubsection{Reconstruction}
+
+The reconstruction adds $\arctan(b_i)$ (read as a double-double
+from a table) to $\arctan(\xred)$ (approximated by
+$(\xredhi+\xredlo)(1+q)$).  The terms of this developed product are
+depicted in the following figure.
+
+
+\begin{center}
+ \small
+ \setlength{\unitlength}{3ex}
+      \framebox{
+        \begin{picture}(22,3.5)(-3,-4.15)
+         \put(9.5,-0.5){\line(0,-1){4}}  \put(9,-1){$\epsilon$}
+  
+          \put(4,-2){$\arctan(b_i)_{hi}$} \put(0.05,-2.15){\framebox(7.9,0.7){}}
+          \put(12,-2){$\arctan(b_i)_{lo}$}  \put(8.05,-2.15){\framebox(7.9,0.7){}}
+
+          \put(4,-3){$\xredhi$} \put(0.55,-3.15){\framebox(7.9,0.7){}}
+          \put(12,-3){$\xredlo$}  \put(8.55,-3.15){\framebox(7.9,0.7){}}
+
+          \put(5,-4){$\xredhi.q$} \put(2.05,-4.15){\framebox(7.9,0.7){}}
+          \put(13,-4){$\xredlo.q$}  \put(10.05,-4.15){\framebox(7.9,0.7){}}
+
+        \end{picture}
+      }
+  \end{center}
+  
+  Here the $\epsilon$ bar represents the target accuracy of $2^{-64}$.
+  One can see that the term $\xredlo.q$ can be truncated. As $\xredlo
+  < \xredhi.2^{-53}$ and $q<x^2<2^{-12.6}$ this entails an error of
+  $\epsilon_\mathrm{trunc} = \epsilon_{65.6}$ relative to $\xred$,
+  or an absolute error of $\delta_\mathrm{trunc} =
+    e.\epsilon_\mathrm{trunc} = e^3 .2^{-53} \approx \delta_{71.9}$.
+
+
+\begin{lstlisting}[caption={Reconstruction},firstnumber=1]
+      /* reconstruction : atan(x) = atan(b[i]) + atan(x) */
+      double atanlolo = Xredlo+ arctan_table[i][ATAN_BLO].d + Xredhi*q;
+      double tmphi2, tmplo2;
+      Add12( tmphi2, tmplo2, arctan_table[i][ATAN_BHI].d, Xredhi);
+      Add12( atanhi, atanlo, tmphi2, (tmplo2+atanlolo));
+
+\end{lstlisting}
+
+Upon entering this code we have:
+\begin{center}
+ \small
+ \setlength{\unitlength}{3ex}
+      \framebox{
+        \begin{picture}(22,3.5)(-3,-4.15)
+         \put(9.5,-0.5){\line(0,-1){4}}  \put(9,-1){$\epsilon$}
+         \put(10.1,-0.5){\line(0,-1){4}}  \put(10.2,-1){$\delta_{71.9}$}
+  
+          \put(4,-2){$\arctan(b_i)_{hi}$} \put(0.05,-2.15){\framebox(7.9,0.7){}}
+          \put(12,-2){$\arctan(b_i)_{lo}$}  \put(8.05,-2.15){\framebox(7.9,0.7){}}
+
+          \put(4,-3){$\xredhi$} \put(0.55,-3.15){\framebox(7.9,0.7){}}
+          \put(12,-3){$\xredlo$}  \put(8.55,-3.15){\framebox(7.9,0.7){}}
+
+          \put(5,-4){$\xredhi.q$} \put(2.05,-4.15){\framebox(7.9,0.7){}}
+
+        \end{picture}
+      }
+  \end{center}
+
+
+Before line 5, the situation is the following:
+
+\begin{center}
+ \small
+ \setlength{\unitlength}{3ex}
+      \framebox{
+        \begin{picture}(22,2.5)(-3,-4.15)
+         \put(9.5,-0.5){\line(0,-1){4}}  \put(9,-1){$\epsilon$}
+         \put(10.1,-0.5){\line(0,-1){4}}  \put(10.2,-1){$\delta_{71.9}$}
+  
+          \put(0.5,-3){$\mathrm{tmphi2}$}
+          \put(0.05,-3.15){\framebox(7.9,0.7){}}
+          \put(8.5,-3){$\mathrm{tmplo2}$} \put(8.05,-3.15){\framebox(7.9,0.7){}}
+
+          \put(5,-4){$atanlolo$} \put(2.05,-4.15){\framebox(7.9,0.7){}}
+
+
+        \end{picture}
+      }
+  \end{center}
+\begin{tabular}{ll}
+Line 2 & The computation of  $atanlolo$  causes 3 errors :\\
+      & $ \epsilon_{53}.(\xredlo+ \arctan(b_i)_{lo}) < \delta_{105}$\\
+      & $\epsilon_{53}.\xredhi.q < \delta_{72}$\\
+      & $\epsilon_{53} . atanlolo < \delta_{72}$ (again) \\
+Line 4 & Add12 adds no error\\
+Line 5 & Here we have an FP addition which adds again $\delta_{72}$\\
+      & Add12 adds no error.
+\end{tabular}      
+
+Finally, we get (after  accurate computation in Maple) \\
+$ \delta_\mathrm{reconstr} \approx \delta_{71.8}$
+
+
+
+\subsubsection {Final error and rounding constant}
+
+We have to add all error : 
+\begin{equation}
+\delta_{final} =  \delta_{approx} + \delta_{q}  + \delta_\mathrm{reconstr} = \delta_{70.2}
+\end{equation}
+
+So when $i < 10$, the relative error is $\epsilon_{63.8}$ that leads to a
+rounding constant of $1.001$.
+
+And when $i > 10$ the relative error is $\epsilon_{68.24}$ that leads to a
+rounding constant of $1.000068$.
+
+\subsubsection{Error when there is no reduction}
+\begin{lstlisting}[caption={No reduction},firstnumber=1]
+
+      x2 = x*x;
+      q = x2*(coef_poly[3]+x2*
+                 (coef_poly[2]+x2*
+                  (coef_poly[1]+x2*
+                   coef_poly[0]))) ;
+      Add12(atanhi,atanlo, x , x*q);
+
+\end{lstlisting}
+
+The code is very simple so there are few error terms:
+
+\begin{tabular}{ll}
+Line 1 & $\epsilon_{53}$ \\
+Line 2 & The Maple procedure to compute Horner approximation gives $\epsilon_{51}$\\
+Line 3 & $\delta_{no\_reduction} = \epsilon_{105}.x + \epsilon_q.x^3 + 
+\epsilon_{x.q}.x^3 + |arctan(x) - x.(1+q)| $
+\end{tabular}
+
+When $x>2^{-10}$ the relative error is $\epsilon_{62.9}$. The
+constant is $1.0024$. 
+
+When $x<2^{-10}$ the relative error is $\epsilon_{70.4}$. The
+constant is $1.000005$. 
+
+\bigskip
+
+\subsection{Exceptional cases and rounding}
+\subsubsection{Rounding to nearest}
+\begin{lstlisting}[caption={Exceptional cases : rounding to nearest},firstnumber=1]
+
+  db_number x_db;
+  x_db.d = x;
+  unsigned int hx = x_db.i[HI] & 0x7FFFFFFF; 
+
+  /* Filter cases */
+  if ( hx >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((hx > 0x7ff00000) || ((hx == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else
+        return HALFPI.d;           /* \arctan(x) = Pi/2 */
+    }
+  else
+    if ( hx < 0x3E400000 )
+      {return x;                   /* x<2^-27 then \arctan(x) =~ x */}
+
+\end{lstlisting}
+\begin{tabular}{ll}
+Lines 3 & Test if x is greatear than $2^{54}$, $\infty$ or $NaN$. \\
+Line 5,6 & return $\arctan(NaN) = NaN$\\
+Line 8 & \texttt{HALFPI} is the greatest double smaller than
+$\frac{\pi}{2}$ in order not to have $\arctan(x) > \dfrac{pi}{2}$ \\
+Line 11 & When $x<2^{-27}$ : $x^2 < 2^{-54}$ so $o(\arctan(x)) = x$
+\end{tabular}
+\\
+
+\textbf{Proof}
+
+ we know that $\arctan(x) = \displaystyle {\sum_{i=0}^{\infty}
+\frac{x^{2i+1}}{2i+1}(-1)^i}$.
+
+So:
+\begin{equation}
+   \begin{split}
+       \Big| \frac{\arctan(x)-x}{x}  \Big| & = 
+       \Bigg|\frac{ \displaystyle {\sum_{i=0}^{\infty}
+       \Big( \frac{x^{2i+1}}{2i+1}(-1)^i} \Big) - x}{x} \Bigg|
+       \nonumber\\
+       & = \Big|\displaystyle {\sum_{i=1}^{\infty}}
+       \frac{x^{2i}}{2i+1}(-1)^i\Big|\nonumber \\ 
+       & < \frac{x^2}{3}\nonumber \\
+       & < 2^{-54} \nonumber
+   \end{split}
+\end{equation}
+
+Then : $\arctan(x) \approx x $
+\bigskip
+
+\subsubsection{Rounding toward $-\infty$}
+\begin{lstlisting}[caption={Exceptional cases : rounding down},firstnumber=1]
+
+  if ( hx >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((hx > 0x7ff00000) || ((hx == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else
+        if (x>0)
+          return HALFPI.d;
+        else
+          return -HALFPI_TO_PLUS_INFINITY.d;           /* atan(x) = Pi/2 */
+    }
+  else
+    if ( hx < 0x3E400000 )
+      {if (sign>0)
+        {if(x==0)
+          {x_db.i[HI]  = 0x80000000;
+          x_db.i[LO] = 0;}
+        else
+          x_db.l--;
+        return x_db.d;
+        }
+      else
+        return x;
+      }
+  
+\end{lstlisting}
+
+The differences with rounding to nearest mode are for $frac{pi}{2}$ for
+$x<2^(-27)$.
+
+\begin{lstlisting}[caption={Test for rounding down},firstnumber=1]
+  absyh.d=atanhi;
+  absyl.d=atanlo;
+  
+  absyh.l = absyh.l & 0x7fffffffffffffffLL;
+  absyl.l = absyl.l & 0x7fffffffffffffffLL;
+  u53.l     = (absyh.l & 0x7ff0000000000000LL) +  0x0010000000000000LL;
+  u.l   = u53.l - 0x0350000000000000LL;
+  
+  if(absyl.d > roundcst*u53.d){
+    if(atanlo<0.)
+      {atanhi -= u.d;}
+    return atanhi;
+  }
+  else {
+    return scs_atan_rd(sign*x);
+  }
+\end{lstlisting}
+
+\subsubsection{Rounding toward $-\infty$}
+
+\begin{lstlisting}[caption={Exceptional cases : rounding up},firstnumber=1]
+
+  if ( hx >= 0x43500000)           /* x >= 2^54 */
+    {
+      if ((hx > 0x7ff00000) || ((hx == 0x7ff00000) && (x_db.i[LO] != 0)))
+        return x+x;                /* NaN */
+      else
+        if (x>0)
+          return HALFPI.d;
+        else
+          return -HALFPI_TO_PLUS_INFINITY.d;           /* atan(x) = Pi/2 */
+    }
+  else
+    if ( hx < 0x3E400000 )
+      {if (sign<0)
+        {x_db.l--;
+        return -x_db.d;
+        }
+      else
+        if(x==0)
+          return 0;
+      return x;
+      }
+
+\end{lstlisting}
+
+There are the same differences for rounding down.
+
+\subsubsection{Rounding to zero}
+
+This function is quite simple: it call one of the two function defineded
+before.
+
+\begin{lstlisting}[caption={Rounding to zero},firstnumber=1]
+
+extern double atan_rz(double x) {
+  if (x>0)
+    return atan_rd(x);
+  else
+    return atan_ru(x);
+}
+\end{lstlisting}
+
+\subsubsection{Test if rounding is possible}
+This test use the theorem \ref{th:roundingRN1}.
+The code is the same than in the theorem except that we have 4 rounding
+constants : 
+\begin{itemize}
+\item 1.0047 when $i<10$
+\item 1.000068 when $i\geq10$
+\item 1.0024 when $x>2^{-10}$
+\item 1.0000132 when $x<2^{-10}$
+\end{itemize}
+
+
+\section{Accurate phase}
+The accurate phase is the same as the quick phase, except that number are
+scs and not double.
+
+The intervals are the same as in quick phase. The only difference is that
+$\arctan(b_i)$ as a third double to improve the precision of $\arctan(b_i)$ to
+150 bits. Then we use less memory, that is why we can use the same
+intervals as in the quick phase.
+
+The polynomial degree is 19 in order to have 136 bits of precision.
+
+\begin{equation} \arctan(x) \approx
+x-\frac{1}{3}.x^3+\frac{1}{5}.x^5-\frac{1}{7}.x^7+\frac{1}{9}.x^9-\frac{1}{11}.x^{11}+\frac{1}{13}.x^{13}-\frac{1}{15}.x^{15}+\frac{1}{17}.x^{17}-\frac{1}{19}.x^{19}
+\label{eq:arctan_scspoly}
+\end{equation}
+
+\section{Analysis of the performance}
+
+\subsection{Speed}
+Table \ref{tbl:arctan_abstime} (produced by the \texttt{crlibm\_testperf}
+executable) gives absolute timings for a variety of processors. The test
+computed 50000 atan in rounding to nearest mode. The second step of
+\texttt{crlibm} was taken 1 time on 50000.
+
+\begin{table}[!htb]
+\begin{center}
+\renewcommand{\arraystretch}{1.2}
+\begin{tabular}{|l|r|r|r|}
+\hline
+\hline
+
+ \multicolumn{4}{|c|}{Pentium 4 Xeon / Linux Debian / gcc 2.95}   \\
+ \hline
+                         & min time      & max time      & avg time \\ 
+ \hline
+                         & min time      & max time      & avg time \\ 
+ \hline
+ \texttt{libm}           & 180          & 344           &        231 \\ 
+ \hline
+  \texttt{mpfr}          & 417016       & 3956992       &     446362 \\ 
+ \hline
+  \texttt{libultim}      & 48           & 257616        &        189 \\ 
+ \hline
+ \texttt{crlibm}         & 36           & 46428         &        381 \\ 
+ \hline
+ \hline
+  \multicolumn{4}{|c|}{PowerPC G4 / MacOS X / gcc2.95}   \\
+ \hline
+                         & min time      & max time      & avg time \\
+ \hline
+ \texttt{libm}           & 6            & 11            &          9 \\
+ \hline
+  \texttt{mpfr}          & 35291        & 303019        &      37022 \\
+ \hline
+  \texttt{libultim}      & 7            & 13251         &         14 \\
+ \hline
+ \texttt{crlibm}         & 5            & 1037          &         19 \\
+ \hline
+ \hline
+
+\end{tabular}
+\end{center}
+\caption{Absolute timings for the inverse tangent (arbitrary units)
+  \label{tbl:arctan_abstime}}
+\end{table}
+
+\subsection{Memory requirements}
+Table size is
+\begin{itemize}
+\item for the \quick\ phase,
+  $62\times (1+1+2) \times8=1984$ bytes for the 62 $a_i$, $b_i$,
+  $\arctan(b_i)$ (hi and lo), plus another $8$ bytes for the rounding
+  constant, plus $4\times8$ for the polynomial, $8$ bytes for
+  $\frac{\pi}{2}$ and $64$ for the rounding constants or $2096$ bytes in
+  total.
+  
+\item for the \accurate\ phase, we just have $10$ SCS constants for the
+  polynomial, and 62 other double for $\arctan(b_i)_{lo_{lo}}$.
+  If we add all : $10*11*8 + 62*8 = 1376$
+\end{itemize}
+If we add the fast phase and the acurate one, we have a total of 3472
+bytes. 
+
+
+\section{Conclusion and perspectives}
+
+Our $\arctan$ is reasonably fast.  Libultim is faster but requires ten
+times more memory (241 polynomials of degree 7 and 241 of degree 16
+that represents more than 40KB !). Instead, our argument reduction
+performs a division, which is an expensive operation.
+
+To improve performances we could inline the code of \texttt{atan\_quick},
+but we prefer to keep it as it is in order to ease the evolution of the
+algorithm.
+
+The main problem of our $\arctan$ is the worst case time which is about 100
+times slower than the average time. Thus to improve performances we could
+try to use double-extended. A double-extended has a mantissa of 64 bits
+which could transform all double-double operation in double-extended
+operation. This format number is present in most of the Intel recent
+processors.
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
diff --git a/src/crlibm/docs/latex/crlibm.tex b/src/crlibm/docs/latex/crlibm.tex
new file mode 100644
index 0000000..cbd0b32
--- /dev/null
+++ b/src/crlibm/docs/latex/crlibm.tex
@@ -0,0 +1,284 @@
+\documentclass[a4paper,pdftex]{book} 
+
+\usepackage{fullpage}
+%\usepackage{isolatin1} 
+\usepackage{graphicx}
+\usepackage{mathpazo}
+\usepackage{listings}
+\usepackage{longtable} %pour les preuves des programmes
+
+\usepackage{lscape}    % pour le mode landscape
+\usepackage{makeidx}
+\usepackage{color}
+\usepackage{amstext,url,latexsym,amsfonts,amssymb,amsmath,amsthm}
+\usepackage{hyperref}
+
+
+\newtheorem{example}{Example}
+\newtheorem{theorem}{Theorem}
+\newtheorem{algorithm}{Algorithm}
+\newtheorem{propriete}{Property}
+
+\DeclareMathOperator{\sinpi}{sinpi}
+\DeclareMathOperator{\cospi}{cospi}
+\DeclareMathOperator{\tanpi}{tanpi}
+\DeclareMathOperator{\asinpi}{asinpi}
+\DeclareMathOperator{\acospi}{acospi}
+\DeclareMathOperator{\atanpi}{atanpi}
+\DeclareMathOperator{\arccosh}{arccosh}
+
+
+\newcommand{\pref}[1]{$<$\ref{#1}$>$}
+\newcommand{\quick}{{quick}}
+\newcommand{\accurate}{{accurate}}
+\newcommand{\ulp}{\mbox{ulp}}
+\newcommand{\crlibm}{\texttt{crlibm}}
+\newcommand{\scslib}{\texttt{scslib}}
+
+\renewcommand{\epsilon}{\varepsilon}
+
+\newcommand{\round}{\circ}
+\newcommand{\roundup}{\bigtriangleup}
+\newcommand{\rounddown}{\bigtriangledown}
+\newcommand{\intpart}[1]{\left\lceil #1 \right\rfloor}
+\newcommand{\maxv}[1]{{\overline{#1}}}
+\newcommand{\maxx}{\maxv{x}}
+\newcommand{\maxeps}{\maxv{\epsilon}}
+\newcommand{\maxdelta}{\maxv{\delta}}
+\newcommand{\maxz}{{\overline{z}}}
+\newcommand{\maxs}[1]{\overline{s}_{#1}}
+\newcommand{\mins}[1]{\underline{s}_{#1}}
+\newcommand{\maxp}{\overline{|P|}}
+\newcommand{\minp}{\underline{|P|}}
+\newcommand{\infnorm}[1]{||{#1}||^{\infty}}
+
+\newcommand{\abserr}[1]{\delta_{\mathrm{#1}}}
+\newcommand{\relerr}[1]{\epsilon_{\mathrm{#1}}}
+\newcommand{\maxabserr}[1]{\maxv{\delta}_{\mathrm{#1}}}
+\newcommand{\maxrelerr}[1]{\maxv{\epsilon}_{\mathrm{#1}}}
+
+\newcommand{\N}{\ensuremath{\mathbb {N}}}
+\newcommand{\Z}{\ensuremath{\mathbb {Z}}}
+\newcommand{\F}{\ensuremath{\mathbb {F}}}
+\newcommand{\R}{\ensuremath{\mathbb {R}}}
+\newcommand{\hi}{\ensuremath{\mathit{h}}}
+\newcommand{\mi}{\ensuremath{\mathit{m}}}
+\newcommand{\lo}{\ensuremath{\mathit{l}}}
+\newcommand{\E}{\ensuremath{\mathcal{E}}}
+\newcommand{\Add}{{\bf Add12}}
+\newcommand{\AddDD}{{\bf Add22}}
+\newcommand{\AddDTT}{{\bf Add233}}
+\newcommand{\AddDTTCond}{{\bf Add233Cond}}
+\newcommand{\AdddTT}{{\bf Add133}}
+\newcommand{\AddTT}{{\bf Add33}}
+\newcommand{\MulDT}{{\bf Mul23}}
+\newcommand{\Mul}{{\bf Mul12}}
+\newcommand{\MulDD}{{\bf Mul22}}
+\newcommand{\MulDTT}{{\bf Mul233}}
+\newcommand{\MuldTT}{{\bf Mul133}}
+\newcommand{\MuldDD}{{\bf Mul122}}
+\newcommand{\MuldDT}{{\bf Mul123}}
+\newcommand{\MulTT}{{\bf Mul33}}
+\newcommand{\MulAddDdD}{{\bf MulAdd212}}
+\newcommand{\MulAddDD}{{\bf MulAdd22}}
+\newcommand{\SqrtD}{{\bf sqrt12}}
+\newcommand{\SqrtT}{{\bf sqrt13}}
+\newcommand{\Renormalize}{{\bf Renormalize3}}
+\newcommand{\mAdd}{\ensuremath{\mathbf{Add12}}}
+\newcommand{\mAddDD}{\ensuremath{\mathbf{Add22}}}
+\newcommand{\mAddDTT}{\ensuremath{\mathbf{Add233}}}
+\newcommand{\mAddDTTCond}{\ensuremath{\mathbf{Add233Cond}}}
+\newcommand{\mAdddTT}{\ensuremath{\mathbf{Add133}}}
+\newcommand{\mAddTT}{\ensuremath{\mathbf{Add33}}}
+\newcommand{\mMul}{\ensuremath{\mathbf{Mul12}}}
+\newcommand{\mMulDD}{\ensuremath{\mathbf{Mul22}}}
+\newcommand{\mMulDT}{\ensuremath{\mathbf{Mul23}}}
+\newcommand{\mMulDTT}{\ensuremath{\mathbf{Mul233}}}
+\newcommand{\mMuldTT}{\ensuremath{\mathbf{Mul133}}}
+\newcommand{\mMuldDD}{\ensuremath{\mathbf{Mul122}}}
+\newcommand{\mMuldDT}{\ensuremath{\mathbf{Mul123}}}
+\newcommand{\mMulAddDdD}{\ensuremath{\mathbf{MulAdd212}}}
+\newcommand{\mMulAddDD}{\ensuremath{\mathbf{MulAdd22}}}
+\newcommand{\mUlp}{\ensuremath{\mathrm{ulp}}}
+\newcommand{\nan}{\ensuremath{\mathrm{NaN}}}
+\newcommand{\sgn}{\ensuremath{\mathrm{sgn}}}
+\renewcommand{\succ}{\ensuremath{\mathrm{succ}}}
+\newcommand{\pred}{\ensuremath{\mathrm{pred}}}
+\newcommand{\xor}{\ensuremath{\mbox{ }\mathrm{XOR}\mbox{ }}}
+\newcommand{\Ord}{\ensuremath{\mathcal{O}}} 
+
+
+
+%\newcommand{\deltapprox}{\delta_{\mathrm{approx}}}
+%\newcommand{\deltaround}{\delta_{\mathrm{round}}}
+
+
+
+
+% Environnement pour disposer de propri�t� ``� la leslie lamport''
+\newcounter{propexp} % reset propexp � chaque chapitre
+\newenvironment{prop}
+{\begin{trivlist}\refstepcounter{propexp}\item[\hbox to 0pt{\spring {\bf $<$\arabic{propexp}$>$}}]}
+{\ifvmode\smallskip\fi$\bullet$\end{trivlist}}
+
+% D�finition de l'environnement proof
+\def\spring{\hskip 0pt minus 1fil}
+\def\@yproof[#1]{\@proof{ #1}}
+\def\@proof#1{\begin{trivlist}\item[\hbox to 0pt{\spring $\diamond$}]
+\emph{Proof#1. }}
+\newenvironment{preuve}
+{\@proof{}}{\hfill\null\hfill$\square$\end{trivlist}}
+
+
+
+% Definition des options pour le packages listings
+\lstset{numbers=left,
+  numberstyle=\tiny,
+  stepnumber=1,
+  numbersep=5pt,
+  lineskip=-1pt,
+  extendedchars=true,
+  basicstyle=\footnotesize,
+  breaklines,
+  showstringspaces=false,
+  frame=single,
+  language={[ANSI]C},
+  firstnumber=last,
+  escapeinside={(*@}{@*)}
+}
+ 
+
+
+
+\title{CR-LIBM\\A library of correctly rounded elementary functions in double-precision}
+\author{\mbox{Catherine Daramy-Loirat}, \mbox{David Defour}, \mbox{Florent~de~Dinechin},\\ \mbox{Matthieu Gallet}, \mbox{Nicolas Gast},  \mbox{Christoph Quirin Lauter}, \mbox{Jean-Michel Muller}}
+
+%% \abstract{
+%%   CRLibm is a mathematical library with correct rounding in
+%%   double-precision in the four IEEE-754 rounding modes. This report
+%%   explains the code and proves the correct rounding property.
+%% }
+
+%% \RRIresume{%
+%%   CRLibm est une biblioth�que math�matique offrant l'arrondi correct
+%%   en double pr�cision selon les quatre modes d'arrondi. Ce rapport
+%%   d�taille les algorithmes utilis�s et prouve fonction par fonction la
+%%   propri�t� d'arrondi correct.
+%% }%
+
+%% \RRIkeywords{elementary functions, correct rounding, IEEE-754, double precision}
+
+%% \RRImotscles{fonctions �l�mentaires, arrondi correct, IEEE-754, double pr�cision}
+
+%% \RRItheme{2}
+
+%% \RRIprojet{Ar�naire}
+
+%% \RRIinria{\RRnote{%
+%%     This  text  is  also  available   as  a  research  report  of  the
+%%     Laboratoire    de     l'Informatique    du    Parall�lisme    {\tt
+%%       http://www.ens-lyon.fr/LIP}.
+%% }}%
+
+
+
+
+\begin{document}
+\maketitle
+
+
+\section*{Important warning}
+
+This report describes and proves version \input{../../VERSION} of the
+\texttt{crlibm} library. It may therefore not correspond to the latest
+version. An up-to-date version will always be distributed along with
+the code.
+
+\vfill
+\section*{Many thanks to...}
+\begin{itemize}
+\item Vincent Lef\`evre, from \textsc{Inria}-Lorraine, without whom this
+  project would't have started, and who has since then lended a helpful hand in
+  more than 17 occasions;
+\item The Ar\'enaire project at ENS-Lyon, especially Marc Daumas,
+  Sylvie Boldo, Guillaume Melquiond, Nathalie Revol and Arnaud
+  Tisserand;
+\item Guillaume Melquiond for Gappa and its first-class hotline;
+\item The MPFR developers, and especially the \textsc{Inria}
+  \textsc{Spaces} project;
+\item The Intel Nizhniy-Novgorod Lab, especially Andrey Naraikin,
+  Sergei Maidanov and Evgeny Gvozdev;
+\item The contributors of bits and pieces, Phil Defert and Eric
+  McIntosh from CERN, Patrick Pelissier from \textsc{Inria};
+\item All the people who have reported bugs, hoping that they continue
+  until they have to stop: Evgeny Gvozdev from Intel with special
+  thanks, Christoph Lauter from TUM\"unchen (before he joined the
+  project), Eric McIntosh from CERN, Patrick Pelissier and Paul
+  Zimmermann from \textsc{Inria} Lorraine;
+\item William Kahan at UCBerkeley, Peter Markstein at HP, Neil Toda at
+  Sun, Shane Story at Intel, and many others for interesting and
+  sometimes heated discussions;
+\item Serge Torres for LIPForge.
+\end{itemize}
+
+This work was partly funded by the \textsc{Inria}, the ENS-Lyon and
+the Universit\'e de Perpignan.
+
+\tableofcontents
+
+\addtocounter{chapter}{-1}
+\chapter{Getting started with crlibm}
+\input{0_getting-started.tex}
+
+\chapter{Introduction: Goals and methods \label{chap:intro}}
+\input{0_intro.tex}
+
+\chapter{Common notations, theorems and procedures \label{chap:common}}
+\input{1_common.tex}
+
+\chapter{The natural logarithm \label{chap:log}}
+\input{log.tex}
+
+\chapter{The logarithm in base 2 \label{chap:log2}}
+\input{log2.tex}
+
+\chapter{The logarithm in base 10 \label{chap:log10}}
+\input{log10.tex}
+ 
+\chapter{The exponential \label{chap:exp}}
+\input{exp.tex}
+
+\chapter{The \texttt{expm1} function\label{chap:expm1}}
+\input{expm1.tex}
+
+\chapter{The \texttt{log1p} function\label{chap:log1p}}
+\input{log1p.tex}
+
+\chapter{The trigonometric functions \label{chap:trigo}}
+\input{trigo.tex}
+
+\chapter{The arcsine \label{chap:asin}}
+\input{asin.tex}
+
+\chapter{The arccosine \label{chap:acos}}
+\input{acos.tex}
+
+\chapter{The arctangent \label{chap:atan}}
+\input{atan.tex}
+\chapter{The trig-of-$\pi x$ functions  \label{chap:trigpi}}
+\input{trigpi.tex}
+\chapter{The hyperbolic sine and cosine \label{chap:csh}}
+\input{csh.tex}
+\chapter{The power function \label{chap:pow}}
+\input{pow.tex}
+
+
+\appendix
+
+
+\bibliographystyle{plain} 
+\bibliography{elem-fun}
+
+\end{document}
+
+
diff --git a/src/crlibm/docs/latex/csh.tex b/src/crlibm/docs/latex/csh.tex
new file mode 100644
index 0000000..6d2b186
--- /dev/null
+++ b/src/crlibm/docs/latex/csh.tex
@@ -0,0 +1,620 @@
+This chapter was initially contributed by Matthieu Gallet under the
+supervision of F. de~Dinechin. The accurate phase was rewritten by Ch.
+Q. Lauter and F. de~Dinechin.
+
+
+\section{Overview}
+
+Like the algorithms for others elementary functions, we will compute
+our hyperbolic cosine and sine in one or two steps.  The first one,
+which is called 'fast step' is always executed and provides a
+precision of about 63 bits.  This is a sufficient precision in most
+cases, but sometimes more precision is needed, and then we enter the
+second step using the SCS library. 
+
+
+
+\subsection{Definition interval and exceptional cases}
+The hyperbolic cosine and the hyperbolic sine are defined for all real
+numbers, and then for all floating point numbers.  These functions are
+divergent toward $+\infty$ and $-\infty$, so for $|x| > 710.47586007$,
+$\cosh(x)$ and $\sinh(x)$ should return $+\infty$ or the greatest
+representable number (depending ot the choosen rounding mode).
+
+\begin{itemize}
+\item If $x = NaN$ , then $\sin(x)$ and $\cosh(x)$ should return $NaN$
+\item If $x = +\infty$ , then $\cosh(x)$ and $\sinh(x)$ should return $+\infty$. 
+\item If $x = -\infty$ , then $\cosh(x)$ should return $+\infty$. 
+\item If $x = -\infty$ , then $\sinh(x)$ should return $-\infty$. 
+\end{itemize}
+
+This is true in all rounding modes.
+
+Concerning subnormals, $\cosh(x) \geq 1$, so $\cosh(x)$ can't return
+subnormal numbers, even for subnormal inputs.  For small inputs ($|x|
+\leq 2^{-26}$), we have $\sinh(x) = x$ with 80 bits of precision, so
+we can return a result without any computation on subnormals.
+
+\subsection{Relation between $\cosh(x)$, $\sinh(x)$ and $e^x$}
+
+The hyperbolic sine and cosine are defined by 
+ $$\sinh(x) = \frac{e^x -  e^{-x}}{2}$$ 
+and
+ $$\cosh(x) = \frac{e^x +  e^{-x}}{2}$$
+respectively.
+
+For large arguments, we will be able to neglect the smaller term.
+\begin{itemize}
+\item $e^{-x}<2^{-65}e^x$ as soon as $x>23$ (this is the target precision of the first step) 
+\item $e^{-x}<2^{-115}e^x$ as soon as $x>40$ (this is the target precision of the second step)
+\end{itemize}
+
+Note that this has been used in the search for worst cases, too:
+knowing that correct rounding of \texttt{exp} requires at most
+$2^{-113}$ accuracy for $x>2^{-30}$, and the division by 2 being
+exact, we deduce that the worst cases for $\sinh$ and $\cosh$ will be
+those of the exponential for all the input values greater
+than 40.
+
+
+However, due to the division by 2, the domain of $\sinh$ and $\cosh$
+is slightly larger than that of exp, so there is a little additional
+search to do (precisely between 709.78 and 710.75). For the same
+reason, this additional search gives worst cases for both $\sinh$ and
+$\cosh$.
+
+
+\subsection{Worst cases for correct rounding}
+The search for the worst-case accuracy required for correct rounding
+the hyperbolic sine and cosine and their inverses is completed. The
+$\cosh$ function require a relative accuracy of
+$2^{-142}$ in the worst case, while $\sinh$ requires
+$2^{-126}$. However, for $x>2^{-12}$, both functions require only
+$2^{-111}$.
+
+
+\section{Quick phase}
+
+\subsection{Overview of the algorithm}
+
+The algorithm consists of two argument reduction using classical
+formulae of hyperbolic trigonometry, followed by a polynomial
+evaluation using a Taylor polynom of degree $6$ (for $\cosh$) and $7$
+(for $\sinh$).
+
+These formulaes are:
+\begin{itemize}
+\item  $\sinh(x + y) = \sinh(x)  \cosh(y) + \sinh(y)  \cosh(x)$
+\item  $\cosh(x + y) = \cosh(x)  \cosh(y) + \sinh(x)  \sinh(y)$
+\item  $\cosh(k\ln(2)) = 2^{k-1} + 2^{-k-1}$
+\item   $\sinh(k\ln(2)) = 2^{k-1} - 2^{-k-1}$
+\end{itemize}
+
+
+
+After having treated special cases ($NaN$, $+\infty$, $-\infty$), we
+do a first range reduction to reduce the argument between
+$\frac{-ln(2)}{2}$ and $\frac{ln(2)}{2}$.  So, we write $x = k\ln(2)
++ y$, where k is given by rounding to the nearest integer $x 
+\frac{1}{ln(2)}$.  Now, $\frac{-ln(2)}{2} \leq y \leq
+\frac{ln(2)}{2}$, but it is even too large to have a sufficient
+precision during polynomial evaluation with small polynoms, and we do
+a second range reduction, by writing $y = a + b$, where $a = index .
+2^{-8}$ (index is an integer) and $|b| \leq 2^{-9}$.
+
+Mathematically, we have: $$\sinh(x) = (2^{k-1} + 2^{-k-1})\sinh(y) +
+(2^{k-1} - 2^{-k-1}) \cosh(y)$$
+and $$\cosh(x) = (2^{k-1} +
+2^{-k-1})\cosh(y) + (2^{k-1} - 2^{-k-1}) \sinh(y)$$
+The second range
+reduction allows to compute $\sinh(y)$ and $\cosh(y)$ as $\sinh(y) =
+\sinh(a) \cosh(b) + \sinh(b) \cosh(a)$ and $\cosh(y) = \cosh(a) 
+\cosh(b) + \sinh(a) \sinh(b)$. In the C code, we have $ch\_hi + ch\_lo
+\approx \cosh(y)$ and $sh\_hi + sh\_lo \approx \sinh(y)$.
+
+A quick computation shows that $-89 \leq index \leq 89$, and we can
+pre-compute so few values of $\sinh(a)$ and $\cosh(a)$ and store them in
+a table as double-doubles.
+
+
+The constants $2^{k-1}$ and $2^{-k-1}$ are constructed by working
+directly on their binary representation.
+
+
+$\cosh(b)$ and $\sinh(b)$ are computed with Taylor polynoms. It's
+well-known that $$\cosh(b) = \sum_{n \geq 0}{\frac{x^{2n}}{(2n)!}}$$
+and $$\sinh(b) = \sum_{n \geq 0}{\frac{x^{2n+1}}{(2n+1)!}}$$
+For our
+needs, a degree $6$ polynom for cosh and a degree $7$ polynom for sinh
+give enough accuracy.
+
+We write $\cosh(b) = 1 + tcb$ and $\sinh(b) = b(1 + tsb)$, where
+$$tcb = b^{2}  (\frac{1}{2} + b^{2}(\frac{1}{24} + b^{2} 
+\frac{1}{720}))$$
+$$tsb = b^{2} (\frac{1}{6} + b^{2} 
+(\frac{1}{120} + b^{2}  \frac{1}{5040}))$$
+We use the Horner
+scheme  for the evaluation of the polynoms, with all the
+coefficients being coded on double-precision numbers.
+
+If the input is very small (i.e. $|b| \leq 2^{-40}$), $tsb$ and $tcb$
+are not calculated but directly set to $0$, to avoid any problem with
+subnormal numbers.
+
+
+At this stage, we have computed all the needed sub-terms before the
+final reconstruction, which is done in two steps, corresponding to the
+two-step range-reduction. The reconstruction is computed in
+double-double arithmetic.  In the first reconstruction, some sub-terms
+can be ignored without any loss of precision, due to their very small
+relative values.  For this step, it exists a particular case, when
+$index = 0$, since it is the only case where $|\sinh(a)| < 2^{-9}$
+($\sinh(a) = 0$).  Now we have the definitive values of $\cosh(y)$ and
+$\sinh(y)$.
+
+In the second reconstruction, we begin by computing all needed
+products before adding their results (i.e. $2^{k-1}\cosh(y)$,
+$2^{k-1}\sinh(y)$,...).  Computations are also done using double
+double arithmetics, with the Add22 function.
+
+
+
+\subsection{Error analysis}
+
+Many of the previous computations can introduce some error.
+\begin{itemize}
+\item{First range reduction}
+We have to consider two different cases:
+\begin{itemize}
+\item{$|x| \leq \frac{ln(2)}{2}$}
+
+We have $k = 0$, and there is no reduction, and no term of error.
+\item{$|x| > \frac{ln(2)}{2}$}
+
+  We have $k \neq 0$, and we must compute the term of error introduced
+  by the range reduction.  Since $k$ is an integer, we can assume that
+  there is no error on it.  $ln(2)$ is a constant which is stored in
+  the function in double-double, and we have $ln(2) =
+  ln2_{hi} + ln2_{lo} + \maxabserr{repr\_ln2}$, where
+  $|\maxabserr{repr ln2}| \leq 1.94e-31$.  The total absolute error of
+  this reduction is $\maxabserr{range\_reduc} = 3.437e-27$, so the
+  maximum relative error is $\maxrelerr{range\_reduc} = 9.9e-27$ (we
+  have $|x| \geq 0.36$), and that represents about $86.38$ bits of
+  precision.
+
+\end{itemize}
+
+\item{Second range reduction} This range reduction is exact (we only
+  cut y in two parts, with no multiplication nor division), so no new
+  term of error is introduced.
+
+\item{Error in tabulation} Since $\cosh(a)$ and $\sinh(a)$ are stored as
+  double-doubles, and since they are transcendental numbers (when $a
+  \neq 0$), some error is done on their approximation.  A simple Maple
+  procedure can compute this error, which is about $\maxabserr{ca} =
+  6.08e-33$ for cosh and $\maxabserr{sa} = 1.47e-33$ for sinh. That is
+  large overkill compared to precision on other values.
+
+\item{Error in polynomial approximations} We use the
+  $errlist\_quickphase$ and $compute\_horner\_rounding\_error$ Maple
+  procedures to compute thes errors on $tcb$ and $tsb$, which are
+  $\maxabserr{rounding\_cosh} = 6.35e-22$ and
+  $\maxabserr{rounding\_sinh} = 1.94e-22$. Then there is the approximation error. The sum of theses errors
+  gives $\maxabserr{tcb} = 6.35e-22$ and $\maxabserr{tsb} = 1.11e-21$.
+
+\item{First reconstruction} This reconstruction is done by adding all
+  the pre-calculated terms ($tcb$, $tsb$, $ca = \cosh(a)$, $sa =
+  \sinh(a)$), in an order which try to minimize the total
+  error.$\maxabserr{sh} = 2.10e-25$. Maple scripts are used to compute
+  the error, since there are many terms.  There are 2 different cases:
+\begin{itemize}
+
+\item{$a = 0$}
+
+  $ch_{hi}+ch_{lo} = \widehat{\cosh(\widehat{y})} + \abserr{cosh0}$, where $|\abserr{cosh0}| \leq \maxabserr{cosh0} = 6.35e-22$, and 
+  $\sinh(y) = \widehat{\sinh(\widehat{y})} + \abserr{sinh0}$, where $|\abserr{sinh0}| \leq  \maxabserr{sinh0} = 5.4e-20$.
+
+\item{$a \neq 0$}
+
+  $ch_{hi}+ch_{lo} = \widehat{\cosh(\widehat{y})} + \abserr{cosh1}$, where $|\abserr{cosh1}| \leq \maxabserr{cosh1} = 2.39e-20$, and 
+  $\sinh(y) = \widehat{\sinh(\widehat{y})} + \abserr{sinh1}$, where $|\abserr{sinh1}| \leq  \maxabserr{sinh1} = 1.09e-22$.
+\end{itemize}
+
+\item{Second reconstruction} This reconstruction is based on
+  multiplying the obtained results before adding them. The products
+  are exact since each product has a factor which a power of 2.  We
+  have to leave absolute errors for relative errors, since the range
+  of values returned by $\cosh$ is too large.  We will distinguish three
+  different cases:
+\begin{itemize}
+\item{$|k| \leq 35$}
+  All terms must be computed. We have $ch_{hi} + ch_{lo} = \widehat{\cosh(\widehat{x})}(1+\relerr{ch})$, where $|\relerr{ch}| \leq \maxrelerr{ch} = 7.66e-19$
+\item{$k > 35$}
+  In this case, the terms corresponding to $e^{-x}$  are neglected, with an error smaller than $2^{-68}$. We have $ch_{hi} + ch_{lo} = \widehat{\cosh(\widehat{x})}(1+\relerr{ch})$, where $|\relerr{ch}| \leq \maxrelerr{ch} = 7.69e-19$
+\item{$k < -35$}
+  This case is symmetric to the previous one, we just have to remplace k by -k.
+\end{itemize}
+\end{itemize} 
+
+\subsection{Details of computer program}
+
+The procedures \texttt{cosh\_quick} and \texttt{sinh\_quick} contain the computation respectively shared by the 
+functions \texttt{cosh\_rn}, \texttt{cosh\_ru}, \texttt{cosh\_rd} and \texttt{cosh\_rz} in one hand, and by the 
+functions \texttt{sinh\_rn}, \texttt{sinh\_ru}, \texttt{sinh\_rd} and \texttt{sinh\_rz} in the other hand.
+The eight functions \texttt{cosh\_rX} and \texttt{sinh\_rX} call \texttt{cosh\_quick} or \texttt{sinh\_quick} with an integer which represent the choosen rounding mode.
+We will begin to prove the cosh function, and then we will prove the sinh function. Since both functions share a lot a code, only the different part between cosh and sinh will be proven for the sinh. 
+
+\subsubsection{Exceptional cases and argument reduction}
+
+This part  is shown for \texttt{cosh\_rn}, but it is quite identical for the three other functions.
+
+\begin{lstlisting}[caption={Exceptional cases},firstnumber=1]
+
+ double cosh_rn(double x){ 
+  db_number y;
+  y.d = x;
+  y.i[HI] = y.i[HI] & 0x7FFFFFFF;     /* to get the absolute value of the input */
+  if (y.d > max_input_ch.d) { /* out of range */
+    y.i[LO] = 0; y.i[HI] = 0x7FF00000; return (y.d);
+  }
+  if ((y.i[HI] & 0x7FF00000) >= (0x7FF00000)) {    /*particular cases : QNaN, SNaN, +- oo*/
+   return (y.d);
+  }
+  return(cosh_quick(x, RN));
+}
+\end{lstlisting}
+
+\begin{tabular}{ll}
+Lines  3 &  Initialize y\\
+Line 4 & Get the absolute value of y by removing the first bit.\\
+Line 5 & Test if $\cosh(|x|) = \cosh(x)$ is representable as a double.\\
+Line 6 & If this test is true, we must return $\infty$.\\
+Line 8 & Test if $|x|$ is a special case, like NaN or $\infty$\\
+Line 9 & If this test is true, we must return $|x|$ \\
+Line 11 & $x$ is a correct input, we can return cosh\_quick. \\
+\end{tabular}
+
+
+
+\subsubsection{Procedure cosh\_quick}
+
+\begin{lstlisting}[caption={Procedure \texttt{cosh\_quick} - variables},firstnumber=1]
+
+ double cosh_quick(double x, int rounding_mode){
+
+  /*some variable declarations */
+  int k;
+  db_number y;
+  double res_hi, res_lo;
+  double ch_hi, ch_lo, sh_hi, sh_lo;/* cosh(x) = (ch_hi + ch_lo)*(cosh(k*ln(2)) + (sh_hi + sh_lo)*(sinh(k*ln(2))) */
+  db_number  table_index_float;
+  int table_index;
+  double temp_hi, temp_lo, temp;/* some temporary variables */
+  double b_hi, b_lo,b_ca_hi, b_ca_lo, b_sa_hi, b_sa_lo;
+  double ca_hi, ca_lo, sa_hi, sa_lo; /*will be the tabulated values */
+  double tcb_hi, tsb_hi; /*results of polynomial approximations*/
+  double square_y_hi;
+  double ch_2_pk_hi, ch_2_pk_lo, ch_2_mk_hi, ch_2_mk_lo;
+  double sh_2_pk_hi, sh_2_pk_lo, sh_2_mk_hi, sh_2_mk_lo;
+  db_number two_p_plus_k, two_p_minus_k; /* 2^(k-1) + 2^(-k-1) */
+  db_number absyh, absyl, u53, u;
+
+\end{lstlisting}
+
+Here there are all the variables which will be used in the code.
+
+\subsubsection{First range reduction}
+
+\begin{lstlisting}[caption={Procedure \texttt{cosh\_quick} - first range reduction},firstnumber=19]
+
+  /* Now we can do the first range reduction*/
+  DOUBLE2INT(k, x * inv_ln_2.d)
+    if (k != 0){ /* b_hi+b_lo =  x - (ln2_hi + ln2_lo) * k */
+      temp_hi = x - ln2_hi.d * k;                                         
+      temp_lo = -ln2_lo.d * k;                                          
+      Add12Cond(b_hi, b_lo, temp_hi, temp_lo); 
+    }
+    else {                                                         
+      b_hi = x;  b_lo = 0.;
+    }                                                               
+\end{lstlisting}
+
+\begin{tabular}{ll}
+Line 20 & Put in k the closest integer of x * inv\_ln\_2. \\
+        & We use the property of DOUBLE2INT that convert a floating-point number in rouding to nearest mode. \\
+        & By its definition, $k$ satisfies the following properties:\\
+        &  $\lfloor x \times inv\_ln2 \rfloor \leq k \leq \lceil x \times inv\_ln2\rceil$ \\
+        & $|k| \leq \frac{x}{2} \times inv\_ln2$ \\
+        & since $|x| \leq 710.475...$, we have $|k| \leq 1025$, so $k$ is coded on at most 11 bits. \\
+Line 21 & First case : $k \neq 0$ \\
+        & We have by contruction : $ln2_{hi} + ln2_{lo} = \ln(2) + \abserr{repr\_ln2}$, where $|\abserr{repr\_ln2}| \leq \maxabserr{repr\_ln2} = 1.95e-31$.\\
+        & the last 11 bits of $ln_{hi}$ are set to zero by its construction \\
+Line 22 & the $ln2_{hi}  k$ product is exact since $k$ is coded on at most 11 bits and the last 11 bits of $ln2_{hi}$ are zeros \\
+        & we have to use the properties verified by $k$: $x  inv\_ln2 - 1 \leq k \leq x  inv\_ln2 + 1$\\
+        & if $x \geq 0$ \\
+        & we have $ k \geq 1$ and then $x \geq \frac{\ln(2)}{2}$, so $(x  inv\_ln2 + 1)ln2_{hi} \leq 2 x$\\
+        & since $|k| \leq \frac{x}{2} \times inv\_ln2$, we have $\frac{x}{2} \leq (x  inv\_ln2 - 1)ln2_{hi}$\\
+        & and then we have $\frac{x}{2} \leq k  ln2_{hi} \leq 2 x$\\
+        & we can apply the Sterbenz theorem to prove that the result of this line is exact\\
+        & if $x \leq 0$\\
+        & we can use the same reasoning and then apply the Sterbenz theorem\\
+        & and this line of code is always exact. \\
+Line 23 & this product is not exact, we can loose at most 11 bits of precision\\
+        & there is an error of $\abserr{round}$ which satisfies $|\abserr{round}|\leq \maxabserr{round} = 3.15e-30$ on $ln2_{lo}$ \\
+        & so a bound to the maximal absolute error is $k_{max} \maxabserr{round}$\\
+Line 24 & We do an Add12 to have well-aligned double doubles in $b_{hi}$ and $b_{lo}$\\
+        & The conditionnal version is used since temp\_hi  can be zero if $x$ is very close to $k ln(2)$.\\
+        & The total absolute error is bounded by $\maxabserr{b} = 3.43e-27$ \\
+Line 27 & We have $k = 0$. We needn't to do any reduction, so $b_{hi} + b_{lo} = x$ exactly.\\
+\end{tabular}
+
+At this stage, we have $b_{hi} + b_{lo} = \widehat{y} + \abserr{b}$, where $|\abserr{b}| \leq \maxabserr{b} = 3.43e-24$. Now we will write $y = a + b$, where $a = 2^{-8}  index$. 
+
+\subsubsection{Second range reduction}
+
+\begin{lstlisting}[caption={Procedure \texttt{cosh\_quick} - second range reduction},firstnumber=29]
+
+  /*we'll construct 2 constants for the last reconstruction */
+  two_p_plus_k.i[LO] = 0;
+  two_p_plus_k.i[HI] = (k-1+1023) << 20;
+  two_p_minus_k.i[LO] = 0;
+  two_p_minus_k.i[HI] = (-k-1+1023) << 20;
+
+  /* at this stage, we've done the first range reduction : we have b_hi + b_lo  between -ln(2)/2 and ln(2)/2 */
+  /* now we can do the second range reduction */
+  /* we'll get the 8 leading bits of b_hi */
+  table_index_float.d = b_hi + two_43_44.d;
+  /*this add do the float equivalent of a rotation to the right, since -0.5 <= b_hi <= 0.5*/
+  table_index = LO(table_index_float.d);/* -89 <= table_index <= 89 */
+  table_index_float.d -= two_43_44.d;
+  table_index += bias; /* to have only positive values */
+  b_hi -= table_index_float.d;/* to remove the 8 leading bits*/
+  /* since b_hi was between -2^-1 and 2^1, we now have b_hi between -2^-9 and 2^-9 */  
+\end{lstlisting}
+
+\begin{tabular}{ll}
+Line 30-33 & Put in \texttt{two\_p\_plus\_k} and \texttt{two\_p\_minus\_k} the exact values of $2^{k-1}$ and $2^{-k-1}$.\\
+Line 38-44 & The goal of the second range reduction is to write $y$ as $y = index  2^{-8} + b$ \\
+           & We have $|y| \leq \frac{ln(2)}{2} \leq \frac{1}{2}$ \\
+           & so $2^{44} \leq 2^{44} + 2^{43} + y \leq 2^{44} + 2^{43} + 2^{42}$ \\
+           & since the mantissa counts 53 bits, only the part above $2^{-8}$ si kept in table\_index\_float\\
+           & It is easy to show that we have $-89 \leq table\_index \leq 89$ \\
+           & so we can add $bias = 89$ to $table\_index$ to have only positive values. \\
+           & then we remove this bits of $y$ to obtain the final $b = b_{hi} + b_{lo}$ \\
+           & all these operations are exact, so the final absolute error doesn't increase \\
+
+\end{tabular}
+
+
+\subsubsection{Polynomial evaluation - First reconstruction}
+
+\begin{lstlisting}[caption={Procedure \texttt{cosh\_quick} - polynomial evaluation - first reconstruction},firstnumber=45]
+  y.d = b_hi;
+  /*   first, y�  */
+  square_b_hi = b_hi * b_hi;
+  /* effective computation of the polynomial approximation */
+  
+  if (((y.i[HI])&(0x7FFFFFFF)) < (two_minus_30.i[HI])) {
+    tcb_hi = 0;
+    tsb_hi = 0;
+  }
+  else {
+    /*   second, cosh(b) = b� * (1/2 + b� * (1/24 + b� * 1/720)) */
+    tcb_hi = (square_b_hi)* (c2.d + square_b_hi * (c4.d + square_b_hi * c6.d));
+    tsb_hi = square_b_hi * (s3.d + square_b_hi * (s5.d + square_b_hi * s7.d));
+  }
+ 
+
+  if( table_index != bias) {
+    /* we get the tabulated the tabulated values */
+    ca_hi = cosh_sinh_table[table_index][0].d;
+    ca_lo = cosh_sinh_table[table_index][1].d;
+    sa_hi = cosh_sinh_table[table_index][2].d;
+    sa_lo = cosh_sinh_table[table_index][3].d;
+    
+    /* first reconstruction of the cosh (corresponding to the second range reduction) */
+    Mul12(&b_sa_hi,&b_sa_lo, sa_hi, b_hi);
+    temp =  ((((((ca_lo + (b_hi * sa_lo)) + b_lo * sa_hi) + b_sa_lo) + (b_sa_hi * tsb_hi)) + ca_hi * tcb_hi) + b_sa_hi);
+    Add12Cond(ch_hi, ch_lo, ca_hi, temp);
+      /* first reconstruction for the sinh (corresponding to the second range reduction) */
+  }
+  else {
+    Add12Cond(ch_hi, ch_lo, (double) 1, tcb_hi);
+  }
+  
+  
+\end{lstlisting}
+
+\begin{tabular}{ll}
+Line 45 & Put in $y$ the value of $b_{hi}$, so we can use its hexadecimal aspect \\
+Line 47    & Put $b^2$ in $square\_b_{hi}$. We have $square\_b_{hi} = \widehat{b} + \abserr{square\_b}$, where $|\abserr{square\_b}| \leq \maxabserr{square\_b} = 4.23e-22$ \\
+Line 50    & Match $b_{hi}$ and then $b$ with $2^{-40}$\\
+Line 51-52 & If $|b| \leq 2^{-40}$, we will have $|tcb|,[tsb| \leq \maxabserr{square\_b}$, so we can directly set $tcb$ and $tsb$ to zero: \\
+           & converning the mathematical values, we have $|\widehat{tcb}|, |\widehat{tsb}| \leq 2^{-24}$. \\
+           & We can avoid by this way any problem with subnormal numbers. \\
+Line 55-56 & Polynomial evaluation of $\cosh(x)-1$ and $\frac{\sinh(x)}{x}-1$, following the H�rner scheme. \\
+           & A maple procedure is used to compute the error on this computations\\
+           & There are 2 reasons for the total error :\\
+           & the effective computations, since all operations are done with 53 bits of precision.\\
+           & the mathematical approximation, since we use polynoms \\
+           & finally, we have $tcb = \widehat{\cosh(\widehat{b}-1)} + \abserr{tcb}$, where $|\abserr{tcb}| \leq \maxabserr{tcb} = 6.35e-22$, \\
+           & and $tsb = \widehat{(\frac{\sinh(\widehat{b})}{\widehat{b}}-1)} + \abserr{tsb}$, where $|\abserr{tsb}| \leq \maxabserr{tsb} = 1.11e-21$ \\
+Line 60    & If $y$ is very close to $0$, we have the 8 bits of the second range reduction which are null \\
+Line 62-65 & We get tabulated values for $\cosh(a)$ and $\sinh(a)$. They are tabulated as double doubles: \\
+           & we have $ca_{hi} + ca_{lo} = \widehat{\cosh(\widehat{a})} + \abserr{ca}$, where $|\abserr{ca}| \leq \maxabserr{ca} = 6.08e-33$, \\
+           & and $sa_{hi} + sa_{lo} = \widehat{\sinh(\widehat{a})} + \abserr{sa}$, where $|\abserr{sa}| \leq \maxabserr{sa} = 1.47e-33$, \\
+Line 68    & $b\_sa_{hi} + b\_sa_{lo} = sa_{hi}  b_{hi}$. This product is exact. \\
+Line 69-70 & it is the reconstruction : $\cosh(y) = \cosh(a)(1+tcb) + \sinh(a)b(1+tsb)$ \\
+           & A maple procedure is used to compute the error done in this reconstruction. \\
+           & We have $ch_{hi}+ch_{lo} = \widehat{\cosh(\widehat{y})} + \abserr{cosh1}$, where $|\abserr{cosh1}| \leq \maxabserr{cosh1} = 2.39e-20$\\
+Line 75    & If $y$ is very close to $0$, we have $a = 0$ and $\cosh(y) = \cosh(b) = 1 + tcb$. \\
+           & This addition is exact, so no error is introduced. \\
+           & We have $ch_{hi}+ch_{lo} = \widehat{\cosh(\widehat{y})} + \abserr{cosh0}$, where $|\abserr{cosh0}| \leq \maxabserr{cosh0} = 6.35e-22$\\
+\end{tabular}
+
+
+\subsubsection{Second reconstruction}
+
+\begin{lstlisting}[caption={Procedure \texttt{cosh\_quick} - reconstruction},firstnumber=77]
+  if(k != 0) {
+    if( table_index != bias) {
+      /* first reconstruction for the sinh (corresponding to the second range reduction) */
+      Mul12(&b_ca_hi , &b_ca_lo, ca_hi, b_hi);
+      temp = (((((sa_lo + (b_lo * ca_hi)) + (b_hi * ca_lo)) + b_ca_lo) + (sa_hi*tcb_hi)) + (b_ca_hi * tsb_hi));
+      Add12(temp_hi, temp_lo, b_ca_hi, temp);
+      Add22Cond(&sh_hi, &sh_lo, sa_hi, (double) 0, temp_hi, temp_lo);
+    }
+    else {
+      Add12Cond(sh_hi, sh_lo, b_hi, tsb_hi * b_hi + b_lo);
+    }
+    if((k < 35) && (k > -35) )
+      {
+        ch_2_pk_hi = ch_hi * two_p_plus_k.d;
+        ch_2_pk_lo = ch_lo * two_p_plus_k.d;
+        ch_2_mk_hi = ch_hi * two_p_minus_k.d;
+        ch_2_mk_lo = ch_lo * two_p_minus_k.d;
+        sh_2_pk_hi = sh_hi * two_p_plus_k.d;
+        sh_2_pk_lo = sh_lo * two_p_plus_k.d;
+        sh_2_mk_hi = -1 * sh_hi * two_p_minus_k.d;
+        sh_2_mk_lo = -1 * sh_lo * two_p_minus_k.d;
+        
+        Add22Cond(&res_hi, &res_lo, ch_2_mk_hi, ch_2_mk_lo, sh_2_mk_hi, sh_2_mk_lo);
+        Add22Cond(&ch_2_mk_hi, &ch_2_mk_lo , sh_2_pk_hi, sh_2_pk_lo, res_hi, res_lo);
+        Add22Cond(&res_hi, &res_lo, ch_2_pk_hi, ch_2_pk_lo, ch_2_mk_hi, ch_2_mk_lo);
+      } 
+    else if (k >= 35) 
+      {
+        ch_2_pk_hi = ch_hi * two_p_plus_k.d;
+        ch_2_pk_lo = ch_lo * two_p_plus_k.d;
+        sh_2_pk_hi = sh_hi * two_p_plus_k.d;
+        sh_2_pk_lo = sh_lo * two_p_plus_k.d;
+        Add22Cond(&res_hi, &res_lo, ch_2_pk_hi, ch_2_pk_lo, sh_2_pk_hi, sh_2_pk_lo);
+      }
+    else /* if (k <= -35) */
+      {
+        ch_2_mk_hi = ch_hi * two_p_minus_k.d;
+        ch_2_mk_lo = ch_lo * two_p_minus_k.d;
+        sh_2_mk_hi = -1 * sh_hi * two_p_minus_k.d;
+        sh_2_mk_lo = -1 * sh_lo * two_p_minus_k.d;
+        Add22Cond(&res_hi, &res_lo, ch_2_mk_hi, ch_2_mk_lo, sh_2_mk_hi, sh_2_mk_lo);
+      }
+  }
+  else {
+    res_hi = ch_hi;
+    res_lo = ch_lo;
+  }
+
+\end{lstlisting}
+
+\begin{tabular}{ll}
+Line 77    & Test if $k = 0$ or not \\
+Line 78-87 & We have $k \neq 0$, so we must compute $\sinh(y)$ \\
+           & This computation is done like the computation of $\cosh(h)$ \\
+           & We can use an Add12 (instead of Add12Cond) since $b_{hi}  ca_{hi} \geq  temp$ \\
+           & A maple script gives $\sinh(y) = \widehat{\sinh(\widehat{y})} + \abserr{sinh1}$, where $|\abserr{sinh1}| \leq  \maxabserr{sinh1} = 1.09e-22$ \\
+
+           & and $|\abserr{sinh1}| \leq  \maxabserr{sinh0} = 5.4e-20$ (when $\sinh(a) = 0$) \\
+Line 89    & We have $k\neq 0$, and $|k| \leq 35$ \\
+Line 91-98 & we multiply $\sinh(y)$ and $\cosh(y)$ by powers of 2, so these products are exact \\
+Line 100-102 & A maple script is used to compute the error: \\
+             & We have $ch_{hi} + ch_{lo} = \widehat{\cosh(\widehat{x})}(1+\relerr{ch})$, where $|\relerr{ch}| \leq \maxrelerr{ch} = 7.66e-19$ \\
+Line 104   & $k \geq 35$ \\
+Line 106-109 & we multiply $\sinh(y)$ and $\cosh(y)$ by powers of 2, so these products are exact \\
+           & Some terms are not computed, since they are too little \\
+Line 110   &  A maple script is used to compute the error: \\
+             & We have $ch_{hi} + ch_{lo} = \widehat{\cosh(\widehat{x})}(1+\relerr{ch})$, where $|\relerr{ch}| \leq \maxrelerr{ch} = 7.69e-19$ \\
+Line 112   & $k \leq -35$ \\
+Line 114-118 & this case is symmetric to the previous one. \\
+           & We also have $ch_{hi} + ch_{lo} = \widehat{\cosh(\widehat{x})}(1+\relerr{ch})$, where $|\relerr{ch}| \leq \maxrelerr{ch} = 7.69e-19$ \\
+Line 121   & we now have $k = 0$ \\
+           & Since we have $1 \leq \cosh(x)$, we have  $\maxrelerr{ch} \leq max(\maxabserr{cosh0},\maxabserr{cosh1}) = 2.39e-20$ \\
+\end{tabular}
+
+At this, stage, we have $ch_{hi} + ch_{lo} = \widehat{\cosh(\widehat{x})}(1+\relerr{ch})$, where  $|\relerr{ch}| \leq \maxrelerr{ch} = 7.69e-19 = 2^{-60.17}$ .
+
+
+\subsection{Rounding}
+
+\subsubsection{Rounding to the nearest}
+
+The code for rounding is strictly identical to that of
+Theorem~\ref{th:roundingRN1}.  The condition to this theorem that
+$\mathtt{res\_hi}\ge 2^{-1022+53}$ is ensured by the image domain of
+the $\cosh$, since $\cosh(x) \geq 1$. The rounding constant
+
+\subsection{Directed rounding}
+Here again, the code is strictly identical to that of
+Theorem~\ref{th:roundingDirected}, and the conditions to this theorem
+are ensured by the image domain of the cosh.
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Accurate phase}
+
+It is reminded that correct rounding requires an intermediate accuracy
+of $2^{-142}$ for $\cosh$ and $2^{-126}$ for $\sinh$. The
+triple-double exponential function in \texttt{crlibm} is sufficiently
+accurate for computing the $\cosh$, using the equation
+ $$\cosh(x) = \frac{e^x +  e^{-x}}{2}\quad.$$
+
+ For $\sinh$, we use the \texttt{expm1} triple-double implementation:
+ This is more accurate around $0$, as the following equation shows:
+ $$\sinh(x) = \frac{e^x -  e^{-x}}{2}\quad = \frac{(e^x-1) -  (e^{-x}-1)}{2}\quad .$$
+
+ As already noted, the $e^{-x}$ term is optimised out for large
+ arguments. Indeed, for $|x|>40$ we have $e^{-x}<2^{-115}e^x$,
+ therefore the relative error due to neglecting $e^{-x}$ is much
+ smaller than the worst case accuracy required to decide rounding,
+ which is smaller than $2^{-111}$ for both functions in this range.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Analysis of cosh performance}
+\label{section:cosh_results}
+The input numbers for the performance tests given here are random
+positive double-precision numbers with a normal distribution on the
+exponents. More precisely, we take random 63-bit integers and cast
+them into double-precision numbers.  
+
+
+In average, the second step is taken in 0.13\% of the calls.
+
+
+\subsection{Speed}
+Table \ref{tbl:cosh_abstime} (produced by the \texttt{crlibm\_testperf}
+executable) gives absolute timings for a variety of processors and
+operating systems.  
+
+\begin{table}[!htb]
+\begin{center}
+\renewcommand{\arraystretch}{1.2}
+\begin{tabular}{|l|r|r|r|}
+\hline
+ \multicolumn{4}{|c|}{Pentium III / Linux 2.6 / gcc 4.0}   \\ 
+ \hline
+ \hline
+                             & min time          & avg time     & max time        \\ 
+ \hline
+ default \texttt{libm}          & 242           &        272    & 304      \\ 
+ \hline
+ \texttt{crlibm}                & 212           &        344    & 2639      \\ 
+ \hline
+ \hline
+\end{tabular}
+\end{center}
+\caption{Absolute timings for the hyperbolic cosine
+  \label{tbl:cosh_abstime}}
+\end{table}
+
+Contributions to this table for new processors/OS/compiler combinations are welcome.
+
+
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
diff --git a/src/crlibm/docs/latex/elem-fun.bib b/src/crlibm/docs/latex/elem-fun.bib
new file mode 100644
index 0000000..bae7ef2
--- /dev/null
+++ b/src/crlibm/docs/latex/elem-fun.bib
@@ -0,0 +1,1431 @@
+
+ at BOOK{Baker75,
+  author = {A. Baker},
+  year = 1975,
+  title = {Transcendental Number Theory},
+  publisher = {Cambridge University Press}
+} 
+
+ at Article{Ng1992,
+  author =       "K. C. Ng",
+  title =        "Argument Reduction for Huge Arguments: Good to the
+                 Last Bit",
+  journal =      "SunPro",
+  day =          "13",
+  month =        jul,
+  year =         "1992",
+  bibdate =      "Thu Sep 1 10:16:08 1994",
+  bibsource =    "ftp://garbo.uwasa.fi/pc/doc-soft/fpbibl18.zip",
+  note =         "Work in progress."
+}
+
+ at TechReport{AMDoptim2001,
+  author = 	 {AMD},
+  title = 	 {{AMD} Athlon Processor {x86} Code Optimization Guide},
+  institution =  {Advanced Micro Devices,inc},
+  year = 	 2001
+}
+
+ at article{Car59,
+  author =	 {Carr, J. W. },
+  journal =	 {Communications of the ACM},
+  number =	 5,
+  pages =	 {10-16},
+  title =	 {Error analysis in floating point arithmetic},
+  volume =	 2,
+  year =	 1959,
+  url = {http://delivery.acm.org/10.1145/370000/368329/p10-carr.pdf}
+}
+
+
+
+ at InCollection{Gal86,
+  author = 	 {S. Gal},
+  title = 	 {Computing elementary functions: A new approach for achieving high accuracy and good performance},
+  booktitle = 	 {Accurate Scientific Computations, LNCS 235},
+  pages =	 {1-16},
+  publisher =	 {Springer Verlag},
+  year =	 1986
+}
+
+ at ARTICLE{KarOfm62,
+  author =	 {Karatsuba, A. and Ofman, Y.},
+  JOURNAL =	 {Doklady Akademii Nauk SSSR},
+  TITLE =	 {Multiplication of multidigit numbers on automata},
+  NUMBER =	 {2},
+  PAGES =	 {293-294},
+  VOLUME =	 {145},
+  YEAR =	 {1962},
+  CRINDEX =	 {Traduit}
+}
+
+
+ at ARTICLE{Brent78,
+  AUTHOR =       {Richard P. Brent},
+  JOURNAL =      {ACM Transactions on Mathematical Software},
+  NUMBER =       1,
+  PAGES =        {57-70},
+  TITLE =        {A {Fortran} multiple-precision arithmetic package},
+  VOLUME =       4,
+  YEAR =         1978
+}
+
+
+
+ at Article{Bernstein86,
+  AUTHOR =	 {R. Bernstein},
+  TITLE =	 {Multiplication by Integer Constants},
+  JOURNAL =	 {Software -- Practice and Experience},
+  VOLUME =	 {16},
+  NUMBER =	 {7},
+  PAGES =	 {641--652},
+  MONTH =	 jul,
+  YEAR =	 {1986}
+}
+
+ at ARTICLE{DM94,
+  AUTHOR =	 {Das Sarma, D.  and  Matula, D. W.},
+  JOURNAL =	 {IEEE Transactions on Computers},
+  MONTH =	 Aug,
+  NUMBER =	 {8},
+  PAGES =	 {932-940},
+  TITLE =	 {Measuring the Accuracy of {ROM} Reciprocal Tables},
+  VOLUME =	 {43},
+  YEAR =	 {1994},
+  KEYWORDS =	 {division}
+}
+ at ARTICLE{Bailey95,
+  author =	 {David H. Bailey},
+  JOURNAL =	 {ACM Transactions on Mathematical Software},
+  NUMBER =	 {4},
+  PAGES =	 {379-387},
+  TITLE =	 {A {Fortran}-90 based multiprecision system},
+  VOLUME =	 {21},
+  YEAR =	 {1995},
+  CRINDEX =	 {Fichier},
+  url =
+                  {http://science.nas.nasa.gov/Pubs/TechReports/RNRreports/dbailey/RNR-94-013/RNR-94-013.ps}
+}
+
+
+ at Misc{GMPweb,
+  title = 	 {{GMP}, the {GNU} Multi-Precision Library},
+  key = {GMP},
+  howpublished = {{\tt http://swox.com/gmp/}}
+}
+
+ at Misc{MPFRweb,
+  title = 	 {{MPFR}},
+  key = {MPFR},
+  howpublished = {{\tt http://www.mpfr.org/}}
+}
+
+ at Misc{IBMlibultimweb,
+  title = 	 {{IBM} {Accurate} {Portable} {Math.} {Library}},
+  key = {LibUltim},
+  howpublished = {{\tt http://oss.software.ibm.com/mathlib/}}
+}
+
+ at Misc{FDLIBMweb,
+  title = 	 {Sun {Freely Distributable LIBM}},
+  howpublished = {{\tt http://www.netlib.org/fdlibm/}}
+}
+
+
+ at Misc{IntelOpenSource,
+  title = 	 {Open Source from {Intel}},
+  howpublished = {{\tt http://www.intel.com/software/products/opensource/}}
+}
+
+
+
+
+ at inproceedings{Daumas98,
+  author =       {Marc Daumas},
+  title =        {Expansions: lightweight multiple precison
+                  arithmetic},
+  booktitle =    {Architecture and Arithmetic Support for Multimedia},
+  address =      {Dagstuhl, Germany},
+  year =         {1998},
+  url =
+                  {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR98/RR98-39.ps.Z}
+}
+
+ at ARTICLE{DauFin99a,
+        AUTHOR             = {Marc Daumas and Claire Finot},
+        NUMBER             = {6},
+        VOLUME             = {5},
+        PAGES              = {323-338},
+        JOURNAL            = {Journal of Universal Computer Science},
+        TITLE              = {Division of floating point expansions with an application to the computation of a determinant},
+        YEAR               = {1999},
+        CRINDEX            = {Fichier},
+        LOCATION           = {http://www.iicm.edu/jucs_5_6/division_of_floating_point/paper.pdf}
+}
+
+ at INPROCEEDINGS{DauMor2K,
+        AUTHOR             = {Marc Daumas and Claire Moreau-Finot},
+        ADDRESS            = {Dagstuhl, Germany},
+        BOOKTITLE          = {Real Numbers and Computers},
+        PAGES              = {61-74},
+        TITLE              = {Exponential: implementation trade-offs for hundred bit precision},
+        CRINDEX            = {Livre, Fichier},
+        YEAR               = {2000}
+}
+
+ at TECHREPORT{DefDinMul01,
+  author = {D. Defour and F. de~Dinechin and J.M. Muller},
+  month = {July},
+  year = 2001,
+  title = {Correctly Rounded Exponential Function in Double Precision Arithmetic},
+  number = {RR2001-26},
+  note = {Available at ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2001/RR2001-26.ps.Z},
+  institution = {LIP, \'Ecole Normale Sup\'erieure de Lyon},
+}
+
+ at TECHREPORT{Defour02,
+  author = {D. Defour},
+  month = oct,
+  year = 2002,
+  title = {Cache-Optimised Methods for the Evaluation of Elementary Functions},
+  number = {RR2002-38},
+  note = {Available at ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2002/RR2002-38.ps.Z},
+  institution = {LIP, \'Ecole Normale Sup\'erieure de Lyon},
+}
+
+
+
+ at ARTICLE{Dek71,
+        AUTHOR             = {Theodorus J. Dekker},
+        JOURNAL            = {Numerische Mathematik},
+        NUMBER             = {3},
+        PAGES              = {224-242},
+        TITLE              = {A floating point technique for extending the available precision},
+        VOLUME             = {18},
+        YEAR               = {1971},
+        CRINDEX            = {Classeur}
+}
+
+ at INPROCEEDINGS{Far81,
+  author = {P.~M. Farmwald},
+  editor = {K.~S. Trivedi and D.~E. Atkins},
+  year = 1981,
+  title = {High Bandwidth Evaluation of Elementary Functions},
+  booktitle = {Proceedings of the 5th IEEE Symposium on Computer Arithmetic},
+  publisher = {IEEE Computer Society Press, Los Alamitos, CA},
+  key = {Far81}
+}
+
+ at ARTICLE{Gol91,
+  author = {D. Goldberg},
+  month = Mar,
+  year = 1991,
+  title = {What every computer scientist should know about floating-point
+          arithmetic},
+  journal = {ACM Computing Surveys},
+  volume = 23,
+  number = 1,
+  pages = {5-47},
+  keywords = {floating-point arithmetic}
+}
+
+ at techreport{Markstein2001,
+        author = {R.-C. Li and P. Markstein and J. P. Okada and J. W. Thomas},
+        title = {The Libm library and floating-point arithmetic for {HP-UX} on {I}tanium},
+        institution = {{H}ewlett-{P}ackard company},
+        year = {2001},
+        month = {april}
+}
+
+ at ARTICLE{HarKubStoTan99,
+  author = {J. Harrison and T. Kubaska and S. Story and P.T.P. Tang},
+  year = 1999,
+  title = {The Computation of Transcendental Functions on the {IA}-64
+          Architecture},
+  journal = {Intel Technology Journal},
+  volume = {Q4}
+}
+
+ at INPROCEEDINGS{Hassler95,
+  AUTHOR =	 {Hassler, H. and Takagi, N.},
+  ADDRESS =	 {Bath, UK},
+  BOOKTITLE =	 {12th IEEE Symposium on Computer
+                  Arithmetic},
+  EDITOR =	 {S. Knowles and W.H. McAllister},
+  PAGES =	 {10--16},
+  PUBLISHER =	 {IEEE Computer Society Press},
+  TITLE =	 {Function Evaluation by Table Look-up and Addition},
+  YEAR =	 {1995}
+}
+
+ at BOOK{Hwang79,
+  AUTHOR =	 {K. Hwang},
+  PUBLISHER =	 {Wiley, New York},
+  TITLE =	 {Computer Arithmetic Principles, Architecture and
+                  Design},
+  YEAR =	 {1979}
+}
+
+ at BOOK{Knu73,
+  author = {D. Knuth},
+  year = 1973,
+  title = {The Art of Computer Programming},
+  volume = 2,
+  publisher = {Addison Wesley, Reading, MA}
+}
+
+ at BOOK{Kor93,
+  AUTHOR =	 {I. Koren},
+  PUBLISHER =	 {Prentice-Hall},
+  TITLE =	 {Computer arithmetic algorithms},
+  YEAR =	 {1993},
+  KEYWORDS =	 {accuracy control,addition,cordic,division,elementary
+                  functions,exponential,floating-point
+                  arithmetic,logarithm,multiplication,number
+                  systems,redundant number systems,residue number
+                  systems,shift-and-add algorithms,square root,survey
+                  on computer arithmetic,trigonometric functions}
+}
+
+ at INPROCEEDINGS{Arnold89,
+  author = {Arnold, M.G. and Bailey, T.A. and Cowles, J.R. and Cupal, J.J.},
+  title = {Redundant Logarithmic Number Systems},
+  month = sep,
+  year = 1989,
+  booktitle = {Proceedings of the 9th IEEE Symposium on Computer Arithmetic},
+  editor = {Avizienis, Ercegovac and Swartzlander},
+  pages = {144-151},
+  publisher = {IEEE Computer Society Press},
+  address = {Santa Monica}
+}
+
+ at INPROCEEDINGS{Lewis89,
+  author = {Lewis, D.M. and Yu, L.K.},
+  title = {Algorithm Design for a 30 bit Integrated Logarithmic Processor},
+  month = sep,
+  year = 1989,
+  booktitle = {Proceedings of the 9th IEEE Symposium on Computer Arithmetic},
+  editor = {Avizienis, Ercegovac and Swartzlander},
+  pages = {192-199},
+  publisher = {IEEE Computer Society Press},
+  address = {Santa Monica}
+}
+
+ at PHDTHESIS{Lef2000,
+  author = {V.~Lef�vre},
+  year = 2000,
+  title = {Moyens arithm\'etiques pour un calcul fiable},
+  school = {\'Ecole Normale Sup\'erieure de Lyon, Lyon, France}
+}
+
+ at INPROCEEDINGS{LefMul2000,
+  author = {V. Lef�vre and J.M. Muller},
+  month = aug,
+  year = 2000,
+  title = {On-the-Fly Range Reduction},
+  booktitle = {{SPIE's} International Symposium on Optical Science and
+              Technology},
+  address = {San Diego}
+}
+
+ at Article{LMT98,
+  AUTHOR =	 {V. Lef\`evre and J.M. Muller and A. Tisserand},
+  JOURNAL =	 {IEEE Transactions on Computers},
+  MONTH =	 nov,
+  NUMBER =	 {11},
+  PAGES =	 {1235--1243},
+  TITLE =	 {Towards Correctly Rounded Transcendentals},
+  VOLUME =	 {47},
+  YEAR =	 {1998},
+  KEYWORDS =	 {table maker's dilemma,elementary
+                  functions,rounding,floating-point arithmetic}
+}
+
+ at Article{Lewis94,
+  AUTHOR =	 {Lewis, D.M.},
+  JOURNAL =	 {IEEE Transactions on Computers},
+  MONTH =	 aug,
+  NUMBER =	 {8},
+  PAGES =	 {974-982},
+  TITLE =	 {Interleaved Memory Function Interpolators with Application to an Accurate {LNS} Arithmetic Unit},
+  VOLUME =	 {43},
+  YEAR =	 {1994}
+}
+
+ at TechReport{Lefevre99b,
+  AUTHOR =	 {V. Lef\`evre},
+  TITLE =	 {Multiplication by an Integer Constant},
+  ADDRESS =	 {Lyon, France},
+  INSTITUTION =	 {Laboratoire d'Informatique du Parall\'elisme},
+  TYPE =	 {{LIP} research report},
+  NUMBER =	 {RR1999-06
+                  (\texttt{ftp://ftp.ens-lyon.fr/pub/LIP�/Rapports/�RR/�RR1999/�RR1999-06.ps.Z})},
+  YEAR =	 {1999},
+  KEYWORDS =	 {multiplication,addition chains}
+}
+ at BOOK{Map91,
+  author = {B.~W. Char and K.~O. Geddes and G.~H. Gonnet and B.~L. Leong and
+           M.~B. Monagan and S.~M. Watt},
+  year = 1991,
+  title = {Maple V Library Reference Manual},
+  publisher = {Springer Verlag},
+  address = {Berlin, Germany},
+  key = {Map91},
+  issn_isbn = {3-540-97592-6}
+}
+
+ at INPROCEEDINGS{Mehendale95,
+  AUTHOR =	 {Mahesh Mehendale and S. D.Sherlekar and G. Venkatesh
+                  },
+  TITLE =	 {Synthesis of multiplier-less {FIR} filters with
+                  minimum number of additions},
+  BOOKTITLE =	 {IEEE/ACM International Conference on Computer-Aided
+                  Design},
+  PAGES =	 {668-671},
+  ADDRESS =	 {San Jose, CA USA},
+  MONTH =	 nov,
+  YEAR =	 {1995}
+}
+
+ at INPROCEEDINGS{Mehendale96,
+  AUTHOR =	 {Mahesh Mehendale and G. Venkatesh and S.D.Sherleka},
+  TITLE =	 {Optimized code generation of multiplication-free
+                  linear transforms},
+  BOOKTITLE =	 {ACM IEEE Design Automation Conference },
+  PAGES =	 {41},
+  ADDRESS =	 {Las Vegas, NV USA},
+  MONTH =	 nov,
+  YEAR =	 {1996}
+}
+ at INPROCEEDINGS{Potkonjak94,
+  AUTHOR =	 {M. Potkonjak and M.B. Srivastava and
+                  A. Chandrakasan},
+  TITLE =	 {Efficient substitution of multiple constant
+                  multiplications by shifts and additions using
+                  iterative pairwise matching},
+  BOOKTITLE =	 {ACM IEEE Design Automation Conference },
+  PAGES =	 {189-194},
+  ADDRESS =	 {San Diego, CA USA},
+  MONTH =	 jun,
+  YEAR =	 {1994}
+}
+ at INPROCEEDINGS{Pri91,
+  author = {D.~M. Priest},
+  editor = {P. Kornerup and D.~W. Matula},
+  month = {June},
+  year = 1991,
+  title = {Algorithms for arbitrary precision floating point arithmetic},
+  booktitle = {Proceedings of the 10th IEEE Symposium on Computer Arithmetic
+              (Arith-10)},
+  pages = {132-144},
+  publisher = {IEEE Computer Society Press, Los Alamitos, CA},
+  address = {Grenoble, France},
+  keywords = {accuracy control,floating-point arithmetic},
+  location = {}
+}
+ at INPROCEEDINGS{SS97,
+  AUTHOR =	 {M.J. Schulte and J.E. Stine},
+  BOOKTITLE =	 {Proceedings of the 13th IEEE Symposium on Computer
+                  Arithmetic},
+  LOCATION =	 {Asilomar, CA},
+  EDITOR =	 {T. Lang and J.M. Muller and N. Takagi},
+  KEY =		 {SS97},
+  PUBLISHER =	 {IEEE Computer Society Press},
+  TITLE =	 {Symmetric Bipartite Tables for Accurate Function
+                  Approximation},
+  PAGES =	 {175-183},
+  YEAR =	 {1997}
+}
+ at Article{SS99sbtm,
+  AUTHOR =	 {M.J. Schulte and J.E. Stine},
+  JOURNAL =	 {IEEE Transactions on Computers},
+  MONTH =	 aug,
+  NUMBER =	 {8},
+  PAGES =	 {842-847},
+  TITLE =	 {Approximating Elementary Functions with Symmetric
+                  Bipartite Tables},
+  VOLUME =	 {48},
+  YEAR =	 {1999}
+}
+ at ARTICLE{SS99stam,
+  author =	 { J.E. Stine and M.J. Schulte},
+  year =	 1999,
+  title =	 {The Symmetric Table Addition Method for Accurate
+                  Function Approximation},
+  journal =	 {Journal of VLSI Signal Processing},
+  number =	 2,
+  volume =	 21,
+  pages =	 {167-177}
+}
+ at INPROCEEDINGS{She97,
+        AUTHOR             = {Jonathan R. Shewchuk},
+        BOOKTITLE          = {Discrete and Computational Geometry},
+        PAGES              = {305-363},
+        TITLE              = {Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates},
+        VOLUME             = {18},
+        YEAR               = {1997},
+        CRINDEX            = {Fichier},
+        LOCATION           = {http://link.springer.de/link/service/journals/00454/papers97/18n3p305.pdf},
+        LOCATION.ALT       = {http://www.cs.cmu.edu/afs/cs/project/quake/public/papers/robust-arithmetic.ps}
+}
+ at BOOK{Ste74,
+  author = {P.~H. Sterbenz},
+  year = 1974,
+  title = {Floating point computation},
+  publisher = {Prentice-Hall},
+  address = {Englewood Cliffs, NJ},
+  keywords = {floating-point arithmetic}
+}
+ at INPROCEEDINGS{StoTan99,
+  author = {Shane Story and Ping Tak Peter Tang},
+  month = {April},
+  year = 1999,
+  title = {New Algorithms for Improved Transcendental Functions on {IA}-64},
+  booktitle = {Proceedings of the 14th {IEEE} Symposium on Computer
+              Arithmetic, Adelaide, Australia},
+  pages = {4---11},
+  publisher = {IEEE Computer Society Press}
+}
+ at ARTICLE{Tang89,
+  author = {P.~T.~P.~Tang},
+  month = jun,
+  year = 1989,
+  title = {Table-Driven Implementation of the Exponential Function in {IEEE}
+          Floating-Point Arithmetic},
+  journal = {ACM Transactions on Mathematical Software},
+  volume = 15,
+  number = 2,
+  pages = {144--157},
+  key = {Tan89},
+  keywords = {Elementary functions, exponential}
+}
+ at ARTICLE{Dunham90,
+  author = {Dunham, C. B.},
+  month = oct,
+  year = 1990,
+  title = {Feasability of "perfect" function evaluation},
+  journal = {{SIGNUM} Newsletter},
+  volume = 25,
+  number = 4,
+  pages = {25-26}
+}
+ at INPROCEEDINGS{Tan91,
+  author = {P.~T.~P. Tang},
+  editor = {P. Kornerup and D.~W. Matula},
+  month = {June},
+  year = 1991,
+  title = {Table lookup algorithms for elementary functions and their error
+          analysis},
+  booktitle = {Proceedings of the 10th IEEE Symposium on Computer Arithmetic},
+  pages = {232-236},
+  publisher = {IEEE Computer Society Press, Los Alamitos, CA},
+  address = {Grenoble, France},
+  keywords = {accuracy control,elementary functions,table lookup algorithms},
+  location = {Grenoble, France}
+}
+ at ARTICLE{Tan92,
+  author = {Tang, P.T.P.},
+  month = jun,
+  year = 1992,
+  title = {Table-Driven Implementation of the Exponential Function in {IEEE}
+          Floating-Point Arithmetic},
+  journal = {{ACM} Transactions on Mathematical Software},
+  volume = 18,
+  number = 2,
+  pages = {211--222},
+  key = {Tan92}
+}
+
+ at book{ErcegovacLang94,
+        author={Ercegovac, M. D. and Lang, T.},
+        title={Division and Square Root: Digit-Recurrence Algorithms and
+Implementations},
+        publisher={Kluwer Academic Publishers, Boston},
+        year= 1994
+}
+
+ at ARTICLE{WG94,
+  author = {Wong, W. F. and Goto, E.},
+  month = mar,
+  year = 1994,
+  title = {Fast Hardware-Based Algorithms for Elementary Function Computations
+          Using Rectangular Multipliers},
+  journal = {IEEE Transactions on Computers},
+  volume = 43,
+  number = 3,
+  pages = {278--294},
+  key = {WG94}
+}
+
+ at ARTICLE{WG95,
+        AUTHOR             = {Wong, W.F. and Goto, E.},
+        JOURNAL            = {IEEE Transactions on Computers},
+        MONTH              = mar,
+        NUMBER             = {3},
+        PAGES              = {453--457},
+        TITLE              = {Fast Evaluation of the Elementary Functions in Single Precision},
+        VOLUME             = {44},
+        YEAR               = {1995}
+}
+ at ARTICLE{Ziv91,
+  author = {A.~Ziv},
+  month = sep,
+  year = 1991,
+  title = {Fast evaluation of elementary mathematical functions with correctly
+          rounded last bit},
+  journal = {ACM Transactions on Mathematical Software},
+  volume = 17,
+  number = 3,
+  pages = {410--423}
+}
+
+ at Article{HsiLauDel2000,
+  author =       "Shen-Fu Hsiao and Chun-Yi Lau and Jean-Marc Delosme",
+  month =        jun,
+  year =         "2000",
+  title =        "Redundant Constant-Factor Implementation of
+                 Multi-Dimensional {CORDIC} and Its Application to
+                 Complex {SVD}",
+  journal =      "Journal of VLSI Signal Processing Systems",
+  volume =       "25",
+  number =       "2",
+  pages =        "155--166",
+}
+
+ at Book{Parhami2000,
+  author =       {Parhami, B.},
+  title =        {Computer Arithmetic, Algorithms and Hardware
+                 Designs},
+  year =         2000,
+  publisher =    {Oxford University Press}
+}
+
+ at Article{Coleman2000,
+  AUTHOR =	 {Coleman, J. N. and Chester, E. I.},
+  JOURNAL =	 {IEEE Transactions on Computers},
+  TITLE =	 {Arithmetic on the European Logarithmic Microprocessor}, 
+  MONTH =	 jul,
+  YEAR =	 {2000},
+ VOLUME =	 {49},
+  NUMBER =	 {7},
+  PAGES =	 {702--715}
+}
+
+ at InProceedings{Pineiro2001,
+  author = {Pi\~neiro, J. A. and Bruguera, J. D. and Muller, J.-M.},
+  title = {Faithful Powering Computation Using Table Look-Up and a Fused Accumulation Tree},
+  booktitle =    {15th {IEEE} Symposium on Computer Arithmetic},
+  editor =       {Neil Burgess and Luigi Ciminiera},
+  year =         2001,
+  address =      {Vail, Colorado},
+  month =        Jun,
+  pages = {40-47}
+}
+
+ at InProceedings{CaoWeiCheng2001,
+  author = {J. Cao and  Wei, B.W.Y. and J. Cheng},
+  title = {High-Performance Architectures for Elementary Function Generation},
+  booktitle =    {15th {IEEE} Symposium on Computer Arithmetic},
+  editor =       {Neil Burgess and Luigi Ciminiera},
+  year =         2001,
+  address =      {Vail, Colorado},
+  month =        Jun
+}
+
+ at InProceedings{Pineiro2001b,
+  author = {Pi\~neiro, J.A. and Bruguera, J.D. and Muller, J.-M.},
+  title = {{FPGA} Implementation of a Faithful Polynomial Approximation 
+for  Powering Function Computation},
+  booktitle =    {EuroMicro DSD},
+  year =         2001,
+  address =      {Warszawa, Poland}
+}
+
+ at InProceedings{Bailey2001,
+  author = {Hida, Yozo and Li, Xiaoye S. and Bailey, David H.},
+  title = {Algorithms for Quad-Double Precision Floating-Point Arithmetic},
+  booktitle =    {15th {IEEE} Symposium on Computer Arithmetic},
+  editor =       {Neil Burgess and Luigi Ciminiera},
+  year =         2001,
+  address =      {Vail, Colorado},
+  month =        Jun,
+  pages = {155-162}
+}
+
+ at inproceedings{Lee2002,
+  author =       {Lee, B. and Burgess, N.},
+  title =        {Parameterisable Floating-Point Operators on {FPGA}s},
+  booktitle =    {36th Asilomar Conference on Signals, Systems, and Computers},
+  pages =        {1064-1068},
+  address =      {Pacific Grove, California},
+  year =         2002
+}
+
+ at InProceedings{Pineiro2001b,
+  author = {Pi\~neiro, J. A. and Bruguera, J. D. and Muller, J.-M.},
+  title = {{FPGA} Implementation of a Faithful Polynomial Approximation 
+for  Powering Function Computation},
+  booktitle =    {EuroMicro DSD},
+  year =         2001,
+  address =      {Warszawa, Poland}
+}
+
+ at InProceedings{Liddicoat2001,
+  author = {Liddicoat, A. A.  and Flynn,  M. J. },
+  title = {High-Performance Floating Point Divide},
+  booktitle =    {Euromicro Symposium on Digital System Design},
+  year =         2001,
+  address =      {Warsaw, Poland},
+  month =        Sep,
+  pages = {354-361}
+}
+
+
+
+ at PhdThesis{liddicoat-thesis,
+  author = 	 {Liddicoat, A.A.},
+  title = 	 {High-performance arithmetic for division and the elementary functions},
+  school = 	 {Stanford University},
+  year = 	 2002
+}
+
+ at Misc{Briggs2002,
+  author = {Briggs, K.},
+  year = 2002,
+  title = 	 {Doubledouble floating point arithmetic},
+  url = {{\tt http://members.lycos.co.uk/keithmbriggs/doubledouble.html}}
+}
+
+
+ at InProceedings{MencerBoullisLukStyles2001,
+  author = {O. Mencer and N. Boullis and W. Luk and H. Styles},
+  title = {Parametrized Function Evaluation on FPGAs},
+  booktitle =    {Field-Programmable Logic and Applications},
+  year =         2001,
+  address =      {Belfast},
+  month =        Sep
+}
+
+
+ at InProceedings{Matousek2002,
+  author = {R. Matou\v sek and M. Tich\' y and Z. Pohl and J. Kadlec and C. Softley and N. Coleman},
+  title = {Logarithmic Number System and Floating-Point Arithmetics on {FPGA}},
+  booktitle =    {Field-Programmable Logic and Applications},
+  year =         2002,
+  address =      {Montpellier},
+  month =        Sep,
+  pages = {627-636}
+}
+
+
+ at InProceedings{Arnold2002,
+  author = {M. Arnold},
+  title = {21st Century Slide Rules with Logarithmic Arithmetic: High-Speed, Low-Cost, Low-Power Alternative to Fixed Point Arithmetic},
+  booktitle =    {Online Symposium for Electronics Engineers (\texttt{http://www.osee.net})},
+  year =         2002,
+  month =        Feb
+}
+
+ at InProceedings{Lee2003,
+  author = {B. Lee and N. Burgess},
+  title = {A Dual-Path Logarithmic Number System Addition/Subtraction Scheme for {FPGA}},
+  booktitle =    {Field-Programmable Logic and Applications},
+  year =         2003,
+  address =      {Lisbon},
+  month =        Sep
+}
+
+ at Article{Taylor88,
+  AUTHOR =	 {Taylor, F. J. and Gill, R. and Joseph, J. and Radke, J.},
+  JOURNAL =	 {IEEE Transactions on Computers},
+  TITLE =	 {A 20 Bit Logarithmic Number System Processor}, 
+  YEAR =	 {1988},
+  MONTH =        feb, 
+ VOLUME =	 {37},
+  NUMBER =	 {2},
+  PAGE =	 {190-199}
+}
+
+ at Article{Lewis90,
+  AUTHOR =	 {Lewis, D. M.},
+  JOURNAL =	 {IEEE Transactions on Computers},
+  TITLE =	 {An Architecture for Addition and Subtraction of Long Word Length Numbers in the Logarithmic Number System}, 
+  YEAR =	 {1990},
+  MONTH =        nov, 
+ VOLUME =	 {39},
+  NUMBER =	 {11},
+  PAGE =	 {1325-1336}
+}
+
+
+ at Book{Flynn2001,
+  author =       {Flynn, M. J. and Oberman, S. F.},
+  title =        {Advanced Computer Arithmetic Design},
+  year =         2001,
+  publisher =    {Wiley-Interscience}
+}
+
+
+ at Article{Lefevre2001,
+  AUTHOR =	 {Defour, D. and Muller, J.M.},
+  JOURNAL =	 {R\'eseaux et syst\`emes r\'epartis, calculateurs parall\`eles},
+  TITLE =	 {\'Evaluation des fonctions \'el\'ementaires}, 
+  YEAR =	 {2001},
+ VOLUME =	 {13},
+  NUMBER =	 {4-5},
+  PAGE =	 {449-464}
+}
+
+ at book{Markstein2000,
+	author = {P. Markstein},
+	title = {{IA-64} and Elementary Functions : Speed and Precision},
+	publisher = {Prentice Hall},
+	year = {2000},
+	series = {Hewlett-Packard Professional Books},
+	note = {ISBN: 0130183482}
+}
+
+
+
+ at Book{CorneaHarrisonTang2002,
+  author =	 {M. Cornea and J. Harrison and Tang, P.T.P},
+  title = 	 {Scientific Computing on Itanium-based Systems},
+  publisher = 	 {Intel Press},
+  year = 	 2002
+}
+
+ at Misc{IEEE754,
+  author =	 {ANSI/IEEE},
+  title =	 {Standard  754-1985 for Binary Floating-Point Arithmetic},
+  year =	 1985
+}
+
+
+ at BOOK{KKLRW93,
+        AUTHOR             = {Klatte, R. and Kulisch, U. and Lawo, C. and Rauch, M. and Wiethoff, A.},
+        PUBLISHER          = {Springer Verlag},
+        TITLE              = {{C-XSC a C++ class library for extended scientific computing}},
+        YEAR               = {1993}
+}
+
+ at BOOK{Moore66,
+        AUTHOR             = {Moore, R.E.},
+        PUBLISHER          = {Prentice Hall},
+        TITLE              = {Interval analysis},
+        YEAR               = {1966}
+}
+
+ at book{ErcegovacLang2003,
+        author={Ercegovac, M. D. and Lang, T.},
+        title={Digital Arithmetic},
+        publisher={Morgan Kaufmann},
+        year= 2003
+}
+
+ at Article{Vassiliadis2000,
+  author = 	 {S. Vassiliadis and M. Zhang and Delgado-Frias, J. G. },
+  title = 	 {Elementary Function Generators for Neural-Network Emulators},
+  journal = 	 {{IEEE} transactions on neural networks},
+  year = 	 2000,
+  volume =	 11,
+  number =	 6,
+  pages =	 {1438-1449},
+  month =	 {nov}
+}
+
+
+ at InProceedings{LeeLuk2003,
+  author = 	 {Lee, D-U and W. Luk and J. Villasenor and P. Cheung},
+  title = 	 {Hierarchical Segmentation Schemes for Function Evaluation},
+  booktitle =	 {{IEEE} Conference on Field-Programmable Technology},
+  year =	 2003,
+  address =	 {Tokyo},
+  month =	 {dec}
+}
+
+ at book{Muller89,
+  AUTHOR =	 {Muller, Jean-Michel},
+  TITLE =	 {Arithm\'etique des ordinateurs, operateurs et
+                  fonctions \'el\'ementaires},
+  PUBLISHER =	 {Masson},
+  YEAR =	 1989
+}
+
+ at BOOK{Muller97,
+  AUTHOR =	 {Muller, J.-M.},
+  PUBLISHER =	 {Birkhauser},
+  ADDRESS = {Boston},
+  TITLE =	 {Elementary Functions, Algorithms and Implementation},
+  YEAR =	 {1997},
+  ISSN_ISBN =	 {ISBN 0-8176-3990-X}
+}
+
+ at ARTICLE{Mul99,
+  author =	 {Muller, J.-M. },
+  year =	 1999,
+  title =	 {A Few Results on Table-Based Methods},
+  journal =	 {Reliable Computing},
+  volume =	 5,
+  number =	 3,
+  pages  = {279-288}
+}
+
+ at ARTICLE{DefHanLefMulRevZim2004,
+  AUTHOR =  {Defour, D. and Hanrot, G. and Lef\`evre, V. and Muller, J.-M. and Revol, N. and Zimmermann, P.},
+  JOURNAL = {Numerical algorithms},
+  VOLUME = 37, 
+  NUMBER = {1-4},
+  PAGES = {367-375},
+  TITLE = {Proposal for a Standardization of Mathematical function Implementations in Floating-Point Arithmetic},
+  MONTH = jan,
+  YEAR =  2004
+}
+
+ at inproceedings{Boldo2001,
+  author =       {Boldo, S. and Daumas, M.},
+  title =        {A mechanically validated technique for extending the available precision},
+  PUBLISHER =	 {IEEE Computer Society Press},
+  booktitle =    {35th Asilomar Conference on Signals, Systems, and Computers},
+  address =      {Pacific Grove, California},
+  url =          {http://www.ens-lyon.fr/~daumas/SoftArith/BolDau01b.pdf},
+  year =         2001
+}
+
+ at InProceedings{LefMulTis1997a,
+  AUTHOR =	 {V. Lef\`evre and Muller, J.-M.  and A. Tisserand},
+  ADDRESS =	 {Asilomar, USA},
+  BOOKTITLE =	 {Proceedings of the 13th IEEE Symposium on Computer
+                  Arithmetic},
+  PUBLISHER =	 {IEEE Computer Society Press, Los Alamitos, CA},
+  TITLE =	 {Towards Correctly Rounded Transcendentals},
+  YEAR =	 {1997},
+  KEYWORDS =	 {table maker's dilemma,elementary
+                  functions,rounding,floating-point arithmetic}
+}
+
+ at TechReport{Lef1997a,
+  AUTHOR =	 {V. Lef\`evre},
+  TITLE =	 {An Algorithm that Computes a Lower Bound on the
+                  Distance Between a Segment and $\mathbb{Z}^2$},
+  ADDRESS =	 {Lyon, France},
+  INSTITUTION =	 {Laboratoire de l'Informatique du Parall�lisme},
+  TYPE =	 rr,
+  NUMBER =	 {RR1997-18},
+  YEAR =	 {1997},
+  KEYWORDS =	 {elementary functions,floating-point
+                  arithmetic,rounding},
+  ABSTRACT-URL = {http://www.ens-lyon.fr/LIP/research_reports.us.html},
+  URL =
+                  {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR1997/RR1997-18.ps.Z}
+}
+
+ at InProceedings{ELMT98,
+  author =	 {M.D. Ercegovac and T. Lang and Muller, J.-M. and
+                  A. Tisserand},
+  title =	 {Reciprocation, square root, inverse square root, and
+                  some elementary functions using small multipliers},
+  booktitle =	 {International Symposium on Optical Science,
+                  Engineering and Instrumentation},
+  year =	 1998,
+  editor =	 {SPIE},
+  month =	 jun,
+  note =	 {San Diego, U.S.A}
+}
+
+
+ at TechReport{LefMulTis1998a,
+  AUTHOR =	 {V. Lef\`evre and Muller, J.-M.  and A. Tisserand},
+  TITLE =	 {The Table Maker's Dilemma},
+  ADDRESS =	 {Lyon, France},
+  INSTITUTION =	 {Laboratoire de l'Informatique du Parall�lisme},
+  TYPE =	 rr,
+  NUMBER =	 {RR1998-12},
+  YEAR =	 {1998},
+  KEYWORDS =	 {table maker's dilemma,elementary
+                  functions,rounding,floating-point arithmetic},
+  ABSTRACT-URL = {http://www.ens-lyon.fr/LIP/research_reports.us.html},
+  URL =
+                  {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR1998/RR1998-12.ps.Z}
+}
+
+
+
+
+ at Article{ELMT2000,
+  author =	 {M.D. Ercegovac and T. Lang and Muller, J.-M. and
+                  A. Tisserand},
+  title =	 {Reciprocation, square root, inverse square root, and
+                  some elementary functions using small multipliers},
+  JOURNAL =	 {{IEEE} Transactions on Computers},
+  year =	 2000,
+  MONTH =	 jul,
+  NUMBER =	 {7},
+  PAGES =	 {628--637},
+  VOLUME =	 {49}
+}
+
+
+ at Article{LefMulTis1998b,
+  AUTHOR =	 {V. Lef\`evre and Muller, J.-M.  and A. Tisserand},
+  JOURNAL =	 {{IEEE} Transactions on Computers},
+  MONTH =	 nov,
+  NUMBER =	 {11},
+  PAGES =	 {1235--1243},
+  TITLE =	 {Towards Correctly Rounded Transcendentals},
+  VOLUME =	 {47},
+  YEAR =	 {1998},
+  KEYWORDS =	 {table maker's dilemma,elementary
+                  functions,rounding,floating-point arithmetic}
+}
+
+ at Article{MST98,
+  author =	 { Muller, J.-M. and A. Scherbyna and A. Tisserand},
+  title =	 {Semi-Logarithmic Number Systems},
+  journal =	 {IEEE Transactions on Computers},
+  year =	 1998,
+  volume =	 47,
+  number =	 2,
+  pages =	 {145--151},
+  month =	 {feb},
+  annote =	 {ISSN 0018-9340}
+}
+
+ at Book{RALIP99,
+  author =	 {{Laboratoire d'Informatique du Parall�lisme}},
+  title =	 {Rapport d'activit� 1999},
+  publisher =	 {ENS Lyon},
+  year =	 {1999},
+  URL =		 {http://www.ens-lyon.fr/LIP/Rapport99-WEB/}
+}
+ at ARTICLE{BajKlaMul94,
+        AUTHOR             = {Jean-Claude Bajard and Sylvanus Kla and Jean-Michel Muller},
+        JOURNAL            = {IEEE Transactions on Computers},
+        NUMBER             = {8},
+        PAGES              = {955-963},
+        TITLE              = {{BKM}: a new hardware algorithm for complex elementary functions},
+        VOLUME             = {43},
+        YEAR               = {1994},
+        CRINDEX            = {Non r�f�renc�}
+}
+
+ at InProceedings{TMP99b,
+  author =	 {A. Tisserand and P. Marchal and C. Piguet},
+  title =	 {An On-Line Arithmetic based FPGA for Low-Power
+                  Custom Computing},
+  booktitle =	 {9th International Workshop on Field Programmable
+                  Logic and Applications (FPL99)},
+  pages =	 {264--273},
+  year =	 1999,
+  number =	 1673,
+  series =	 {LNCS},
+  address =	 {Denver, Colorado},
+  month =	 {sep}
+}
+
+ at Article{DTHL99,
+  author =	 {M. Dimmler and A. Tisserand and U. Holmberg and
+                  R. Longchamp},
+  title =	 {On-Line Arithmetic for Real-Time Control of
+                  Microsystems},
+  journal =	 {IEEE/ASME Transactions on Mechatronics},
+  year =	 1999,
+  volume =	 4,
+  number =	 2,
+  pages =	 {213--217},
+  month =	 {jun},
+  annote =	 {ISSN 1083-4435}
+}
+
+ at InCollection{Lef1999a,
+  AUTHOR =	 {V. Lef\`evre},
+  TITLE =	 {An Algorithm that Computes a Lower Bound on the
+                  Distance Between a Segment and $\mathbb{Z}^2$},
+  BOOKTITLE =	 {Developments in Reliable Computing},
+  YEAR =	 {1999},
+  PUBLISHER =	 {Kluwer},
+  ADDRESS =	 {Dordrecht, Netherlands},
+  PAGES =	 {203--212},
+  KEYWORDS =	 {elementary functions,floating-point
+                  arithmetic,rounding}
+}
+
+ at TechReport{Lef1999b,
+  AUTHOR =	 {V. Lef\`evre},
+  TITLE =	 {Multiplication by an Integer Constant},
+  ADDRESS =	 {Lyon, France},
+  INSTITUTION =	 {Laboratoire de l'Informatique du Parall�lisme},
+  TYPE =	 rr,
+  NUMBER =	 {RR1999-06},
+  YEAR =	 {1999},
+  KEYWORDS =	 {multiplication,addition chains},
+  ABSTRACT-URL = {http://www.ens-lyon.fr/LIP/research_reports.us.html},
+  URL =
+                  {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR1999/RR1999-06.ps.Z}
+}
+
+ at InProceedings{LefMul1999a,
+  AUTHOR =	 {V. Lef\`evre and Muller, J.-M.},
+  TITLE =	 {Table Methods for the Elementary Functions},
+  BOOKTITLE =	 {Proceedings of the SPIE --- The International
+                  Society for Optical Engineering},
+  EDITOR =	 {F.T. Luk},
+  ADDRESS =	 {Denver, Colorado},
+  PAGES =	 {43--49},
+  VOLUME =	 {3807},
+  YEAR =	 {1999}
+}
+
+ at PhDThesis{Lef2000a,
+  AUTHOR =	 {V. Lef\`evre},
+  TITLE =	 {Moyens arithm�tiques pour un calcul fiable},
+  SCHOOL =	 {�cole Normale Sup�rieure de Lyon},
+  ADDRESS =	 {Lyon, France},
+  YEAR =	 {2000},
+  MONTH =	 jan,
+  URL =          {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/PhD/PhD2000/PhD2000-02.ps.Z}
+}
+
+ at PhdThesis{Defour-thesis,
+  author = 	 {Defour, David},
+  title = 	 {Fonctions \'el\'ementaires: algorithmes et impl\'ementations efficaces pour
+l'arrondi correct en double pr\'ecision},
+  school = 	 {\'Ecole Normale Sup\'erieure de  Lyon},
+  year = 	 2003,
+  ADDRESS =	 {Lyon, France},
+  month = sep,
+  URL =          {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/PhD/PhD2003/PhD2003-01.ps.gz}
+}
+
+
+
+
+ at techreport{Lauter2003lip,
+	author = {C. Lauter},
+	title = {A correctly rounded implementation of the exponential function on the {Intel} {Itanium} architecture},
+	institution = {{LIP}, \'Ecole Normale Sup\'erieure de Lyon},
+	year = 2003,
+	number = {2003-54},
+	month = nov,
+	note = {Available at ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2003/RR2003-54.ps.gz}
+}
+
+
+
+
+ at TECHREPORT{Lauter2003inria,
+author = {C.  Lauter},
+title = {A correctly rounded implementation of the exponential function on the {Intel} {Itanium} architecture},
+institution= {{INRIA}},
+  NUMBER =	 {RR-5024},
+  MONTH =	 nov,
+  YEAR =	 {2003},
+  note =    {Available at http://www.inria.fr/rrrt/rr-5024.html}
+}
+
+ at InProceedings{BIT:spie03,
+  author =	 { Beuchat, J.-L. and L. Imbert and A.
+                  Tisserand},
+  title =	 {Comparison of Modular Multipliers on {FPGA}s},
+BOOKTITLE =	 {Proceedings of the SPIE --- The International
+                  Society for Optical Engineering},
+  year =	 {2003}
+}
+
+ at InProceedings{BM:sympaaa2003,
+  author =	 {Jean-Luc Beuchat and Jean-Michel Muller},
+  title =	 {Multiplication-addition modulaire: algorithmes
+                  it\'eratifs et implantations sur {FPGA}},
+  booktitle =	 {Actes de RenPar'15, CFSE'3 et SympAAA'2003},
+  editor =	 {M. Auguin and F. Baude and D. Lavenier and
+                  M. Riveill},
+  year =	 {2003},
+  pages =	 {235--242},
+  month =	 oct
+}
+
+ at Article{BT:tsisympa8,
+  author =	 {Jean-Luc Beuchat and Arnaud Tisserand},
+  title =	 {Evaluation polynomiale en-ligne de fonctions
+                  \'el\'ementaires sur {FPGA}},
+  journal =	 {Technique et science informatiques},
+  year = {\aparaitre}
+}
+ at InProceedings{Beuchat:asap03,
+  author =	 {Jean-Luc Beuchat},
+  title =	 {Modular Multiplication for {FPGA} Implementation of
+                  the {IDEA} Block Cipher},
+  booktitle =	 {Proceedings of the 14th IEEE International
+                  Conference on Application-Specific Systems,
+                  Architectures, and Processors},
+  pages =	 {412--422},
+  year =	 {2003},
+  editor =	 {E. Deprettere and S. Bhattacharyya and J. Cavallaro
+                  and A. Darte and L. Thiele},
+  publisher =	 {IEEE Computer Society}
+}
+
+ at InProceedings{Beuchat:fpl2003,
+  author =	 {Jean-Luc Beuchat},
+  title =	 {{FPGA} Implementations of the {RC6} Block Cipher},
+  booktitle =	 {Field-Programmable Logic and Applications},
+  pages =	 {101--110},
+  year =	 {2003},
+  editor =	 {P. Y. K. Cheung and G. A. Constantinides and
+                  J. T. de Sousa},
+  number =	 {2778},
+  series =	 {Lecture Notes in Computer Science},
+  publisher =	 {Springer}
+}
+
+ at InProceedings{Beuchat:raw03,
+  author =	 {Jean-Luc Beuchat},
+  title =	 {Some Modular Adders and Multipliers for Field
+                  Programmable Gate Arrays},
+  booktitle =	 {Proceedings of the 17th International Parallel \&
+                  Distributed Processing Symposium},
+  year =	 {2003},
+  publisher =	 {IEEE Computer Society}
+}
+
+
+ at InProceedings{BouTis03-arith16,
+  author =	 {N. Boullis and A. Tisserand},
+  title =	 {Some Optimizations of Hardware Multiplication by
+                  Constant Matrices},
+  booktitle =	 {ARITH 16},
+  pages =	 {20--27},
+  year =	 2003
+}
+
+ at INPROCEEDINGS{BouTis02sympa,
+  AUTHOR =	 {Boullis, N. and Tisserand, A.},
+  ADDRESS =	 {Hamamet, Tunisie},
+  BOOKTITLE =	 {8\`eme SYMPosium en Architectures nouvelles de
+                  machines},
+  MONTH =	 apr,
+  PAGES =	 {283--290},
+  TITLE =	 {G\'en\'eration automatique d'architectures de calcul
+                  pour des op\'erations lin\'eaires~: application \`a
+                  l'{IDCT} sur {FPGA}},
+  YEAR =	 {2002}
+}
+
+ at misc{LefMul2004,
+  author = 	 {Lef\`evre, V. and Muller, J.-M},
+  title = 	 {Worst Cases for Correct Rounding of the Elementary Functions in Double Precision},
+  institution =  {LIP/ENS-Lyon},
+  year = 	 2004,
+howpublished = {http://perso.ens-lyon.fr/jean-michel.muller/Intro-to-TMD.htm}
+}
+
+
+
+ at InProceedings{DefDinMul2001,
+  author = {D. Defour and F. de~Dinechin and J.M. Muller},
+  title = {Correctly Rounded Exponential Function in Double Precision Arithmetic},
+  booktitle =    {Advanced Signal Processing Algorithms, Architectures, and
+Implementations X (SPIE'2000)},
+  editor =       {},
+  year =         2001,
+  volume =       {},
+  address =      {San Diego, California},
+  month =        Aug,
+  note = {Also available as LIP research report 2001-26}
+}
+
+
+
+ at InProceedings{DefDin2002,
+  author = {Defour, D. and de~Dinechin, F.},
+  title = {Software carry-save for fast multiple-precision algorithms},
+  booktitle =    {35th International Congress of Mathematical Software},
+  year =         2002,
+  address =      {Beijing, China},
+  note = {Updated version of LIP research report 2002-08}
+}
+
+
+
+ at InProceedings{DinDef2003,
+  author = {de Dinechin, F. and Defour, D.},
+  title = {Software Carry-Save: A case study for instruction-level parallelism},
+  booktitle =    {Seventh International Conference on Parallel Computing Technologies},
+  year =         2003,
+  month =        Sep,
+  address =      {Nizhny Novgorod, Russia}
+}
+
+
+
+
+
+ at techreport{DarDefDinMul03,
+	author = {C. Daramy and D. Defour and F. de~Dinechin and J.M. Muller},
+	title = {{CR-LIBM}: The evaluation of the exponential},
+	institution = {LIP, \'Ecole Normale Sup\'erieure de Lyon},
+	year = 2003,
+	number = {RR2003-37},
+	month = jul,
+	note = {Available at ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2003/RR2003-37.ps.gz}
+}
+
+
+
+ at misc{SCSweb,
+        title = {{SCS}, {S}oftware {C}arry-{S}ave multiprecision library},
+        url = {http://www.ens-lyon.fr/LIP/Arenaire/News/SCSLib/}
+}
+
+
+
+ at techreport{DinDefLau2004LIP,
+	author = {de~Dinechin, F. and D. Defour and C. Lauter},
+	title = {Fast correct rounding of elementary functions 
+             in double precision using double-extended arithmetic},
+	institution = {LIP, \'Ecole Normale Sup\'erieure de Lyon},
+	year = 2004,
+	number = {2004-10},
+	month = mar,
+	note = {Available at http://www.ens-lyon.fr/LIP/Pub/Rapports/RR/RR2004/RR2004-10.pdf}
+}
+
+ at techreport{DinGast2004LIP,
+	author = { de~Dinechin, F. and Gast, N.},
+	title = {Towards the post-ultimate \texttt{libm}},
+	institution = {LIP, \'Ecole Normale Sup\'erieure de Lyon},
+	year = 2004,
+	number = {2004-47},
+	month = nov,
+        note={Submitted to Arith' 17},
+	anote = {available at \url{http://www.ens-lyon.fr/LIP/Pub/Rapports/RR/RR2004/RR2004-47.pdf}}
+}
+
+
+ at InProceedings{DinErshGast2005,
+  author = {de~Dinechin, F. and Ershov, A. and Gast, N.},
+  title = {Towards the post-ultimate libm},
+  booktitle =    {17th Symposium on Computer Arithmetic},
+  year =         2005,
+  nolocation =      {Cape Cod, Massachussets},
+  PUBLISHER =	 {IEEE Computer Society Press},
+  month =        jun,
+  pages = {288-295},
+  url = {http://perso.ens-lyon.fr/florent.de.dinechin/recherche/publis/2005-Arith.pdf}
+}
+
+
+ at TechReport{Lauter2005LIP:tripledouble,
+	author = {Lauter, Ch. Q.},
+  title =        {Basic building blocks for a triple-double intermediate format},
+  institution =  {LIP},
+  year =         {2005},
+  month =        sep,
+  number =       {RR2005-38},
+  location =
+{http://www.ens-lyon.fr/LIP/Pub/Rapports/RR/RR2005/RR2005-38.pdf}
+}
+
+
+
+ at inproceedings{BroMelPio03,
+  author    = {H. Br{\"o}nnimann and G. Melquiond and S. Pion},
+  title     = {The {B}oost interval arithmetic library},
+  booktitle = {Proceedings of the 5th Conference on Real Numbers and Computers},
+  pages     = {65--80},
+  location   = {Lyon, France},
+  year      = {2003},
+  url       = {http://perso.ens-lyon.fr/guillaume.melquiond/doc/03-rnc5-article.ps.gz}
+}
+
+
+ at inproceedings{DauMelMun05,
+  author    = {M. Daumas and G. Melquiond and C. Mu{\~n}oz},
+  title     = {Guaranteed proofs using interval arithmetic},
+  booktitle = {Proceedings of the 17th IEEE Symposium on Computer Arithmetic},
+  Noeditor    = {Paolo Montuschi and Eric Schwarz},
+  pages     = {188--195},
+  address   = {Cape Cod, Massachusetts, USA},
+  year      = {2005},
+  url       = {http://perso.ens-lyon.fr/guillaume.melquiond/doc/05-arith17-article.pdf}
+}
+
+ at inproceedings{MelPio05,
+  author    = {G. Melquiond and S. Pion},
+  title     = {Formal certification of arithmetic filters for geometric predicates},
+  booktitle = {Proceedings of the 15th IMACS World Congress on Computational and Applied Mathematics},
+  location   = {Paris, France},
+  year      = {2005},
+  url       = {http://perso.ens-lyon.fr/guillaume.melquiond/doc/05-imacs17_2-article.ps.gz}
+}
+
+ at misc{Melqu05,
+        title = {Gappa - G\'en\'eration automatique de preuves de propri\'et\'es arithm\'etiques},
+   author = {G. Melquiond},
+        howpublished = {Available at \url{http://lipforge.ens-lyon.fr/www/gappa/}}
+}
+
+
+ at PhdThesis{Finot-thesis,
+  author = 	 {Finot-Moreau, Claire},
+  title = 	 {Preuves et algorithmes utilisant l'arithm\'etique flottante normalis\'ee IEEE},
+  school = 	 {\'Ecole Normale Sup\'erieure de  Lyon},
+  year = 	 2001,
+  ADDRESS =	 {Lyon, France},
+  month = jul,
+  URL =          {ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/PhD/PhD2001/PhD2001-03.ps.Z}
+}
+
+ at techreport{Muller05INRIA,
+	author = {Muller, Jean-Michel},
+	title = {On the definition of ulp$(x)$},
+	institution = {INRIA},
+	year = 2005,
+	number = {RR 5504},
+	month = feb,
+	note = {Available at ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-5504.pdf}
+}
+
+ at Misc{crlibmweb,
+  title = 	 {{CR-Libm}, A library of correctly rounded elementary functions in
+                    double-precision},
+  howpublished = {\url{http://lipforge.ens-lyon.fr/www/crlibm/}}
+}
+
+ at InProceedings{DinLauMel2005,
+  author =       {de~Dinechin, F. and Lauter, Ch. Q. and Melquiond, G.},
+  title =        {Assisted verification of elementary functions using {Gappa}},
+  booktitle =	 {ACM{ }�Symposium on Applied Computing},
+  note = {Extended version available as LIP research report RR2005-43, \url{http://www.ens-lyon.fr/LIP/Pub/Rapports/RR/RR2005/RR2005-43.pdf}},
+  year =	 2006
+
+}
+
+
+ at PhdThesis{Stehle-thesis,
+  author = 	 {Damien Stehl\'e},
+  title = 	 {Algorithmique de la r�duction de r�seaux et application � la recherche de pires cas pour l'arrondi de fonctions math�matiques},
+  school = 	 {LORIA},
+  year = 	 2006,
+  URL =          {http://perso.ens-lyon.fr/damien.stehle/these.html}
+}
+
+ at techreport{LauterLefevre2007,
+  author =       {Ch. Lauter and V. Lef{\`e}vre},
+  institution =  {Laboratoire de l'Informatique du Parall{\'e}lisme},
+  number =       {RR-2007-36},
+  title =        {An efficient rounding boundary test for pow(x,y) in double precision},
+  type =         {Technical Report},
+  year =         {2007},
+  url =          {http://prunel.ccsd.cnrs.fr/ensl-00169409/},
+  note =         {To appear in IEEE Transactions on Computers}
+}
+
+ at techreport{KorLauLefLouvMul2008,
+        author = {P. Kornerup and Ch. Lauter and V. Lef{\`e}vre and N. Louvet and J.-M. Muller},
+        title = {Computing Correctly Rounded Integer Powers in Floating-Point Arithmetic},
+        number = {RR 2008-15},
+        institution = {SDU, Odense, Denmark et LIP, CNRS/ENS Lyon/INRIA/Universit� de Lyon, Lyon, France},
+        year = {2008},
+        month = may,
+        note = {To appear in ACM Transactions on Mathematical Software}
+} 
\ No newline at end of file
diff --git a/src/crlibm/docs/latex/exp.tex b/src/crlibm/docs/latex/exp.tex
new file mode 100644
index 0000000..3d21659
--- /dev/null
+++ b/src/crlibm/docs/latex/exp.tex
@@ -0,0 +1,1098 @@
+This chapter is contributed by Ch. Q. Lauter.
+
+
+\section{Overview of the algorithm}
+The exponential function allows for additive argument reduction with
+multiplicative reconstruction: $e^{a + b} = e^a \cdot e^b$. In
+particular, the following equation is useful in developing an
+argument reduction:
+$$e^x = e^{E \cdot \ln\left(2\right) + z} = \left(e^{\ln\left( 2
+\right)}\right)^E \cdot e^z = 2^E \cdot e^z$$ Here, $E$ can be
+considered to be a signed integer, $E \in \Z$ and $z$ to be a reduced
+argument such that $\left \vert z \right \vert <
+\ln\left(2\right)$. One remarks that the use of such an argument
+reduction implies a multiplication with a transcendental constant,
+$\ln\left( 2 \right)$.  This means that the reduced argument will not
+be exact. The corresponding error bound will be given in section
+\ref{sec:expargred}.
+
+A reduced argument obtained by the reduction shown above is generally
+still to great for polynomial approximation. By use of tabulation
+methods, the following argument reduction can be employed and yields
+to smaller reduced arguments.
+\begin{eqnarray*}
+k & = & \left \lfloor x \cdot \frac{2^l}{\ln\left(2 \right)} \right \rceil \\
+\hat{r} & = & x - k \cdot \frac{\ln\left( 2 \right)}{2^l} \\
+k & = & 2^l \cdot M + 2^{w_1} \cdot i_2 + i_1 
+\end{eqnarray*}
+where $\hat{r}$ is the reduced argument, $k, M \in \N$ are intermediate
+integers, and $w_1, w_2 \in \N$, $l = w_1 + w_2$, are the widths of
+the indices to the two tables. The corresponding reconstruction phase
+is
+$$e^x = 2^M \cdot 2^{\frac{i_2}{2^{w_1}}} \cdot 2^{\frac{i_1}{2^l}}
+\cdot e^{\hat{r}} = 2^M \cdot t_1 \cdot t_2 \cdot e^{\hat{r}}$$ with the table values $t_1 =
+2^{\frac{i_2}{2^{w_1}}}$ and $t_2 = 2^{\frac{i_1}{2^l}}$. The argument
+reduction ensures that $\left \vert \hat{r} \right \vert \leq
+\frac{\ln\left( 2 \right)}{2^l} < 2^{-l}$. This magnitude is small enough for 
+allowing for polynomial approximation.
+
+In the case of the given algorithm, we use $l = 12$ and $w_1 = w_2 = 6$.
+
+The subtraction $\hat{r} = x - k \cdot \round \left(\frac{\ln\left( 2
+\right)}{2^l}\right)$ can be implemented exactly but leads to
+catastrophic cancellation that amplifies the absolute error of the
+potentially exact multiplication of $k$ by the approximated
+$\frac{\ln\left( 2 \right)}{2^l}$. Is is nevertheless not of such an
+issue, as will be shown in section \ref{sec:expaccuracy}.                  % ATTENTION: CHANGER EVTL LA MARQUE
+
+\section{Special case handling}\label{sec:expspecial}
+The exponential function $e^x$, which is monotone increasing, produces
+results that are representable in a floating point format for
+arguments $$x \in \left[ \mbox{\small \it underflowBound};
+\mbox{\small \it overflowBound} \right]$$ Herein the following values
+are observed for double precision: $$\mbox{\small \it underflowBound}
+= \round \left( \ln\left(2^{-1075} \right) \right) \approx -745.13$$
+and $$\mbox{\small \it overflowBound} = \round \left(
+\ln\left(2^{1024} \cdot \left( 1 - 2^{-53} \right) \right) \right)
+\approx 709.78$$ Its double precision result is gradually underflowed
+in the argument domain $$x \in \left[\mbox{\small \it underflowBound};
+\mbox{\small \it denormBound} \right]$$ where
+$$\mbox{\small \it denormBound} = \round\left( \ln\left( 2^{-1022}
+\right) \right) \approx -708.40$$ for double precision.  No special
+case can therefore occur for arguments $x$ such that $$\left \vert x
+\right \vert \leq \min \left( \left \vert \mbox{\small \it
+underflowBound} \right \vert, \left \vert \mbox{\small \it
+overflowBound} \right \vert, \left \vert \mbox{\small \it denormBound}
+\right \vert \right) \approx 708.40$$ This provides us a very
+efficient filter for the greatest part of the definition domain.
+Since also some arguments are filtered out that actually do not
+represent a special case, additional tests are made in the body of the
+main special handling sequence launched by the filter. Particular cases like
+$x=\pm \infty$, $x = \nan$ are handled as follows:
+\begin{itemize}
+\item The result for $x = \nan$ is $\nan$.
+\item The result for $x = + \infty$ is $+ \infty$.
+\item The result for $x = - \infty$ is $0$, even in round-upwards mode.
+\end{itemize}
+If the result is clearly underflowed, $0$ is returned with the inexact
+flag set for round-to-nearest and round-downwards, $0^+$ is returned
+for round-upwards.
+
+The ordering of double precision numbers is compatible with the
+integer ordering of the signed 64 bit integers the floating point
+numbers can be read in memory as. Further the ordering on numbers is
+equal to the lexicographic ordering of its digits. So if the higher
+order word of $\left \vert x \right \vert$ is less than the higher
+order word of $\mbox{\small \it overUnderDenormBound} = \min \left(
+\left \vert \mbox{\small \it underflowBound} \right \vert, \left \vert
+\mbox{\small \it overflowBound} \right \vert, \left \vert \mbox{\small
+\it denormBound} \right \vert \right)$, no underflow, gradual
+underflow or overflow can occur. In the other cases, special handling
+in the reconstruction step may be necessary. A flag
+\texttt{mightBeDenorm} is set for possible subnormals. Cases where
+intermediate results are not representable because of overflow but
+where the final result is representable can be overcome by replacing
+the corresponding floating point multiplication by an integer
+manipulation. This will be shown below.
+
+Since $e^{x} = 1 + x + \Ord\left( x^2 \right)$ for small $\left
+\vert x \right \vert$, underflowed arguments $x$ ($\left \vert x \right
+\vert \leq 2^{-1022}$) can be handled as follows:
+\begin{itemize}
+\item In round-to-nearest mode, $1$ can be returned since $\round
+\left( 1 + x \right) = 1$ for $\left \vert x \right \vert \leq
+2^{-54}$.
+\item In round-upwards mode, $1$ must be returned for $x = 0$. For $x
+< 0$, $1$ can be returned, too, because $\roundup \left( 1 - \left
+\vert x \right \vert \right) = 1$.  If $x > 0$, $1^+$ must be
+returned.
+\item Round-downwards mode is analogous to round-upwards mode, but the signs 
+are inverted. 
+\item Round-towards-zero mode is equivalent to round-downwards mode since 
+$e^x > 0 \mbox{~~} \forall x \in \R$.
+\end{itemize}
+
+The following sequence realizes the special case handling for
+round-to-nearest. The sequences for the other rounding modes are
+straightforward and will not be shown here. The constants\\
+\texttt{OVRUDRFLWSMPLBOUND}, \texttt{OVRFLWBOUND} and
+\texttt{DENORMBOUND} are computed by the corresponding Maple script
+that realizes the equations given above.
+\begin{lstlisting}[caption={Handling special cases},firstnumber=1]
+/* Special cases tests */
+xIntHi = xdb.i[HI];
+mightBeDenorm = 0;
+/* Test if argument is a denormal or zero */
+if ((xIntHi & 0x7ff00000) == 0) {
+  /* We are in the RN case, return 1.0 in all cases */
+  return 1.0;
+}
+
+/* Test if argument is greater than approx. 709 in magnitude */
+if ((xIntHi & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) {
+  /* If we are here, the result might be overflowed, underflowed, inf, or NaN */
+
+  /* Test if +/- Inf or NaN */
+  if ((xIntHi & 0x7fffffff) >= 0x7ff00000) {
+    /* Either NaN or Inf in this case since exponent is maximal */
+
+    /* Test if NaN: mantissa is not 0 */
+    if (((xIntHi & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* x = NaN, return NaN */
+	return x + x;
+    } else {
+	/* +/- Inf */
+
+	/* Test sign */
+	if ((xIntHi & 0x80000000)==0) 
+	  /* x = +Inf, return +Inf */
+	  return x;
+	else
+	  /* x = -Inf, return 0 */
+	  return 0;
+    } /* End which in NaN, Inf */
+  } /* End NaN or Inf ? */
+  
+  /* If we are here, we might be overflowed, denormalized or underflowed in the result 
+     but there is no special case (NaN, Inf) left */
+
+  /* Test if actually overflowed */
+  if (x > OVRFLWBOUND) {
+    /* We are actually overflowed in the result */
+    return LARGEST * LARGEST;
+  }
+
+  /* Test if surely underflowed */
+  if (x <= UNDERFLWBOUND) {
+    /* We are actually sure to be underflowed and not denormalized any more 
+	 So we return 0 and raise the inexact flag */
+    return SMALLEST * SMALLEST;
+  }
+     
+  /* Test if possibly denormalized */
+  if (x <= DENORMBOUND) {
+    /* We know now that we are not sure to be normalized in the result
+	 We just set an internal flag for a further test 
+    */
+    mightBeDenorm = 1;
+  }
+} /* End might be a special case */
+\end{lstlisting}
+\section{Argument reduction}\label{sec:expargred}
+Mathematically, the argument reduction used for quick and accurate phase is the same.
+The reduced argument is nevertheless different for the both phases because the
+reduction is inexact. It is therefore implemented in two or three phases:
+
+First, $k$ corresponding to $\left \lfloor x \cdot
+\frac{2^{12}}{\ln\left(2 \right)} \right \rceil$ is computed in both
+integer and floating point (double) representation. Herein
+$\frac{2^{12}}{\ln\left(2 \right)}$ is represented in double precision
+and the multiplication by $x$ is performed in double precision,
+too. Then the nearest integer $k$ to the number obtained is
+computed. This computational problem is principally subject to the
+Table Maker's Dilemma: $x \cdot \frac{2^{12}}{\ln\left(2 \right)}$ is
+transcendental for all $x \not = \ln\left(2 \right)$ and the
+to-nearest-integer operation is equivalent to a rounding to the
+nearest. It is not possible to guarantee that the computed $k$ is
+really the integer nearest to $x \cdot \frac{2^{12}}{\ln\left(2
+\right)}$. Nevertheless, this is not a problem. The following argument
+reduction steps, as $\hat{r} = x - k \cdot
+\frac{\ln\left(2\right)}{2^{12}}$, and the reconstruction are
+mathematically correct for any $k$. So computing the wrong $k$ only
+leads to a slight enlargement of the interval of the reduced argument
+$\hat{r}$, as one can see with the following argument:
+
+The function's argument's value $x$ is bounded in magnitude by
+$2^{10}$. So, $x \cdot \frac{2^{12}}{\ln\left(2 \right)}$ is bounded
+in magnitude by $2^{22}$. Since the accuracy of the value
+$xMultLog2InvMult2L = \round \left( x \cdot \round \left(
+\frac{2^{12}}{\ln\left(2 \right)} \right) \right)$ with respect to the
+exact value $x \cdot \frac{2^{12}}{\ln\left(2 \right)}$ is at least
+$51$ bits, an error is made not earlier than at the $19$th bit
+following the integer-fractional point. Thus
+$$\left \vert \frac{k - x \cdot \frac{2^{12}}{\ln\left(2
+      \right)}}{x \cdot \frac{2^{12}}{\ln\left(2 \right)}} \right
+\vert \leq \frac{1}{2} + 2^{-19}$$ Therefore $\hat{r}^\prime$ is
+actually bounded by $\left \vert \hat{r}^\prime \right \vert \leq
+\frac{\ln\left( 2 \right)}{2^{12}} \cdot \left( \frac{1}{2} + 2^{-19}
+\right)$ instead of $\left \vert \hat{r} \right \vert \leq
+\frac{\ln\left( 2 \right)}{2^{12}} \cdot \frac{1}{2}$. This difference
+can be taken into account in the error computation, and we may safely
+assume that its effects will be negligible.
+
+Note further that $k$ is computed exactly ($k = 0$) for $\left \vert x
+\right \vert \leq 2^{-14}$ because no Table Maker's Dilemma can no
+longer occur.
+
+This first step is performed by the following code sequence:
+\begin{lstlisting}[caption={Argument reduction - first step},firstnumber=1]
+xMultLog2InvMult2L = x * log2InvMult2L;
+shiftedXMult = xMultLog2InvMult2L + shiftConst;
+kd = shiftedXMult - shiftConst;
+shiftedXMultdb.d = shiftedXMult;
+k = shiftedXMultdb.i[LO];
+\end{lstlisting}
+Here, \texttt{k} and \texttt{kd} represent $k$ in integer and floating
+point (double) format. The technique for computing $\left \lfloor z
+\right \rceil$ out of $z$ is explained in section
+\ref{sec:double2int}, page \pageref{sec:double2int}.
+
+In the second step of the argument reduction, an arithmetical
+approximation to $\hat{r} = x - k \cdot \frac{\ln\left( 2
+\right)}{2^{12}}$, $r_\hi + r_\mi = \hat{r} + \delta_{\mbox{\tiny
+argred}}$, is computed using a double-double approximation to
+$\frac{\ln\left( 2 \right)}{2^{12}}$ and double-double precision for
+computations. We will consider its absolute error $\delta_{\mbox{\tiny
+argredquick}} = r_\hi + r_\mi - \hat{r}$ and the resulting relative
+error on the exponential function $\epsilon_{\mbox{\tiny argredquick}}
+= \frac{e^{\hat{r} + \delta} - e^{\hat{r}}}{e^{\hat{r}}}$ below.
+
+This argument reduction step is implemented as follows:
+\begin{lstlisting}[caption={Argument reduction - second step},firstnumber=1]
+Mul12(&s1,&s2,msLog2Div2Lh,kd);
+s3 = kd * msLog2Div2Lm;
+s4 = s2 + s3; 
+s5 = x + s1;
+Add12Cond(rh,rm,s5,s4);
+\end{lstlisting}
+Here, \texttt{msLog2Div2Lh} and \texttt{msLog2Div2Lm} are a
+double-double representing $-\frac{\ln\left( 2 \right)}{2^{12}}$ with
+an relative error $\left \vert \epsilon_{\mbox{\tiny logconstquick}}
+\right \vert = \left \vert \frac{msLog2Div2L_\hi + msLog2Div2L_\mi +
+2^{-12} \cdot \ln\left( 2 \right)}{-2^{-12} \cdot \ln\left( 2 \right)}
+\right \vert \leq 2^{-109}$. Further, $\left \vert msLog2Div2L_\mi
+\right \vert \leq 2^{-54} \cdot \left \vert msLog2Div2L_\hi \right
+\vert$.
+
+Let us now show first a bound on the absolute round-off error of the
+given sequence.  We know that the multiplication $s_1 + s_2 = kd \cdot
+msLog2Div2h$ and the final addition $r_\hi + r_\mi = s_5 + s_4$ are
+exact. Further, the addition $s_5 = x \oplus s_1$ is exact as per Sterbenz' lemma.
+In fact, since 
+$$\left \vert x - \left \lfloor x \cdot
+\frac{2^{12}}{\ln\left(2\right)} \right \rceil \cdot
+\frac{\ln\left(2\right)}{2^{12}} \right \vert \leq 2^{-12}$$ and
+$$s_1 = - \left \lfloor x \cdot \frac{2^{12}}{\ln\left(2\right)}
+\right \rceil \cdot \frac{\ln\left(2\right)}{2^{12}} \cdot \left( 1 + \epsilon^\prime \right)$$
+with $\left \vert \epsilon^\prime \right \vert \leq 2^{-50}$, it is trivial to see that
+$$\frac{1}{2} \cdot \left \vert s_1 \right \vert \leq \left \vert x
+\right \vert \leq 2 \cdot \left \vert s_1 \right \vert$$ In addition,
+$s_1$ and $x$ are clearly of opposed sign. So, noting
+$$s_3 = k \cdot msLog2Div2L_\mi \cdot \left( 1 + \epsilon_1 \right)$$ and
+$$s_4 = \left( s_2 + s_3 \right) \cdot \left( 1 + \epsilon_2 \right)$$
+with $\left \vert \epsilon_1 \right \vert \leq 2^{-53}$ and $\left
+\vert \epsilon_2 \right \vert \leq 2^{-53}$, we get
+$$r_\hi + r_\mi = x + k \cdot \left( msLog2Div2L_\hi + msLog2Div2L_\mi \right) + \delta^\prime$$
+with 
+$$\left \vert \delta^\prime \right \vert \leq \left \vert \epsilon_1 \right
+\vert \cdot \left \vert k \cdot msLog2Div2L_\mi \right \vert + \left
+\vert \epsilon_2 \right \vert \cdot \left \vert s_2 + s_3 \right
+\vert$$
+We have
+$$\left \vert s_2 \right \vert \leq 2^{-53} \cdot \left \vert s_1
+\right \vert \leq 2^{-53} \cdot \left \vert \round \left( k \cdot
+msLog2Div2L_\hi \right) \right \vert \leq 2^{-52} \cdot \left \vert k
+\cdot msLog2Div2L_\hi \right \vert$$
+and further
+$$\left \vert s_3 \right \vert \leq \left \vert k \cdot msLog2Div2L_\mi \left( 1 + \epsilon_1 \right) \right \vert
+\leq \left \vert k \cdot msLog2Div2L_\mi \right \vert + \left \vert \epsilon_1 \right \vert \cdot
+\left \vert k \cdot msLog2Div2L_\mi \right \vert$$
+So one can easily check that 
+$$\left \vert \delta^\prime \right \vert \leq 2^{-104} \cdot \left
+\vert k \cdot msLog2Div2Lh \right \vert$$ In consequence using the
+fact that $\left \vert msLog2Div2L_\hi \right \vert = \left \vert \round
+\left( \frac{\ln\left( 2 \right)}{2^{12}} \right) \right \vert \leq 2
+\cdot \left \vert \frac{\ln\left( 2 \right)}{2^{12}} \right \vert$ and
+the bound for $k$, one obtains
+$$\left \vert \delta^\prime \right \vert \leq \left \vert \left( x
+\cdot \frac{2^{12}}{\ln\left( 2 \right)} + \frac{1}{2} + 2^{-19}
+\right) \cdot \frac{\ln\left( 2 \right)}{2^{12}} \right \vert$$ Since
+$\left \vert x \right \vert \leq 746$ after filtering out the special
+cases, we obtain $\left \vert \delta^\prime \right \vert \leq 2^{-103}
+\cdot 2^{10} = 2^{-93}$.  
+
+To this round-off error adds the
+approximation error comitted by rounding $\frac{\ln\left( 2
+\right)}{2^{12}}$ to a double-double.
+We can note 
+$$r_\hi + r_\mi = x - k \cdot \frac{\ln\left( 2 \right)}{2^{12}} \cdot
+\left( 1 + \epsilon_{\mbox{\tiny logconstquick}} \right) +
+\delta^\prime$$
+This gives us 
+$$r_\hi + r_\mi = \hat{r} + \delta$$ with $\left \vert \delta \right
+\vert \leq \left \vert k \cdot \frac{\ln\left( 2 \right)}{2^{12}}
+\cdot \epsilon_{\mbox{\tiny logconstquick}} \right \vert + \left \vert
+\delta^\prime \right \vert$. One can easily check that one obtains
+thus finally $\left \vert \delta \right \vert \leq 2^{-92}$.
+
+This absolute error $\delta$ in the reduced argument $\hat{r}$
+translates to a relative error $\epsilon_{\mbox{\tiny argredquick}}$ in the function $e^{\hat{r}}$ as
+follows:
+\begin{eqnarray*}
+e^r & = & e^{\hat{r} + \delta} \\
+& = & e^{\hat{r}} \cdot e^{\delta} \\
+& = & e^{\hat{r}} \cdot \sum\limits_{i=0}^{\infty} \frac{1}{i!} \cdot \delta^i \\
+& = & e^{\hat{r}} \cdot \left( 1 + \sum\limits_{i=1}^{\infty} \frac{1}{i!} \cdot \delta^i \right) \\
+& = & e^{\hat{r}} \cdot \left( 1 + \epsilon_{\mbox{\tiny argredquick}} \right)
+\end{eqnarray*}
+with $\epsilon_{\mbox{\tiny argredquick}} = \sum\limits_{i=1}^{\infty} \frac{1}{i!} \cdot \delta^i =
+\delta \cdot \sum\limits_{i=0}^{\infty} \frac{1}{\left(i + 1 \right)!}
+\cdot \delta^i$.
+Since $\left \vert \delta \right \vert < \frac{1}{2}$, we get 
+$$\forall i \geq 0 \mbox{ . } \left \vert \frac{1}{\left( i + 1
+\right)!} \cdot \delta^i \right \vert \leq \left( \frac{1}{2}
+\right)^i$$ In consequence, $\sum\limits_{i=0}^{\infty}
+\frac{1}{\left(i + 1 \right)!}  \cdot \delta^i \leq
+\sum\limits_{i=0}^{\infty} \left( \frac{1}{2} \right)^i = 2$.  
+
+Thus we get $\left \vert \epsilon_{\mbox{\tiny argredquick}} \right
+\vert \leq 2 \cdot \left \vert \delta \right \vert \leq 2^{-91}$.
+
+Still in the second step of the argument reduction, the values $M$,
+$i_1$ and $i_2$ are computed exactly in integer computation as
+follows:
+\begin{lstlisting}[caption={Argument reduction - second step (cont'd)},firstnumber=1]
+M = k >> L;
+index1 = k & INDEXMASK1;
+index2 = (k & INDEXMASK2) >> LHALF;
+\end{lstlisting}
+Here \texttt{L} is equal to $12$ and \texttt{LHALF} is equal to
+$6$. The values \texttt{INDEXMASK1} and \texttt{INDEXMASK2} are masks
+to the lowest 6 bits and respectively to bits 6 through 15 of an 32
+bit word.
+
+If ever the accurate phase must be launched, a third argument
+reduction phase is performed.  It computes a triple-double $r_\hi +
+r_\mi + r_\lo = \hat{r} + \delta$ such that the resulting relative
+error on the exponential function $\epsilon_{\mbox{\tiny
+argredaccurate}} = \frac{e^{\hat{r} + \delta} -
+e^{\hat{r}}}{e^{\hat{r}}}$ is bounded by $\left \vert
+\epsilon_{\mbox{\tiny argredaccurate}} \right \vert \leq 2^{-140}$ as
+will be shown below. This step uses a triple-double approximation to
+$\frac{\ln\left( 2 \right)}{2^{12}}$ with a relative error $$\left
+\vert \epsilon_{\mbox{\tiny logconstaccurate}} \right \vert = \left
+\vert \frac{msLog2Div2L_\hi + msLog2Div2L_\mi + msLog2Div2L_\lo +
+2^{-12} \cdot \ln\left( 2 \right)}{-2^{-12} \cdot \ln\left( 2 \right)}
+\right \vert \leq 2^{-163}$$ It is implemented as follows:
+\begin{lstlisting}[caption={Argument reduction - third step},firstnumber=1]
+Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+t1 = x + msLog2Div2LMultKh;
+Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+\end{lstlisting}
+The values for $k$, $M$, $i_1$ and $i_2$ that have been exactly
+computed already at the second argument reduction step can of course
+be reused.
+
+All operation but the first \texttt{Mul133} operator are exact: the
+last two by their general properties, the addition $t_1 = x \oplus
+msLog2Div2LMultK_\hi$ as per Sterbenz' lemma analogously as in the
+second argument reduction step. So one can note
+$$r_\hi + r_\mi + r_\lo = x - k \cdot \left( msLog2Div2L_\hi +
+msLog2Div2L_\mi + msLog2Div2L_\lo \right) \cdot \left( 1 + \epsilon_1
+\right)$$ where $\epsilon_1$ is the relative error bound of the
+\texttt{Mul133} operator, for instance $\left \vert \epsilon_1 \right
+\vert \leq 2^{-153}$. Integrating also the rounding error in the constant, we
+get 
+$$r_\hi + r_\mi + r_\lo = x - k \cdot \frac{\ln\left( 2
+\right)}{2^{12}} + \delta$$ with $\left \vert \delta \right \vert \leq
+\left \vert k \cdot \frac{\ln\left( 2 \right)}{2^{12}} \right \vert
+\cdot \left( 2^{-163} + 2^{-153} \right) \leq 2^{-152} \cdot \left
+\vert k \cdot \frac{\ln\left( 2 \right)}{2^{12}} \right \vert \leq
+2^{-141}$.  One checks the previous upper bounds by using analogous
+arguments as the ones given for the second argument reduction step.
+Once again, this absolute error $\delta$ translates to a relative
+error $\epsilon_{\mbox{\tiny argredaccurate}} = \frac{e^{\hat{r} +
+\delta} - e^{\hat{r}}}{e^{\hat{r}}}$ in a similar way as mentioned
+above. We get $$\left \vert \epsilon_{\mbox{\tiny argredaccurate}}
+\right \vert \leq 2^{-140}$$ which is the bound to prove.
+
+Let us still remark that argument reduction is exact for arguments $x$
+such that $\left \vert x \right \vert \leq \frac{\ln\left( 2
+\right)}{2^{13}} < 2^{-13}$. In fact, in this case, $k = 0$ which
+implies that all multiplications of $k$ by the constants for
+$\frac{\ln\left( 2 \right)}{2^{12}}$ are exact. 
+
+According to their uses either in quick or accurate phase, the table
+values $t_1 = e^{\frac{i_1}{2^{12}}}$ and $t_2 =
+e^{\frac{i_1}{2^{12}}}$ for $i_1, i_2 \in \left \lbrace 0 \dots 63
+\right \rbrace$ are read as a double-double or as a triple-double. By
+construction, the double-double values have a relative error
+$\epsilon_{\mbox{\tiny tablequick}} = \frac{tbl_{i\hi} + tbl_{i\mi} -
+t_i}{t_i}$ bounded by $\left \vert \epsilon_{\mbox{\tiny tablequick}}
+\right \vert \leq 2^{-106}$.  The triple-double values with
+$\epsilon_{\mbox{\tiny tableaccurate}} = \frac{tbl_{i\hi} + tbl_{i\mi}
++ tbl_{i\lo} - t_i}{t_i}$ verify $\left \vert \epsilon_{\mbox{\tiny
+tableaccurate}} \right \vert \leq 2^{-159}$. For $i_1 = 0$ and $i_2 =
+0$ both errors are equal to $0$, so both argument reduction and
+reconstruction steps are exact for argument $x$ that verify $\left
+\vert x \right \vert \leq 2^{-13}$.
+
+\section{Polynomial approximation and reconstruction}\label{sec:exppolynomial}
+In both quick and accurate phase, the reduced argument $r_\hi + r_\mi$
+respectively $r_\hi + r_\mi + r_\lo$ corresponding to their
+mathematical equivalent $\hat{r}$ are bounded by $\left \vert \hat{r}
+\right \vert \leq \frac{\ln\left( 2 \right)}{2^{12}} \cdot \left(
+2^{-1} + 2^{-19} \right) + \delta < 2^{-13}$.  After simplification by
+$e^{r_\hi + r_\mi + r_\lo} = e^{r_\hi} \cdot e^{r_\mi} \cdot
+e^{r_\lo}$, $e^{r_\hi} - 1$ is approximated by a polynomial of degree
+4 or 7. The functions $e^{r_\mi} - 1$ and potentially $e^{r_\lo} - 1$
+are both approximated linearly by $r_\mi$ or, respectively, $r_\lo$.
+
+Concerning the approximation errors for $e^{r_\mi}$ and $e^{r_\lo}$,
+one can note that $\left \vert r_\mi \right \vert \leq 2^{-52} \cdot
+2^{-13} \leq 2^{-65}$ and $\left \vert r_\lo \right \vert \leq
+2^{-105} \cdot 2^{-13} \leq 2^{-118}$. In consequence
+$\epsilon_{\mbox{\tiny approxargmiddle}} = \frac{r_\mi - \left(
+e^{r_\mi} - 1 \right)}{\left( e^{r_\mi} - 1 \right)}$ and
+$\epsilon_{\mbox{\tiny approxarglower}} = \frac{r_\lo - \left(
+e^{r_\lo} - 1 \right)}{\left( e^{r_\lo} - 1 \right)}$ are bounded by
+$\left \vert \epsilon_{\mbox{\tiny approxargmiddle}} \right \vert \leq
+2^{-66}$ and $\left \vert \epsilon_{\mbox{\tiny approxarglower}}
+\right \vert \leq 2^{-119}$.
+
+\subsection{Quick phase polynomial approximation and reconstruction}
+In quick phase $e^{r_\hi} - 1$ is approximated by a polynomial
+$p\left( r_\hi \right)$ of the following form
+$$p\left( r_\hi \right) = r_\hi + \frac{1}{2} \cdot r_\hi^2 + c_3
+\cdot r_\hi^3 + c_4 \cdot r_\hi^4$$ The coefficients $c_3$ and $c_4$
+are stored in double precision, $\frac{1}{2}$ is exactly
+representable. For $r_\hi$ bounded as indicated above, the relative
+approximation error $\epsilon_{\mbox{\tiny approxarghighquick}} =
+\frac{p\left( r_\hi \right) - e^{r_\hi} + 1}{e^{r_\hi} - 1}$ is bounded by 
+$\left \vert \epsilon_{\mbox{\tiny approxarghighquick}} \right \vert \leq 2^{-62}$.
+
+The polynomial $p\left(r_\hi \right) - r_\hi = \frac{1}{2} \cdot
+r_\hi^2 + c_3 \cdot r_\hi^3 + c_4 \cdot r_\hi^4$ is evaluated in
+double precision using the following scheme:
+\begin{enumerate}
+\item In the beginning, an approximation to $r_\hi^2$, $rhSquare$, is computed. Concurrently, 
+$c_3$ is multiplied by $r_\hi$ yielding to $rhC3 = c_3 \cdot r_\hi \cdot \left( 1 + \epsilon \right)$.
+\item At the first step, the squared argument $rhSquare$ is multiplied
+by $\frac{1}{2}$ yielding to the approximation $rhSquareHalf$. At the
+same time, it is multiplied by $rhC3$ which results in $monomialCube$
+approximating now $c_3 \cdot r_\hi^3$. Still in the same moment, it is
+squared once again yielding to $rhFour$ which approximates thus
+$r_\hi^4$.
+\item At the next dependency top, $rhFour$ is multiplied by
+$c_4$. This results in $monomialFour$ -- a value corresponding to $c_4
+\cdot r_\hi^4$.
+\item In the next moment, $monomialCube$ and $monomialFour$ are added
+together. This gives a value approximating $c_3 \cdot r_\hi^3 + c_4
+\cdot r_\hi^4$.
+\item Finally, $rhSquareHalf$ is added to the value obtained at the
+previous step yielding to an arithmetical approximation of
+$\frac{1}{2} \cdot r_\hi + c_3 \cdot r_\hi^3 + c_4 \cdot r_\hi^4$,
+stored in $highPolyWithSquare$.
+\end{enumerate}
+This scheme does not completely exploit the possible parallelism for
+purpose of not deteriorating too much the final accuracy. It is
+implemented as follows:
+\begin{lstlisting}[caption={Quick phase polynomial evaluation - high order terms},firstnumber=1]
+rhSquare = rh * rh;
+rhC3 = c3 * rh;
+
+rhSquareHalf = 0.5 * rhSquare;
+monomialCube = rhC3 * rhSquare;
+rhFour = rhSquare * rhSquare;
+
+monomialFour = c4 * rhFour;
+
+highPoly = monomialCube + monomialFour;
+
+highPolyWithSquare = rhSquareHalf + highPoly;
+\end{lstlisting}
+The following steps must still add the linear term $r_\hi$ of the
+polynomial ($p\left( r_\hi \right) = r_\hi + highPolyWithSquare$) and
+reconstruct the exponential as
+$$e^{x} = 2^M \cdot \left( tbl_{1\hi} + tbl_{1\mi} \right) \cdot
+\left( tbl_{2\hi} + tbl_{2\mi} \right) \cdot \left( 1 + r_\hi +
+highPolyWithSquare \right) \cdot \left( 1 + r_\mi \right) + \delta$$
+In order to allow for increasing speed by approximating different
+terms, they are implemented as this:
+\begin{enumerate}
+\item The two table values $tbl_{1\hi} + tbl_{1\mi}$ and $tbl_{2\hi} +
+tbl_{2\mi}$ are multiplied using a double-double multiplication
+operator yielding to $tables_\hi + tables_\lo = \left( tbl_{1\hi} +
+tbl_{1\mi} \right) \cdot \left( tbl_{2\hi} + tbl_{2\mi} \right) \cdot
+\left( 1 + \epsilon \right)$.
+\item The term \\
+$\left( 1 + r_\hi + highPolyWithSquare \right) \cdot
+\left( 1 + r_\mi \right) =$ \\ $1 + r_\hi + highPolyWithSquare + r_\mi +
+r_\hi \cdot r_\mi + highPolyWithSquare \cdot r_\mi$ \\ is approximated
+by neglecting the quadratic terms. First $r_\hi$ and
+$highPolyWithSquare$ are added together in double precision. Their sum
+is then added to $r_\hi$ in double precision, too.  This yields to the
+intermediate value $t_9$. The addition with $1$ is not explicited.
+\item The multiplication $\left( tables_\hi + tables_\lo \right) \cdot
+\left( 1 + t_9 \right)$ is approximated by $tables_\hi + tables_\lo +
+tables_\hi \cdot t_9$. The multiplication $tables_\hi \cdot t_9$ is
+performed in double precision. It produces $t_{10}$.
+\item The addition $tables_\hi + tables_\lo + t_{10}$ is carried out
+in double-double precision. Its result $polyTbl_\hi + polyTbl_\mi$
+approximates finally
+$$polyTbl_\hi + polyTbl_\mi = \left( tbl_{1\hi} + tbl_{1\mi} \right)
+\cdot \left( tbl_{2\hi} + tbl_{2\mi} \right) \cdot \left( 1 + p\left(
+r_\hi \right) \right) \cdot \left( 1 + r_\mi \right) \cdot \left( 1 +
+\epsilon \right)$$
+for some relative error $\epsilon$.
+\end{enumerate}
+The steps explained above are implemented in the code as follows:
+\begin{lstlisting}[caption={Quick phase reconstruction},firstnumber=1]
+Mul22(&tablesh,&tablesl,tbl1h,tbl1m,tbl2h,tbl2m);
+
+t8 = rm + highPolyWithSquare;
+t9 = rh + t8;
+
+t10 = tablesh * t9;
+
+Add12(t11,t12,tablesh,t10);
+t13 = t12 + tablesl;
+Add12(polyTblh,polyTblm,t11,t13);
+\end{lstlisting}
+
+The final result for the exponential is $e^x \approx 2^M \cdot \left(
+polyTbl_\hi + polyTbl_\mi \right)$.  On this value, a rounding test
+would have to be performed. Since gradual underflow is excluded by
+special case handling, the multiplication by $2^M$ is exact. In
+consequence, it is possible to do the rounding test on $polyTbl_\hi +
+polyTbl_\mi$ and to multiply then by $2^M$. This is the way chosen in
+the given implementation. See section \ref{sec:expfinalround}, page
+\pageref{sec:expfinalround}, for further details.
+
+\subsection{Accurate phase polynomial approximation and reconstruction}
+In accurate phase, $e^{r_\hi} - 1$ is approximated by a polynomial
+$p\left( r_\hi \right)$ of degree $7$. It has the following form:
+$$p\left( r_\hi \right) = r_\hi + \frac{1}{2} \cdot r_\hi^2 + r_\hi^3
+\cdot \left( \left( c_{3\hi} + c_{3\lo} \right) + r_\hi \cdot \left(
+\left( c_{4\hi} + c_{4\lo} \right) + r_\hi \cdot \left( c_5 + r_\hi
+\cdot \left( c_6 + r_\hi \cdot c_7 \right) \right) \right) \right)$$
+Coefficients $c_{3\hi} + c_{3\lo}$ and $c_{4\hi} + c_{4\lo}$ are
+stored as double-double numbers, coefficients $c_5$ through $c_7$ are
+stored in double precision.
+
+For $r_\hi$ bounded by $\left \vert r_\hi \right \vert \leq 2^{-13}$,
+the relative approximation error $\epsilon_{\mbox{\tiny
+approxarghighaccu}} = \frac{p\left( r_\hi \right) - e^{r_\hi} +
+1}{e^{r_\hi} - 1}$ is bounded by $\left \vert \epsilon_{\mbox{\tiny
+approxarghighaccu}} \right \vert \leq 2^{-113}$.  For $r_\hi$ such
+that $\left \vert r_\hi \right \vert \leq 2^{-30}$,
+$\epsilon_{\mbox{\tiny approxarghighaccu}}$ is bounded by $\left \vert
+\epsilon_{\mbox{\tiny approxarghighaccu}} \right \vert \leq 2^{-160}$.
+
+The polynomial $p\left( r_\hi \right)$ is evaluated as follows:
+\begin{enumerate}
+\item The high order terms of $p\left( r_\hi \right)$, $c_5 + r_\hi
+\cdot \left( c_6 + r_\hi \cdot c_7 \right)$ are evaluated in double
+precision using Horner's scheme.  The result of this evaluation is
+stored in $highPoly \approx c_5 + r_\hi \cdot \left( c_6 + r_\hi \cdot
+c_7 \right)$.
+\item The multiplication $r_\hi \cdot highPoly$ is implemented using
+an exact operator and yields to a double-double $t_{1\hi} +
+t_{1\lo}$. The following steps leading to $t_{4\hi} + t_{4\lo} \approx
+\left( c_{3\hi} + c_{3\lo} \right) + r_\hi \cdot \left( \left(
+c_{4\hi} + c_{4\lo} \right) + \left( t_{1\hi} + t_{1\lo} \right)
+\right)$ are implemented using double-double computations and Horner's
+scheme.
+\item The sum of the low order terms $r_\hi + \frac{1}{2} \cdot
+r_\hi^2$, stored in a non-overlapped triple-double $lowPoly_\hi +
+lowPoly_\mi + lowPoly_\lo$, is computed exactly as follows: first
+$r_\hi$ is squared exactly using an exact multiplication operator
+producing $rhSquare_\hi + rhSquare_\lo = r_\hi \cdot r_\hi$. Since for
+arguments $x$ to the exponential function such that $\left \vert x
+\right \vert \leq 2^{-55}$ rounding is trivial in all rounding modes,
+we can suppose that $\left \vert x \right > 2^{-55}$. In consequence,
+since $x$ is a double precision number, the reduced argument $r_\hi$
+is either equal to $0$ or greater in magnitude than $2^{-58}$. So both
+$rhSquare_\hi$ and $rhSquare_\lo$ are either exactly $0$ or greater in
+magnitude than $\left( 2^{-58} \right)^2 \cdot 2^{-53} =
+2^{-169}$. They are thus never subnormal.  Therefore the pairwise
+multiplication of $rhSquare_\hi + rhSquare_\lo$ by $\frac{1}{2}$
+yielding to $rhSquareHalf_\hi + rhSquareHalf_\lo = \frac{1}{2} \cdot
+r_\hi^2$ is exact. Since $r_\hi$ is such that $\left \vert r_\hi
+\right \vert \leq 2^{-13}$, $r_\hi + rhSquareHalf_\hi +
+rhSquareHalf_\lo$ can be considered as a partially overlapped
+triple-double number. The overlap bound is such that $\left \vert
+rhSquareHalf_\hi \right \vert \leq 2^{-12} \cdot \left \vert r_\hi
+\right \vert$ and $\left \vert rhSquareHalf_\lo \right \vert \leq
+2^{-53} \cdot \left \vert rhSquareHalf_\hi \right \vert$.  Thus it is
+possible to use the \Renormalize~ sequence
+\cite{Lauter2005LIP:tripledouble} to obtain a non-overlapped
+triple-double $lowPoly_\hi + lowPoly_\mi + lowPoly_\lo$ which is
+exactly equal to $r_\hi + \frac{1}{2} \cdot r_\hi^2$ because the
+renormalization operator is exact and all preceeding operations have
+been, too.
+\item An triple-double approximation to $r_\hi^3$, stored in
+$rhCube_\hi + rhCube_\mi + rhCube_\lo$ is computed by multiplying
+$r_\hi$ by the exact $rhSquare_\hi + rhSquare_\lo$ computed in the
+previous step. For this operation the \MulDT~ sequence is used.
+\item The approximation of the high order terms of the polynomial,
+$t_{4\hi} + t_{4\lo}$ is then multiplied by $rhCube_\hi + rhCube_\mi +
+rhCube_\lo$ using a triple-double multiplication operator. The result
+of this operation is added to $lowPoly_\hi + lowPoly_\mi +
+lowPoly_\lo$ in order to obtain a potentially overlapped triple-double
+$p_\hi + p_\mi + p_\lo$ approximating $p\left( r_\hi \right)$.
+\end{enumerate}
+All this steps are implemented by the following code:
+\begin{lstlisting}[caption={Accurate phase polynomial approximation},firstnumber=1]
+highPoly = accPolyC5 + rh * (accPolyC6 + rh * accPolyC7);
+
+Mul12(&t1h,&t1l,rh,highPoly);
+Add22(&t2h,&t2l,accPolyC4h,accPolyC4l,t1h,t1l);
+Mul22(&t3h,&t3l,rh,0,t2h,t2l);
+Add22(&t4h,&t4l,accPolyC3h,accPolyC3l,t3h,t3l);
+
+Mul12(&rhSquareh,&rhSquarel,rh,rh);
+Mul23(&rhCubeh,&rhCubem,&rhCubel,rh,0,rhSquareh,rhSquarel);
+
+rhSquareHalfh = 0.5 * rhSquareh;
+rhSquareHalfl = 0.5 * rhSquarel;  
+
+Renormalize3(&lowPolyh,&lowPolym,&lowPolyl,rh,rhSquareHalfh,rhSquareHalfl);
+
+Mul233(&highPolyMulth,&highPolyMultm,&highPolyMultl,t4h,t4l,rhCubeh,rhCubem,rhCubel);
+
+Add33(&ph,&pm,&pl,lowPolyh,lowPolym,lowPolyl,highPolyMulth,highPolyMultm,highPolyMultl);
+\end{lstlisting}
+For reconstructing $e^x$ out of the polynomial approximation of
+$e^{r_\hi}-1$, $e^{r_\mi}-1$, $e^{r_\lo}-1$ and the table values
+$tbl_{1\hi} + tbl_{1\mi} + tbl_{1\lo}$ and $tbl_{2\hi} + tbl_{2\mi} +
+tbl_{2\lo}$ the following term must be approximated:
+$$e^x \approx 2^M \cdot \left( tbl_{1\hi} + tbl_{1\mi} + tbl_{1\lo}
+\right) \cdot \left( tbl_{2\hi} + tbl_{2\mi} + tbl_{2\lo} \right)
+\cdot \left( 1 + \left( p_\hi + p_\mi + p_\lo \right) \right) \cdot
+\left( 1 + r_\mi \right) \cdot \left( 1 + r_\lo \right)$$ First, the
+following approximation is possible $$\left( 1 + \left( p_\hi + p_\mi
++ p_\lo \right) \right) \cdot \left( 1 + r_\mi \right) \cdot \left( 1
++ r_\lo \right) \approx 1 + \left( p_\hi + p_\mi + p_\lo + r_\mi +
+r_\lo + \left( r_\mi + r_\lo \right) \cdot \left( p_\hi + p_\mi
+\right) \right)$$ First an arithmetical approximation $fullPoly_\hi +
+fullPoly_\mi + fullPoly_\lo$ to $p_\hi + p_\mi + p_\lo + r_\mi + r_\lo
++ \left( r_\mi + r_\lo \right) \cdot \left( p_\hi + p_\mi \right)$ is
+computed as follows:
+\begin{enumerate}
+\item By means of an exact, unconditional addition, $p_\hi$ and
+$p_\mi$, which may be potentially overlapped because of being the
+higher significant parts of an overlapped triple-double, are
+renormalized. 
+\item They are then multiplied by the non-overlapping $r_\mi +
+r_\lo$ using a double-double multiplication operator. The result of
+this product is added to $r_\mi + r_\lo$ in double-double
+precision. 
+\item The result of this addition, $q_\hi + q_\lo$, approximates
+thus $r_\mi + r_\lo + \left( r_\mi + r_\lo \right) \cdot \left( p_\hi
++ p_\mi \right)$.
+\item The triple-double addition operator \AddDTT~ allows then for adding 
+$p_\hi + p_\mi + p_\lo$ to $q_\hi + q_\lo$ resulting in $fullPoly_\hi +
+fullPoly_\mi + fullPoly_\lo$.
+\end{enumerate}
+Then $1$ is added to $fullPoly_\hi + fullPoly_\mi + fullPoly_\lo$ by
+the following code sequence:
+\begin{lstlisting}[caption={Addition with $1$},firstnumber=1]
+Add12(polyAddOneh,t5,1,fullPolyh);
+Add12Cond(polyAddOnem,t6,t5,fullPolym);
+polyAddOnel = t6 + fullPolyl;
+\end{lstlisting}
+Since the \Add~ operator is exact, the round-off error of this adding
+of $1$ is equal to the round-off error in the last addition
+$polyAddOne_\lo = t_6 \oplus fullPoly_\lo$. In absolute value, it is
+always less than $2^{-53} \cdot \left \vert t_6 + fullPoly_\lo \right
+\vert$. Since $\left \vert r_\hi \right \vert \leq 2^{-12}$, one
+checks that $\frac{1}{2} < polyAddOne_\hi < 2$. So the relative error
+of this addition with $1$, $\epsilon_{\mbox{\tiny addOne}}$ is in
+magnitude less than $2^{-52} \cdot \left \vert t_6 + fullPoly_\lo
+\right \vert$. This is particularly important when considering high
+critical precision worst cases, see section \ref{sec:expaccuracy},
+page \pageref{sec:expaccuracy}.
+
+The result of the polynomial approximation, $$polyWithOne_\hi +
+polyWithOne_\mi + polyWithOne_\lo \approx e^{r_\hi} \cdot e^{r_\mi}
+\cdot e^{r_\lo}$$ is then multiplied in two steps first by $tbl_{1\hi}
++ tbl_{1\mi} + tbl_{2\lo}$ and then by $tbl_{2\hi} + tbl_{2\mi} +
+tbl_{2\lo}$ using each time the triple-double multiplication operator
+\MulTT. Remark that these multiplications are exact for arguments
+$\left \vert x \right \vert \leq 2^{-14}$ because in this case, $k=0$,
+$i_1 = 0$ and $i_2 = 0$ which implies that $tbl_{1\hi} = 1$,
+$tbl_{2\hi} = 1$ and $tbl_{i\mi} = 0$ and $tbl_{i\lo} = 0$. In fact
+machine multiplications by $1$ are always exact. 
+
+The final product of this multiplications may be overlapped and is
+therefore renormalized using the \Renormalize~ sequence. This yields
+to the non-overlapped triple-double $polyTbl_\hi + polyTbl_\mi +
+polyTbl_\lo$ approximating $\frac{e^x}{2^M}$.
+
+All these steps are implemented by the following code sequence:
+\begin{lstlisting}[caption={Accurate phase reconstruction},firstnumber=1]
+Add12(phnorm,pmnorm,ph,pm);
+Mul22(&rmlMultPh,&rmlMultPl,rm,rl,phnorm,pmnorm);
+Add22(&qh,&ql,rm,rl,rmlMultPh,rmlMultPl);
+
+Add233Cond(&fullPolyh,&fullPolym,&fullPolyl,qh,ql,ph,pm,pl);
+Add12(polyAddOneh,t5,1,fullPolyh);
+Add12Cond(polyAddOnem,t6,t5,fullPolym);
+polyAddOnel = t6 + fullPolyl;
+Mul33(&polyWithTbl1h,&polyWithTbl1m,&polyWithTbl1l,tbl1h,tbl1m,tbl1l,polyAddOneh,polyAddOnem,polyAddOnel);
+Mul33(&polyWithTablesh,&polyWithTablesm,&polyWithTablesl,
+	tbl2h,tbl2m,tbl2l,
+	polyWithTbl1h,polyWithTbl1m,polyWithTbl1l);
+
+Renormalize3(polyTblh,polyTblm,polyTbll,polyWithTablesh,polyWithTablesm,polyWithTablesl);
+\end{lstlisting}
+
+The multiplication of $polyTbl_\hi + polyTbl_\mi + polyTbl_\lo$ by
+$2^M$ and the final rounding will be discussed in the next section.
+
+\section{Final rounding}\label{sec:expfinalround}
+For both quick and accurate phase, final rounding is simple when the
+result cannot be underflowed. In this case, the final multiplication
+of $t_1 \cdot t_2 \cdot e^r$ by $2^M$ only affects the exponent of $t_1
+\cdot t_2 \cdot e^r$. So the rounding test and the final rounding (in
+quick and accurate phase) can be done on $t_1 \cdot t_2 \cdot e^r$
+before this value is multiplied by $2^M$. This rounding is a standard
+\crlibm~ rounding of respectively a double-double or a
+triple-double. Since $M$ might be as great as $M = 1024$ (whilst $t_1
+\cdot t_2 \cdot e^r < 1$ in this case, because overflow in the final
+result has been filtered out), $2^M$ may not be
+representable. Nevertheless it is possible not to representate
+$2^M$ explicitely in a variable and to replace the operation by the
+following sequence. We suppose that $polyTbl_\hi = \round \left( t_1
+\cdot t_2 \cdot e^r + \delta \right)$.
+\begin{lstlisting}[caption={Final multiplication by $2^M$},firstnumber=1]
+polyTblhdb.d = polyTblh;
+polyTblhdb.i[HI] += M << 20;
+return polyTblhdb.d;
+\end{lstlisting}
+
+If the result might be gradually underflowed but is not completely
+underflowed (i.e. not equal to $0$ or $0^+$ depending on the rounding
+mode), the quick phase is not used and the accurate phase is launched
+in any case. This does not sensibly affect performance. The
+triple-double result of the accurate phase, \texttt{polyTblh},
+\texttt{polyTblm} and \texttt{polyTbll}, where $polyTbl_\hi +
+polyTbl_\mi + polyTbl_\lo \approx t_1 \cdot t_2 \cdot e^r$, is
+multiplied by $2^M$ and rounded to double precision as follows:
+\begin{itemize}
+\item $polyTbl_\hi$ is multiplied by $2^M$ in two steps: $2^M$ is not
+representable in double precision but $2^{-1000}$ and $2^{M+1000}$
+are. This multiplication generates a subnormal $t_4$, which prevents
+us from replacing it by an integer sequence manipulating the exponent
+of the numbers involved. We have $t_4 = \round \left( 2^M \cdot
+polyTbl_\hi\right) = 2^M polyTbl_\hi + \delta$ with $\left \vert
+\delta \right \vert \leq \frac{1}{2} \cdot \mUlp\left( \mbox{\small \it denorm} \right)
+= 2^{-1075}$.
+\item The obtained value $t_4$ is remultiplied by $2^{-M}$, once again
+in $2$ steps. This multiplication produces a normal number and is
+therefore exact: $t_6 = 2^{-M} \cdot \round\left( 2^M \cdot
+polyTbl_\hi \right) = polyTbl_\hi + 2^{-M} \cdot \delta$.
+\item Since $\left \vert M \right \vert \leq 1075$ and $\left \vert
+polyTbl_\hi \right \vert \leq 2$, one checks that 
+$$\frac{1}{2} \cdot polyTbl_\hi \leq t_6 \leq 2 \cdot polyTbl_\hi$$
+is verified. So the arithmetical substraction $t_7 = polyTbl_\hi \ominus t_6$ 
+is exact by Sterbenz' lemma and one obtains: 
+$$t_7 = 2^{-M} \cdot \left( 2^M \cdot polyTbl_\hi - \round \left( 2^M
+\cdot polyTbl_\hi \right) \right)$$
+We obtain therefore
+$$t_4 + 2^M \cdot \left( t_7 + polyTbl_\mi + polyTbl_\lo \right) = 
+2^M \cdot \left( polyTbl_\hi + polyTbl_\mi + polyTbl_\lo \right)$$
+Further, since the triple-double number
+$polyTbl_\hi + polyTbl_\mi + polyTbl_\lo$ is non-overlapping, we know that
+$$t_4 \in \left \lbrace r^-, r, r^+\right \rbrace$$
+with $r = \round \left( polyTbl_\hi + polyTbl_\mi + polyTbl_\lo \right)$.
+In addition, since the precision of a denormal is maximally $52$ bits and 
+that of a normal (like $polyTbl_\hi$) is $53$ bits, $t_7$ is either $0$ or 
+greater in magnitude than $polyTbl_\mi + polyTbl_\lo$. If this were not the case, 
+the triple-double would overlap. Thus $2^M \cdot \left( t_7 + polyTbl_\mi + polyTbl_\lo \right)$
+corresponds to the part of the high accuracy mantissa that is rounded off when 
+rounding to the subnormal and if $t_7$ is not zero, it contains at least the first bit that is rounded off.
+\end{itemize}
+The arithmetical steps mentioned are performed by the following code sequence:
+\begin{lstlisting}[caption={Underflowed final multiplication and rounding},firstnumber=1]
+/* Final rounding and multiplication with 2^M 
+
+   We first multiply the highest significant byte by 2^M in two steps
+	and adjust it then depending on the lower significant parts.
+
+	We cannot multiply directly by 2^M since M is less than -1022.
+	We first multiply by 2^(-1000) and then by 2^(M+1000).
+
+*/
+
+t3 = polyTblh * twoPowerM1000;
+
+/* Form now twoPowerM with adjusted M */
+twoPowerMdb.i[LO] = 0;
+twoPowerMdb.i[HI] = (M + 2023) << 20;
+
+
+/* Multiply with the rest of M, the result will be denormalized */
+t4 = t3 * twoPowerMdb.d;
+
+/* For x86, force the compiler to pass through memory for having the right rounding */
+
+t4db.d = t4;   /* Do not #if-ify this line, we need the copy */
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+t4db2.i[HI] = t4db.i[HI];
+t4db2.i[LO] = t4db.i[LO];
+t4 = t4db2.d;
+#endif
+
+/* Remultiply by 2^(-M) for manipulating the rounding error and the lower significant parts */
+M *= -1;
+twoPowerMdb.i[LO] = 0;
+twoPowerMdb.i[HI] = (M + 23) << 20;
+t5 = t4 * twoPowerMdb.d;
+t6 = t5 * twoPower1000;
+t7 = polyTblh - t6;
+\end{lstlisting}
+One remarks that on $x86$ platforms, it is necessary to write $t_4$ to
+memory and to reread it from there in order to to overcome the inexistence
+of pseudosubnormals in the underlying $80$ bit register format.
+
+Depending on the rounding mode, $t_4$ is then adjusted to the correct
+rounding of \\$2^M \cdot \left( polyTbl_\hi + polyTbl_\mi + polyTbl_\lo
+\right)$ as follows:
+\begin{itemize}
+\item In round-to-nearest mode, the rounding decision when rounding to
+a subnormal is made at a constant value $\frac{1}{2} \cdot \mUlp\left(
+\mbox{\small \it denorm}\right) = 2^{-1075}$. 
+
+Rounding is simple for round-to-nearest when the mantissa does not
+contain a one following the last mantissa bit of the rounded
+result. In this case, the rounding downwards and thus equivalent to a
+truncation. Truncation to different lengths is associative. Omitting
+$polyTbl_\mi + polyTbl_\lo$ is a truncation. The rounding of $2^M
+\cdot polyTbl_\hi$ to a subnormal is correct as per the use of a IEEE
+754 operation. So $t_4$ already is equal to $\round\left( polyTbl_\hi
++ polyTbl_\mi + polyTbl_\lo \right)$.
+
+If the first bit following the last mantissa bit of the rounded result
+is a one, two cases must be considered: if the TMD's case is such that
+the next following mantissa one is contained in the bits of
+$polyTbl_\hi$ that are rounded of, the rounding $\round \left( 2^M
+\cdot polyTbl_\hi \right)$ is equivalent to the rounding $\round
+\left( 2^M \cdot \left( polyTbl_\hi + polyTbl_\mi + polyTbl_\lo
+\right) \right)$ because both roundings are upwards. So in this case,
+too, $t_4$ already contains the correct result. 
+
+In contrast, if the the TMD's case is such that the next following
+mantissa one (after the first one following the rounded mantissa) is
+only contained in $polyTbl_\mi + polyTbl_\lo$, the rounding direction
+of $\round \left( 2^M \cdot polyTbl_\hi \right)$ and $\round \left(
+2^M \cdot \left( polyTbl_\hi + polyTbl_\mi + polyTbl_\lo \right)
+\right)$ may be different.  As $t_7$ is the (scaled) correction of the
+roundoff of $\round \left( 2^M \cdot polyTbl_\hi \right)$ and greater
+in magnitude than $polyTbl_\mi + polyTbl_\lo$, its sign determines the
+rounding direction of the rounding $t_4 = \round \left( 2^M \cdot
+polyTbl_\hi \right)$. The sign of $polyTbl_\mi = \round \left(
+polyTbl_\hi + polyTbl_\lo \right)$ determines then that of the
+direction of \\$\round \left( 2^M \cdot \left( polyTbl_\hi + polyTbl_\mi
++ polyTbl_\lo \right) \right)$ and such whether $t_4$ must be adjusted
+by $\pm 1 \mUlp$.
+
+The algorithm is thus the following: $2^M \cdot t_7$ is compared to
+$\frac{1}{2} \cdot \mUlp\left( \mbox{\small \it denorm}\right)$ by
+comparing $t_7$ to $2^{-1075-M}$. This determines whether the rounding
+is easy and $t_4$ can be returned or whether an adjustment must be
+made. If the latter is the case, the signs of $t_7$ and $polyTbl_\hi$ 
+are examined and $t_4$ is adjusted. Since $e^x > 0 \mbox{~~} \forall x \in \R$,
+the adjustment of $t_4$ by $\pm \mUlp$ can be simplified.
+The code sequence below implements this:
+\begin{lstlisting}[caption={Rounding adjustment in round-to-nearest},firstnumber=1]
+/* The rounding decision is made at 1/2 ulp of a denormal, i.e. at 2^(-1075)
+	We construct this number and by comparing with it we get to know 
+	whether we are in a difficult rounding case or not. If not we just return 
+	the known result. Otherwise we continue with further tests.
+*/
+
+twoPowerMdb.i[LO] = 0;
+twoPowerMdb.i[HI] = (M - 52) << 20;
+
+if (ABS(t7) != twoPowerMdb.d) return t4;
+
+/* If we are here, we are in a difficult rounding case */
+
+/* We have to adjust the result iff the sign of the error on 
+	rounding 2^M * polyTblh (which must be an ulp of a denormal) 
+	and polyTblm +arith polyTbll is the same which means that 
+	the error made was greater than an ulp of an denormal.
+*/
+
+polyTblm = polyTblm + polyTbll;
+
+if (t7 > 0.0) {
+  if (polyTblm > 0.0) {
+	 t4db.l++;
+	 return t4db.d;
+  } else return t4;
+} else {
+  if (polyTblm < 0.0) {
+	 t4db.l--;
+	 return t4db.d;
+  } else return t4;
+}
+\end{lstlisting}
+\item In round-upwards mode, the rounding~~ $\roundup \left( polyTbl_\hi
++ polyTbl_\mi + polyTbl_\lo \right)$ is determined by $\round\left(
+polyTbl_\hi \right)$ and the rounding rest $2^M \cdot \left( t_7 +
+polyTbl_\mi + polyTbl_\lo \right)$. 
+
+If $t_7$ not equal to $0$, it is greater in magnitude than
+$polyTbl_\mi + polyTbl_\lo$. Thus the rounding direction of the
+to-nearest rounding $\round\left( polyTbl_\hi \right)$ is downwards if
+$t_7 + polyTbl_\mi + polyTbl_\lo$ is positive. In this case, an
+adjustment of $+ 1 \mUlp$ must be made on $t_4$.
+
+If $t_7$ is equal to $0$, the rounding $\round\left( polyTbl_\hi
+\right)$ was errorless and $t_4 = 2^M \cdot polyTbl_\hi$. So we get
+$$\roundup\left( 2^M \cdot \left( polyTbl_\hi + polyTbl_\mi +
+polyTbl_\lo \right) \right) = \roundup\left( t_4 + 2^M \cdot \left(
+polyTbl_\mi + polyTbl_\lo \right) \right)$$ Clearly, $2^M \cdot \left(
+polyTbl_\mi + polyTbl_\lo \right)$ is less than $\mUlp\left( t_4
+\right)$ because $polyTbl_\hi + polyTbl_\mi + polyTbl_\lo$ is
+non-overlapping. One can show that
+$$\roundup\left( x + \mu \right) = \roundup\left( x + \nu \right)$$ if
+$x \in \F$ and $\sgn\left( \mu \right) = \sgn\left( \nu \right)$,
+$\left \vert \mu \right \vert, \left \vert \nu \right \vert <
+\mUlp\left( x \right)$ and $\mu, \nu \in \R$
+\cite{Lauter2005LIP:tripledouble}.  Since the algebraic images of double
+arguments have been filtered out, it is thus possible to find $\mu \in \R$ such that
+with $\nu = 2^M \cdot \left( polyTbl_\mi + polyTbl_\lo \right)$ respectively 
+$\nu = \mUlp\left(t_4\right) + 2^M \cdot \left( polyTbl_\mi + polyTbl_\lo \right)$
+the following can be verified:
+$$\roundup \left( t_4 + 2^M \cdot \left( polyTbl_\mi + polyTbl_\lo
+\right) \right) = \left \lbrace \begin{array}{ll} t_4 & \mbox{ if }
+polyTbl_\mi + polyTbl_\lo < 0 \\ t_4^+ & \mbox{ otherwise} \end{array}
+\right.$$
+
+So it suffices to add $t_7$ and $polyTbl_\mi = \round\left(
+polyTbl_\mi + polyTbl\lo \right)$ together and to check for the sign
+of this sum. The rounding error of this operation may not affect the
+sign of its result. If the sign is positive, $+1 \mUlp$ is added 
+to $t_4$. The following code sequence realizes this:
+\begin{lstlisting}[caption={Rounding adjustment in round-upwards},firstnumber=1]
+/* The rounding can be decided using the sign of the arithmetical sum of the
+	round-to-nearest-error (i.e. t7) and the lower part(s) of the final result.
+	We add first the lower parts and add the result to the error in t7. We have to 
+	keep in mind that everything is scaled by 2^(-M).
+	t8 can never be exactly 0 since we filter out the cases where the image of the 
+	function is algebraic and the implementation is exacter than the TMD worst case.
+*/
+
+polyTblm = polyTblm + polyTbll;
+t8 = t7 + polyTblm;
+
+/* Since we are rounding upwards, the round-to-nearest-rounding result in t4 is 
+	equal to the final result if the rounding error (i.e. the error plus the lower parts)
+	is negative, i.e. if the rounding-to-nearest was upwards.
+*/
+
+if (t8 < 0.0) return t4;
+
+/* If we are here, we must adjust the final result by +1ulp 
+	Relying on the fact that the exponential is always positive, we can simplify this
+	adjustment 
+*/
+
+t4db.l++;
+return t4db.d;
+\end{lstlisting}
+\item Round-downwards mode is analogous to round-upwards mode with signs inverted.
+\item Round-towards-zero is equivalent to rounding downwards.
+\end{itemize}
+\section{Accuracy bounds}\label{sec:expaccuracy}
+In this section we give an overview on the error bound
+computation. The actual error bound proof is implemented using the
+Gappa tool.
+
+An implementation of the exponential function in double precision can
+be considered to be correctly rounding if the accuracy of the accurate
+phase is at least $113$ bits for arguments $x$ such that $\left \vert
+x \right \vert \geq 2^{-30}$ and at least $158$ bits for $2^{-54} \leq
+\left \vert x \right \vert < 2^{-30}$ -- provided that the rounding
+test after the quick phase is correct \cite{DinDefLau2004LIP}.
+
+In order to give a first error estimate, one can consider
+\begin{eqnarray*}
+\mbox{\tt exp(x)} & = & 2^M \cdot tbl_1 \cdot tbl_2 \cdot \left( 1 +
+p\left( r_\hi \right) \right) \cdot \left( 1 + r_\mi \right) \cdot
+\left( 1 + r_\lo \right) \cdot \left( 1 + \epsilon_{\mbox{\tiny
+arith}} \right) \\ & = & 2^M \cdot t_1 \cdot \left( 1 +
+\epsilon_{\mbox{\tiny tbl1}} \right) \cdot t_2 \left( 1 +
+\epsilon_{\mbox{\tiny tbl1}} \right) \cdot \\ & & \cdot \left( 1 +
+\left( e^{r_\hi} - 1 \right) \cdot \left( 1 + \epsilon_{\mbox{\tiny
+approxhigh}} \right) \right) \cdot \\ & & \cdot \left( 1 + \left(
+e^{r_\mi} - 1 \right) \cdot \left( 1 + \epsilon_{\mbox{\tiny
+approxmiddle}} \right) \right) \cdot \\ & & \cdot \left( 1 + \left(
+e^{r_\lo} - 1 \right) \cdot \left( 1 + \epsilon_{\mbox{\tiny
+approxlower}} \right) \right) \cdot \left( 1 + \epsilon_{\mbox{\tiny
+arith}} \right) \\ & = & 2^M \cdot t_1 \cdot t_2 \cdot e^{r_\hi +
+r_\mi + r_\lo} \cdot \\ & & \cdot \left( 1 + \epsilon_{\mbox{\tiny
+tbl1}} \right) \cdot \left( 1 + \epsilon_{\mbox{\tiny tbl2}} \right)
+\cdot \left( 1 + \epsilon_{\mbox{\tiny approxhigh}}^\prime \right)
+\cdot \left( 1 + \epsilon_{\mbox{\tiny approxmiddle}}^\prime \right)
+\cdot \left( 1 + \epsilon_{\mbox{\tiny approxlower}}^\prime \right)
+\cdot \left( 1 + \epsilon_{\mbox{\tiny arith}} \right) \\ & = & 2^M
+\cdot t_1 \cdot t_2 \cdot e^{\hat{r}} \cdot \\ & & \cdot \left( 1 +
+\epsilon_{\mbox{\tiny tbl1}} \right) \cdot \left( 1 +
+\epsilon_{\mbox{\tiny tbl2}} \right) \cdot \left( 1 +
+\epsilon_{\mbox{\tiny approxhigh}}^\prime \right) \cdot \left( 1 +
+\epsilon_{\mbox{\tiny approxmiddle}}^\prime \right) \cdot \left( 1 +
+\epsilon_{\mbox{\tiny approxlower}}^\prime \right) \cdot \left( 1 +
+\epsilon_{\mbox{\tiny arith}} \right) \cdot \left( 1 +
+\epsilon_{\mbox{\tiny argred}} \right) \\ & = & e^x \cdot \left( 1 +
+\epsilon \right)
+\end{eqnarray*}
+where $\epsilon_{\mbox{\tiny approxhigh}}^\prime =
+\epsilon_{\mbox{\tiny approxhigh}} - \frac{\epsilon_{\mbox{\tiny
+approxhigh}}}{e^{r_\hi}}$, $\epsilon_{\mbox{\tiny
+approxmiddle}}^\prime = \epsilon_{\mbox{\tiny approxmiddle}} -
+\frac{\epsilon_{\mbox{\tiny approxmiddle}}}{e^{r_\mi}}$ and
+$\epsilon_{\mbox{\tiny approxlower}}^\prime = \epsilon_{\mbox{\tiny
+approxlower}} - \frac{\epsilon_{\mbox{\tiny
+approxlower}}}{e^{r_\lo}}$.  The Gappa proof files integrate all these
+errors and allow for evaluating the relative arithmetical round-off
+error $\epsilon_{\mbox{\tiny arith}}$.
+
+%TODO: inserer les valeurs obtenues en Gappa pour les deux phases
+
+\section{Timings}\label{sec:exptiming}
+For evaluating the timings of the triple-double based implementation
+of the exponential function $e^x$, in comparison with other correctly
+rounded functions.  ``{\tt crlibm} portable using {\tt scslib}'' still
+stands for a logarithm implementation in {\tt crlibm} before the work
+on triple-double. The values are given in arbitrary units and obtained
+on a IBM Power 5 processor with gcc 3.3.3 on a Linux Kernel 2.6.5. The
+timings on other systems are comparable.
+\begin{center}
+\begin{tabular}{|l|r|r|}
+ \hline
+  Library                       &     avg time  & max time \\
+ \hline
+ \hline
+ \texttt{MPFR}   &   2128    & 4908        \\ 
+ \hline
+ \texttt{crlibm} portable using \texttt{scslib}   &   44    & 1976        \\ 
+ \hline
+ \texttt{crlibm} portable using triple-double      &        39    & 258        \\ 
+ \hline
+ default \texttt{libm} (IBM's {\tt libultim})  &        34    & 221062      \\ 
+ \hline
+\end{tabular}
+\end{center}
+On average, our triple-double based implementation wins about $12\%$
+speed-up in comparison with the SCS based implementation. It is
+however slightly less performant than Ziv's library.
+
+Concerning worst case timing, the results are more striking and
+confirm the general results concering triple-double: the use of
+triple-double arithmetic instead of the SCS format allows for a
+speed-up of a factor of about $7.65$. In comparison with IBM's {\tt
+libultim} a performance gain of a factor $857$ is achieved. The timing
+difference between average and worst-case is decreased to a factor of
+about $6.6$.
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
+
diff --git a/src/crlibm/docs/latex/expm1.tex b/src/crlibm/docs/latex/expm1.tex
new file mode 100644
index 0000000..fbe8452
--- /dev/null
+++ b/src/crlibm/docs/latex/expm1.tex
@@ -0,0 +1 @@
+ Todo. In between, see files expm1-td.\{h,c,mpl,gappa\}.
diff --git a/src/crlibm/docs/latex/fig_exp/reconstruction.fig b/src/crlibm/docs/latex/fig_exp/reconstruction.fig
new file mode 100644
index 0000000..8046c51
--- /dev/null
+++ b/src/crlibm/docs/latex/fig_exp/reconstruction.fig
@@ -0,0 +1,519 @@
+#FIG 3.2
+Portrait
+Center
+Metric
+A4      
+24.00
+Single
+-2
+1200 2
+0 32 #ffffff
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 12558 69 747 542 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 12558 69 747 542 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 10393 2362 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 10393 2362 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 14173 7086 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 14173 7086 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 17952 8503 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 17952 8503 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 14173 1417 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 14173 1417 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 14173 -5669 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 14173 -5669 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 17952 2834 944 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 17952 2834 944 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 17952 0 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 17952 0 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 21732 -2834 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 21732 -2834 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 19370 -1417 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 19370 -1417 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 22204 9921 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 22204 9921 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 25511 -1417 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 25511 -1417 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 21732 -9921 944 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 21732 -9921 944 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 25511 -7086 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 25511 -7086 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 26456 -4724 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 26456 -4724 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 27401 -944 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 27401 -944 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 31181 472 944 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 31181 472 944 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 34960 -4724 944 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 34960 -4724 944 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 38740 -944 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 38740 -944 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 38740 -7559 944 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 38740 -7559 944 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 42519 -3307 472 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 42519 -3307 472 472 0 0 0 0
+1 1 0 3 32 32 0 0 20 31.496 1 0.0000 46299 -5669 944 472 0 0 0 0
+1 1 0 3 0 -1 0 0 -1 31.496 1 0.0000 46299 -5669 944 472 0 0 0 0
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 10059 2028 10727 2696
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 10059 2696 10727 2028
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 9448 944 10393 944 10393 1889
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 9448 3779 10393 3779 10393 2834
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 11338 1417 13228 1417 13228 2362 11338 2362 11338 1417
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 11338 1417 13228 1417 13228 2362 11338 2362 11338 1417
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 13839 6752 14507 7420
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 13839 7420 14507 6752
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 13228 1889 13228 2362 14173 2362 14173 6614
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 13228 8031 14173 8031 14173 7559
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 10866 2362 11338 2362 11338 1889
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 15118 6141 17007 6141 17007 7086 15118 7086 15118 6141
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 15118 6141 17007 6141 17007 7086 15118 7086 15118 6141
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 14645 7086 15118 7086
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 17618 8169 18286 8838
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 17618 8838 18286 8169
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 17007 7086 17952 7086 17952 8031
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 17007 9921 17952 9921 17952 8976
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 19370 7559 21259 7559 21259 8503 19370 8503 19370 7559
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 19370 7559 21259 7559 21259 8503 19370 8503 19370 7559
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 13839 1083 14507 1751
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 13839 1751 14507 1083
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 14173 1889 14173 2362 13228 2362 13228 1889
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 13306 69 13306 0 14173 0 14173 944
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 15118 472 17007 472 17007 1417 15118 1417 15118 472
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 15118 472 17007 472 17007 1417 15118 1417 15118 472
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 14645 1417 15118 1417
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 13839 -6003 14507 -5335
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 13839 -5335 14507 -6003
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 13228 -7086 14173 -7086 14173 -6141
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 13228 -4251 14173 -4251 14173 -5196
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 18897 -6614 20787 -6614 20787 -5669 18897 -5669 18897 -6614
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 18897 -6614 20787 -6614 20787 -5669 18897 -5669 18897 -6614
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 14645 -5669 18897 -5669 18897 -6141
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 17007 4251 17284 4251 17284 3168
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 17007 1417 17284 1417 17284 2500
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 18897 472 20787 472 20787 1417 18897 1417 18897 472
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 18897 472 20787 472 20787 1417 18897 1417 18897 472
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 18897 3307 20787 3307 20787 4251 18897 4251 18897 3307
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 18897 3307 20787 3307 20787 4251 18897 4251 18897 3307
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 18897 1417 18620 1417 18620 2500
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 18897 4251 18620 4251 18620 3168
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 17952 -472 17952 472
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 17480 0 18425 0
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 17007 -1889 17007 -1417 17952 -1417 17952 -472
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 17007 1417 17952 1417 17952 472
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 17007 -4724 17007 -4251 19370 -4251 19370 -1889
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 18425 0 19370 0 19370 -944
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 21732 -3307 21732 -2362
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 21259 -2834 22204 -2834
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 20787 -6141 20787 -5669 21732 -5669 21732 -3307
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 19842 -1417 21732 -1417 21732 -2362
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 19036 -1751 19704 -1083
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 19036 -1083 19704 -1751
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 22677 -3779 24566 -3779 24566 -2834 22677 -2834 22677 -3779
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 22677 -3779 24566 -3779 24566 -2834 22677 -2834 22677 -3779
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 22204 -2834 22677 -2834
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 21870 9587 22538 10255
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 21870 10255 22538 9587
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 23149 8976 25039 8976 25039 9921 23149 9921 23149 8976
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 23149 8976 25039 8976 25039 9921 23149 9921 23149 8976
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 21259 8503 22204 8503 22204 9448
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 21259 11338 22204 11338 22204 10393
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 22677 9921 23149 9921 23149 9448
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 25511 -1889 25511 -944
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 25039 -1417 25984 -1417
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 24566 -2834 25511 -2834 25511 -1889
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 20787 1417 25511 1417 25511 -944
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 20787 -11338 21064 -11338 21064 -10255
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 20787 -8976 20787 -8503 21064 -8503 21064 -9587
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 22677 -12283 24566 -12283 24566 -11338 22677 -11338 22677 -12283
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 22677 -12283 24566 -12283 24566 -11338 22677 -11338 22677 -12283
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 22677 -9448 24566 -9448 24566 -8503 22677 -8503 22677 -9448
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 22677 -9448 24566 -9448 24566 -8503 22677 -8503 22677 -9448
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 22677 -11338 22400 -11338 22400 -10255
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 22677 -8976 22677 -8503 22400 -8503 22400 -9587
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 25511 -7559 25511 -6614
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 25039 -7086 25984 -7086
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 24566 -8976 24566 -8503 25511 -8503 25511 -6614
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 24566 -6141 24566 -5669 25511 -5669 25511 -7559
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 26456 -5196 26456 -4251
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 25984 -4724 26929 -4724
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 25984 -7086 26456 -7086 26456 -5196
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 26456 -4251 26456 -1417 25984 -1417
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 27401 -1417 27401 -472
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 26929 -944 27874 -944
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 25039 9921 27401 9921 27401 -472
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 26929 -4724 27401 -4724 27401 -1417
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 28346 -1889 30236 -1889 30236 -944 28346 -944 28346 -1889
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 28346 -1889 30236 -1889 30236 -944 28346 -944 28346 -1889
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 27874 -944 27874 -911 28346 -911 28346 -1417
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 30236 -1417 30236 -944 30512 -944 30512 138
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 20787 4251 30512 4251 30512 806
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 32125 -1889 34015 -1889 34015 -944 32125 -944 32125 -1889
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 32125 -1889 34015 -1889 34015 -944 32125 -944 32125 -1889
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 32125 944 34015 944 34015 1889 32125 1889 32125 944
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 32125 944 34015 944 34015 1889 32125 1889 32125 944
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 32125 -944 31849 -944 31849 138
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 32125 1417 32125 1889 31849 1889 31849 806
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 35905 -7086 37795 -7086 37795 -6141 35905 -6141 35905 -7086
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 35905 -7086 37795 -7086 37795 -6141 35905 -6141 35905 -7086
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 35905 -4251 37795 -4251 37795 -3307 35905 -3307 35905 -4251
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 35905 -4251 37795 -4251 37795 -3307 35905 -3307 35905 -4251
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 35905 -6614 35905 -6141 35628 -6141 35628 -5058
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 35905 -3307 35628 -3307 35628 -4390
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 34015 -1417 34015 -944 34292 -944 34292 -4390
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 24566 -11338 34292 -11338 34292 -5058
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 38740 -1417 38740 -472
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 38267 -944 39212 -944
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 34015 1417 34015 1889 38740 1889 38740 -472
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 37795 -3307 38740 -3307 38740 -1417
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 39685 -1889 41574 -1889 41574 -944 39685 -944 39685 -1889
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 39685 -1889 41574 -1889 41574 -944 39685 -944 39685 -1889
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 39212 -944 39685 -944 39685 -1417
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 39685 -9921 41574 -9921 41574 -8976 39685 -8976 39685 -9921
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 39685 -9921 41574 -9921 41574 -8976 39685 -8976 39685 -9921
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 39685 -7086 41574 -7086 41574 -6141 39685 -6141 39685 -7086
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 39685 -7086 41574 -7086 41574 -6141 39685 -6141 39685 -7086
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 39685 -8976 39408 -8976 39408 -7893
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 39685 -6614 39685 -6141 39408 -6141 39408 -7224
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 41574 -6614 41580 -6120 42520 -6122 42519 -3779
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 37795 -8976 38072 -8976 38072 -7893
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 37795 -6614 37795 -6141 38072 -6141 38072 -7224
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 42519 -3779 42519 -2834
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 42047 -3307 42992 -3307
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 41574 -1417 41574 -944 42519 -944 42519 -2834
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 43464 -4251 45354 -4251 45354 -3307 43464 -3307 43464 -4251
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 43464 -4251 45354 -4251 45354 -3307 43464 -3307 43464 -4251
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 42992 -3307 43464 -3307 43464 -3779
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 47244 -8031 49133 -8031 49133 -7086 47244 -7086 47244 -8031
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 47244 -8031 49133 -8031 49133 -7086 47244 -7086 47244 -8031
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 47244 -7559 47244 -7086 46967 -7086 46967 -6003
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 47244 -4251 46967 -4251 46967 -5335
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 3
+	 41574 -8976 45631 -8976 45631 -6003
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 4
+	 45354 -3779 45354 -3307 45631 -3307 45631 -5335
+2 1 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 2
+	 19370 8503 18425 8503
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 11340 -7110 13230 -7110 13230 -6165 11340 -6165 11340 -7110
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 47244 -5196 49133 -5196 49133 -4251 47244 -4251 47244 -5196
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 47244 -5196 49133 -5196 49133 -4251 47244 -4251 47244 -5196
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 15120 -1440 17010 -1440 17010 -495 15120 -495 15120 -1440
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 11340 -4275 13230 -4275 13230 -3330 11340 -3330 11340 -4275
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 15120 -4275 17010 -4275 17010 -3330 15120 -3330 15120 -4275
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 15120 1395 17010 1395 17010 2340 15120 2340 15120 1395
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 11340 2340 13230 2340 13230 3285 11340 3285 11340 2340
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 15120 4230 17010 4230 17010 5175 15120 5175 15120 4230
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7560 945 9450 945 9450 1890 7560 1890 7560 945
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7560 3780 9450 3780 9450 4725 7560 4725 7560 3780
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 11340 8010 13230 8010 13230 8955 11340 8955 11340 8010
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 15120 7065 17010 7065 17010 8010 15120 8010 15120 7065
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 15120 9900 17010 9900 17010 10845 15120 10845 15120 9900
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 19372 11340 21240 11340 21240 12262 19372 12262 19372 11340
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 19372 8505 21240 8505 21240 9429 19372 9429 19372 8505
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 23130 9900 25020 9900 25020 10845 23130 10845 23130 9900
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 18900 4230 20790 4230 20790 5175 18900 5175 18900 4230
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 18900 1395 20790 1395 20790 2340 18900 2340 18900 1395
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 18900 -5670 20790 -5670 20790 -4725 18900 -4725 18900 -5670
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 22680 -5670 24570 -5670 24570 -4725 22680 -4725 22680 -5670
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 22680 -2835 24570 -2835 24570 -1890 22680 -1890 22680 -2835
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 18900 -8505 20790 -8505 20790 -7560 18900 -7560 18900 -8505
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 22680 -8505 24570 -8505 24570 -7560 22680 -7560 22680 -8505
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 22680 -11340 24570 -11340 24570 -10395 22680 -10395 22680 -11340
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 18900 -11340 20790 -11340 20790 -10395 18900 -10395 18900 -11340
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 28350 -945 30240 -945 30240 0 28350 0 28350 -945
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 32130 -945 34020 -945 34020 0 32130 0 32130 -945
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 32130 1890 34020 1890 34020 2835 32130 2835 32130 1890
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 35910 -3330 37800 -3330 37800 -2385 35910 -2385 35910 -3330
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 39690 -945 41580 -945 41580 0 39690 0 39690 -945
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 39690 -6165 41580 -6165 41580 -5220 39690 -5220 39690 -6165
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 39690 -9000 41580 -9000 41580 -8055 39690 -8055 39690 -9000
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 35910 -6165 37800 -6165 37800 -5220 35910 -5220 35910 -6165
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 35910 -9000 37800 -9000 37800 -8055 35910 -8055 35910 -9000
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 43470 -3330 45360 -3330 45360 -2385 43470 -2385 43470 -3330
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 47250 -4275 49140 -4275 49140 -3330 47250 -3330 47250 -4275
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 47250 -7110 49140 -7110 49140 -6165 47250 -6165 47250 -7110
+2 3 0 3 32 32 0 -1 20 31.496 0 0 0 0 0 5
+	 39909 8709 41798 8709 41798 9654 39909 9654 39909 8709
+2 3 0 3 0 0 0 0 -1 31.496 0 0 0 0 0 5
+	 39909 8709 41798 8709 41798 9654 39909 9654 39909 8709
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 39915 9630 41805 9630 41805 10575 39915 10575 39915 9630
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 7560 0 9450 0 9450 945 7560 945 7560 0
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 7560 2835 9450 2835 9450 3780 7560 3780 7560 2835
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 15120 -2385 17010 -2385 17010 -1440 15120 -1440 15120 -2385
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 11340 7065 13230 7065 13230 8010 11340 8010 11340 7065
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 11340 -5220 13230 -5220 13230 -4275 11340 -4275 11340 -5220
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 18900 -12285 20790 -12285 20790 -11340 18900 -11340 18900 -12285
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 18900 -9450 20790 -9450 20790 -8505 18900 -8505 18900 -9450
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 11340 -8055 13230 -8055 13230 -7110 11340 -7110 11340 -8055
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 15120 -5220 17010 -5220 17010 -4275 15120 -4275 15120 -5220
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 15120 3285 17010 3285 17010 4230 15120 4230 15120 3285
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 15120 8955 17010 8955 17010 9900 15120 9900 15120 8955
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 19350 10395 21240 10395 21240 11340 19350 11340 19350 10395
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 35910 -9945 37800 -9945 37800 -9000 35910 -9000 35910 -9945
+2 2 0 3 0 3 50 -1 20 0.000 0 0 -1 0 0 5
+	 22680 -6615 24570 -6615 24570 -5670 22680 -5670 22680 -6615
+4 1 0 0 0 12 23 0.0000 4 270 630 12558 173 1/2\001
+4 1 0 0 0 2 28 0.0000 4 375 990 8503 3307 rp_hi\001
+4 1 0 0 0 2 28 0.0000 4 375 990 8503 472 rp_hi\001
+4 1 0 0 0 2 28 0.0000 4 285 510 12283 1889 R1\001
+4 1 0 0 0 2 28 0.0000 4 375 990 12283 7559 rp_hi\001
+4 1 0 0 0 2 28 0.0000 4 375 1170 16062 6614 crp_hi\001
+4 1 0 0 0 2 28 0.0000 4 330 645 16062 9448 P_r\001
+4 1 0 0 0 2 28 0.0000 4 285 510 20314 8031 R2\001
+4 1 0 0 0 2 28 0.0000 4 285 510 16062 944 R1\001
+4 1 0 0 0 2 28 0.0000 4 330 960 12283 -7559 ex_hi\001
+4 1 0 0 0 2 28 0.0000 4 375 960 12283 -4724 rp_lo\001
+4 1 0 0 0 2 28 0.0000 4 285 510 19842 -6141 R4\001
+4 1 0 0 0 2 28 0.0000 4 330 960 16062 3779 ex_hi\001
+4 1 0 0 0 12 20 0.0000 4 180 990 17952 2834 Dekker\001
+4 1 0 0 0 2 28 0.0000 4 330 1050 19842 944 R5_lo\001
+4 1 0 0 0 2 28 0.0000 4 330 1080 19842 3779 R5_hi\001
+4 1 0 0 0 2 28 0.0000 4 375 990 16062 -1889 rp_hi\001
+4 1 0 0 0 2 28 0.0000 4 330 930 16062 -4724 ex_lo\001
+4 1 0 0 0 2 28 0.0000 4 285 510 23622 -3307 R6\001
+4 1 0 0 0 2 28 0.0000 4 330 960 20314 10866 ex_hi\001
+4 1 0 0 0 2 28 0.0000 4 285 510 24094 9448 R7\001
+4 1 0 0 0 2 28 0.0000 4 375 990 19842 -11811 rp_hi\001
+4 1 0 0 0 2 28 0.0000 4 330 960 19842 -8976 ex_hi\001
+4 1 0 0 0 12 20 0.0000 4 180 990 21732 -9921 Dekker\001
+4 1 0 0 0 2 28 0.0000 4 330 1050 23622 -11811 R3_lo\001
+4 1 0 0 0 2 28 0.0000 4 330 1050 23622 -8976 R3_lo\001
+4 1 0 0 0 2 28 0.0000 4 330 930 23622 -6141 ex_lo\001
+4 1 0 0 0 2 28 0.0000 4 285 510 29291 -1417 R7\001
+4 1 0 0 0 12 20 0.0000 4 180 1320 31181 472 Fast2Sum\001
+4 1 0 0 0 2 28 0.0000 4 285 510 33070 -1417 R9\001
+4 1 0 0 0 2 28 0.0000 4 285 510 33070 1417 R8\001
+4 1 0 0 0 12 20 0.0000 4 180 1320 34960 -4724 Fast2Sum\001
+4 1 0 0 0 2 28 0.0000 4 285 720 36850 -6614 R10\001
+4 1 0 0 0 2 28 0.0000 4 360 720 36850 -3779 tmp\001
+4 1 0 0 0 2 28 0.0000 4 285 510 40629 -1417 R8\001
+4 1 0 0 0 2 28 0.0000 4 330 960 36850 -9448 ex_hi\001
+4 1 0 0 0 12 20 0.0000 4 180 1320 38740 -7559 Fast2Sum\001
+4 1 0 0 0 2 28 0.0000 4 285 720 40629 -9448 R11\001
+4 1 0 0 0 2 28 0.0000 4 360 720 40629 -6614 tmp\001
+4 1 0 0 0 2 28 0.0000 4 285 510 44409 -3779 R8\001
+4 1 0 0 0 12 20 0.0000 4 180 1320 46299 -5669 Fast2Sum\001
+4 1 0 0 0 2 28 0.0000 4 285 720 48188 -7559 R11\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 23490 10305 $2^{-30}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 11745 -6570 $2^{-1}$\001
+4 1 0 0 0 2 28 0.0000 4 285 510 48188 -4724 R8\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 11655 -3690 $2^{-63}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 15480 -3690 $2^{-55}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 15570 -900 $2^{-9}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 11790 2925 $2^{-9}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 15525 1935 $2^{-19}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 15570 4815 $2^{-1}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 7965 1440 $2^{-9}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 7965 4320 $2^{-9}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 11745 8595 $2^{-9}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 15525 10440 $2^{-2}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 15525 7560 $2^{-27}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 19755 11880 $2^{-1}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 19710 9045 $2^{-29}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 19260 1935 $2^{-20}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 19260 4815 $2^{-74}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 19215 -5130 $2^{-64}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 22995 -5130 $2^{-55}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 23040 -2295 $2^{-62}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 19260 -10800 $2^{-9}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 23085 -10800 $2^{-10}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 19305 -7965 $2^{-1}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 23040 -7965 $2^{-64}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 28665 -405 $2^{-29}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 32445 -405 $2^{-19}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 32490 2430 $2^{-73}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 40045 -5618 $2^{-53}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 36315 -8415 $2^{-1}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 945 40185 -8460 $2^{0}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 36360 -5580 $2^{-9}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 36270 -2790 $2^{-63}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 40050 -405 $2^{-62}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 43785 -2745 $2^{-53}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1170 47565 -3690 $2^{-53}$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1035 47610 -6570 $2^{-1}$\001
+4 1 0 0 0 2 28 0.0000 4 285 300 40860 9315 A\001
+4 1 0 0 0 2 28 0.0000 4 300 1965 43020 9315 Variable A\001
+4 1 0 0 -1 0 20 0.0000 2 240 765 40860 10215 $max$\001
+4 0 0 0 -1 0 20 0.0000 2 270 1620 42120 10260 $|A| \\leq max$\001
diff --git a/src/crlibm/docs/latex/fig_exp/reconstruction.pstex b/src/crlibm/docs/latex/fig_exp/reconstruction.pstex
new file mode 100644
index 0000000..d487ca5
--- /dev/null
+++ b/src/crlibm/docs/latex/fig_exp/reconstruction.pstex
@@ -0,0 +1,997 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: /home/ddefour/ens/Personnel/these/fig_chap4/reconstruction.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 4
+%%CreationDate: Tue Jun 24 14:20:21 2003
+%%For: ddefour at pecheresse (David Defour)
+%%BoundingBox: 0 0 630 373
+%%Magnification: 0.2400
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+/col32 {0.996 0.996 0.996 srgb} bind def
+
+end
+save
+newpath 0 373 moveto 0 0 lineto 630 0 lineto 630 373 lineto closepath clip newpath
+-113.8 185.9 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/reencdict 12 dict def /ReEncode { reencdict begin
+/newcodesandnames exch def /newfontname exch def /basefontname exch def
+/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def
+basefontdict { exch dup /FID ne { dup /Encoding eq
+{ exch dup length array copy newfont 3 1 roll put }
+{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall
+newfont /FontName newfontname put newcodesandnames aload pop
+128 1 255 { newfont /Encoding get exch /.notdef put } for
+newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat
+newfontname newfont definefont pop end } def
+/isovec [
+8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde
+8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis
+8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron
+8#220 /dotlessi 8#230 /oe 8#231 /OE
+8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling
+8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis
+8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot
+8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus
+8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph
+8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine
+8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf
+8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute
+8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring
+8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute
+8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute
+8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve
+8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply
+8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex
+8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave
+8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring
+8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute
+8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute
+8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve
+8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide
+8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex
+8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def
+/Courier /Courier-iso isovec ReEncode
+/Times-Bold /Times-Bold-iso isovec ReEncode
+/Times-Roman /Times-Roman-iso isovec ReEncode
+ /DrawEllipse {
+	/endangle exch def
+	/startangle exch def
+	/yrad exch def
+	/xrad exch def
+	/y exch def
+	/x exch def
+	/savematrix mtrx currentmatrix def
+	x y tr xrad yrad sc 0 0 1 startangle endangle arc
+	closepath
+	savematrix setmatrix
+	} def
+
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+0 slj 0 slc
+ 0.01512 0.01512 sc
+%
+% Fig objects follow
+%
+% 
+% here starts figure with depth 50
+% Polyline
+30.000 slw
+n 11340 -7110 m 13230 -7110 l 13230 -6165 l 11340 -6165 l
+ cp gs col0 s gr 
+% Polyline
+n 15120 -1440 m 17010 -1440 l 17010 -495 l 15120 -495 l
+ cp gs col0 s gr 
+% Polyline
+n 11340 -4275 m 13230 -4275 l 13230 -3330 l 11340 -3330 l
+ cp gs col0 s gr 
+% Polyline
+n 15120 -4275 m 17010 -4275 l 17010 -3330 l 15120 -3330 l
+ cp gs col0 s gr 
+% Polyline
+n 15120 1395 m 17010 1395 l 17010 2340 l 15120 2340 l
+ cp gs col0 s gr 
+% Polyline
+n 11340 2340 m 13230 2340 l 13230 3285 l 11340 3285 l
+ cp gs col0 s gr 
+% Polyline
+n 15120 4230 m 17010 4230 l 17010 5175 l 15120 5175 l
+ cp gs col0 s gr 
+% Polyline
+n 7560 945 m 9450 945 l 9450 1890 l 7560 1890 l
+ cp gs col0 s gr 
+% Polyline
+n 7560 3780 m 9450 3780 l 9450 4725 l 7560 4725 l
+ cp gs col0 s gr 
+% Polyline
+n 11340 8010 m 13230 8010 l 13230 8955 l 11340 8955 l
+ cp gs col0 s gr 
+% Polyline
+n 15120 7065 m 17010 7065 l 17010 8010 l 15120 8010 l
+ cp gs col0 s gr 
+% Polyline
+n 15120 9900 m 17010 9900 l 17010 10845 l 15120 10845 l
+ cp gs col0 s gr 
+% Polyline
+n 19372 11340 m 21240 11340 l 21240 12262 l 19372 12262 l
+ cp gs col0 s gr 
+% Polyline
+n 19372 8505 m 21240 8505 l 21240 9429 l 19372 9429 l
+ cp gs col0 s gr 
+% Polyline
+n 23130 9900 m 25020 9900 l 25020 10845 l 23130 10845 l
+ cp gs col0 s gr 
+% Polyline
+n 18900 4230 m 20790 4230 l 20790 5175 l 18900 5175 l
+ cp gs col0 s gr 
+% Polyline
+n 18900 1395 m 20790 1395 l 20790 2340 l 18900 2340 l
+ cp gs col0 s gr 
+% Polyline
+n 18900 -5670 m 20790 -5670 l 20790 -4725 l 18900 -4725 l
+ cp gs col0 s gr 
+% Polyline
+n 22680 -5670 m 24570 -5670 l 24570 -4725 l 22680 -4725 l
+ cp gs col0 s gr 
+% Polyline
+n 22680 -2835 m 24570 -2835 l 24570 -1890 l 22680 -1890 l
+ cp gs col0 s gr 
+% Polyline
+n 18900 -8505 m 20790 -8505 l 20790 -7560 l 18900 -7560 l
+ cp gs col0 s gr 
+% Polyline
+n 22680 -8505 m 24570 -8505 l 24570 -7560 l 22680 -7560 l
+ cp gs col0 s gr 
+% Polyline
+n 22680 -11340 m 24570 -11340 l 24570 -10395 l 22680 -10395 l
+ cp gs col0 s gr 
+% Polyline
+n 18900 -11340 m 20790 -11340 l 20790 -10395 l 18900 -10395 l
+ cp gs col0 s gr 
+% Polyline
+n 28350 -945 m 30240 -945 l 30240 0 l 28350 0 l
+ cp gs col0 s gr 
+% Polyline
+n 32130 -945 m 34020 -945 l 34020 0 l 32130 0 l
+ cp gs col0 s gr 
+% Polyline
+n 32130 1890 m 34020 1890 l 34020 2835 l 32130 2835 l
+ cp gs col0 s gr 
+% Polyline
+n 35910 -3330 m 37800 -3330 l 37800 -2385 l 35910 -2385 l
+ cp gs col0 s gr 
+% Polyline
+n 39690 -945 m 41580 -945 l 41580 0 l 39690 0 l
+ cp gs col0 s gr 
+% Polyline
+n 39690 -6165 m 41580 -6165 l 41580 -5220 l 39690 -5220 l
+ cp gs col0 s gr 
+% Polyline
+n 39690 -9000 m 41580 -9000 l 41580 -8055 l 39690 -8055 l
+ cp gs col0 s gr 
+% Polyline
+n 35910 -6165 m 37800 -6165 l 37800 -5220 l 35910 -5220 l
+ cp gs col0 s gr 
+% Polyline
+n 35910 -9000 m 37800 -9000 l 37800 -8055 l 35910 -8055 l
+ cp gs col0 s gr 
+% Polyline
+n 43470 -3330 m 45360 -3330 l 45360 -2385 l 43470 -2385 l
+ cp gs col0 s gr 
+% Polyline
+n 47250 -4275 m 49140 -4275 l 49140 -3330 l 47250 -3330 l
+ cp gs col0 s gr 
+% Polyline
+n 47250 -7110 m 49140 -7110 l 49140 -6165 l 47250 -6165 l
+ cp gs col0 s gr 
+% Polyline
+n 39915 9630 m 41805 9630 l 41805 10575 l 39915 10575 l
+ cp gs col0 s gr 
+% Polyline
+n 7560 0 m 9450 0 l 9450 945 l 7560 945 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 7560 2835 m 9450 2835 l 9450 3780 l 7560 3780 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 15120 -2385 m 17010 -2385 l 17010 -1440 l 15120 -1440 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 11340 7065 m 13230 7065 l 13230 8010 l 11340 8010 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 11340 -5220 m 13230 -5220 l 13230 -4275 l 11340 -4275 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 18900 -12285 m 20790 -12285 l 20790 -11340 l 18900 -11340 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 18900 -9450 m 20790 -9450 l 20790 -8505 l 18900 -8505 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 11340 -8055 m 13230 -8055 l 13230 -7110 l 11340 -7110 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 15120 -5220 m 17010 -5220 l 17010 -4275 l 15120 -4275 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 15120 3285 m 17010 3285 l 17010 4230 l 15120 4230 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 15120 8955 m 17010 8955 l 17010 9900 l 15120 9900 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 19350 10395 m 21240 10395 l 21240 11340 l 19350 11340 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 35910 -9945 m 37800 -9945 l 37800 -9000 l 35910 -9000 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% Polyline
+n 22680 -6615 m 24570 -6615 l 24570 -5670 l 22680 -5670 l
+ cp gs col3 1.00 shd ef gr gs col0 s gr 
+% here ends figure;
+% 
+% here starts figure with depth 0
+% Ellipse
+30.000 slw
+n 12558 69 747 542 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 12558 69 747 542 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 10393 2362 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 10393 2362 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 14173 7086 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 14173 7086 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 17952 8503 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 17952 8503 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 14173 1417 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 14173 1417 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 14173 -5669 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 14173 -5669 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 17952 2834 944 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 17952 2834 944 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 17952 0 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 17952 0 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 21732 -2834 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 21732 -2834 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 19370 -1417 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 19370 -1417 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 22204 9921 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 22204 9921 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 25511 -1417 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 25511 -1417 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 21732 -9921 944 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 21732 -9921 944 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 25511 -7086 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 25511 -7086 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 26456 -4724 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 26456 -4724 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 27401 -944 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 27401 -944 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 31181 472 944 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 31181 472 944 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 34960 -4724 944 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 34960 -4724 944 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 38740 -944 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 38740 -944 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 38740 -7559 944 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 38740 -7559 944 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 42519 -3307 472 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 42519 -3307 472 472 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 46299 -5669 944 472 0 360 DrawEllipse gs col32 1.00 shd ef gr gs col32 s gr
+
+% Ellipse
+n 46299 -5669 944 472 0 360 DrawEllipse gs col0 s gr
+
+% Polyline
+n 10059 2028 m
+ 10727 2696 l gs col0 s gr 
+% Polyline
+n 10059 2696 m
+ 10727 2028 l gs col0 s gr 
+% Polyline
+n 9448 944 m 10393 944 l
+ 10393 1889 l gs col0 s gr 
+% Polyline
+n 9448 3779 m 10393 3779 l
+ 10393 2834 l gs col0 s gr 
+% Polyline
+n 11338 1417 m 13228 1417 l 13228 2362 l 11338 2362 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 11338 1417 m 13228 1417 l 13228 2362 l 11338 2362 l
+ cp gs col0 s gr 
+% Polyline
+n 13839 6752 m
+ 14507 7420 l gs col0 s gr 
+% Polyline
+n 13839 7420 m
+ 14507 6752 l gs col0 s gr 
+% Polyline
+n 13228 1889 m 13228 2362 l 14173 2362 l
+ 14173 6614 l gs col0 s gr 
+% Polyline
+n 13228 8031 m 14173 8031 l
+ 14173 7559 l gs col0 s gr 
+% Polyline
+n 10866 2362 m 11338 2362 l
+ 11338 1889 l gs col0 s gr 
+% Polyline
+n 15118 6141 m 17007 6141 l 17007 7086 l 15118 7086 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 15118 6141 m 17007 6141 l 17007 7086 l 15118 7086 l
+ cp gs col0 s gr 
+% Polyline
+n 14645 7086 m
+ 15118 7086 l gs col0 s gr 
+% Polyline
+n 17618 8169 m
+ 18286 8838 l gs col0 s gr 
+% Polyline
+n 17618 8838 m
+ 18286 8169 l gs col0 s gr 
+% Polyline
+n 17007 7086 m 17952 7086 l
+ 17952 8031 l gs col0 s gr 
+% Polyline
+n 17007 9921 m 17952 9921 l
+ 17952 8976 l gs col0 s gr 
+% Polyline
+n 19370 7559 m 21259 7559 l 21259 8503 l 19370 8503 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 19370 7559 m 21259 7559 l 21259 8503 l 19370 8503 l
+ cp gs col0 s gr 
+% Polyline
+n 13839 1083 m
+ 14507 1751 l gs col0 s gr 
+% Polyline
+n 13839 1751 m
+ 14507 1083 l gs col0 s gr 
+% Polyline
+n 14173 1889 m 14173 2362 l 13228 2362 l
+ 13228 1889 l gs col0 s gr 
+% Polyline
+n 13306 69 m 13306 0 l 14173 0 l
+ 14173 944 l gs col0 s gr 
+% Polyline
+n 15118 472 m 17007 472 l 17007 1417 l 15118 1417 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 15118 472 m 17007 472 l 17007 1417 l 15118 1417 l
+ cp gs col0 s gr 
+% Polyline
+n 14645 1417 m
+ 15118 1417 l gs col0 s gr 
+% Polyline
+n 13839 -6003 m
+ 14507 -5335 l gs col0 s gr 
+% Polyline
+n 13839 -5335 m
+ 14507 -6003 l gs col0 s gr 
+% Polyline
+n 13228 -7086 m 14173 -7086 l
+ 14173 -6141 l gs col0 s gr 
+% Polyline
+n 13228 -4251 m 14173 -4251 l
+ 14173 -5196 l gs col0 s gr 
+% Polyline
+n 18897 -6614 m 20787 -6614 l 20787 -5669 l 18897 -5669 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 18897 -6614 m 20787 -6614 l 20787 -5669 l 18897 -5669 l
+ cp gs col0 s gr 
+% Polyline
+n 14645 -5669 m 18897 -5669 l
+ 18897 -6141 l gs col0 s gr 
+% Polyline
+n 17007 4251 m 17284 4251 l
+ 17284 3168 l gs col0 s gr 
+% Polyline
+n 17007 1417 m 17284 1417 l
+ 17284 2500 l gs col0 s gr 
+% Polyline
+n 18897 472 m 20787 472 l 20787 1417 l 18897 1417 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 18897 472 m 20787 472 l 20787 1417 l 18897 1417 l
+ cp gs col0 s gr 
+% Polyline
+n 18897 3307 m 20787 3307 l 20787 4251 l 18897 4251 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 18897 3307 m 20787 3307 l 20787 4251 l 18897 4251 l
+ cp gs col0 s gr 
+% Polyline
+n 18897 1417 m 18620 1417 l
+ 18620 2500 l gs col0 s gr 
+% Polyline
+n 18897 4251 m 18620 4251 l
+ 18620 3168 l gs col0 s gr 
+% Polyline
+n 17952 -472 m
+ 17952 472 l gs col0 s gr 
+% Polyline
+n 17480 0 m
+ 18425 0 l gs col0 s gr 
+% Polyline
+n 17007 -1889 m 17007 -1417 l 17952 -1417 l
+ 17952 -472 l gs col0 s gr 
+% Polyline
+n 17007 1417 m 17952 1417 l
+ 17952 472 l gs col0 s gr 
+% Polyline
+n 17007 -4724 m 17007 -4251 l 19370 -4251 l
+ 19370 -1889 l gs col0 s gr 
+% Polyline
+n 18425 0 m 19370 0 l
+ 19370 -944 l gs col0 s gr 
+% Polyline
+n 21732 -3307 m
+ 21732 -2362 l gs col0 s gr 
+% Polyline
+n 21259 -2834 m
+ 22204 -2834 l gs col0 s gr 
+% Polyline
+n 20787 -6141 m 20787 -5669 l 21732 -5669 l
+ 21732 -3307 l gs col0 s gr 
+% Polyline
+n 19842 -1417 m 21732 -1417 l
+ 21732 -2362 l gs col0 s gr 
+% Polyline
+n 19036 -1751 m
+ 19704 -1083 l gs col0 s gr 
+% Polyline
+n 19036 -1083 m
+ 19704 -1751 l gs col0 s gr 
+% Polyline
+n 22677 -3779 m 24566 -3779 l 24566 -2834 l 22677 -2834 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 22677 -3779 m 24566 -3779 l 24566 -2834 l 22677 -2834 l
+ cp gs col0 s gr 
+% Polyline
+n 22204 -2834 m
+ 22677 -2834 l gs col0 s gr 
+% Polyline
+n 21870 9587 m
+ 22538 10255 l gs col0 s gr 
+% Polyline
+n 21870 10255 m
+ 22538 9587 l gs col0 s gr 
+% Polyline
+n 23149 8976 m 25039 8976 l 25039 9921 l 23149 9921 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 23149 8976 m 25039 8976 l 25039 9921 l 23149 9921 l
+ cp gs col0 s gr 
+% Polyline
+n 21259 8503 m 22204 8503 l
+ 22204 9448 l gs col0 s gr 
+% Polyline
+n 21259 11338 m 22204 11338 l
+ 22204 10393 l gs col0 s gr 
+% Polyline
+n 22677 9921 m 23149 9921 l
+ 23149 9448 l gs col0 s gr 
+% Polyline
+n 25511 -1889 m
+ 25511 -944 l gs col0 s gr 
+% Polyline
+n 25039 -1417 m
+ 25984 -1417 l gs col0 s gr 
+% Polyline
+n 24566 -2834 m 25511 -2834 l
+ 25511 -1889 l gs col0 s gr 
+% Polyline
+n 20787 1417 m 25511 1417 l
+ 25511 -944 l gs col0 s gr 
+% Polyline
+n 20787 -11338 m 21064 -11338 l
+ 21064 -10255 l gs col0 s gr 
+% Polyline
+n 20787 -8976 m 20787 -8503 l 21064 -8503 l
+ 21064 -9587 l gs col0 s gr 
+% Polyline
+n 22677 -12283 m 24566 -12283 l 24566 -11338 l 22677 -11338 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 22677 -12283 m 24566 -12283 l 24566 -11338 l 22677 -11338 l
+ cp gs col0 s gr 
+% Polyline
+n 22677 -9448 m 24566 -9448 l 24566 -8503 l 22677 -8503 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 22677 -9448 m 24566 -9448 l 24566 -8503 l 22677 -8503 l
+ cp gs col0 s gr 
+% Polyline
+n 22677 -11338 m 22400 -11338 l
+ 22400 -10255 l gs col0 s gr 
+% Polyline
+n 22677 -8976 m 22677 -8503 l 22400 -8503 l
+ 22400 -9587 l gs col0 s gr 
+% Polyline
+n 25511 -7559 m
+ 25511 -6614 l gs col0 s gr 
+% Polyline
+n 25039 -7086 m
+ 25984 -7086 l gs col0 s gr 
+% Polyline
+n 24566 -8976 m 24566 -8503 l 25511 -8503 l
+ 25511 -6614 l gs col0 s gr 
+% Polyline
+n 24566 -6141 m 24566 -5669 l 25511 -5669 l
+ 25511 -7559 l gs col0 s gr 
+% Polyline
+n 26456 -5196 m
+ 26456 -4251 l gs col0 s gr 
+% Polyline
+n 25984 -4724 m
+ 26929 -4724 l gs col0 s gr 
+% Polyline
+n 25984 -7086 m 26456 -7086 l
+ 26456 -5196 l gs col0 s gr 
+% Polyline
+n 26456 -4251 m 26456 -1417 l
+ 25984 -1417 l gs col0 s gr 
+% Polyline
+n 27401 -1417 m
+ 27401 -472 l gs col0 s gr 
+% Polyline
+n 26929 -944 m
+ 27874 -944 l gs col0 s gr 
+% Polyline
+n 25039 9921 m 27401 9921 l
+ 27401 -472 l gs col0 s gr 
+% Polyline
+n 26929 -4724 m 27401 -4724 l
+ 27401 -1417 l gs col0 s gr 
+% Polyline
+n 28346 -1889 m 30236 -1889 l 30236 -944 l 28346 -944 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 28346 -1889 m 30236 -1889 l 30236 -944 l 28346 -944 l
+ cp gs col0 s gr 
+% Polyline
+n 27874 -944 m 27874 -911 l 28346 -911 l
+ 28346 -1417 l gs col0 s gr 
+% Polyline
+n 30236 -1417 m 30236 -944 l 30512 -944 l
+ 30512 138 l gs col0 s gr 
+% Polyline
+n 20787 4251 m 30512 4251 l
+ 30512 806 l gs col0 s gr 
+% Polyline
+n 32125 -1889 m 34015 -1889 l 34015 -944 l 32125 -944 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 32125 -1889 m 34015 -1889 l 34015 -944 l 32125 -944 l
+ cp gs col0 s gr 
+% Polyline
+n 32125 944 m 34015 944 l 34015 1889 l 32125 1889 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 32125 944 m 34015 944 l 34015 1889 l 32125 1889 l
+ cp gs col0 s gr 
+% Polyline
+n 32125 -944 m 31849 -944 l
+ 31849 138 l gs col0 s gr 
+% Polyline
+n 32125 1417 m 32125 1889 l 31849 1889 l
+ 31849 806 l gs col0 s gr 
+% Polyline
+n 35905 -7086 m 37795 -7086 l 37795 -6141 l 35905 -6141 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 35905 -7086 m 37795 -7086 l 37795 -6141 l 35905 -6141 l
+ cp gs col0 s gr 
+% Polyline
+n 35905 -4251 m 37795 -4251 l 37795 -3307 l 35905 -3307 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 35905 -4251 m 37795 -4251 l 37795 -3307 l 35905 -3307 l
+ cp gs col0 s gr 
+% Polyline
+n 35905 -6614 m 35905 -6141 l 35628 -6141 l
+ 35628 -5058 l gs col0 s gr 
+% Polyline
+n 35905 -3307 m 35628 -3307 l
+ 35628 -4390 l gs col0 s gr 
+% Polyline
+n 34015 -1417 m 34015 -944 l 34292 -944 l
+ 34292 -4390 l gs col0 s gr 
+% Polyline
+n 24566 -11338 m 34292 -11338 l
+ 34292 -5058 l gs col0 s gr 
+% Polyline
+n 38740 -1417 m
+ 38740 -472 l gs col0 s gr 
+% Polyline
+n 38267 -944 m
+ 39212 -944 l gs col0 s gr 
+% Polyline
+n 34015 1417 m 34015 1889 l 38740 1889 l
+ 38740 -472 l gs col0 s gr 
+% Polyline
+n 37795 -3307 m 38740 -3307 l
+ 38740 -1417 l gs col0 s gr 
+% Polyline
+n 39685 -1889 m 41574 -1889 l 41574 -944 l 39685 -944 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 39685 -1889 m 41574 -1889 l 41574 -944 l 39685 -944 l
+ cp gs col0 s gr 
+% Polyline
+n 39212 -944 m 39685 -944 l
+ 39685 -1417 l gs col0 s gr 
+% Polyline
+n 39685 -9921 m 41574 -9921 l 41574 -8976 l 39685 -8976 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 39685 -9921 m 41574 -9921 l 41574 -8976 l 39685 -8976 l
+ cp gs col0 s gr 
+% Polyline
+n 39685 -7086 m 41574 -7086 l 41574 -6141 l 39685 -6141 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 39685 -7086 m 41574 -7086 l 41574 -6141 l 39685 -6141 l
+ cp gs col0 s gr 
+% Polyline
+n 39685 -8976 m 39408 -8976 l
+ 39408 -7893 l gs col0 s gr 
+% Polyline
+n 39685 -6614 m 39685 -6141 l 39408 -6141 l
+ 39408 -7224 l gs col0 s gr 
+% Polyline
+n 41574 -6614 m 41580 -6120 l 42520 -6122 l
+ 42519 -3779 l gs col0 s gr 
+% Polyline
+n 37795 -8976 m 38072 -8976 l
+ 38072 -7893 l gs col0 s gr 
+% Polyline
+n 37795 -6614 m 37795 -6141 l 38072 -6141 l
+ 38072 -7224 l gs col0 s gr 
+% Polyline
+n 42519 -3779 m
+ 42519 -2834 l gs col0 s gr 
+% Polyline
+n 42047 -3307 m
+ 42992 -3307 l gs col0 s gr 
+% Polyline
+n 41574 -1417 m 41574 -944 l 42519 -944 l
+ 42519 -2834 l gs col0 s gr 
+% Polyline
+n 43464 -4251 m 45354 -4251 l 45354 -3307 l 43464 -3307 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 43464 -4251 m 45354 -4251 l 45354 -3307 l 43464 -3307 l
+ cp gs col0 s gr 
+% Polyline
+n 42992 -3307 m 43464 -3307 l
+ 43464 -3779 l gs col0 s gr 
+% Polyline
+n 47244 -8031 m 49133 -8031 l 49133 -7086 l 47244 -7086 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 47244 -8031 m 49133 -8031 l 49133 -7086 l 47244 -7086 l
+ cp gs col0 s gr 
+% Polyline
+n 47244 -7559 m 47244 -7086 l 46967 -7086 l
+ 46967 -6003 l gs col0 s gr 
+% Polyline
+n 47244 -4251 m 46967 -4251 l
+ 46967 -5335 l gs col0 s gr 
+% Polyline
+n 41574 -8976 m 45631 -8976 l
+ 45631 -6003 l gs col0 s gr 
+% Polyline
+n 45354 -3779 m 45354 -3307 l 45631 -3307 l
+ 45631 -5335 l gs col0 s gr 
+% Polyline
+n 19370 8503 m
+ 18425 8503 l gs col0 s gr 
+% Polyline
+n 47244 -5196 m 49133 -5196 l 49133 -4251 l 47244 -4251 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 47244 -5196 m 49133 -5196 l 49133 -4251 l 47244 -4251 l
+ cp gs col0 s gr 
+% Polyline
+n 39909 8709 m 41798 8709 l 41798 9654 l 39909 9654 l
+ cp gs col32 1.00 shd ef gr gs col32 s gr 
+% Polyline
+n 39909 8709 m 41798 8709 l 41798 9654 l 39909 9654 l
+ cp gs col0 s gr 
+/Courier-iso ff 345.00 scf sf
+12558 173 m
+gs 1 -1 sc (1/2) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+8503 3307 m
+gs 1 -1 sc (rp_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+8503 472 m
+gs 1 -1 sc (rp_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+12283 1889 m
+gs 1 -1 sc (R1) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+12283 7559 m
+gs 1 -1 sc (rp_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+16062 6614 m
+gs 1 -1 sc (crp_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+16062 9448 m
+gs 1 -1 sc (P_r) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+20314 8031 m
+gs 1 -1 sc (R2) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+16062 944 m
+gs 1 -1 sc (R1) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+12283 -7559 m
+gs 1 -1 sc (ex_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+12283 -4724 m
+gs 1 -1 sc (rp_lo) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+19842 -6141 m
+gs 1 -1 sc (R4) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+16062 3779 m
+gs 1 -1 sc (ex_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-iso ff 300.00 scf sf
+17952 2834 m
+gs 1 -1 sc (Dekker) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+19842 944 m
+gs 1 -1 sc (R5_lo) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+19842 3779 m
+gs 1 -1 sc (R5_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+16062 -1889 m
+gs 1 -1 sc (rp_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+16062 -4724 m
+gs 1 -1 sc (ex_lo) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+23622 -3307 m
+gs 1 -1 sc (R6) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+20314 10866 m
+gs 1 -1 sc (ex_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+24094 9448 m
+gs 1 -1 sc (R7) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+19842 -11811 m
+gs 1 -1 sc (rp_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+19842 -8976 m
+gs 1 -1 sc (ex_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-iso ff 300.00 scf sf
+21732 -9921 m
+gs 1 -1 sc (Dekker) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+23622 -11811 m
+gs 1 -1 sc (R3_lo) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+23622 -8976 m
+gs 1 -1 sc (R3_lo) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+23622 -6141 m
+gs 1 -1 sc (ex_lo) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+29291 -1417 m
+gs 1 -1 sc (R7) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-iso ff 300.00 scf sf
+31181 472 m
+gs 1 -1 sc (Fast2Sum) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+33070 -1417 m
+gs 1 -1 sc (R9) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+33070 1417 m
+gs 1 -1 sc (R8) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-iso ff 300.00 scf sf
+34960 -4724 m
+gs 1 -1 sc (Fast2Sum) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+36850 -6614 m
+gs 1 -1 sc (R10) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+36850 -3779 m
+gs 1 -1 sc (tmp) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+40629 -1417 m
+gs 1 -1 sc (R8) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+36850 -9448 m
+gs 1 -1 sc (ex_hi) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-iso ff 300.00 scf sf
+38740 -7559 m
+gs 1 -1 sc (Fast2Sum) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+40629 -9448 m
+gs 1 -1 sc (R11) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+40629 -6614 m
+gs 1 -1 sc (tmp) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+44409 -3779 m
+gs 1 -1 sc (R8) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Courier-iso ff 300.00 scf sf
+46299 -5669 m
+gs 1 -1 sc (Fast2Sum) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+48188 -7559 m
+gs 1 -1 sc (R11) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+48188 -4724 m
+gs 1 -1 sc (R8) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+40860 9315 m
+gs 1 -1 sc (A) dup sw pop 2 div neg 0 rm  col0 sh gr
+/Times-Bold-iso ff 420.00 scf sf
+43020 9315 m
+gs 1 -1 sc (Variable A) dup sw pop 2 div neg 0 rm  col0 sh gr
+% here ends figure;
+$F2psEnd
+rs
+showpage
diff --git a/src/crlibm/docs/latex/fig_exp/reconstruction.pstex_t b/src/crlibm/docs/latex/fig_exp/reconstruction.pstex_t
new file mode 100644
index 0000000..7ab7cec
--- /dev/null
+++ b/src/crlibm/docs/latex/fig_exp/reconstruction.pstex_t
@@ -0,0 +1,89 @@
+\begin{picture}(0,0)%
+\includegraphics{fig_exp/reconstruction.pstex}%
+\end{picture}%
+\setlength{\unitlength}{994sp}%
+%
+\begingroup\makeatletter\ifx\SetFigFont\undefined%
+\gdef\SetFigFont#1#2#3#4#5{%
+  \reset at font\fontsize{#1}{#2pt}%
+  \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
+  \selectfont}%
+\fi\endgroup%
+\begin{picture}(41646,24613)(7528,-11456)
+\put(23491,-9466){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-30}$}%
+}}}}
+\put(11746,7409){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-1}$}%
+}}}}
+\put(11656,4529){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-63}$}%
+}}}}
+\put(15481,4529){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-55}$}%
+}}}}
+\put(15571,1739){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-9}$}%
+}}}}
+\put(11791,-2086){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-9}$}%
+}}}}
+\put(15526,-1096){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-19}$}%
+}}}}
+\put(15571,-3976){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-1}$}%
+}}}}
+\put(7966,-601){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-9}$}%
+}}}}
+\put(7966,-3481){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-9}$}%
+}}}}
+\put(11746,-7756){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-9}$}%
+}}}}
+\put(15526,-9601){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-2}$}%
+}}}}
+\put(15526,-6721){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-27}$}%
+}}}}
+\put(19756,-11041){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-1}$}%
+}}}}
+\put(19711,-8206){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-29}$}%
+}}}}
+\put(19261,-1096){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-20}$}%
+}}}}
+\put(19261,-3976){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-74}$}%
+}}}}
+\put(19216,5969){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-64}$}%
+}}}}
+\put(22996,5969){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-55}$}%
+}}}}
+\put(23041,3134){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-62}$}%
+}}}}
+\put(19261,11639){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-9}$}%
+}}}}
+\put(23086,11639){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-10}$}%
+}}}}
+\put(19306,8804){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-1}$}%
+}}}}
+\put(23041,8804){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-64}$}%
+}}}}
+\put(28666,1244){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-29}$}%
+}}}}
+\put(32446,1244){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-19}$}%
+}}}}
+\put(32491,-1591){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-73}$}%
+}}}}
+\put(40046,6457){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-53}$}%
+}}}}
+\put(36316,9254){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-1}$}%
+}}}}
+\put(40186,9299){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{0}$}%
+}}}}
+\put(36361,6419){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-9}$}%
+}}}}
+\put(36271,3629){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-63}$}%
+}}}}
+\put(40051,1244){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-62}$}%
+}}}}
+\put(43786,3584){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-53}$}%
+}}}}
+\put(47566,4529){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-53}$}%
+}}}}
+\put(47611,7409){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$2^{-1}$}%
+}}}}
+\put(40861,-9376){\makebox(0,0)[b]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$max$}%
+}}}}
+\put(42121,-9421){\makebox(0,0)[lb]{\smash{{\SetFigFont{5}{6.0}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$|A| \leq max$}%
+}}}}
+\end{picture}%
diff --git a/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.fig b/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.fig
new file mode 100644
index 0000000..4f8934a
--- /dev/null
+++ b/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.fig
@@ -0,0 +1,111 @@
+#FIG 3.2
+Landscape
+Center
+Metric
+A4      
+41.00
+Single
+-2
+1200 2
+6 15975 1125 18000 1350
+4 0 0 50 -1 0 20 0.0000 4 195 210 15975 1350 X\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 16875 1350 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 17775 1350 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 17550 1350 X\001
+-6
+6 1313 2580 8228 3210
+4 1 0 50 -1 0 20 0.0000 2 270 6915 4770 2790 $R8 > 0 \\mbox{~~~et~~~} R11\\_err=\\frac{1}{2}ulp(R12)$\001
+4 1 0 50 -1 0 20 0.0000 0 255 675 4770 3150 cas a)\001
+-6
+6 9900 1350 13725 2025
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 9900 1440 9900 1665 13725 1665 13725 1440
+4 0 0 50 -1 0 20 0.0000 4 195 465 11475 1890 R11\001
+-6
+6 10538 2580 17543 3210
+4 1 0 50 -1 0 20 0.0000 2 270 7005 14040 2790 $R8 < 0 \\mbox{~~~et~~~} R11\\_err=-\\frac{1}{2}ulp(R12)$\001
+4 1 0 50 -1 0 20 0.0000 0 255 675 14040 3150 cas b)\001
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 9900 -135 9900 90 18000 90 18000 -135
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 675 990 675 1215 2025 1215 2025 990
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 2250 990 2250 1215 4500 1215 4500 990
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 675 1440 675 1665 4500 1665 4500 1440
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 4950 1215 4950 1440 8775 1440 8775 1215
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 11437 982 11437 1207 13725 1215 13725 990
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 9900 990 9900 1215 11340 1215 11340 990
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 14175 1215 14175 1440 18000 1440 18000 1215
+4 0 0 50 -1 0 20 0.0000 4 30 180 12375 1125 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 14175 1350 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 14400 1350 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 15300 1350 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 9900 0 X\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 10575 0 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 11475 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 11700 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 11925 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 12150 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 12375 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 12600 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 12825 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 13050 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 13275 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 13500 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 15075 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 14850 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 14175 0 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 15975 0 X\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 16875 0 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 17775 0 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 17550 0 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 15750 0 X\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 12375 1125 ...\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 12375 1125 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 225 15525 1350 -1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 15525 0 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 15300 0 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 675 1125 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 900 1125 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 1800 1125 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 2250 1125 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 2475 1125 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 4275 1125 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 4050 1125 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 2700 1125 0\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 3150 1125 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 4950 1350 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 5175 1350 0\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 5625 1350 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 6075 1350 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 6300 1350 1\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 6525 1350 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 6750 1350 X\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 7650 1350 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 8550 1350 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 8325 1350 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 465 1125 1440 R12\001
+4 0 0 50 -1 0 20 0.0000 4 255 930 2925 1440 R11_err\001
+4 0 0 50 -1 0 20 0.0000 4 195 465 2250 1890 R11\001
+4 0 0 50 -1 0 20 0.0000 4 195 330 6525 1890 R8\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 14850 1350 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 11925 1125 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 225 11475 1125 -1\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 13500 1125 0\001
+4 0 0 50 -1 0 20 0.0000 4 195 135 13275 1125 0\001
+4 0 0 50 -1 0 20 0.0000 4 255 930 12150 1440 R11_err\001
+4 0 0 50 -1 0 20 0.0000 4 195 465 10350 1440 R12\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 10125 1125 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 9900 1125 X\001
+4 0 0 50 -1 0 20 0.0000 4 30 180 10575 1132 ...\001
+4 0 0 50 -1 0 20 0.0000 4 195 285 11025 1125 +1\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 10125 0 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 1095 13275 450 R11 + R8\001
+4 0 0 50 -1 0 20 0.0000 4 195 210 11025 0 X\001
+4 0 0 50 -1 0 20 0.0000 4 195 330 15750 1890 R8\001
diff --git a/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.pstex b/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.pstex
new file mode 100644
index 0000000..a14f545
--- /dev/null
+++ b/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.pstex
@@ -0,0 +1,386 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: rnd_to_nearest.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 4
+%%CreationDate: Mon Jun 30 21:34:50 2003
+%%For: ddefour at pecheresse (David Defour)
+%%BoundingBox: 0 0 449 89
+%%Magnification: 0.4100
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 89 moveto 0 0 lineto 449 0 lineto 449 89 lineto closepath clip newpath
+-17.1 83.3 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/reencdict 12 dict def /ReEncode { reencdict begin
+/newcodesandnames exch def /newfontname exch def /basefontname exch def
+/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def
+basefontdict { exch dup /FID ne { dup /Encoding eq
+{ exch dup length array copy newfont 3 1 roll put }
+{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall
+newfont /FontName newfontname put newcodesandnames aload pop
+128 1 255 { newfont /Encoding get exch /.notdef put } for
+newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat
+newfontname newfont definefont pop end } def
+/isovec [
+8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde
+8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis
+8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron
+8#220 /dotlessi 8#230 /oe 8#231 /OE
+8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling
+8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis
+8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot
+8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus
+8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph
+8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine
+8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf
+8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute
+8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring
+8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute
+8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute
+8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve
+8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply
+8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex
+8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave
+8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring
+8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute
+8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute
+8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve
+8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide
+8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex
+8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def
+/Times-Roman /Times-Roman-iso isovec ReEncode
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+0 slj 0 slc
+ 0.02583 0.02583 sc
+%
+% Fig objects follow
+%
+% 
+% here starts figure with depth 50
+/Times-Roman-iso ff 300.00 scf sf
+15975 1350 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+16875 1350 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+17775 1350 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+17550 1350 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+4770 3150 m
+gs 1 -1 sc (cas a\)) dup sw pop 2 div neg 0 rm  col0 sh gr
+% Polyline
+7.500 slw
+n 9900 1440 m 9900 1665 l 13725 1665 l
+ 13725 1440 l gs col0 s gr 
+/Times-Roman-iso ff 300.00 scf sf
+11475 1890 m
+gs 1 -1 sc (R11) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+14040 3150 m
+gs 1 -1 sc (cas b\)) dup sw pop 2 div neg 0 rm  col0 sh gr
+% Polyline
+n 9900 -135 m 9900 90 l 18000 90 l
+ 18000 -135 l gs col0 s gr 
+% Polyline
+n 675 990 m 675 1215 l 2025 1215 l
+ 2025 990 l gs col0 s gr 
+% Polyline
+n 2250 990 m 2250 1215 l 4500 1215 l
+ 4500 990 l gs col0 s gr 
+% Polyline
+n 675 1440 m 675 1665 l 4500 1665 l
+ 4500 1440 l gs col0 s gr 
+% Polyline
+n 4950 1215 m 4950 1440 l 8775 1440 l
+ 8775 1215 l gs col0 s gr 
+% Polyline
+n 11437 982 m 11437 1207 l 13725 1215 l
+ 13725 990 l gs col0 s gr 
+% Polyline
+n 9900 990 m 9900 1215 l 11340 1215 l
+ 11340 990 l gs col0 s gr 
+% Polyline
+n 14175 1215 m 14175 1440 l 18000 1440 l
+ 18000 1215 l gs col0 s gr 
+/Times-Roman-iso ff 300.00 scf sf
+12375 1125 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+14175 1350 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+14400 1350 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+15300 1350 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+9900 0 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+10575 0 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+11475 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+11700 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+11925 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+12150 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+12375 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+12600 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+12825 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+13050 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+13275 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+13500 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+15075 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+14850 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+14175 0 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+15975 0 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+16875 0 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+17775 0 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+17550 0 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+15750 0 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+12375 1125 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+12375 1125 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+15525 1350 m
+gs 1 -1 sc (-1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+15525 0 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+15300 0 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+675 1125 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+900 1125 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+1800 1125 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+2250 1125 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+2475 1125 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+4275 1125 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+4050 1125 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+2700 1125 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+3150 1125 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+4950 1350 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+5175 1350 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+5625 1350 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+6075 1350 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+6300 1350 m
+gs 1 -1 sc (1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+6525 1350 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+6750 1350 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+7650 1350 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+8550 1350 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+8325 1350 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+1125 1440 m
+gs 1 -1 sc (R12) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+2925 1440 m
+gs 1 -1 sc (R11_err) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+2250 1890 m
+gs 1 -1 sc (R11) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+6525 1890 m
+gs 1 -1 sc (R8) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+14850 1350 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+11925 1125 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+11475 1125 m
+gs 1 -1 sc (-1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+13500 1125 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+13275 1125 m
+gs 1 -1 sc (0) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+12150 1440 m
+gs 1 -1 sc (R11_err) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+10350 1440 m
+gs 1 -1 sc (R12) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+10125 1125 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+9900 1125 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+10575 1132 m
+gs 1 -1 sc (...) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+11025 1125 m
+gs 1 -1 sc (+1) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+10125 0 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+13275 450 m
+gs 1 -1 sc (R11 + R8) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+11025 0 m
+gs 1 -1 sc (X) col0 sh gr
+/Times-Roman-iso ff 300.00 scf sf
+15750 1890 m
+gs 1 -1 sc (R8) col0 sh gr
+% here ends figure;
+$F2psEnd
+rs
+showpage
diff --git a/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.pstex_t b/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.pstex_t
new file mode 100644
index 0000000..aea70e8
--- /dev/null
+++ b/src/crlibm/docs/latex/fig_exp/rnd_to_nearest.pstex_t
@@ -0,0 +1,17 @@
+\begin{picture}(0,0)%
+\includegraphics{fig_exp/rnd_to_nearest.pstex}%
+\end{picture}%
+\setlength{\unitlength}{1699sp}%
+%
+\begingroup\makeatletter\ifx\SetFigFont\undefined%
+\gdef\SetFigFont#1#2#3#4#5{%
+  \reset at font\fontsize{#1}{#2pt}%
+  \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
+  \selectfont}%
+\fi\endgroup%
+\begin{picture}(17349,3421)(664,-2387)
+\put(4771,-1951){\makebox(0,0)[b]{\smash{{\SetFigFont{8}{9.6}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$R8 > 0 \mbox{~~~et~~~} R11\_err=\frac{1}{2}ulp(R12)$}%
+}}}}
+\put(14041,-1951){\makebox(0,0)[b]{\smash{{\SetFigFont{8}{9.6}{\familydefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$R8 < 0 \mbox{~~~et~~~} R11\_err=-\frac{1}{2}ulp(R12)$}%
+}}}}
+\end{picture}%
diff --git a/src/crlibm/docs/latex/fig_scs/exponent_representation.eps b/src/crlibm/docs/latex/fig_scs/exponent_representation.eps
new file mode 100644
index 0000000..0234e70
--- /dev/null
+++ b/src/crlibm/docs/latex/fig_scs/exponent_representation.eps
@@ -0,0 +1,481 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: exponent_representation2.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Tue Apr  2 18:10:36 2002
+%%For: ddefour at reena (David Defour)
+%%BoundingBox: 0 0 712 300
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 300 moveto 0 0 lineto 712 0 lineto 712 300 lineto closepath clip newpath
+426.6 384.1 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add
+  4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+  bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+  4 -2 roll mul srgb} bind def
+/reencdict 12 dict def /ReEncode { reencdict begin
+/newcodesandnames exch def /newfontname exch def /basefontname exch def
+/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def
+basefontdict { exch dup /FID ne { dup /Encoding eq
+{ exch dup length array copy newfont 3 1 roll put }
+{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall
+newfont /FontName newfontname put newcodesandnames aload pop
+128 1 255 { newfont /Encoding get exch /.notdef put } for
+newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat
+newfontname newfont definefont pop end } def
+/isovec [
+8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde
+8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis
+8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron
+8#220 /dotlessi 8#230 /oe 8#231 /OE
+8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling
+8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis
+8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot
+8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus
+8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph
+8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine
+8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf
+8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute
+8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring
+8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute
+8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute
+8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve
+8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply
+8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex
+8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave
+8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring
+8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute
+8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute
+8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve
+8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide
+8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex
+8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def
+/Times-Roman /Times-Roman-iso isovec ReEncode
+/Helvetica /Helvetica-iso isovec ReEncode
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.06299 0.06299 sc
+%
+% Fig objects follow
+%
+/Times-Roman-iso ff 270.00 scf sf
+-2925 3825 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman-iso ff 210.00 scf sf
+-2475 3660 m
+gs 1 -1 sc (r) col0 sh gr
+/Times-Roman-iso ff 225.00 scf sf
+-2835 3600 m
+gs 1 -1 sc (2.m) col0 sh gr
+/Times-Roman-iso ff 270.00 scf sf
+-4275 3825 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman-iso ff 210.00 scf sf
+-3825 3660 m
+gs 1 -1 sc (r) col0 sh gr
+/Times-Roman-iso ff 225.00 scf sf
+-4185 3600 m
+gs 1 -1 sc (3.m) col0 sh gr
+/Times-Roman-iso ff 225.00 scf sf
+-1350 3600 m
+gs 1 -1 sc (m) col0 sh gr
+/Times-Roman-iso ff 210.00 scf sf
+-1125 3660 m
+gs 1 -1 sc (r) col0 sh gr
+/Times-Roman-iso ff 225.00 scf sf
+1222 3592 m
+gs 1 -1 sc (-m) col0 sh gr
+/Times-Roman-iso ff 210.00 scf sf
+1522 3652 m
+gs 1 -1 sc (r) col0 sh gr
+/Times-Roman-iso ff 225.00 scf sf
+2572 3592 m
+gs 1 -1 sc (-2.m) col0 sh gr
+/Times-Roman-iso ff 210.00 scf sf
+3037 3652 m
+gs 1 -1 sc (r) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-2925 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1575 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-2025 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-675 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+675 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+1800 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+225 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-2475 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-900 1800 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-3375 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-3150 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-2700 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-2250 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1800 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1350 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-450 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1125 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-225 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+0 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+450 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+900 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+1125 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+1575 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+1350 1800 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+0 1800 m
+gs 1 -1 sc (,) col0 sh gr
+% Polyline
+7.500 slw
+n -4620 1350 m -4725 1350 -4725 1920 105 arcto 4 {pop} repeat
+  -4725 2025 2145 2025 105 arcto 4 {pop} repeat
+  2250 2025 2250 1455 105 arcto 4 {pop} repeat
+  2250 1350 -4620 1350 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+/Helvetica-iso ff 300.00 scf sf
+-4500 1800 m
+gs 1 -1 sc (X = ) col0 sh gr
+% Polyline
+n -3945 4500 m -4050 4500 -4050 4845 105 arcto 4 {pop} repeat
+  -4050 4950 -2805 4950 105 arcto 4 {pop} repeat
+  -2700 4950 -2700 4605 105 arcto 4 {pop} repeat
+  -2700 4500 -3945 4500 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+% Polyline
+n -2550 4500 m -2655 4500 -2655 4845 105 arcto 4 {pop} repeat
+  -2655 4950 -1455 4950 105 arcto 4 {pop} repeat
+  -1350 4950 -1350 4605 105 arcto 4 {pop} repeat
+  -1350 4500 -2550 4500 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+% Polyline
+n -1200 4500 m -1305 4500 -1305 4845 105 arcto 4 {pop} repeat
+  -1305 4950 -105 4950 105 arcto 4 {pop} repeat
+  0 4950 0 4605 105 arcto 4 {pop} repeat
+  0 4500 -1200 4500 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+% Polyline
+n 150 4500 m 45 4500 45 4845 105 arcto 4 {pop} repeat
+  45 4950 1245 4950 105 arcto 4 {pop} repeat
+  1350 4950 1350 4605 105 arcto 4 {pop} repeat
+  1350 4500 150 4500 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+% Polyline
+n 1500 4500 m 1395 4500 1395 4845 105 arcto 4 {pop} repeat
+  1395 4950 2595 4950 105 arcto 4 {pop} repeat
+  2700 4950 2700 4605 105 arcto 4 {pop} repeat
+  2700 4500 1500 4500 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+/Helvetica-iso ff 300.00 scf sf
+-2895 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1545 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1995 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-645 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+705 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+1830 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+255 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-2445 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-870 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-3345 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-3120 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-2670 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-2220 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1770 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1320 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-420 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-1095 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-195 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+30 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+480 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+930 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+1155 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+1605 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+1380 4830 m
+gs 1 -1 sc (1) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+2055 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+2280 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+2505 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-4020 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-3795 4830 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-3570 4830 m
+gs 1 -1 sc (0) col0 sh gr
+% Polyline
+15.000 slw
+n -5520 4275 m -5625 4275 -5625 5970 105 arcto 4 {pop} repeat
+  -5625 6075 3045 6075 105 arcto 4 {pop} repeat
+  3150 6075 3150 4380 105 arcto 4 {pop} repeat
+  3150 4275 -5520 4275 105 arcto 4 {pop} repeat
+ cp gs col0 s gr 
+/Helvetica-iso ff 300.00 scf sf
+-5355 4800 m
+gs 1 -1 sc (R.digits =) col0 sh gr
+/Helvetica-iso ff 240.00 scf sf
+-1350 5850 m
+gs 1 -1 sc (Software  Carry  Save  Structure \(SCSS\)) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-5340 5745 m
+gs 1 -1 sc (R.sign = 1 ) col0 sh gr
+/Helvetica-iso ff 300.00 scf sf
+-5355 5295 m
+gs 1 -1 sc (R.index = 3 ) col0 sh gr
+% Polyline
+n -5175 3150 m
+ 2925 3150 l gs col0 s gr 
+% Polyline
+n 0 2925 m
+ 0 3375 l gs col0 s gr 
+% Polyline
+n 1350 2925 m
+ 1350 3375 l gs col0 s gr 
+% Polyline
+n 2700 2925 m
+ 2700 3375 l gs col0 s gr 
+% Polyline
+n -1350 2925 m
+ -1350 3375 l gs col0 s gr 
+% Polyline
+n -2700 2925 m
+ -2700 3375 l gs col0 s gr 
+% Polyline
+ [90] 0 sd
+n 2925 3150 m
+ 4500 3150 l gs col0 s gr  [] 0 sd
+% Polyline
+ [90] 0 sd
+n -6750 3150 m
+ -5175 3150 l gs col0 s gr  [] 0 sd
+% Polyline
+n -4050 2925 m
+ -4050 3375 l gs col0 s gr 
+% Polyline
+n -2700 2925 m
+ -2700 3375 l gs col0 s gr 
+% Polyline
+7.500 slw
+ [15 45] 45 sd
+n -2700 1350 m
+ -2700 4950 l gs col0 s gr  [] 0 sd
+% Polyline
+ [15 45] 45 sd
+n -1350 1350 m
+ -1350 4950 l gs col0 s gr  [] 0 sd
+% Polyline
+ [15 45] 45 sd
+n 0 1350 m
+ 0 4950 l gs col0 s gr  [] 0 sd
+% Polyline
+ [15 45] 45 sd
+n 1350 1350 m
+ 1350 4950 l gs col0 s gr  [] 0 sd
+% Polyline
+ [15 45] 45 sd
+n -4050 1350 m
+ -4050 4950 l gs col0 s gr  [] 0 sd
+/Times-Roman-iso ff 270.00 scf sf
+2475 3825 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman-iso ff 270.00 scf sf
+-225 3825 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman-iso ff 270.00 scf sf
+1125 3825 m
+gs 1 -1 sc (2) col0 sh gr
+/Times-Roman-iso ff 270.00 scf sf
+-1575 3825 m
+gs 1 -1 sc (2) col0 sh gr
+/Helvetica-iso ff 270.00 scf sf
+-3435 2925 m
+gs 1 -1 sc (3) col0 sh gr
+/Helvetica-iso ff 270.00 scf sf
+-2085 2925 m
+gs 1 -1 sc (2) col0 sh gr
+/Helvetica-iso ff 270.00 scf sf
+-765 2925 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 270.00 scf sf
+570 2925 m
+gs 1 -1 sc (-1) col0 sh gr
+/Helvetica-iso ff 270.00 scf sf
+1890 2925 m
+gs 1 -1 sc (-2) col0 sh gr
+/Times-Roman-iso ff 225.00 scf sf
+-75 3653 m
+gs 1 -1 sc (0) col0 sh gr
+/Helvetica-iso ff 270.00 scf sf
+-5415 2910 m
+gs 1 -1 sc (Index =) col0 sh gr
+/Helvetica-iso ff 270.00 scf sf
+-5430 3825 m
+gs 1 -1 sc (Value =) col0 sh gr
+$F2psEnd
+rs
diff --git a/src/crlibm/docs/latex/fig_scs/exponent_representation.pdf b/src/crlibm/docs/latex/fig_scs/exponent_representation.pdf
new file mode 100644
index 0000000..65aa966
Binary files /dev/null and b/src/crlibm/docs/latex/fig_scs/exponent_representation.pdf differ
diff --git a/src/crlibm/docs/latex/fig_scs/multiplication.eps b/src/crlibm/docs/latex/fig_scs/multiplication.eps
new file mode 100644
index 0000000..a5ee952
--- /dev/null
+++ b/src/crlibm/docs/latex/fig_scs/multiplication.eps
@@ -0,0 +1,1237 @@
+%!PS-Adobe-3.0
+%%Pages: (atend)
+%%BoundingBox: 0 0 373 234
+%%HiResBoundingBox: 0.000000 0.000000 372.082007 233.460010
+%.........................................
+%%Creator: GNU Ghostscript 707 (pswrite)
+%%CreationDate: 2004/04/07 15:40:39
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 2
+%%EndComments
+%%BeginProlog
+% This copyright applies to everything between here and the %%EndProlog:
+% Copyright (C) 2003 artofcode LLC, Benicia, CA.  All rights reserved.
+%%BeginResource: procset GS_pswrite_2_0_1001
+/GS_pswrite_2_0_1001 80 dict dup begin
+/PageSize 2 array def/setpagesize{ PageSize aload pop 3 index eq exch
+4 index eq and{ pop pop pop}{ PageSize dup  1
+5 -1 roll put 0 4 -1 roll put dup null eq {false} {dup where} ifelse{ exch get exec}
+{ pop/setpagedevice where
+{ pop 1 dict dup /PageSize PageSize put setpagedevice}
+{ /setpage where{ pop PageSize aload pop pageparams 3 {exch pop} repeat
+setpage}if}ifelse}ifelse}ifelse} bind def
+/!{bind def}bind def/#{load def}!/N/counttomark #
+/rG{3{3 -1 roll 255 div}repeat setrgbcolor}!/G{255 div setgray}!/K{0 G}!
+/r6{dup 3 -1 roll rG}!/r5{dup 3 1 roll rG}!/r3{dup rG}!
+/w/setlinewidth #/J/setlinecap #
+/j/setlinejoin #/M/setmiterlimit #/d/setdash #/i/setflat #
+/m/moveto #/l/lineto #/c/rcurveto #
+/p{N 2 idiv{N -2 roll rlineto}repeat}!
+/P{N 0 gt{N -2 roll moveto p}if}!
+/h{p closepath}!/H{P closepath}!
+/lx{0 rlineto}!/ly{0 exch rlineto}!/v{0 0 6 2 roll c}!/y{2 copy c}!
+/re{4 -2 roll m exch dup lx exch ly neg lx h}!
+/^{3 index neg 3 index neg}!
+/f{P fill}!/f*{P eofill}!/s{H stroke}!/S{P stroke}!
+/q/gsave #/Q/grestore #/rf{re fill}!
+/Y{P clip newpath}!/Y*{P eoclip newpath}!/rY{re Y}!
+/|={pop exch 4 1 roll 3 array astore cvx exch 1 index def exec}!
+/|{exch string readstring |=}!
+/+{dup type/nametype eq{2 index 7 add -3 bitshift 2 index mul}if}!
+/@/currentfile #/${+ @ |}!
+/B{{2 copy string{readstring pop}aload pop 4 array astore cvx
+3 1 roll}repeat pop pop true}!
+/Ix{[1 0 0 1 11 -2 roll exch neg exch neg]exch}!
+/,{true exch Ix imagemask}!/If{false exch Ix imagemask}!/I{exch Ix image}!
+/Ic{exch Ix false 3 colorimage}!
+/F{/Columns counttomark 3 add -2 roll/Rows exch/K -1/BlackIs1 true>>
+/CCITTFaxDecode filter}!/FX{<</EndOfBlock false F}!
+/X{/ASCII85Decode filter}!/@X{@ X}!/&2{2 index 2 index}!
+/@F{@ &2<<F}!/@C{@X &2 FX}!
+/$X{+ @X |}!/&4{4 index 4 index}!/$F{+ @ &4<<F |}!/$C{+ @X &4 FX |}!
+/IC{3 1 roll 10 dict begin 1{/ImageType/Interpolate/Decode/DataSource
+/ImageMatrix/BitsPerComponent/Height/Width}{exch def}forall
+currentdict end image}!
+/~{@ read {pop} if}!
+end readonly def
+%%EndResource
+/pagesave null def
+%%EndProlog
+%%Page: 1 1
+%%BeginPageSetup
+GS_pswrite_2_0_1001 begin
+375 234 null setpagesize
+/pagesave save store 100 dict begin
+0.1 0.1 scale
+%%EndPageSetup
+gsave mark
+K
+0 0 0 0 rf
+Q q
+0 0 3750 0 0 2340 ^ Y
+255 G
+2785.42 744.91 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+[ 9.4485 28.3455 ] 28.3455 d
+4.72425 w
+K
+2785.42 744.91 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+2331.89 688.21 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+736.98 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+2331.89 688.21 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+736.98 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1878.36 631.52 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.67 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 31.31 -25.39 56.69 -56.7 56.69 c
+f*
+K
+1878.36 631.52 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.67 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 0 p
+0 31.31 -25.39 56.69 -56.7 56.69 c
+h
+S
+255 G
+1481.52 574.83 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.68 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+[ ] 0 d
+K
+1481.52 574.83 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.68 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+2785.42 1935.42 m
+-31.31 0 -56.69 -25.39 -56.69 -56.69 c
+0 -31.31 25.38 -56.7 56.69 -56.7 c
+680.29 0 p
+31.31 0 56.69 25.39 56.69 56.7 c
+0 31.3 -25.38 56.69 -56.69 56.69 c
+f*
+K
+2785.42 1935.42 0 0 P
+-31.31 0 -56.69 -25.39 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.7 56.69 -56.7 c
+680.29 0 p
+31.31 0 56.69 25.39 56.69 56.7 c
+0 0 p
+0 31.3 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1481.52 574.83 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.68 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1481.52 574.83 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.68 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+2388.58 1651.96 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+2388.58 1651.96 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1594.91 1085.05 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1594.91 1085.05 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1991.74 1368.51 m
+-31.31 0 -56.69 -25.39 -56.69 -56.69 c
+0 -31.31 25.38 -56.7 56.69 -56.7 c
+680.29 0 p
+31.31 0 56.7 25.39 56.7 56.69 c
+0 0.01 p
+0 31.3 -25.39 56.69 -56.7 56.69 c
+f*
+K
+1991.74 1368.51 0 0 P
+-31.31 0 -56.69 -25.39 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.7 56.69 -56.7 c
+680.29 0 p
+31.31 0 56.7 25.39 56.7 56.69 c
+0 0.01 p
+0 31.3 -25.39 56.69 -56.7 56.69 c
+h
+S
+255 G
+1084.69 518.14 m
+-31.31 0 -56.7 -25.38 -56.7 -56.69 c
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+793.67 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1084.69 518.14 0 0 P
+-31.31 0 -56.7 -25.38 -56.7 -56.69 c
+0 0 p
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+793.67 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1198.07 1028.36 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1198.07 1028.36 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1084.69 518.14 m
+-31.31 0 -56.7 -25.38 -56.7 -56.69 c
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+793.67 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1084.69 518.14 0 0 P
+-31.31 0 -56.7 -25.38 -56.7 -56.69 c
+0 0 p
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+793.67 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1594.91 1311.81 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1594.91 1311.81 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1991.74 1595.27 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 31.31 -25.39 56.69 -56.7 56.69 c
+f*
+K
+1991.74 1595.27 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 0 p
+0 31.31 -25.39 56.69 -56.7 56.69 c
+h
+S
+255 G
+2388.58 1878.73 m
+-31.31 0 -56.69 -25.39 -56.69 -56.7 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.7 -56.69 56.7 c
+f*
+K
+2388.58 1878.73 0 0 P
+-31.31 0 -56.69 -25.39 -56.69 -56.7 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.7 -56.69 56.7 c
+h
+S
+255 G
+1198.07 1255.12 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1198.07 1255.12 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+687.85 461.45 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.67 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+687.85 461.45 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.67 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1594.91 1538.58 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1594.91 1538.58 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+801.23 971.67 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+801.23 971.67 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1991.74 1822.03 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 31.31 -25.39 56.69 -56.7 56.69 c
+f*
+K
+1991.74 1822.03 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 0 p
+0 31.31 -25.39 56.69 -56.7 56.69 c
+h
+S
+255 G
+687.85 461.45 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.67 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+687.85 461.45 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+793.67 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1198.07 1481.89 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1198.07 1481.89 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+404.39 914.98 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.3 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+404.39 914.98 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.3 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+801.23 1198.43 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+801.23 1198.43 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+255 G
+1594.91 1765.34 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+1594.91 1765.34 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+680.29 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+3181 1850 63 69 /6P
+$C
++@:SXs8W-!s8W-!l-o;'3dulNh'^b'\mK?A8\X"6[nEOSDO4DsdVc2QX*X"h>LV-6=/W1KIbcNP~>
+,
+3238 1822 50 67 /2A
+$C
+,@^]Qs8W,uC_a_a7U1gtpYWIK\)6(]^Mi"Yhf%D$hnK''hnK'(IJ\GRhZ!8a^$kE7~>
+,
+3323 1850 62 69 /6T
+$C
+0GKEKD(GKUh-Flo]"1qoF`aaglKMMYe^Cn7l_SGKInJEqrfsjlHF80)^:.9mVd7[UmZ[ODh'_qg
+\kcPZFIot=kr2sDd^m/^V0.2F>GV+5[f~>
+,
+3380 1822 2A ,
+2784 1794 6P ,
+2841 1765 2A ,
+2388 1737 6P ,
+2444 1709 2A ,
+2047 1652 2A ,
+2501 1737 6T ,
+1991 1680 6P ,
+2104 1680 6T ,
+2169 1652 26 67 /2E
+$C
+.E2>es8W-!s8W-!s89Y\s3/915WE`O^AI[~>
+,
+2062.92 1651.96 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+2062.92 1651.96 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+2898 1794 6T ,
+3182.25 2162.18 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.46 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+2785.42 2162.18 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.45 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+2954 1763 49 69 /6X
+$C
+,6?_R_@@-!*BJ:.%e,&5-L!IemF(mtmB?Ols/fANX<eutM$=FYYctTl\Jbt_mG?a03%+V's8TL?
+DsM7`Q%leW.hugLW*r%#$kr~>
+,
+1254.76 1765.34 0 -113.38 S
+1198.07 1708.65 113.38 0 S
+2558 1709 50 67 /2I
+$C
+2 at A?VnfY,aqgRDhgV^L/fPoZ%@D`SmL>dmsfPoV)%GQZIDqi%[iEuWRs)kp=^=ldqBl#)(KWJ1S
+<hY3U-nnH~>
+,
+2841 1537 6X ,
+2388 1510 6P ,
+2444 1480 6X ,
+1991.74 2162.18 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.46 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+2047 1423 6X ,
+1594 1397 6P ,
+1651 1367 6X ,
+2898 1567 6T ,
+2954 1539 2A ,
+2501 1510 6T ,
+2558 1480 6X ,
+2784 1567 6P ,
+2161 1425 2I ,
+1707 1397 6T ,
+1772 1369 2E ,
+2062.92 1538.58 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+2062.92 1538.58 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+2062.92 1425.2 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.48 14.48 14.48 c
+8 0 14.49 -6.48 14.49 -14.48 c
+f*
+2062.92 1425.2 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.48 14.48 14.48 c
+8 0 14.49 -6.48 14.49 -14.48 c
+h
+S
+2388.58 2162.18 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.45 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 0 p
+0 31.31 -25.39 56.69 -56.7 56.69 c
+h
+S
+3323 2049 2A ,
+3266 2077 6P ,
+2926 2047 6X ,
+2869 2077 6P ,
+1991 1454 6P ,
+461.08 1198.43 0 -113.38 S
+404.39 1141.74 113.38 0 S
+2388 1283 6P ,
+2444 1255 2I ,
+1991 1227 6P ,
+2047 1198 2I ,
+1594 1170 6P ,
+1651 1142 2I ,
+2104 1454 6T ,
+1254 1085 2I ,
+2501 1283 6T ,
+2558 1255 2A ,
+2104 1227 6T ,
+2161 1196 6X ,
+1707 1170 6T ,
+1764 1142 2I ,
+1310 1113 6T ,
+1375 1085 2E ,
+2062.92 1311.81 m
+0 -8 -6.49 -14.48 -14.49 -14.48 c
+-8 0 -14.48 6.48 -14.48 14.48 c
+0 8.01 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.48 14.49 -14.49 c
+f*
+2062.92 1311.81 m
+0 -8 -6.49 -14.48 -14.49 -14.48 c
+-8 0 -14.48 6.48 -14.48 14.48 c
+0 8.01 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.48 14.49 -14.49 c
+h
+S
+2062.92 1198.43 m
+0 -8 -6.49 -14.48 -14.49 -14.48 c
+-8 0 -14.48 6.48 -14.48 14.48 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+2062.92 1198.43 m
+0 -8 -6.49 -14.48 -14.49 -14.48 c
+-8 0 -14.48 6.48 -14.48 14.48 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+2529 2049 2I ,
+2473 2077 6P ,
+2140 2049 2E ,
+801.23 1425.2 113.38 0 S
+2076 2077 6P ,
+2055 972 2E ,
+1594 943 6P ,
+1659 915 2E ,
+1197 887 6P ,
+1262 858 2E ,
+800 830 6P ,
+865 802 2E ,
+914 830 6T ,
+978 802 2E ,
+1310 887 6T ,
+1367 858 2I ,
+1707 943 6T ,
+1764 913 6X ,
+2104 1000 6T ,
+2161 972 2A ,
+2062.92 971.67 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+2062.92 971.67 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+1666.08 914.98 m
+0 -8 -6.48 -14.49 -14.48 -14.49 c
+-8.01 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.48 14.49 14.49 14.49 c
+8 0 14.48 -6.49 14.48 -14.49 c
+f*
+1666.08 914.98 m
+0 -8 -6.48 -14.49 -14.48 -14.49 c
+-8.01 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.48 14.49 14.49 14.49 c
+8 0 14.48 -6.49 14.48 -14.49 c
+h
+S
+1269.25 858.29 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.49 14.49 14.49 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+1269.25 858.29 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.49 14.49 14.49 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+28.3455 w
+1594.91 2218.87 -141.73 -141.73 S
+1453.18 2218.87 141.73 -141.73 S
+3323 2219 2A ,
+1197 1113 6P ,
+255 G
+404.39 404.76 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.3 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+4.72425 w
+K
+404.39 404.76 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.3 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+3266 2247 6T ,
+2926 2217 6X ,
+2869 2247 6T ,
+255 G
+404.39 404.76 m
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.3 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 31.31 -25.38 56.69 -56.69 56.69 c
+f*
+K
+404.39 404.76 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+680.3 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+2529 2219 2I ,
+2473 2247 6T ,
+2140 2219 2E ,
+885 318 65 72 /7B
+$C
++ at 1f-%I4-:+Qtd[SN7n)*<HH/+Pd/B:"">^l_NG&5J;2fJ$%3!<5X0Os8W-!hgbOlgEOLapAU>l
+CMpShd^HS$9+3D)"KYV(:t.1mKa]C4#Cl~>
+,
+950 291 2E ,
+1282 374 7B ,
+1339 348 2I ,
+1679 431 7B ,
+1736 403 6X ,
+2076 488 7B ,
+2132 461 2A ,
+857.92 1481.89 0 -113.38 S
+2076 2247 6T ,
+1991 1000 6P ,
+885 36 56 69 /2M
+$C
+2?]ZPaASo&hfeDAp?gVKmG#,;gUDUc[r:$1DYpn\hm[LZpMSg%DV_qmh7I<N9E4J~>
+,
+942 8 2I ,
+1282 36 2M ,
+1339 6 6X ,
+1679 36 2M ,
+1736 8 2A ,
+488 36 2M ,
+553 8 2E ,
+801.23 121.3 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.46 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+1198.07 121.3 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.45 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+1594.91 121.3 -0.01 0 P
+-31.3 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.39 -56.69 56.7 -56.69 c
+283.45 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+[ 37.794 ] 0 d
+1991.74 121.3 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.46 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+2388.58 121.3 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.45 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 0 p
+0 31.31 -25.39 56.69 -56.7 56.69 c
+h
+S
+2785.42 121.3 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.45 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+3182.25 121.3 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.46 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+[ ] 0 d
+404.39 121.3 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.46 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+64.25 914.98 0 -113.38 S
+7.56 858.29 113.38 0 S
+1269.25 1085.05 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.49 14.49 14.49 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+1269.25 1085.05 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.49 14.49 14.49 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+1269.25 971.67 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.49 14.49 14.49 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+1269.25 971.67 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.49 14.49 14.49 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+1254.76 1085.05 0 -113.38 S
+1666.08 1141.74 m
+0 -8 -6.48 -14.49 -14.48 -14.49 c
+-8.01 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.48 14.49 14.49 14.49 c
+8 0 14.48 -6.49 14.48 -14.49 c
+f*
+1666.08 1141.74 m
+0 -8 -6.48 -14.49 -14.48 -14.49 c
+-8.01 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.48 14.49 14.49 14.49 c
+8 0 14.48 -6.49 14.48 -14.49 c
+h
+S
+1666.08 1028.36 m
+0 -8 -6.48 -14.49 -14.48 -14.49 c
+-8.01 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.48 14.49 14.49 14.49 c
+8 0 14.48 -6.49 14.48 -14.49 c
+f*
+1666.08 1028.36 m
+0 -8 -6.48 -14.49 -14.48 -14.49 c
+-8.01 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.48 14.49 14.49 14.49 c
+8 0 14.48 -6.49 14.48 -14.49 c
+h
+S
+1651.6 1141.74 0 -113.38 S
+2062.92 1198.43 m
+0 -8 -6.49 -14.48 -14.49 -14.48 c
+-8 0 -14.48 6.48 -14.48 14.48 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+2062.92 1198.43 m
+0 -8 -6.49 -14.48 -14.49 -14.48 c
+-8 0 -14.48 6.48 -14.48 14.48 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+2062.92 1085.05 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+2062.92 1085.05 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+2048.43 1198.43 0 -113.38 S
+1666.08 1368.51 m
+0 -8.01 -6.48 -14.49 -14.48 -14.49 c
+-8.01 0 -14.49 6.48 -14.49 14.49 c
+0 8 6.48 14.48 14.49 14.48 c
+8 0 14.48 -6.48 14.48 -14.48 c
+f*
+1666.08 1368.51 m
+0 -8.01 -6.48 -14.49 -14.48 -14.49 c
+-8.01 0 -14.49 6.48 -14.49 14.49 c
+0 8 6.48 14.48 14.49 14.48 c
+8 0 14.48 -6.48 14.48 -14.48 c
+h
+S
+1666.08 1255.12 m
+0 -8 -6.48 -14.48 -14.48 -14.48 c
+-8.01 0 -14.49 6.48 -14.49 14.48 c
+0 8 6.48 14.49 14.49 14.49 c
+8 0 14.48 -6.49 14.48 -14.49 c
+f*
+1666.08 1255.12 m
+0 -8 -6.48 -14.48 -14.48 -14.48 c
+-8.01 0 -14.49 6.48 -14.49 14.48 c
+0 8 6.48 14.49 14.49 14.49 c
+8 0 14.48 -6.49 14.48 -14.49 c
+h
+S
+1651.6 1368.51 0 -113.39 S
+2062.92 1425.2 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.48 14.48 14.48 c
+8 0 14.49 -6.48 14.49 -14.48 c
+f*
+2062.92 1425.2 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.48 14.48 14.48 c
+8 0 14.49 -6.48 14.49 -14.48 c
+h
+S
+2062.92 1311.81 m
+0 -8 -6.49 -14.48 -14.49 -14.48 c
+-8 0 -14.48 6.48 -14.48 14.48 c
+0 8.01 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.48 14.49 -14.49 c
+f*
+2062.92 1311.81 m
+0 -8 -6.49 -14.48 -14.49 -14.48 c
+-8 0 -14.48 6.48 -14.48 14.48 c
+0 8.01 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.48 14.49 -14.49 c
+h
+S
+2048.43 1425.2 0 -113.39 S
+2062.92 1651.96 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+2062.92 1651.96 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+2062.92 1538.58 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+2062.92 1538.58 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.48 6.49 -14.48 14.49 c
+0 8 6.48 14.49 14.48 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+2048.43 1651.96 0 -113.38 S
+872.41 801.6 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.49 14.49 14.49 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+f*
+872.41 801.6 m
+0 -8 -6.49 -14.49 -14.49 -14.49 c
+-8 0 -14.49 6.49 -14.49 14.49 c
+0 8 6.49 14.49 14.49 14.49 c
+8 0 14.49 -6.49 14.49 -14.49 c
+h
+S
+2388.58 2332.25 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.45 0 p
+31.31 0 56.7 25.38 56.7 56.69 c
+0 0 p
+0 31.31 -25.39 56.69 -56.7 56.69 c
+h
+S
+2785.42 2332.25 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.45 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+3182.25 2332.25 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.46 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+1991.74 2332.25 0 0 P
+-31.31 0 -56.69 -25.38 -56.69 -56.69 c
+0 0 p
+0 -31.31 25.38 -56.69 56.69 -56.69 c
+283.46 0 p
+31.31 0 56.69 25.38 56.69 56.69 c
+0 0 p
+0 31.31 -25.38 56.69 -56.69 56.69 c
+h
+S
+28.3455 w
+1311.45 1992.11 2409.37 0 S
+Q q
+0 2340 0 -2340 3750 0 ^ H
+2025.13 565.38 47.24 0 0.63 62.36 -23.94 -47.24 -23.3 47.24 Y*
+K
+2048.43 971.67 0 -396.84 f*
+4.72425 w
+2048.43 971.67 0 -396.84 S
+Q q
+0 0 3750 0 0 2340 ^ Y
+K
+2025.76 627.74 23.3 -47.24 23.94 47.24 -47.24 0 f*
+4.72425 w
+2025.76 627.74 23.3 -47.24 23.94 47.24 -47.24 0 H
+S
+Q q
+0 2340 0 -2340 3750 0 ^ H
+1628.29 508.69 47.24 0 0.63 62.36 -23.93 -47.24 -23.31 47.24 Y*
+K
+1651.6 914.98 0 -396.84 f*
+4.72425 w
+1651.6 914.98 0 -396.84 S
+Q q
+0 0 3750 0 0 2340 ^ Y
+K
+1628.92 571.05 23.31 -47.24 23.93 47.24 -47.24 0 f*
+4.72425 w
+1628.92 571.05 23.31 -47.24 23.93 47.24 -47.24 0 H
+S
+Q q
+0 2340 0 -2340 3750 0 ^ H
+1231.45 452 47.25 0 0.62 62.36 -23.93 -47.24 -23.31 47.24 Y*
+K
+1254.76 858.29 0 -396.84 f*
+4.72425 w
+1254.76 858.29 0 -396.84 S
+Q q
+0 0 3750 0 0 2340 ^ Y
+K
+1232.08 514.36 23.31 -47.24 23.93 47.24 -47.24 0 f*
+4.72425 w
+1232.08 514.36 23.31 -47.24 23.93 47.24 -47.24 0 H
+S
+Q q
+0 2340 0 -2340 3750 0 ^ H
+834.62 395.31 47.24 0 0.63 62.36 -23.94 -47.24 -23.31 47.24 Y*
+K
+857.92 801.6 0 -396.84 f*
+4.72425 w
+857.92 801.6 0 -396.84 S
+Q q
+0 0 3750 0 0 2340 ^ Y
+K
+835.25 457.67 23.31 -47.24 23.94 47.24 -47.24 0 f*
+4.72425 w
+835.25 457.67 23.31 -47.24 23.94 47.24 -47.24 0 H
+S
+28.3455 w
+291.01 234.69 2551.1 0 S
+[ 9.4485 28.3455 ] 28.3455 d
+4.72425 w
+744.54 404.76 0 -340.15 S
+1141.38 518.14 0 -453.53 S
+1538.21 574.83 0 -510.22 S
+1935.05 631.52 0 -566.91 S
+347.7 348.07 0 -283.46 S
+cleartomark end end pagesave restore showpage
+%%PageTrailer
+%%Trailer
+%%Pages: 1
+%%EOF
diff --git a/src/crlibm/docs/latex/fig_scs/multiplication.pdf b/src/crlibm/docs/latex/fig_scs/multiplication.pdf
new file mode 100644
index 0000000..e9c775e
Binary files /dev/null and b/src/crlibm/docs/latex/fig_scs/multiplication.pdf differ
diff --git a/src/crlibm/docs/latex/log.tex b/src/crlibm/docs/latex/log.tex
new file mode 100644
index 0000000..5111714
--- /dev/null
+++ b/src/crlibm/docs/latex/log.tex
@@ -0,0 +1,978 @@
+There are two versions of the logarithm.
+\begin{itemize}
+\item The first relies on 80-bit double-extended arithmetic, and is
+  well suited to IA32 and IA64 architectures which have hardware
+  support for such arithmetic. It computes the quick step in
+  double-extended arithmetic, and the accurate step in
+  double-double-extended arithmetic.
+\item The second relies only on double-precision arithmetic, and is
+  portable. It uses double-double for the quick step, and
+  triple-double for the accurate step.
+\end{itemize}
+
+Both implementations use the same algorithm, which is detailed in
+\ref{sec:logoutline}. Sections \ref{sec:logdeproof} and
+\ref{sec:logtdproof} detail the proof of both implementations, and
+\ref{sec:logperf} give some performance results.
+
+
+\section{General outline of the algorithm\label{sec:logoutline}}
+The algorithm used is mainly due to 
+Wong and Goto\cite{WG94} and has been discussed further in \cite{Muller97}. In the case we are given here,
+both quick and accurate phase use principally the same algorithm however optimized for different accuracies.
+
+The function's argument $x \in \F$ is first checked for special cases, such as $x\leq0$, $+\infty$, $\nan$ etc.
+These checks are mainly implemented using integer arithmetics and will be further explained in section
+\ref{subsec:reduction}. Then, the argument is reduced using integer arithmetics as follows:
+$$x = 2^{E^\prime} \cdot m$$
+where $E^\prime$ is the exponent of $x$ and $m$ a double corresponding
+to the mantissa of $x$. This decomposition is done such that in any
+case, i.e. even if $x$ is subnormal, $1 \leq m < 2$. In the subnormal
+case, the exponent of $x$ is adjusted accordingly.  This first
+argument reduction corresponds to the equality
+$$\log\left( x \right) = E^\prime \cdot \log\left(2\right) + \log\left(m \right)$$
+Using this term directly would lead to catastrophic cancellation in the case where $E^\prime = -1$ and
+$m \approx 2$. To overcome this difficulty, a second adjustment is done as follows:
+\begin{center}
+  \begin{tabular}{cc}
+    \begin{minipage}{50mm}
+      $$E = \left \lbrace \begin{array}{lcl} E^\prime & \mbox{ if } & m \leq \sqrt{2} \\
+          E^\prime +1 & \mbox{ if } & m > \sqrt{2} \end{array} \right.$$
+    \end{minipage}
+    &
+    \begin{minipage}{50mm}
+      $$y = \left \lbrace \begin{array}{lcl} m & \mbox{ if } & m \leq \sqrt{2} \\
+          \frac{m}{2} & \mbox{ if } & m > \sqrt{2} \end{array} \right.$$
+    \end{minipage}
+  \end{tabular}
+\end{center} 
+
+The decision whether $m \leq \sqrt{2}$ or not is performed using integer arithmetics on 
+the high order bits of the mantissa $m$. The test is therefore not completely exact which is no
+disadvantage since, in any case, the bound $\sqrt{2}$ is somewhat arbitrary.\par
+All the previous reduction steps can be implemented exactly as they consist mainly in decompositions
+of a floating point number, multiplications by powers of $2$ and integer additions on the corresponding exponent value.
+All this leads to the following equation 
+$$\log\left( x \right) = E \cdot \log\left( 2 \right) + \log\left( y \right)$$
+where
+$$-\frac{1}{2} \cdot \log\left( 2 \right) \leq \log\left( y \right) \leq \frac{1}{2} \cdot \log\left( 2 \right)$$
+The magnitude of $y$ is thus still too great for allowing for a direct polynomial approximation of $\log\left(y\right)$.
+Therefore, a second argument reduction step is performed using a table of $128$ entries as follows:
+using the high order bits of $y$ as an index $i$, a tabulated value $r_i$ is looked up which approximated very well
+$\frac{1}{y}$. Setting $z = y \cdot r_i - 1$, one obtains 
+$$\log\left( y \right) = \log\left( 1 + z \right) - \log\left( r_i \right)$$
+Since $y = \frac{1}{r_i} + \delta$ the magnitude of $z$ is finally
+small enough (typically $\left \vert z \right \vert < 2^{-8}$) for
+approximating $\log\left(1+z\right)$ by a Remez polynomial
+$p\left(z\right)$. The values for $\log\left(r_i\right)$ are of course also tabulated.
+
+It is important to notice that the reduction step 
+$$z = y \cdot r_i - 1$$ 
+can be implemented exactly which eases the correctness proof of the algorithm. This property will be proven in 
+section \ref{subsec:reduction}. The reduced argument $z$ will
+be represented as a double-double number $z_\hi + z_\lo$ that will be fed into the polynomial approximation 
+algorithms of both quick and accurate phase. Each of these phases will take into account the lower significant value 
+$z_\lo$ for more or less 
+higher monomial degrees.
+
+Both phases will finally reconstruct the function's value as follows:
+$$\log\left( x \right) \approx E \cdot \log\left( 2 \right) + p\left( z \right) - \log\left( r_i \right)$$
+using a double (respectively a triple for the accurate phase) double value for each 
+$\log\left( 2 \right)$ and $-\log\left( r_i \right)$. The computations necessary for performing this reconstruction
+are carried out in double-double arithmetics for the quick phase and triple-double for the accurate phase.
+
+The quick phase uses a modified Remez polynomial of degree $7$ of the form
+$$p\left( z \right) = z - \frac{1}{2} \cdot z^2 + z^3 \cdot 
+\left( c_3 + z \cdot \left( c_4 + z \cdot \left( c_5 + z \cdot \left( c_6 + z \cdot c_7 \right) \right) \right) \right)$$
+with $c_i \in \F$.
+This polynomial is evaluated as indicated by the parenthesis in the following term: 
+$$p\left( z_\hi + z_\lo \right) \approx \left( \left(z_\hi + z_\lo \right) - \frac{1}{2} \cdot  z_\hi^2\right) + 
+\left( \left( - z_\hi \cdot z_\lo \right) + 
+\left(z_\hi^2 \cdot z_\hi \right) \cdot 
+\left( c_3 + z_\hi \cdot \left( c_4 + z_\hi \cdot \left( c_5 + z_\hi \cdot \left( c_6 + z_\hi \cdot c_7 \right) \right) \right) \right) \right)$$
+The mathematical relative approximation error of the polynomial $p\left( z \right)$ defined as
+$$\epsilon_{\mbox{\tiny meth}} = \frac{p\left( z \right) - \log\left( 1 + z \right)}{\log\left(1 + z \right)}$$ is bounded by
+$$\left \vert \epsilon_{\mbox{\tiny meth}} \right \vert \leq 2^{-62.99}$$
+This methodical error is joined by the arithmetical error induced by the evaluation of $p\left( z \right)$ 
+and by the rounding of the constants $\log\left( 2 \right)$ and $\log\left( r_i \right)$. 
+As will be shown in section \ref{subsec:quickphase}, the overall error of the quick phase defined as
+$$\epsilon_{\mbox{\tiny quick}} = \frac{\left(log_\hi + log_\lo\right) - \log\left(x\right)}{\log\left(x\right)}$$
+is bounded by
+$$\left \vert \epsilon_{\mbox{\tiny quick}} \right \vert \leq 5 \cdot 2^{-65} \leq 2^{-62.6}$$ ~ \par
+After the computation of the quick phase double-double value $\left( log_\hi + log_\lo \right)$ a rounding test is performed
+using the rounding constants according to \ref{th:roundingRN1}. If the rounding cannot be decided, the accurate 
+phase is launched. \par
+The accurate phase performs all its computations on the same reduced argument $z = z_\hi + z_\lo$ which will be shown to be 
+exact. An approximation polynomial of degree $14$ is used. It is once again a modified Remez polynomial and has the 
+following form:
+$$p\left( z \right) = z + \frac{1}{2} \cdot z + z^3 \cdot q\left( z \right)$$
+where 
+$$q\left( z \right) = 
+c^\prime_3 + z \cdot \left( 
+c^\prime_4 + z \cdot \left( 
+c^\prime_5 + z \cdot \left( 
+c^\prime_6 + z \cdot \left( 
+c^\prime_7 + z \cdot \left( 
+c^\prime_8 + z \cdot \left( 
+c^\prime_9 + z \cdot r\left( z \right) \right) \right) \right) \right) \right) \right)$$
+with
+$c^\prime_i = c_{i\hi} + c_{i\lo} \in \F + \F$ and
+$$r\left( z \right) = 
+c_{10} + z \cdot \left(
+c_{11} + z \cdot \left(
+c_{12} + z \cdot \left(
+c_{13} + z \cdot c_{14} \right) \right) \right)$$
+with $c_i \in \F$.
+The mathematical relative error 
+$$\epsilon_{\mbox{\tiny meth}} = \frac{p\left( z \right) - \log\left( 1 + z \right)}{\log\left( 1 + z \right)}$$
+is bounded by
+$$\left \vert \epsilon_{\mbox{\tiny meth}} \right \vert \leq  2^{-125}$$
+The polynomial is evaluated using double precision for $r\left( z \right)$, double-double arithmetic for
+$q\left( z \right)$ and a triple-double representation for $p\left( z \right)$ and the final reconstruction.
+
+The overall error 
+$$\epsilon_{\mbox{\tiny accurate}} = \frac{\left( log_\hi + log_\mi + log_\lo \right) - \log\left( x \right)}{\log\left( x \right)}$$
+is bounded by 
+$$\left \vert \epsilon_{\mbox{\tiny accurate}} \right \vert \leq 5735 \cdot 2^{-132} \leq 2^{-119.5}$$
+as will be shown in section \ref{subsec:accuratephase}. Here $\left( log_\hi + log_\mi + log_\lo \right)$ 
+are obtained by reconstructing the logarithm as indicated by the parenthesis in the following term:
+$$log_\hi + log_\mi + log_\lo = \left(E \cdot \left( log2_\hi + log2_\mi + log2_\lo \right) \right) + 
+\left( \left( p_\hi + p_\mi + p_\lo \right) + \left(logi_\hi + logi_\mi + logi_\lo \right) \right)$$
+where
+$log2_\hi + log2_\mi + log2_\lo \approx \log\left( 2 \right)$ and $logi_\hi + logi_\mi + logi_\lo \approx -\log\left(r_i \right)$.
+
+Since the critical accuracy of the double precision $\log$ function is $118$ bits according to 
+\cite{DinDefLau2004LIP}, rounding $\log_\hi + log_\mi + log_\lo \approx \log\left( x \right)$ to double precision is equivalent 
+to rounding the infinite precision value $\log\left( x \right)$ to double precision. 
+Using the final rounding sequences presented in \cite{Lauter2005LIP:tripledouble}, which are supposed to be correct, 
+the double precision value returned by the function is the correctly rounded double precision value of 
+$\log\left( x \right)$.
+
+
+
+\section{Proof of correctness of the triple-double implementation \label{sec:logtdproof}}
+Proving that an implementation of an elementary function is correctly rounded means mainly proving two 
+bounds on the relative error $\epsilon_{\mbox{\tiny quick}}$ and $\epsilon_{\mbox{\tiny accurate}}$, using the appropriate lemma for proving the
+correctness of the rounding test and conluding by means of the theorem stating the critical accuracy of the 
+function considered. The computation of the error bounds will be done mainly using the Gappa tool\cite{Melqu05} but
+some parts of the proof are still based on paper or Maple computations. These parts will be shown in sections 
+\ref{subsec:reduction}, \ref{subsec:quickphase} and \ref{subsec:accuratephase} and mainly comprise the following:
+\begin{itemize}
+\item the demonstration that all special cases are handled correctly, 
+\item a proof that $z_\hi + z_\lo = r_i \cdot y - 1$ exactly,
+\item the bounds for the mathematical approximation errors for the polynoms,
+\item a proof of the exactness of some multiplications in the code,
+\item the proof for the accuracy of all basic addition and multiplication code sequences on 
+double-double and triple-double numbers,
+\item the correctness proof of the final rounding sequences for rounding triple-double numbers to double precision and
+\item the mathematical equality of the term rewriting hints in the Gappa code.
+\end{itemize}
+The proofs for the accuracy of the basic operation bricks and the correctness proof of the final rounding sequences
+are somewhat lengthy and are not given here; they can be found in \cite{Lauter2005LIP:tripledouble}.
+\subsection{Exactness of the argument reduction\label{subsec:reduction}}
+In this section, we will show that all special cases are handled correctly and that the 
+reduced argument consisting in $E$ and $z_\hi + z_\lo$ is exact, which means that we have the mathematically exact 
+equation
+$$\log\left( x \right) = E \cdot \log\left( 2 \right) + \log\left( 1 + \left( z_\hi + z_\lo \right) \right) - \log\left( r_i \right)$$
+This part of the algorithm is performed by the following code sequences which we will analyse line by line:
+\begin{lstlisting}[caption={Handling of special cases and table access},firstnumber=1]
+E=0;
+xdb.d=x;
+
+/* Filter cases */
+if (xdb.i[HI] < 0x00100000){                     /* x < 2^(-1022)    */
+  if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+    return -1.0/0.0;     
+  }                    		                 /* log(+/-0) = -Inf */
+  if (xdb.i[HI] < 0){ 
+    return (x-x)/0;                              /* log(-x) = Nan    */
+  }
+  /* Subnormal number */
+  E = -52; 		
+  xdb.d *= ((db_number) ((double) two52)).d; 	 /* make x a normal number    */ 
+}
+    
+if (xdb.i[HI] >= 0x7ff00000){
+  return  x+x;				         /* Inf or Nan       */
+}
+     
+
+/* Do argument reduction */
+E += (xdb.i[HI]>>20)-1023;                       /* extract the exponent */
+index = (xdb.i[HI] & 0x000fffff);
+xdb.i[HI] =  index | 0x3ff00000;	         /* do exponent = 0 */
+index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+/* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+if (index >= MAXINDEX){                          /* corresponds to xdb>sqrt(2)*/
+  xdb.i[HI] -= 0x00100000; 
+  E++;
+}
+y = xdb.d;
+index = index & INDEXMASK;
+
+ed = (double) E;
+
+ri = argredtable[index].ri;
+
+logih = argredtable[index].logih;
+logim = argredtable[index].logim;
+\end{lstlisting}
+Analysis of the code: 
+{\renewcommand{\labelenumi}{}
+\begin{enumerate}
+\item line 1 and 2: Initialization of integer $E$ and {\tt db\_number} {\tt xdb} which is now equal to $x$.
+\item line 5: As the integer ordering and the ordering on floating point numbers are compatible, 
+$x < +2^{-1022}$, i.e. negative, negative infinite, equal to zero or a subnormal. 
+\item line 6: {\tt xdb.i[HI] \& 0x7fffffff} is the high order word of $x$ without the sign bit. If the test is true,
+$\left \vert x \right \vert = 0$. As the logarithm of $0$ is not defined but as the limit $-\infty$ is known, returning
+$-1.0 / 0.0$ is correct.
+\item line 9: Since the integer ordering and the ordering on floating point numbers are compatible, 
+{\tt xdb.i[HI] < 0} implies $x < 0$. The logarithm is not defined for negative numbers, so the result must be $\nan$. 
+$0.0 / 0.0$ leads to a $\nan$; one uses $\left(x - x\right) / 0.0$ in order to overcome the static tests of the compiler.
+\item line 13 and 14: if this code lines are reached, $x$ is a subnormal. Since $E$ equals $0$ at this point, 
+setting it to $-52$ and multipliying {\tt xdb} by $2^{-52}$ means bringing {\tt xdb} to the normal number range and
+rescaling the internal representation $x = 2^E \cdot m = 2^E \cdot${\tt xdb} in consequence.
+\item line 17: As the integer ordering and the ordering on floating point numbers are compatible and as 
+{\tt 0x7fefffff ffffffff} is the greatest normal, the test being true implies that $x$ is equal to $+\infty$ or $\nan$.
+In the case of $x=+\infty$, $+\infty$ must be returned which is done. In the other case, $\nan$ must be returned which is
+still assured by $x + x$.
+\item line 23: At this point of the code, the most significant bit of the high order word of {\tt xdb} must be $0$ as
+the case where $x < 0$ is already filtered out. So {\tt xdb.i[HI] > > 20} is equal to the biased exponent of {\tt xdb} 
+because a double number consists in $1$ sign bit, $11$ exponent bits and the word bit length is supposed to be $32$. 
+Subtracting $1023$ yields to the unbiased exponent which is written to $E$.
+\item line 24 and 25: Since a double number consists in $1$ sign bit and $11$ exponent bits, the operation 
+{\tt xdb.i[HI] \& 0x000fffff} masks out the mantissa bits in the higher order word of {\tt xdb}. 
+Rewriting {\tt xdb.i[HI] = index | 0x3ff00000} means setting the exponent of {\tt xdb} to $0$ because 
+{\tt 0x3ff}$ - 1023 = 0$. 
+\item line 26: Before execution of this line of code, {\tt index} contains the high order bits of the normalized mantissa
+of $x$ stored as a double in {\tt xdb.d} and verifying thus $1 \leq m < 2$. The second argument reduction step
+will slice this intervall in $128$ intervalls for each of which we dispose of a table entry. For reasons of possible 
+cancellation in the reconstruction step on the operation $p\left( z \right) - \log\left( r_i \right)$, we want the 
+small intervalls to be centered around $1$. That means e.g. for the intervall around $1$ and a table indexed by $7$ bits
+that mantissas (as doubles) with the high order word {\tt 0x3fefffff} through {\tt 0x3ff00fff} must be mapped to $0$.
+The decision is therefore made at the $7+1$th bit of the mantissa part of the double depending on whether this bit is $0$ 
+-- in which case the value falls in the lower intervall -- or $1$ -- in which case the value goes to the next higher 
+intervall. So adding $1$ to the $\left(20 - 7 - 1\right)$ rightmost bit ($L = 7$) increases the index value by $1$ iff this bit is $1$.
+So after execution of the line, {\tt index} contains the number of the intervall for the second argument reduction step 
+centered in $1$.
+\item line 29 through 31: The second adjustment to be made on $E^\prime$ and $m$ is the decision whether $m > \sqrt{2}$ as
+indicated in section \ref{sec:logoutline}. The high order word of $\sqrt{2}$ rounded to a double is {\tt 0x3ff6a09e}.
+As one can simply verify, the value for {\tt index} calculated for this value is $53$. As the integer ordering and 
+the ordering of floating point numbers are compatible and as the computations for computing {\tt index} are monotone,
+{\tt index} being greater or equal than $53$ implies that the (normalized) mantissa of $x$ is greater than 
+$\sqrt{2} + \delta$ with a neglectable error $\delta$. 
+As {\tt MAXINDEX} is equal to $53$, the test will be true iff the adjustment on $E^\prime$ leading
+to $E$ and $m$ yielding $y$ is to be made. It is trivial to see that the code in the {\tt if}'s body implements the
+adjustment correctly.
+\item lines 33 and 34: the final value of the reduced argument $y$ -- still stored in {\tt xdb.d} -- is copied to 
+a {\tt double} variable (or register) named {\tt y}. The final index value is masked out by means of an {\tt INDEXMASK}
+which is equal to $127 = 2^7-1$.
+\item lines 36: The integer value of the exponent $E$ stored in {\tt E} is cast to a {\tt double ed}.
+\item lines 38 through 41: The table is indexed by {\tt index} and values {\tt ri}$=r_i$ and 
+{\tt logih}$=logi_\hi$ and {\tt logim}$=logi_\mi$ are read. 
+Since the latter form a double-double precision value, we know that 
+$logi_\hi + logi_\mi = \log\left( r_i \right) \cdot \left( 1 + \epsilon \right)$ with $\left \vert \epsilon \right \vert \leq 2^{-106}$.
+The value {\tt ri} is stored as a single precision variable and a Maple procedure assures that for each value
+$y$ the following inegality is verified:
+$$\left \vert z \right \vert = \left \vert y \cdot r_i - 1 \right \vert \leq 2^{-8}$$
+\end{enumerate}
+} 
+Let us show now that the following line calculate $z_\hi$ and $z_\lo$ such that for each $y$ and corresponding $r_i$,
+we obtain exactly
+$$z_\hi + z_\lo = y \cdot r_i - 1$$
+\begin{lstlisting}[caption={Argument reduction},firstnumber=42]
+Mul12(&yrih, &yril, y, ri);
+th = yrih - 1.0; 
+Add12Cond(zh, zl, th, yril); 
+\end{lstlisting}
+We know that we can suppose that the multiplication and addition sequences \Mul~ and \Add~ used at lines
+42 and 44 are exact. Thus, it suffices to show that
+$$yri_\hi - 1.0 = yri_\hi \ominus 1.0$$
+because in that case, we can note
+$$z_\hi + z_\lo = th + yri_\lo = yri_\hi \ominus 1.0 + yri_\lo = y \cdot r_i - 1.0$$
+We will show this property using Sterbenz' lemma. It suffices thus to prove that
+$$\frac{1}{2} \leq yri_\hi \leq 2$$
+We know that 
+\begin{eqnarray*}
+yri_\hi & = & \circ\left( y \cdot r_i \right) \\
+& \leq & \circ \left( 1 + 2^{-8} \right) \\
+& = & 1 + 2^{-8} \\
+& < & 2
+\end{eqnarray*}
+since the rounding function $\circ$ is monotonic and the accuracy of the format is greater than $9$ bits.
+
+The other way round, we get
+\begin{eqnarray*}
+yri_\hi & = & \circ \left( y \cdot r_i \right) \\
+& \geq & \circ \left( 1 - 2^{-8} \right) \\
+& = & 1 - 2^{-8} \\
+& > & \frac{1}{2}
+\end{eqnarray*}
+for the same reasons.
+
+Thus $z_\hi + z_\lo = y \cdot r_i$ exactly. Since the previous phases of the argument reduction were all exact, the reduced argument
+verifies $x = 2^{E} \cdot y$ exactly.
+
+Still in this section, let us show that neither the reduced argument of the logarithm function nor its result may be
+a sub-normal double number. The first property has already been assured by special case handling as shown above. The 
+latter can be proven as follows: the $\log\left( x \right)$ function has one zero for $x = 1$ and only one. 
+As it is monotone, for $x = 1 \pm 1 \mUlp = 1 \pm 2^{-52}$ we will obtain $\log\left( 1 \pm 2^{-52} \right) = 0 \pm 2^{-52} + \delta$ 
+with 
+$\left \vert \delta \right \vert \leq 2^{-103}$. As $0 \pm 2^{-1022}$ is the least normal, the result of the logarithm function will
+always be a normal. Further, in both double-double and triple-double representations for the final intermediate result
+for the function, as its critical accuracy is $118$, the least significant double in the representation will still be
+a normal as $52 + 106 = 158 < 1022$. 
+\subsection{Accuracy proof of the quick phase\label{subsec:quickphase}}
+As already mentionned, the accuracy proof of the quick phase is mainly based on the Gappa tool. To prove the desired
+accuracy bound defined as
+$$\epsilon_{\mbox{\tiny quick}} = \frac{\left(log_\hi + log_\lo\right) - \log\left(x\right)}{\log\left(x\right)}$$ 
+and given by
+$$\left \vert \epsilon_{\mbox{\tiny quick}} \right \vert \leq 5 \cdot 2^{-65} \leq 2^{-62.6}$$ 
+three different Gappa proof files are necessary depending on the following cases: 
+\begin{itemize}
+\item for $E \geq 1$ and all indexes to the table $0 \leq i \leq 127$, a general proof file named {\tt log-td.gappa} is used
+\item for $E = 0$ and all indexes to the table except $0$, i.e. $1 \leq i \leq 127$, a proof file named {\tt log-td-E0.gappa}
+comes to hand and
+\item for $E = 0$ and the table index $i = 0$, a proof file called {\tt log-td-E0-logir0.gappa} is employed. 
+This latter file
+uses relative error computations in opposition to the other two cases where absolute error estimates suffice. This
+is necessary because in this case and in this one only, the logarithm function has a zero in the intervall considered.
+\end{itemize}
+In each of the three proof files, we will ask the Gappa tool to verify the accuracy bound expressed in its syntax as
+follows:
+\begin{lstlisting}[caption={Accuracy bound to prove},firstnumber=109]
+->
+((logh + logm) - Log) / Log in [-5b-65,5b-65]
+\end{lstlisting}
+Still in any proof file, some hypothesis are made on the correctness of one multiplication sequence and the
+accuracy of the constants and resting operations carried out in double-double arithmetic.
+These hypothesis are the following:
+\begin{itemize}
+\item The operations in the following code sequence are exact since the constants are stored with enough trailing zeros:
+\begin{lstlisting}[caption={Multiplication by $E$},firstnumber=50]
+Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+\end{lstlisting}
+This means that $log2ed_\hi + log2ed_\lo = E \cdot \left( log2_\hi + log2_\lo \right)$ exactly.
+\item The operations in the following code sequence are exact since multiplications with a power of $2$ are exact
+as long as the result is not underflowed:
+\begin{lstlisting}[caption={Multiplication by $-0.5$},firstnumber=60]
+zhSquareHalfh = zhSquareh * -0.5;
+zhSquareHalfl = zhSquarel * -0.5;
+\end{lstlisting}
+i.e. $zhSquareHalf_\hi + zhSquareHalf_\lo = -0.5 \cdot \left( zhSquare_\hi + zhSquare_\lo \right)$.
+\item The following hypothesis on the accuracy bounds, expressed here in Gappa syntax, are verified:
+\begin{lstlisting}[caption={Gappa hypothesis},firstnumber=100]
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (Phl - PE) / PE in [-1b-103,1b-103]
+/\ (LogTabPolyhl - LogTabPoly) / LogTabPoly in [-1b-103,1b-103]
+/\ (Loghm - LogE) / LogE in [-1b-103,1b-103]
+/\ (Log2hm - Log2) / Log2 in [-1b-84,1b-84]
+/\ (Logihm - Logir) / Logir in [-1b-106,1b-106]
+/\ Z in [_zmin,_zmax]
+/\ (P - Log1pZ) / Log1pZ in [-_epsilonApproxQuick,_epsilonApproxQuick]
+/\ ((logh + logm) - Loghm) / Loghm in [-1b-106,1b-106]
+\end{lstlisting}
+Here, {\tt \_zmin}, {\tt \_zmax} and {\tt \_epsilonApproxQuick} are replaced by Maple calculated values, typically
+$-zmin = zmax = 2^{-8}$ and $epsilonApproxQuick = 2^{-62.99}$.
+\end{itemize}
+Let us now show each of this hypothesises. 
+\begin{enumerate}
+\item The operations yielding {\tt log2edh} and {\tt log2edl} are all exact because the \Add~ sequence is supposed 
+to be exact in any case and because the constants {\tt log2h} and {\tt log2m} are calculated by the following Maple
+code and have in consequence at least 11 trailing zeros and {\tt ed} $=E$ is less than $1024$ in magnitude since $1024$ is
+the maximum exponent value for double precision. 
+\begin{lstlisting}[caption={Maple code for computing {\tt log2h} and {\tt log2m}},firstnumber=21,label={list:maplelog2}]
+log2acc := log(2):
+log2h := round(log2acc * 2**(floor(-log[2](abs(log2acc))) + (53 - 11))) / 
+         2**(floor(-log[2](abs(log2acc))) + (53 - 11)):
+log2m := round((log2acc - log2h) * 2**(floor(-log[2](abs((log2acc - log2h)))) + 
+         (53 - 11))) / 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11)):
+\end{lstlisting}
+\item To show that $zhSquareHalf_\hi + zhSquareHalf_\lo = -0.5 \cdot \left( zhSquare_\hi + zhSquare_\lo \right)$ we just have to show
+that both values $zhSquare_\hi$ and $zhSquare_\lo$ are either equal to $0$ or greater than $2$ times the smallest
+normal. Let us first give the definitions of both values:
+\begin{eqnarray*}
+zhSquare_\hi & = & \circ \left( z_\hi \cdot z_\hi \right) \\
+zhSquare_\lo & = & z_\hi \cdot z_\hi - zhSquare_\hi 
+\end{eqnarray*}
+where $z_\hi = \circ \left( z \right)$.
+Let us suppose that $z \not = 0$. Otherwise all values are equal to $0$ and we can conclude.
+
+Let us first show that $\left \vert zhSquare_\hi \right \vert$ is greater than $2^{54}$ times the smallest normal. 
+Let us therefore suppose that this
+is not the case, i.e. $\left \vert zhSquare_\hi \right \vert < 2^{-948}$. Since the rounding function is monotonic,
+this implies that $\left \vert z_\hi \right \vert \leq 2^{-424}$. For the same reason, we can note that 
+$\left \vert z \right \vert \leq 2^{-424}$. As we have $z = y \cdot r_i - 1$, clearly neither $y$ nor $r_i$ can be exactly $1$. 
+If this were the case for both, we would obtain $z=0$ which we excluded; if there were one of them only that was
+exactly $1$, the other being a floating point number in the intervall $\left[ 0.5; 1.5 \right]$, 
+the resulting inegality $\left \vert z \right \vert \geq 2^{-53}$ which would be contradictory.
+
+Otherwise, since we know that $1 - 2^{-8} \leq y \cdot r_i \leq 1 + 2^{-8}$ and since the precision of all formats used is greater than 
+$9$, the hypothesis that $1 - 2^{-424} \leq y \cdot r_i \leq 1 + 2^{-424}$ and $y \cdot r_i \not = 0$ 
+would imply that the infinite precision mantissa of 
+$y \cdot r_i$ contains a $1$ weighted with $2^0$ and a $1$ weighted with less than $2^{-424}$. So its length would be greater than
+$423$ bits. As it is the product of two floating point numbers which have $52$ and $23$ significant bits, there
+cannot be a $1$ weighted with less than $76$ if there is a $1$ weighted with $2^0$ which is the case. Contradiction. 
+
+So $-0.5 \cdot zhSquare_\hi$ is not underflowed. Additionally, with a similar argument, since {\tt zh} is a double precision
+number, $zhSquare_\lo$ is either $0$ or greater in magnitude than $2^{-53} \cdot \left \vert zhSquare_\hi \right \vert$ which is
+$2^{52}$ times greater in magnitude than the smallest normal. So $zhSquare_\lo$ is either $0$ or $2$ times greater in
+magnitude than the smallest normal. 
+
+So, the floating point multiplication of $zhSquare_\hi$ and $zhSquare_\lo$ with $-0.5$ can be considered to be exact.
+\item {\tt (T2hl - T2) / T2 in [-1b-103,1b-103]} which means that 
+$$\left \vert \frac{T2hl - T2}{T2} \right \vert \leq 2^{-103}$$ is verified as $T2hl$ and $T2$ are defined as follows:
+$$T2hl = t2_\hi + t2_\lo \gets \mAddDD \left( z_\hi, z_\lo, zhSquareHalf_\hi, zhSquareHalf_\lo \right)$$
+$$T2 = \left( z_\hi + z_\lo \right) + \left( zhSquareHalf_\hi + zhSquareHalf_\lo \right)$$
+The given bound is thus just the accuracy bound of the \AddDD~ sequence for which a proof can be found in 
+\cite{Lauter2005LIP:tripledouble}.
+\item {\tt (Phl - PE) / PE in [-1b-103,1b-103]} is verified for the same reason; let us just recall the definitions
+$$Phl = p_\hi + p_\lo \gets \mAddDD \left( t2_\hi, t2_\lo, t1_\hi, t1_\lo \right)$$
+$$PE = \left( t2_\hi + t2_\lo\right) + \left( t1_\hi + t1_\lo \right)$$
+\item {\tt (LogTabPolyhl - LogTabPoly) / LogTabPoly in [-1b-103,1b-103]} falls still into the same case with
+$$LogTabPolyhl = logTabPoly_\hi + logTabPoly_\lo \gets \mAddDD \left( logi_\hi, logi_\mi, p_\hi, p_\lo \right)$$
+$$LogTabPoly = \left( logi_\hi, + logi_\mi \right) + \left( p_\hi +  p_\lo \right)$$
+\item And finally, {\tt (Loghm - LogE) / LogE in [-1b-103,1b-103]}
+which is also just the accuracy bound of the \AddDD~ sequence for 
+$$Loghm = log_\hi + log_\mi \gets \mAddDD \left( log2ed_\hi, log2ed_\lo, logTabPoly_\hi, logTabPoly_\lo \right)$$
+$$LogE = \left( log2ed_\hi + log2ed_\lo \right) + \left( logTabPoly_\hi + logTabPoly_\lo \right)$$
+\item {\tt (Log2hm - Log2) / Log2 in [-1b-84,1b-84]} is verified 
+since $log2_\hi$ and $log2_\mi$ are computed as already indicated in listing \ref{list:maplelog2}.
+This means that at least $11$ trailing zeros are stored in each in the doubles in this (pseudo-)double-double number, 
+so it is exact to $2^{-106-2 \cdot 11} = 2^{-84}$.
+\item {\tt (Logihm - Logir) / Logir in [-1b-106,1b-106]} which means
+$$\left \vert \frac{\left( logi_\hi + logi_\mi \right) - \log\left( r_i \right)}{\log\left( r_i \right)} \right \vert \leq 2^{-106}$$
+is verified by construction as $logi_\hi$ and $logi_\mi$ are computed by the following Maple code:
+\begin{lstlisting}[caption={Maple code for computing $logi_\hi$ and $logi_\mi$},firstnumber=35]
+(logih[i], logim[i], logil[i]) := hi_mi_lo(evalf(-log(r[i]))):
+\end{lstlisting}
+where {\tt hi\_mi\_lo} is the procedure for rounding an arbitrary precision number to a triple-double number the higher
+significant numbers of which form a double-double number.
+\item The hypothesis {\tt Z in [\_zmin,\_zmax]} simply recalls the bounds for $z$ as calculated by Maple.
+\item The same can be said on the hypothesis \\
+{\tt (P - Log1pZ) / Log1pZ in [-\_epsilonApproxQuick,\_epsilonApproxQuick]} \\
+which gives the mathematical approximation error of the polynomial. This bound is computed by Maple using the following
+instructions:
+\begin{lstlisting}[caption={Maple code for computing the relative error of the polynomial},firstnumber=129]
+epsilonApproxQuick := numapprox[infnorm]( 1-polyQuick/log(1+x), x=zminmin..zmaxmax)
+\end{lstlisting}
+\item Finally, Gappa's hypothesis {\tt ((logh + logm) - Loghm) / Loghm in [-1b-106,1b-106]} 
+simply restates the fact that a double-double precision number is exact to 
+at least $2^{-106}$ in terms of its relative error.
+\end{enumerate}
+The Gappa tool itself is not capable of proving the final accuracy bound it is asked for a complex algorithm as the 
+one given here. Its user must provide hints to help it to rewrite the interval arithmetics terms it encounters
+in the program. These hints are generally given in the form {\tt $\alpha$ -> $\beta$} 
+where $\beta$ is an expression we want the
+tool to rewrite the expression $\alpha$ by. Generally speaking, the idea behind each hint is one of the following:
+\begin{itemize}
+\item For computing intervall bounds on differences like $\alpha = a - A$ where both $a$ and $A$ are sums of terms like 
+$a = c + C$ and $B = d + D$, it is often useful to rewrite $\alpha$ by $\beta = \left(c - d \right) + \left( C - D \right)$.
+\item An intervall bound can often be easier found for a term $A$ representing an exact mathematical value that for $a$
+which is its arithmetical equivalent. So it is useful to rewrite $a$ by $A \cdot \left( 1 + \frac{a - A}{A} \right)$ when 
+an intervall for $\frac{a - A}{A}$ is known. 
+\item Fractional left hand sides like $\frac{a}{b}$ where both expressions $a$ and $b$ are functions in a common argument
+$x$ that can be written like $a = a\left( x \right) = x^n \cdot a^\prime\left( x \right)$ and 
+$b = b\left( x \right) = x^m \cdot b^\prime\left( x \right)$ should usually be rewritten as follows:
+$$\frac{a\left(x\right)}{b\left( x \right)} = \frac{x^n \cdot a^\prime\left( x \right)}{x^m \cdot b^\prime\left( x \right)} = 
+x^{n - m} \cdot \frac{a^\prime\left( x \right)}{b^\prime\left( x \right)}$$ In particular, this kind of hint is needed when an 
+intervall for the denominator of a fractional left-hand-side comprises $0$.
+\item Fractional left-hand-sides of the form $\frac{a - A}{A}$ with an unknown $A$ can easily be written like
+$$\frac{a - A}{A} = \frac{a - B}{B} + \frac{B - A}{A} + \frac{a - B}{B} \cdot \frac{B - A}{A}$$
+We can show this equivalence like this
+\begin{eqnarray*}
+\frac{a - A}{A} & = & \frac{a - B + B - A}{A} \\
+& = & \frac{a - B}{A} + \frac{B - A}{A} \\
+& = & \frac{a - B}{B} \cdot \frac{B}{A} + \frac{B - A}{A} \\
+& = & \frac{a - B}{B} \cdot \left( 1 + \frac{B - A}{A} \right) + \frac{B - A}{A} \\
+& = & \frac{a - B}{B} + \frac{B - A}{A} + \frac{a - B}{B} \cdot \frac{B - A}{A}
+\end{eqnarray*}
+This is particularly useful when a bound on the relative error of some term $a$ with regard to $B$ should be 
+extended to the next approximation level. 
+\end{itemize}
+Clearly, the left-hand-side $A$ and right-hand-side $B$ of an hint must be mathematically equivalent to provide a 
+correct result. The Gappa tool checks for this equivalence and sometimes is able to prove it. If not, it emits a
+warning indicating that the formal proof it is generating for the accuracy bound computations is valid only under
+the hypothesis that both sides of the rewriting hint are mathematically equivalent. Further, it prints out the 
+difference $A - B$ of both sides $A$ and $B$ which it has already reduced using the equivalences given in the 
+Gappa code. It is relatively simple to verify that all this differences are equal to $0$ modulo the definitions 
+given in the Gappa code by means of Maple-scripts. This work can even been done automatically. Thus, we refrain 
+from giving a paper proof of each hint in the Gappa files used for proving the logarithm function but just 
+give the exhaustive list of the hints in files {\tt log-td.gappa} and {\tt log-td-E0-logir0.gappa}:
+\begin{lstlisting}[caption={Gappa term rewriting hints in file {\tt log-td.gappa}},firstnumber=115]
+T2hl - T2 -> ((T2hl - T2) / T2) * T2;
+T2hl -> (T2hl - T2) + T2;
+
+Phl - PE -> ((Phl - PE) / PE) * PE;
+Phl -> (Phl - PE) + PE;
+
+
+LogTabPolyhl -> (LogTabPolyhl - LogTabPoly) + LogTabPoly;
+
+Loghm -> (Loghm - LogE) + LogE;
+
+Log2 -> Log2hm * (1 / (((Log2hm - Log2) / Log2) + 1));
+
+Logir -> Logihm * (1 / (((Logihm - Logir) / Logir) + 1));
+
+
+LogTabPolyhl - LogTabPoly -> ((LogTabPolyhl - LogTabPoly) / LogTabPoly) * LogTabPoly;
+
+HZZsimp -> (-0.5 * zh * zh) - (0.5 * zl * zl);
+
+T2hl - ZpHZZsimp -> (0.5 * zl * zl) + delta1;
+
+zhCube - ZZZ -> (Z * (zhSquareh - Z * Z)) - (zl * zhSquareh);
+
+polyUpper - ZZZPhigher -> ZZZ * (polyHorner - Phigher) + polyHorner * delta3 + delta2;
+
+ZpHZZ + ZZZPhigher -> ZpHZZsimp + ZZZPhigherPzhzl;
+
+Phl - P -> (T2hl - ZpHZZsimp) + (T1hl - ZZZPhigherPzhzl) + delta4;
+
+Log1pZ -> P * (1 / (((P - Log1pZ) / Log1pZ) + 1));
+P - Log1pZ -> ((P - Log1pZ) / Log1pZ) * Log1pZ;
+
+Phl - Log1pZ -> (Phl - P) + delta6;
+
+LogTabPolyhl - Log1pZpTab -> (Logihm - Logir) + (Phl - Log1pZ) + delta7;
+
+Loghm - Log -> (Log2edhm - Log2E) + (LogTabPolyhl - Log1pZpTab) + delta5;
+
+(logh + logm) - Loghm -> (((logh + logm) - Loghm) / Loghm) * Loghm;
+
+(logh + logm) - Log -> ((logh + logm) - Loghm) + (Loghm - Log);
+\end{lstlisting}
+\begin{lstlisting}[caption={Gappa term rewriting hints in file {\tt log-td-E0-logir0.gappa}},firstnumber=81]
+T2hl - T2 -> ((T2hl - T2) / T2) * T2;
+T2hl -> (T2hl - T2) + T2;
+
+Phl - PE -> ((Phl - PE) / PE) * PE;
+Phl -> (Phl - PE) + PE;
+
+
+(ZhSquarehl - ZZ) / ZZ -> 2 * ((zh - Z) / Z) + ((zh - Z) / Z) * ((zh - Z) / Z);
+
+(zhSquareh - ZZ) / ZZ -> ((ZhSquarehl - ZZ) / ZZ) + ((zhSquareh - ZhSquarehl) / ZZ);
+
+(zhSquareh - ZhSquarehl) / ZZ -> ((zhSquareh - ZhSquarehl) / ZhSquarehl) * (ZhSquarehl / ZZ);
+
+ZhSquarehl / ZZ -> ((ZhSquarehl - ZZ) / ZZ) + 1;
+
+(ZhCube - ZZZ) / ZZZ -> (((zh * zhSquareh) - ZZZ) / ZZZ) + ((ZhCube - (zh * zhSquareh)) / ZZZ);
+
+((zh * zhSquareh) - ZZZ) / ZZZ -> (1 + ((zh - Z) / Z)) * (1 + ((zhSquareh - ZZ) / ZZ)) - 1;
+
+((ZhCube - (zh * zhSquareh)) / ZZZ) -> ((ZhCube - (zh * zhSquareh)) / (zh * zhSquareh)) * (((zh - Z) / Z) + 1) * (((zhSquareh - ZZ) / ZZ) + 1);
+
+polyHorner / Phigher -> ((polyHorner - Phigher) / Phigher) + 1;
+
+(polyUpper - ZZZPhigher) / ZZZPhigher -> ((polyHorner - Phigher) / Phigher) + ((ZhCube - ZZZ) / ZZZ) * (polyHorner / Phigher) + 
+					  + ((polyUpper - (polyHorner * ZhCube)) / (polyHorner * ZhCube)) * (polyHorner / Phigher) +
+					  + ((ZhCube - ZZZ) / ZZZ) * ((polyUpper - (polyHorner * ZhCube)) / (polyHorner * ZhCube)) * 
+					    (polyHorner / Phigher);
+
+
+((ZhSquareHalfhl - (zh * zl)) - HZZ) / HZZ -> - ((zh - Z) / Z) * ((zh - Z) / Z);
+
+(ZhSquareHalfhl - HZZ) / HZZ -> (ZhSquarehl - ZZ) / ZZ;
+
+((T2hl - (zh * zl)) - ZpHZZ) / ZpHZZ -> ((HZ * (((ZhSquareHalfhl - (zh * zl)) - HZZ) / HZZ)) + ((T2hl - T2) / T2) 
+                                        + (HZ * ((T2hl - T2) / T2)) 
+					+ (HZ * ((ZhSquareHalfhl - HZZ) / HZZ) * ((T2hl - T2) / T2))) / (1 + HZ);
+
+(PE - P) / P -> (((1 + HZ) * (((T2hl - (zh * zl)) - ZpHZZ) / ZpHZZ)) +
+		((1 + ((zh - Z) / Z)) * (Z * ((zh - Z) / Z)) * ((Flzhzl - (zh * zl)) / (zh * zl))) 
+	        + (ZZ * Phigher * ((polyUpper - ZZZPhigher) / ZZZPhigher))) / (1 + HZ + ZZ * Phigher);
+
+(Phl - P) / P -> ((PE - P) / P) + ((((PE - P) / P) + 1) * ((Phl - PE) / PE));
+
+(Loghm - Log) / Log -> ((Loghm - P) / P) + ((P - Log) / Log) + ((Loghm - P) / P) * ((P - Log) / Log);
+
+(((logh + logm) - Log) / Log) -> (((logh + logm) - Loghm) / Loghm) + ((Loghm - Log) / Log) + (((logh + logm) - Loghm) / Loghm) * ((Loghm - Log) / Log);
+\end{lstlisting}
+For the reasons mentionned, we can consider the accuracy proof of the quick phase to be correct.
+\subsection{Accuracy proof of the accurate phase\label{subsec:accuratephase}}
+The accuracy proof of the accurate phase is also based mainly on the use of the Gappa tool. 
+Nevertheless, since the tool is currently not directly supporting triple-double representations, some additional
+hand-proven accuracy bound results for the main addition and multiplication operators are needed. They can be
+found in \cite{Lauter2005LIP:tripledouble}. Since all these accuracy bounds are parameterized by the maximal overlap bound
+for the triple-double numbers along the computations, before being able to give a numerical value for
+these error bounds understood by the Gappa tool, it is necessary to do a maximal overlap bound analysis using
+the theorems given in \cite{Lauter2005LIP:tripledouble}.\par
+Eventually, since not an overlapped triple-double intermediate result is to be returned by the logarithm function but a 
+double precision number that is the correct rounding according to the rounding mode chosen, the algorithm effectuates
+a renormalizing operation on the final result and rounds this non-overlapped result down to a double using an
+appropriate rounding sequence. All this renormalization and rounding sequences are exact and have been shown to be
+correct in \cite{Lauter2005LIP:tripledouble}. The same way, all properties shown in section \ref{subsec:reduction} 
+concerning the special case handling and exactness argument reduction can be reused because the algorithm implemented in
+the accurate phase uses the same reduced argument and is substantially the same as for the quick phase. \par
+We will thus rely on all these properties and simply show the following accuracy bound
+$$\epsilon_{\mbox{\tiny accurate}} = \frac{\left( log_\hi + log_\mi + log_\lo \right) - \log\left( x \right)}{\log\left( x \right)}$$
+is bounded by 
+$$\left \vert \epsilon_{\mbox{\tiny accurate}} \right \vert \leq 5735 \cdot 2^{-132} \leq 2^{-119.5}$$
+which will be expressed in Gappa syntax as follows:
+\begin{lstlisting}[caption={Accuracy bound to prove for the accurate phase},firstnumber=165]
+->
+((logh + logm + logl) - MLog) / MLog in [-5735b-132,5735b-132]
+\end{lstlisting}
+The Gappa proof files still make the hypothesis that two of the multiplications in the accurate phase code can be 
+considered to be 
+exact. This property must therefore be shown in a paper proof in the following. 
+
+The first of these multiplications is the following sequence:
+\begin{lstlisting}[caption={Multiplication of triple-double $\circ\left( Z \cdot Z \right)$ by $-\frac{1}{2}$},firstnumber=99]
+  zSquareHalfh = zSquareh * -0.5;
+  zSquareHalfm = zSquarem * -0.5;
+  zSquareHalfl = zSquarel * -0.5;
+\end{lstlisting}
+As it will be shown below, the relative error $\epsilon_{ZSquare}$ defined as
+$$\epsilon_{ZSquare} = \frac{\left( zSquare_\hi + zSquare_\mi + zSquare_\lo \right) - Z^2}{Z^2}$$
+is bounded by $\left \vert \epsilon_{ZSquare} \right \vert \leq 2^{-149}$.
+Using the same argument as the one given in section \ref{subsec:quickphase}, one can show that $Z$ is either $0$ 
+or greater in magnitude than at least $2^{-77}$. So the following is true
+$$Z^2 = 0 \lor \left \vert Z^2 \right \vert \geq 2^{-154}$$
+If $Z^2=0$, $ZSquarehml = zSquare_\hi + zSquare_\mi + zSquare_\lo$ trivially is $0$, too, and the multiplication is 
+with $-\frac{1}{2}$ is therefore exact. 
+Since we can note $ZSquarehml = Z^2 \cdot \left( 1 + \epsilon_{ZSquare} \right)$, we know that in the other case, 
+$$\left \vert ZSquarehml \right \vert \geq 2^{-155}$$
+We can suppose that in the triple-double number $zSquare_\hi + zSquare_\mi + zSquare_\lo$, $zSquare_\mi$ and 
+$zSquare_\lo$ are not overlapped at all (since $zSquare_\mi = \circ \left( zSquare_\mi + zSquare_\lo \right)$) 
+and that $zSquare_\hi$ and $zSquare_\mi$ are not fully overlapped.
+So we can note $\left \vert zSquare_\mi \right \vert \leq 2^{-\beta_o} \cdot \left \vert zSquare_\hi \right \vert$ and
+$\left \vert zSquare_\lo \right \vert \leq 2^{-\beta_u} \cdot \left \vert zSquare_\mi \right \vert$ with $\beta_o \geq 1$ and 
+$\beta_u \geq 53$.
+We will show this property below we are just supposing here.
+So we can verify the following
+\begin{eqnarray*}
+\left \vert ZSquarehml \right \vert & = & \left \vert zSquare_\hi + zSquare_\mi + zSquare_\lo \right \vert \\
+& \leq & \left \vert zSquare_\hi \right \vert + \left \vert zSquare_\mi \right \vert + \left \vert zSquare_\lo \right \vert \\
+& \leq & \left \vert zSquare_\hi \right \vert + 
+2^{-\beta_o} \cdot \left \vert zSquare_\hi \right \vert + 
+2^{-\beta_o} \cdot 2^{-\beta_u} \cdot \left \vert zSquare_\hi \right \vert \\
+& \leq & 2 \cdot \left \vert zSquare_\hi \right \vert 
+\end{eqnarray*}
+In consequence, we obtain
+$$\left \vert zSquare_\hi \right \vert \geq \frac{1}{2} \cdot \left \vert ZSquarehml \right \vert$$
+and thus
+$$\left \vert zSquare_\hi \right \vert \geq 2^{-156}$$ under the hypothesis that it is not exactly zero.
+So $zSquareHalf_\hi = -\frac{1}{2} \cdot zSquare_\hi$ will never be underflowed.
+
+Let us now show first that the operations for computing $zSquareHalf_\mi$ and $zSquareHalf_\lo$ cannot both be
+inexact. We will use the fact that $\left \vert zSquare_\lo \right \vert \leq 2^{-53} \cdot \left \vert zSquare_\mi \right \vert$.
+Suppose first that 
+$$zSquareHalf_\mi \gets - \frac{1}{2} \otimes zSquare_\mi$$ is inexact. So $\left \vert zSquare_\mi \right \vert < 2^{-1022}$ and
+in consequence $\left \vert zSquare_\lo \right \vert < 2^{-1022-53}$. Note that the inegality is strict. 
+Since the least (in magnitude) representable denormalized double precision floating point number is $2^{-52} \cdot 2^{-1023}$,
+$zSquare_\lo = 0$ in this case. So $$zSquareHalf_\lo \gets - \frac{1}{2} \otimes zSquare_\lo$$ is exact because trivially, a 
+multiplication with $0$ is exact. 
+
+Suppose now that $$zSquareHalf_\lo \gets - \frac{1}{2} \otimes zSquare_\lo$$ is inexact. 
+So $\left \vert zSquare_\lo \right \vert < 2^{-1022}$. Further, the least significant bit of the mantissa of $zSquare_\lo$ is 
+$1$ because otherwise, a bit-shift in its mantissa by 1 would be an exact operation. 
+Thus $\left \vert zSquare_\lo \right \vert \geq 2^{-52} \cdot 2^{-1023}$ and $\left \vert zSquare_\mi \right \vert \geq 2^{-1022}$. So
+$$zSquareHalf_\mi \gets - \frac{1}{2} \otimes zSquare_\mi$$ cannot be inexact because in this case we would have 
+$\left \vert zSquare_\mi \right \vert < 2^{-1022}$. 
+
+So, in any case, if ever $zSquareHalf_\mi + zSquareHalf_\lo$ are not exactly 
+$-\frac{1}{2} \cdot \left( zSquare_\mi + zSquare_\lo \right)$, the error made will be $\frac{1}{2} \cdot d$
+in magnitude, where $d = 0^+$ is the smallest representable denormalized non-zero double. So we can note down in this case
+$$zSquareHalf_\hi + zSquareHalf_\mi + zSquareHalf_\lo = - \frac{1}{2} \cdot \left( zSquare_\hi + zSquare_\mi + zSquare_\lo \right) + \delta$$
+with $\left \vert \delta \right \vert \leq 2^{-1075}$. Since we know that
+$\left \vert - \frac{1}{2} \cdot \left( zSquare_\hi + zSquare_\mi + zSquare_\lo \right) \right \vert \geq 2^{-156}$, we can give the
+following bound
+$$\left \vert \frac{\delta}{-\frac{1}{2} \cdot \left( zSquare_\hi + zSquare_\mi + zSquare_\lo \right)} \right \vert \leq 
+\frac{2^{-1075}}{2^{-156}} = 2^{-919}$$
+So we get
+$$ZSquareHalfhml = - \frac{1}{2} \cdot ZSquarehml \cdot \left(1 + \epsilon\right)$$
+with
+$\left \vert \epsilon \right \vert \leq 2^{-919}$ 
+
+In contrast, since we know that $\left \vert Z \right \vert \leq 2^{-8}$
+thus that $\left \vert Z^2 \right \vert \leq 2^{-16}$ but that $\left \vert Z^2 \right \vert \geq 2^{-154}$, we can
+assume that the infinite precision mantissa of $Z^2$ can always be written exactly with at most $154 - 16 = 138 < 149$ 
+bits. As we can show that 
+$\frac{1}{2} \cdot \left \vert ZSquarehml \right \vert \leq \left \vert zSquare_\hi \right \vert \leq 
+2 \cdot \left \vert ZSquarehml \right \vert$ we know that if ever one of $zSquare_\mi$ or $zSquare_\lo$ is such that
+the multiplication with $-\frac{1}{2}$ is not exact, the error made has already been accounted for in the error bound
+for $ZSquarehml$ with regard to $Z^2$.
+So the operation computing $ZSquareHalfhml$ out of $ZSquarehml$ can be considered to be exact. \par
+Let us now analyse the following sequence 
+\begin{lstlisting}[caption={Multiplication of triple-double $Log2hml$ by $E$},firstnumber=126]
+  log2edhover = log2h * ed;
+  log2edmover = log2m * ed;
+  log2edlover = log2l * ed;
+\end{lstlisting}
+Similar to the argumentation that has been given in section \ref{subsec:quickphase}, since $E=ed$ is bound
+in magnitude by $1024=2^{10}$ and since $log2_\hi$, $log2_\mi$ are stored with at least $11$ trailing bits at zero,
+the multiplications in these components are exact. The constant $log2_\lo$ is not stored with $11$ trailing bits at zero
+but it could be because we will be just supposing the bound $\left \vert \epsilon_{Log2hml} \right \vert \leq 2^{-3 \cdot 53 + 33} = 2^{-126}$ for
+$$\epsilon_{Log2hml} = \frac{log2_\hi + log2_\mi + log2_\lo - \log\left( 2 \right)}{\log\left( 2 \right)}$$
+So the multiplication is not exact in itself but the final result is exacter than the bound we are using for it.
+
+Let us finally just recall the Maple code for computing the constants:
+\begin{lstlisting}[caption={Maple code for computing $Log2hml$},firstnumber=21]
+log2acc := log(2):
+log2h := round(log2acc * 2**(floor(-log[2](abs(log2acc))) + (53 - 11))) / 2**(floor(-log[2](abs(log2acc))) + (53 - 11)):
+log2m := round((log2acc - log2h) * 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11))) / 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11)):
+log2l := log2acc - (log2h + log2m):
+\end{lstlisting}
+So the multiplication can be considered to be exact as long the less accurate bound for $\epsilon_{Log2hml}$ is used. 
+
+Let us know analyse the bounds that we can give for the maximal overlap of the components of the triple-double numbers
+in the logarithm implementation. For doing this, we will assign each triple-double number in the code an overlap bound as 
+follows. Call the number in consideration e.g. $a_\hi + a_\mi + a_\lo$. So we will give the bounds expressed like this:
+\begin{eqnarray*}
+\left \vert a_\mi \right \vert & \leq & 2^{-\alpha_o} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-\alpha_u} \cdot \left \vert a_\mi \right \vert 
+\end{eqnarray*}
+where $\alpha_o, \alpha_u \geq 2$.
+We will then propagate this information following the flow of control in the implementation and using the overlap 
+bound theorems given in \cite{Lauter2005LIP:tripledouble}. Here, we understand by ``propagating'' checking a system of constraints 
+of the bounds under the limitations provided by the theorems. As the control-flow-graph of our implementation
+is completely linear, this check is linear, too. The theorems mentionned can be summarized as follows:
+\begin{center}
+\begin{tabular}{|l|ll|ll|ll|}
+\hline 
+Operation & 1st arg. & 2nd arg. & result high & result low \\
+\hline 
+\AddTT & $\alpha_o \geq 4$, $\alpha_u \geq 1$ & $\beta_o \geq 4$, $\beta_u \geq 1$ & $\gamma_o \geq \min\left( \alpha_o, \beta_o \right) - 5$ & $\gamma_u \geq 53$ \\
+\hline
+\AddDTT & - & $\beta_o \geq 2$, $\beta_u \geq 1$ & $\gamma_o \geq \min\left( 45, \beta_o - 4, \beta_o + \beta_u - 2 \right)$ & $\gamma_u \geq 53$ \\
+\hline
+\MulDT & - & - & $\gamma_o \geq 48$ & $\gamma_u \geq 53$ \\
+\hline
+\MulDTT & - & $\beta_o \geq 2$, $\beta_u \geq 1$ & $\gamma_o \geq \min\left( 48, \beta_o - 4, \beta_o + \beta_u - 4 \right)$ & $\gamma_u \geq 53$ \\
+\hline
+\end{tabular}
+\end{center}
+So let us analyse the following code:
+\begin{lstlisting}[caption={Triple-double computations},firstnumber=90,label={list:tripledouble}]
+Mul23(&zSquareh, &zSquarem, &zSquarel, zh, zl, zh, zl); 
+Mul233(&zCubeh, &zCubem, &zCubel, zh, zl, zSquareh, zSquarem, zSquarel); 
+Mul233(&higherPolyMultZh, &higherPolyMultZm, &higherPolyMultZl, t14h, t14l, zCubeh, zCubem, zCubel); 
+zSquareHalfh = zSquareh * -0.5;
+zSquareHalfm = zSquarem * -0.5;
+zSquareHalfl = zSquarel * -0.5;
+Add33(&polyWithSquareh, &polyWithSquarem, &polyWithSquarel, 
+      zSquareHalfh, zSquareHalfm, zSquareHalfl, 
+      higherPolyMultZh, higherPolyMultZm, higherPolyMultZl);
+Add233(&polyh, &polym, &polyl, zh, zl, polyWithSquareh, polyWithSquarem, polyWithSquarel);
+Add33(&logyh, &logym, &logyl, logih, logim, logil, polyh, polym, polyl);
+log2edhover = log2h * ed;
+log2edmover = log2m * ed;
+log2edlover = log2l * ed;
+log2edh = log2edhover;
+log2edm = log2edmover;
+log2edl = log2edlover;
+Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyh, logym, logyl);
+\end{lstlisting}
+This code will finally generate triple-double numbers respecting the following overlap bounds as will be
+shown below:
+\begin{center}
+\begin{tabular}{|l|l|l|l|}
+\hline
+Variable & Line(s) & $\alpha_o \geq$ & $\alpha_u \geq$ \\
+\hline
+$ZSquarehml$ & 90 & $48$ & $53$ \\
+\hline
+$ZCubehml$ & 91 & $44$ & $53$ \\
+\hline
+$HigherPolyMultZhml$ & 92 & $40$ & $53$ \\
+\hline 
+$ZSquareHalfhml$ & 93-95 & $48$ & $53$ \\
+\hline
+$PolyWithSquarehml$ & 96-98 & $35$ & $53$ \\
+\hline 
+$Polyhml$ & 99 & $31$ & $53$ \\
+\hline
+$Logyhml$ & 100 & $26$ & $53$ \\
+\hline
+$Log2edhml$ & 101-106 & $40$ & $40$ \\
+\hline
+$Logoverhml$ & 107 & $21$ & $53$ \\
+\hline
+\end{tabular}
+\end{center}
+So let us verify exemplarily some of these bounds: 
+\begin{itemize}
+\item At line 90, $ZSquarehml$ is computed out of the double-double number $z_\hi + z_\lo$ by use of the \MulDT~ sequence.
+Since the inputs of this function are not triple-double, the overlap bound is just the bound provided by the sequence 
+itself, i.e. $\alpha_o \geq 48$, $\alpha_u \geq 53$. 
+\item $ZCubehml$ is the result of a \MulDTT~ sequence at line 91. Its overlap bound depends therefore on the one
+for $ZSquarehml$, which is the second argument of the function. Since we know the bound for this variable, we easily 
+verify the one for $ZCubehml$ which is $\alpha_o \geq 44$ and $\alpha_u \geq 53$.
+\item $Log2edhml$ is the exact pairwise product of the triple-double constant $Log2hml$ and double $E$. Since $E$ may be
+as small as $0$ in magnitude and further, since the multiplication is pairwise, the overlap bound we dispose of for
+$Log2edhml$ is the same as for $Log2hml$ which is stored with at least $11$ bit trailing zeros. 
+So an appropriate bound is $\alpha_o \geq 52 - 11 \geq 40$ and $\alpha_u \geq 40$. 
+\end{itemize}
+All other bounds can be verified the same way using the theorems given in \cite{Lauter2005LIP:tripledouble} and indicated above. \par
+Since we have computed the overlap bounds for the different triple-double operands in the code, we can now 
+calculate the accuracy bounds for the operations. Doing this is only possible with the knowledge of the
+overlap of the operations because all accuracy bound theorems given in \cite{Lauter2005LIP:tripledouble} are parameterized with this 
+overlap expressions. 
+
+Let us first give a list of the accuracy of the different basic operations which is not exhaustive with regard to
+its lack of listing almost all preconditions on the sequences required for theorems to hold. We refrain from explicitely 
+verifying each of this preconditions in this document as this is only fastidious work but not of special interest. 
+\begin{center}
+\begin{tabular}{|l|l|l|l|}
+\hline
+Operation & Overlap 1st arg. & Overlap 2nd arg. & Relative error $\epsilon$ \\
+\hline
+\AddDD & - & - & $\left \vert \epsilon \right \vert \leq 2^{-103.5} \leq 2^{-103}$ \\
+\hline
+\MulDD & - & - & $\left \vert \epsilon \right \vert \leq 2^{-102}$\\
+\hline
+\AddTT & $\alpha_o \geq 4$, $\alpha_u \geq 1$ & $\beta_o \geq 4$, $\beta_u \geq 1$ & 
+$\left \vert \epsilon \right \vert \leq 2^{-\min\left( \alpha_o + \alpha_u, \beta_o + \beta_u \right) -47} + 2^{-\min\left( \alpha_o, \beta_o \right) - 98}$
+\\
+\hline
+\AddDTT & - & $\beta_o \geq 2$, $\beta_u \geq 1$ & 
+$\left \vert \epsilon \right \vert \leq 2^{-\beta_o - \beta_u - 52} + 2^{-\beta_o-104} + 2^{-153}$
+\\
+\hline
+\MulDT & - & - &  
+$\left \vert \epsilon \right \vert \leq 2^{-149}$
+\\
+\hline
+\MulDTT & - & $\beta_o \geq 2$, $\beta_u \geq 1$ &  
+$\left \vert \epsilon \right \vert \leq 2^{-97-\beta_o} + 2^{-97-\beta_o-\beta_u} + 2^{-150}$
+\\
+\hline
+\end{tabular}
+\end{center}
+Still analyzing the following double-double computations code and the code 
+given at listing \ref{list:tripledouble}, one can now easily check the bounds for 
+the relative error of the different operations listed in the table below.
+We define here the relative error of an operation $\ast$ and its arithmetical equivalent $\circledast$ as follows:
+$$\epsilon = \frac{\left(a \circledast b \right) - \left(a \ast b\right)}{\left(a \ast b \right)}$$
+\begin{lstlisting}[caption={Double-double computations in accurate phase},firstnumber=73,label={list:doubledouble}]
+  Mul12(&t1h, &t1l, zh, highPoly);
+  Add22(&t2h, &t2l, accPolyC9h, accPolyC9l, t1h, t1l);
+  Mul22(&t3h, &t3l, zh, zl, t2h, t2l);
+  Add22(&t4h, &t4l, accPolyC8h, accPolyC8l, t3h, t3l);
+  Mul22(&t5h, &t5l, zh, zl, t4h, t4l);
+  Add22(&t6h, &t6l, accPolyC7h, accPolyC7l, t5h, t5l);
+  Mul22(&t7h, &t7l, zh, zl, t6h, t6l);
+  Add22(&t8h, &t8l, accPolyC6h, accPolyC6l, t7h, t7l);
+  Mul22(&t9h, &t9l, zh, zl, t8h, t8l);
+  Add22(&t10h, &t10l, accPolyC5h, accPolyC5l, t9h, t9l);
+  Mul22(&t11h, &t11l, zh, zl, t10h, t10l);
+  Add22(&t12h, &t12l, accPolyC4h, accPolyC4l, t11h, t11l);
+  Mul22(&t13h, &t13l, zh, zl, t12h, t12l);
+  Add22(&t14h, &t14l, accPolyC3h, accPolyC3l, t13h, t13l);
+\end{lstlisting}
+\begin{center}
+\begin{tabular}{|l|l|l|l|}
+\hline
+Result & Line(s) & Operation & Relative error $\epsilon$ \\
+\hline
+$T1hl$ through $T14hl$ & 73 - 86 & \AddDD~ / \MulDD & 
+$\left \vert \epsilon \right \vert \leq 2^{-103}$ / $\left \vert \epsilon \right \vert \leq 2^{-102}$ \\
+\hline
+$ZSquarehml$ & 90 & \MulDT & $\left \vert \epsilon \right \vert \leq 2^{-149}$ \\
+\hline
+$ZCubehml$ & 91 & \MulDTT & $\left \vert \epsilon \right \vert \leq 2^{-144}$ \\
+\hline
+$HigherPolyMultZhml$ & 92 & \MulDTT & $\left \vert \epsilon \right \vert \leq 2^{-141}$ \\
+\hline 
+$PolyWithSquarehml$ & 96-98 & \AddTT & $\left \vert \epsilon \right \vert \leq 2^{-137}$ \\
+\hline 
+$Polyhml$ & 99 & \AddDTT & $\left \vert \epsilon \right \vert \leq 2^{-134}$ \\
+\hline
+$Logyhml$ & 100 & \AddTT & $\left \vert \epsilon \right \vert \leq 2^{-128}$ \\
+\hline
+$Logoverhml$ & 107 & \AddTT & $\left \vert \epsilon \right \vert \leq 2^{-123}$ \\
+\hline
+\end{tabular}
+\end{center}
+Let us just explicitely check the bound for one of the operations for sake of an example. Let us take
+therefore the \AddTT~ sequence at lines 96-98 computing $PolyWithSquarehml$ out of $ZSquareHalfhml$ and
+$HigherPolyMultZhml$. We have already obtained to following overlap bounds:
+\begin{eqnarray*}
+\left \vert zSquareHalf_\mi \right \vert & \leq & 2^{-48} \cdot \left \vert zSquareHalf_\hi \right \vert \\
+\left \vert zSquareHalf_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert zSquareHalf_\mi \right \vert \\
+\left \vert higherPolyMultZ_\mi \right \vert & \leq & 2^{-40} \cdot \left \vert higherPolyMultZ_\hi \right \vert \\
+\left \vert higherPolyMultZ_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert higherPolyMultZ_\mi \right \vert
+\end{eqnarray*}
+Feeding now this bounds into the theorem on the accuracy of \AddTT, we get
+$$\left \vert \epsilon \right \vert \leq 2^{-\min\left( 48 + 53, 40 + 53 \right) - 47} + 2^{-\min \left( 48, 40 \right) - 98} \leq 2^{-140} + 2^{-138} \leq 2^{-137}$$
+All other error bounds can be verified in a similar way. They are finally expressed in Gappa syntax as follows:
+\begin{lstlisting}[caption={Relative error bounds in Gappa code},firstnumber=139]
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (T3hl - T3) / T3 in [-1b-102,1b-102]
+/\ (T4hl - T4) / T4 in [-1b-103,1b-103]
+/\ (T5hl - T5) / T5 in [-1b-102,1b-102]
+/\ (T6hl - T6) / T6 in [-1b-103,1b-103]
+/\ (T7hl - T7) / T7 in [-1b-102,1b-102]
+/\ (T8hl - T8) / T8 in [-1b-103,1b-103]
+/\ (T9hl - T9) / T9 in [-1b-102,1b-102]
+/\ (T10hl - T10) / T10 in [-1b-103,1b-103]
+/\ (T11hl - T11) / T11 in [-1b-102,1b-102]
+/\ (T12hl - T12) / T12 in [-1b-103,1b-103]
+/\ (T13hl - T13) / T13 in [-1b-102,1b-102]
+/\ (T14hl - T14) / T14 in [-1b-103,1b-103]
+/\ (ZSquarehml - ZSquare) / ZSquare in [-1b-149,1b-149]
+/\ (ZCubehml - ZCube) / ZCube in [-1b-144,1b-144]
+/\ (HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ in [-1b-141,1b-141]
+/\ (PolyWithSquarehml - PolyWithSquare) / PolyWithSquare in [-1b-137,1b-137]
+/\ (Polyhml - Poly) / Poly in [-1b-134,1b-134]
+/\ (Logyhml - Logy) / Logy in [-1b-128,1b-128]
+/\ (Loghml - Logover) / Logover in [-1b-123,1b-123]
+/\ (Log2hml - MLog2) / MLog2 in [-1b-126,1b-126]
+/\ (Logihml - MLogi) / MLogi in [-1b-159,1b-159]
+/\ (MPoly - MLog1pZ) / MLog1pZ in [-_epsilonApproxAccurate,_epsilonApproxAccurate]
+/\ Z in [_zmin,_zmax]
+/\ ((logh + logm + logl) - Loghml) / Loghml in [-1b-159,1b-159]
+\end{lstlisting}
+Concerning the Gappa proofs for accurate phase, in a similar way as for the quick phase, three different proof
+files are used. They reflect once again the three main cases for the argument of the logarithm function:
+\begin{itemize}
+\item For cases where after argument reduction $\left \vert E \right \vert \geq 1$, 
+the file {\tt log-td-accurate.gappa} is used. In this case, absolute error computations are sufficient 
+for the final relative error bound to be calculable because 
+$\left \vert \log\left( x \right) \right \vert \geq \frac{1}{2} \log\left( 2 \right)$ in this case.
+\item For the case where after argument reduction, $E = 0$ and $i \not = 0$, the file 
+{\tt log-td-accurate-E0.gappa} is used. The same way here, we have a preponderant constant term so absolute
+error computations suffice.
+\item For the other case, where $E=0$ and $i=0$ the file {\tt log-td-accurate-E0-logir0.gappa} provides the 
+accuracy bound proof. In contrast to the other cases, we obliged to relative error estimations since the beginning
+since the function $\log\left( x \right)$ has a zero in this intervall.
+\end{itemize}
+Once again, several term rewriting hints are needed in the Gappa proof files for enabling the Gappa tool to 
+generate a proof for the accuracy bounds. In a similar way, the hints which cannot directly be checked for their 
+mathematical correctness by the tool itself are verified by semi-automatic Maple scripts.\par
+By the existence of an accuracy proof for a final relative error of $\left \vert \epsilon_{\mbox{\tiny accurate}} \right \vert \leq 2^{-119.5}$ and
+by the use of the critical accuracy of the double precision natural logarithm function which is 
+$118$ bits\cite{DinDefLau2004LIP}, we can consider the implementation to be correctly rounding under the hypothesis
+that the final rounding sequence used is exact and correct. Since we suppose this -- a correctness proof can be 
+found in \cite{Lauter2005LIP:tripledouble} -- the correctly rounding property is verified.
+
+
+\section{Proof of correctness of the double-extended implementation \label{sec:logdeproof}}
+
+
+\section{Performance results\label{sec:logperf}}
+The given implementation of the natural logarithm function aims at
+being both portable and more performant than the previous
+implementations using the SCS libary for the accurate phase.  This
+goal is acheived in terms of memory consumption (if the code sizes for
+{\tt scslib} are taken into account) and in terms of speed
+performance. The reason for this is mainly the possibility of reusing
+all values computed in the argument reduction phase and the tables for
+the accurate phase directly.
+
+\subsection{Memory requirements}
+
+
+
+\subsection{Timings}
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
diff --git a/src/crlibm/docs/latex/log10.tex b/src/crlibm/docs/latex/log10.tex
new file mode 100644
index 0000000..8688bd5
--- /dev/null
+++ b/src/crlibm/docs/latex/log10.tex
@@ -0,0 +1,213 @@
+This chapter is contributed by Ch. Q. Lauter.
+
+\section{Main considerations, critical accuracy bounds}\label{subsec:criticalboundslog10}
+If one wants to guarantee that an implementation of the logarithm in
+base $10$, $\log_{10}\left( x \right)$, in double precision is
+correctly rounded, one has to ensure that the final intermediate
+approximation before rounding to double precision has a relative error
+of less than $2^{-122}$.
+
+An implementation of $\log_{10}\left(x\right)$ can also be derived from an
+implementation of the natural logarithm $\ln\left(x\right)$ using the formula:
+
+\begin{equation}
+  \log_{10}\left( x \right) = \frac{1}{\ln\left( 10 \right)} \cdot
+\ln\left( x \right)\label{eq:log10}
+\end{equation}
+When doing so, one must ensure that the constant
+$\mathit{log10inv} = \frac{1}{\ln\left(10\right)}$ is stored with
+enough accuracy, that the approximation for $\ln\left( x \right)$ is
+exact enough and that the multiplication sequence does not introduce 
+too great an error. As we will see in the next section
+\ref{subsec:outlinelog10}, this implies slight changes to the code for
+the natural logarithm with regard to what has been presented in
+ Chapter \ref{chap:log}.
+
+ With regard to final rounding, the elementary function $\log_{10}$
+ presents a particular issue that is somewhat singular amongst all
+ considered elementary functions: There exist a large set of input
+ double-precision numbers $x$ such that $\log_{10}(x)$ is a rational
+ and is representable as a double-precision number.
+
+ For such cases, a final directed rounding will be correct only if the
+ approximation error is exactly $0$. 
+ Indeed, the rounding $\diamond\left( f\left( x \right) \right)$ of
+ the exactly representably value $f\left(x\right) \in \F$ is trivially
+ $\diamond\left( f\left( x \right) \right) = f\left( x \right)$
+ \cite{IEEE754}. In contrast, $\diamond\left( f\left( x \right) +
+   \delta \right) \not = f\left( x \right) \in \F$ holds for all
+ $\left \vert \delta \right \vert > 0$. 
+
+ As it is impossible to achieve an approximation error exactly equal
+ to zero, it is preferable to filter out such cases and handle them
+ separately. Other functions described so far had only one such argument
+ ($x=1$ for $\log$, x=0 for the trigs). $\log_2$ has a set of such
+ cases ($x = 2^k$, $k \in \Z$) which is equally trivial to handle in
+ binary floating point.
+ 
+
+For $f = \log_{10}$, filtering much more difficult. In fact, $y =
+\log\left( x \right)$ is algebraic for exactly all $x = 10^k$, $k \in
+\Z$ \cite{Baker75}. Filtering means thus testing whether an input $x$
+can be written $x = 10^k$ with an integer $k \in \Z$. This is
+equivalent to testing if $\log_{10}\left( x \right)$ an integer,
+i.e. $\log_{10}\left( x \right) \in \Z$. However, since $\log_{10}\left( x
+\right)$ can only be approximated, filtering this way is
+impossible.
+
+One possibility is the following approach. In
+floating point arithmetic, in order to be in a situation of difficult
+rounding, not only $\log_{10}\left( x \right)$ must be algebraic but
+also the corresponding $x = 10^k$, $k \in \Z$, must be representable
+in floating point. To start with eliminating cases, we can argue that
+this impossible for all $k < 0$. Indeed, since $2 \nmid 5$, there
+exist no $m \in \N$ and $e \in \Z$ for any $k \in \Z^-$ such that
+$10^k = 2^e \cdot m$ \cite{Muller97}. So we have reduced the range of
+cases to filter to all $x = 10^k$, $k \in \N \cup \left \lbrace
+0\right \rbrace$. Further in double precision, the mantissa's length
+is $53$. So $10^k = 2^k \cdot 5^k = 2^e \cdot m$ is exactly
+representable in double precision only for values $k \in \N \cup \left
+\lbrace 0 \right \rbrace$ such that $5^k \leq 2^{53}$. This yields to
+$k \leq 53 \cdot \frac{\ln\left( 2 \right)}{\ln\left( 5 \right)}
+\approx 22.82$; hence $0 \leq k \leq 22$. In consequence, it would be
+possible to filter out the $23$ arguments $x = 10^k$ with $k \in \left
+\lbrace 0 \dots 22 \right \rbrace$. Nevertheless, this approach would
+be relatively costly. It is not the way that has been chosen for the
+implementation presented here.
+
+Our approach uses the critical worst case accuracy of the
+elementary function $\log_{10}\left( x \right)$. As already mentioned,
+it is $2^{-122}$. Under the condition that we can provide an
+approximation to the function that is exact to at least $2^{-123}$, we
+can decide the directed rounding using a modified final rounding
+sequence: We know that a $1$ after a long series of $0$s (respectively
+a $0$ after a long series of $1$s) must be present at least at the
+$122$th bit of the intermediate mantissa.  If it is not, we can
+consider a potentially present $1$ after the $122$th bit to be an
+approximation error artefact. In fact this means neglecting $\delta$s
+relatively less than $2^{-122}$ when rounding $\diamond \left( f\left(
+x \right) + \delta \right)$ instead of $\diamond \left( f\left( x
+\right) \right)$. 
+
+One shortcoming of this approach is that the
+accurate phase is launched for arguments where the quick phase's
+accuracy would suffice to return the correct result. As
+such arguments are extremely rare ($p = \frac{23}{2^{63}} \approx 2.5
+\cdot 10^{-18}$~!), this is not of an issue. The modification of the
+final rounding sequence is relatively lightweight: merely one floating
+point multiplication, two integer masks and one integer comparison
+have to be added to handle the case.
+
+One remarks this approach is only possible because the critical worst
+case accuracy of the function is known by Lef{\`e}vre's works. Ziv's oignon peeling
+strategy without the filtering of the
+$23$ possible cases in input and without any accuracy limitation for
+intermediate computations yields to nontermination of the
+implementation of the function on such arguments $x = 10^k$.
+
+An earlier \crlibm\ implementation of the $\log_{10}\left(x\right)$
+function based on the SCS format did not handle the problem and
+returned incorrectly rounded results for inputs $x = 10^k$ in the
+directed rounding modes.
+
+
+\section{General outline of the algorithm and accuracy estimates}\label{subsec:outlinelog10}
+% 1/2 page
+% 
+% - Multiply by the right constant, this time using a triple double for the constant => Mul33 which is costly
+% - Tell about the need to gain some bits in the log for the worst case => renormalize at some point in the code
+% - Analyse the issue of integer powers of 10 => give explanation that there are only 17 cases 
+% - Indicate the way the final rounding sequence for triple double can be modified => additional costs
+% - Mention that we launch the accurate phase even for results where the quick phase result suffices (10^n), 
+%   analyse the problem and mention that it is unique for log10 (in the usual list of elementary functions) 
+%   but that it is quasi impossible to get around it (tell that log10 in SCS did not correctly treat the problem)
+
+The quick phase of the implementation of the $\log_{10}\left( x
+\right)$ follows exactly the scheme depicted by equation
+(\ref{eq:log10}) above. Similarly to the logarithm in base
+$2$, the natural logarithm's intermediate double-double result is
+multiplied by a double-double precision approximation of
+$\mathit{log10inv}$. The rounding test is slightly modified in order
+to ensure safe rounding or launching the accurate phase.
+
+Concerning the accurate phase, some modifications in the natural
+logarithm's code are necessary because of the tighter accuracy bound
+needed for the worst case. The natural logarithms accurate phase
+polynomial approximation relative error has already been less than
+$2^{-125}$ which is exact enough for $\log_{10}\left( x
+\right)$. The fact that the complete triple-double implementation is
+exact to only $119$ bits, is mainly due to the inexactness of the
+operators used in reconstruction phase. In turn, this inexactness is
+caused by the relatively high overlap in the triple-double numbers
+handled. By adding two additional renormalisations the triple-double
+operators become exact enough.
+
+The constant $\mathit{log10inv}$ cannot be stored in double-double
+precision with an accuracy of $124$ bits. A triple-double
+approximation is therefore used. Its relative approximation error is
+smaller than $2^{-159}$. The final multiplication of the triple-double
+constant representing $\mathit{log10inv}$ and the triple-double
+natural logarithm result is performed by a \MulTT. The relative error
+of this operator on non-overlapping triple-doubles is not greater than
+$2^{-140}$. This last operation therefore offers a large accuracy
+overkill.
+
+TODO The combination of the previous errors should be verified in Gappa.
+
+
+\section{Timings}\label{subsec:timingslog10}
+
+We compare \crlibm's portable triple-double implementation
+for $\log_{10}\left( x \right)$ to other correctly rounded and
+not-correctly rounded implementations.  ``\crlibm\ portable using
+\scslib'' is the timing for the earlier implementation in {\tt
+  crlibm}, which has been superseded by the one depicted here since
+version 0.10$\beta$. This earlier implementation was completely based
+on the SCS format and did not contain a quick phase implemented in
+double precision arithmetic. The values are given in arbitrary units
+and obtained on a IBM Power 5 processor with gcc 3.3.3 on a Linux
+Kernel 2.6.5.
+ 
+\begin{table}[h]
+  \begin{center}
+\begin{tabular}{|l|r|r|}
+ \hline
+  Library                       &     avg time  & max time \\
+ \hline
+ \hline
+ \multicolumn{3}{|c|}{Power5 / Linux-2.6 / gcc-3.3}   \\ 
+ \hline
+ \texttt{MPFR}   &   9490    & 84478        \\ 
+ \hline
+ \crlibm\ portable using \texttt{scslib}   &   2624    & 2744        \\ 
+ \hline
+ \crlibm\ portable using triple-double      &        60    & 311        \\ 
+ \hline
+ default \texttt{libm} (not correctly rounded)   &        66    & 71      \\ 
+ \hline
+ \hline
+ \multicolumn{3}{|c|}{PentiumM / Linux-2.6 / gcc-4.0}   \\ 
+ \hline
+ \crlibm\ portable using triple-double                  &        304    & 1529      \\ 
+ \hline
+ default \texttt{libm}  (not correctly rounded)          &        153    & 1904      \\ 
+ \hline
+ \hline
+\end{tabular}
+\end{center}
+\caption{Log10 timings on Power5 and PentiumM architectures}
+\label{Log10timings}
+\end{table}
+
+On average, our triple-double based implementation is even $10\%$
+faster than its  incorrectly rounding counterpart on Power. On
+Pentium, we observe the usual factor 2 with respect to an
+implementation using double-extended arithmetic. Worst case timings
+are acceptable in both cases.
+
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
diff --git a/src/crlibm/docs/latex/log1p.tex b/src/crlibm/docs/latex/log1p.tex
new file mode 100644
index 0000000..15e48cd
--- /dev/null
+++ b/src/crlibm/docs/latex/log1p.tex
@@ -0,0 +1 @@
+ Todo. In between, see files log1p-td.\{h,c,mpl,gappa\}.
diff --git a/src/crlibm/docs/latex/log2.tex b/src/crlibm/docs/latex/log2.tex
new file mode 100644
index 0000000..d9a716e
--- /dev/null
+++ b/src/crlibm/docs/latex/log2.tex
@@ -0,0 +1 @@
+ Todo. In between, see files log2-td.\{h,c,mpl,gappa\}.
diff --git a/src/crlibm/docs/latex/pow.tex b/src/crlibm/docs/latex/pow.tex
new file mode 100644
index 0000000..26c6e27
--- /dev/null
+++ b/src/crlibm/docs/latex/pow.tex
@@ -0,0 +1,68 @@
+This chapter is contributed by Ch. Q. Lauter and F. de Dinechin.
+
+
+
+
+\section{Work in progress}
+
+Here is the status of the current implementation of pow in CRLibm:
+
+\begin{itemize}
+\item Exact and mid-point cases are handled properly
+  \cite{LauterLefevre2007}. This is especially important because an
+  exact case would mean an infinite Ziv iteration.
+
+\item Worst cases are not known for the full input range. This is a
+  deep theoretical issue. Recent research has focussed on $x^n$ for
+  integer $n$. At the time of release, it has been proved
+  computationally that that an intermediate precision of $2^{-118}$ is
+  enough to round correctly $x^n$ for all integer $n$ between -180 and
+  +1338. In addition, specific algorithms have been studied for the
+  computation of $x^n$ \cite{KorLauLefLouvMul2008}.
+
+\item Due to lack of time, only round-to-nearest is
+  implemented. Directed rounding requires additional work, in
+  particular in subnormal handling and in exact case management. There
+  are more exact cases in directed rounding modes, therefore the
+  performance should also be inferior.
+
+\item The current implementation computes two Ziv iterations, to
+  $2^{-61}$ then to $2^{-120}$. With current technology, there is
+  little hope to find all the worst cases for the full range of the
+  power function. Should an input require more than $2^{-120}$ happen
+  (to our knowledge none has been exhibited so far), current
+  implementation will not necessarily return the correctly rounded
+  result. Options are:
+  \begin{itemize}
+  \item Ignore silently the problem (this is the current option).
+  \item perform a second rounding test at the end of the accurate
+    step. If the test fails (with a  probability
+      smaller that $2^{-120}$),
+    \begin{itemize}
+    \item an arbitrary precision computation could be launched, for
+      example MPFR. This requires adding a dependency to MPFR only for
+      this highly improbable case.
+    \item launch a high, but not arbitrary precision third step (say,
+      accurate to $2^{-3000}$. Variations of the SLZ algorithm
+      \cite{Stehle-thesis} could provide, at an acceptable
+      computational cost, a certificate that there is no worst case
+      requiring a larger precision. This is the only fully satisfactory solution that seems at reach, but this idea remains to be explored.
+    \item (in addition to the previous) a message on the standard error could be written, including
+      the corresponding inputs, and inviting anyone who reads it to
+      send us a mail. Considering the probability, we might wait
+      several centuries before getting the first mail.
+    \end{itemize}
+
+  \end{itemize}
+
+
+
+\end{itemize}
+
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
+
diff --git a/src/crlibm/docs/latex/sqrt.tex b/src/crlibm/docs/latex/sqrt.tex
new file mode 100644
index 0000000..6ac5f31
--- /dev/null
+++ b/src/crlibm/docs/latex/sqrt.tex
@@ -0,0 +1,323 @@
+Some of \crlibm's functions need high precision square roots.  They
+are not intended to be used outside \crlibm. In particular, we do
+currently not guarantee the correct rounding of their results because
+this property is not needed for our purposes. Their implementation
+does not handle all possible special cases ($x < 0$, $\nan$, $\infty$
+etc.) neither.
+
+We currently provide two C macros computing the square root of a
+double precision argument either in double-double precision with at
+least $100$ correct bits (in faithful rounding) or in triple-double
+precision with an accuracy of at least $146$ bits (in faithful
+rounding). The corresponding macros are called \SqrtD~ and
+\SqrtT.
+
+The implementation of these macros was guided by the following
+principles:
+\begin{itemize}
+\item no dependency on other \texttt{libm}s, so avoidance of
+bootstrapping a Newton iteration by a double precision square root
+implemented elsewhere,
+\item high efficiency,
+\item a small memory footprint,
+\item the possible use of hardware support on some platforms in the
+future.
+\end{itemize}
+\subsubsection{Overview of the algorithm}
+The algorithm uses a combination of polynomial approximation and
+Newton iteration.
+
+After handling some special cases, the argument $x = 2^{E^\prime}
+\cdot m^\prime$ is reduced into its exponent $E^\prime$ stored in
+integer and its fractional part $m^\prime$ stored as a double
+precision number.  This argument reduction is obviously exact. The two
+values are then adjusted as follows:
+\vspace{-3mm}
+\begin{center}
+  \begin{tabular}{cc}
+    \begin{minipage}{60mm}
+      $$E = \left \lbrace \begin{array}{ll} E^\prime & \mbox{ if } \exists n \in \N \mbox{ . } E^\prime = 2n\\
+          E^\prime +1 & \mbox{ otherwise} \end{array} \right.$$
+    \end{minipage}
+    &
+    \begin{minipage}{60mm}
+      $$m = \left \lbrace \begin{array}{ll} m^\prime & \mbox{ if } \exists n \in \N \mbox{ . } E^\prime = 2n \\
+          \frac{m^\prime}{2} & \mbox{ otherwise } \end{array} \right.$$
+    \end{minipage}
+  \end{tabular}
+\end{center} 
+One easily checks that $\frac{1}{2} \leq m \leq 2$ and that $E$ is always even. Thus
+$$\sqrt{x} = \sqrt{2^E \cdot m} = 2^{\frac{E}{2}} \cdot \sqrt{m} =
+2^{\frac{E}{2}} \cdot m \cdot \frac{1}{\sqrt{m}}$$ The algorithm
+therefore approximates $\hat{r} = \frac{1}{\sqrt{m}}$ and reconstructs
+the square root by multiplying by $m$ and exactly by
+$2^{\frac{E}{2}}$.
+
+The reciprocal square root $\hat{r}$ is approximated in two
+steps. First, a polynomial approximation yields to $r_0 = \hat{r}
+\cdot \left( 1 + \epsilon_1 \right)$, which is exact to about $8$
+bits.  In a second step, this approximation is refined by a Newton
+iteration that approximately doubles its accuracy at each step. So for
+a double-double result, $4$ iterations are needed and for a
+triple-double result $5$.
+
+The initial polynomial approximation is less exact than the one
+provided by Itanium's \texttt{} operation, which allows for using this
+hardware assistance in the future.
+
+\subsubsection{Special case handling}
+The square root of a double precision number can never be
+subnormal. In fact, if $\sqrt{x} \leq 2^{-1021}$, $x = \sqrt{x}^2 \leq
+2^{-1042441}$, a value that is is not representable in double
+precision. 
+
+Concerning subnormals in argument, it to be mentioned that still
+$E^\prime$ and $m^\prime$ can be found such that $x = 2^{E^\prime}
+\cdot m$ exactly and $1 \leq m^\prime \leq 2$. Only the extraction
+sequence must be modified: $x$ is first multiplied by $2^{52}$ where
+$E^\prime$ is set to $-52$. The double number $x$ is thus no longer a
+subnormal an integer handling can extract its mantissa easily. The
+extraction of the exponent takes into account the preceeding bias of
+$E^\prime$. The case $x = 0$ is filtered out before. Obviously
+$\sqrt{0} = 0$ is returned for this argument.
+
+The special cases $x < 0$, $x = \pm \infty$ and $x = \nan$ are not
+handled since they can be easily excluded by the code using the square
+root macros.
+
+Special case handling is implemented as follows:
+\begin{lstlisting}[caption={Special case handling},firstnumber=1]
+/* Special case x = 0 */
+if (x == 0) {
+  *resh = x;
+  *resl = 0;
+} else {
+
+  E = 0;
+
+  /* Convert to integer format */
+  xdb.d = x;
+    
+  /* Handle subnormal case */
+  if (xdb.i[HI] < 0x00100000) {
+    E = -52;
+    xdb.d *= ((db_number) ((double) SQRTTWO52)).d; 	  /* make x a normal number */ 
+  }
+  
+  /* Extract exponent E and mantissa m */
+  E += (xdb.i[HI]>>20)-1023; 
+  xdb.i[HI] = (xdb.i[HI] & 0x000fffff) | 0x3ff00000;
+  m = xdb.d;
+  
+  /* Make exponent even */
+  if (E & 0x00000001) {
+    E++;
+    m *= 0.5;    /* Suppose now 1/2 <= m <= 2 */
+  }
+
+  /* Construct sqrt(2^E) = 2^(E/2) */
+  xdb.i[HI] = (E/2 + 1023) << 20;
+  xdb.i[LO] = 0;
+\end{lstlisting}
+
+\subsubsection{Polynomial approximation}
+The reciprocal square root $\hat{r} = \frac{1}{\sqrt{m}}$ is
+approximated in the domain $m \in \left[ \frac{1}{2}; 2 \right]$ by a
+polynomial $p\left( m \right) = \sum\limits_{i=0}^4 c_i \cdot m^i$ of
+degree $4$. The polynomial's coefficients $c_0$ through $c_4$ are
+stored in double precision.  The following values are used:
+\begin{eqnarray*}
+c_0 & = & 2.50385236695888790947606139525305479764938354492188 \\  
+c_1 & = & -3.29763389114324168005509818613063544034957885742188  \\
+c_2 & = & 2.75726076139124520736345402838196605443954467773438   \\
+c_3 & = & -1.15233725777933848632983426796272397041320800781250  \\
+c_4 & = & 0.186900066679800969104974228685023263096809387207031 
+\end{eqnarray*}
+
+The relative approximation error $\epsilon_{\mbox{\tiny approx}} =
+\frac{p\left( m\right) - \hat{r}}{\hat{r}}$ is bounded by $\left \vert
+\epsilon_{\mbox{\tiny approx}} \right \vert \leq 2^{-8.32}$ for $m \in
+\left[ \frac{1}{2}; 2 \right]$.
+
+The polynomial is evaluated in double precision using Horner's
+scheme. There may be some cancellation in the different steps but the
+relative arithmetical error $\epsilon_{\mbox{\tiny arithpoly}}$ is
+always less in magnitude than $2^{-30}$. This will be shown in more
+detail below.
+
+The code implementing the polynomial approximation reads:
+\begin{lstlisting}[caption={Polynomial approximation},firstnumber=1]
+r0 = SQRTPOLYC0 + m * (SQRTPOLYC1 + m * (SQRTPOLYC2 + m * (SQRTPOLYC3 + m * SQRTPOLYC4)));
+\end{lstlisting}
+So 4 double precision multiplications and 4 additions are needed for computing the
+initial approximation. They can be replaced by 4 FMA instructions, if available.
+
+\subsubsection{Double and double-double Newton iteration}
+The polynomial approximation is then refined using the following iteration scheme:
+$$r_{i+1} = \frac{1}{2} \cdot r_i \cdot (3 - m \cdot r_i^2)$$
+If the arithmetic operations were exact, one would obtain the following error estimate:
+\begin{eqnarray*}
+\epsilon_{i+1} & = & \frac{r_i - \hat{r}}{\hat{r}} \\ & = &
+\frac{\frac{1}{2} \cdot r_i \cdot \left(3 - m \cdot r_i^2\right) -
+\hat{r}}{\hat{r}} \\ 
+& = & \frac{\frac{1}{2} \cdot \hat{r} \cdot
+\left( 1 + \epsilon_i \right) \cdot \left( 3 - m \cdot \hat{r}^2 \cdot
+\left( 1 + \epsilon_i \right)^2 \right) - \hat{r}}{\hat{r}} \\
+& = & \frac{1}{2} \cdot \left( 1 + \epsilon_i \right) \cdot \left( 3 - m \cdot \frac{1}{m} \cdot \left( 1 + 
+\epsilon_i\right)^2 \right) - 1 \\
+& = & \frac{1}{2} \cdot \left( 1 + \epsilon_i \right) \cdot \left( 3 - 1 - 2 \cdot \epsilon_i - \epsilon_i^2  
+\right) - 1 \\
+& = & \left( 1 + \epsilon_i \right) \cdot \left( 1 - \epsilon_i - \frac{1}{2} \cdot \epsilon_i^2  
+\right) - 1 \\
+& = & 1 - \epsilon_i - \frac{1}{2} \cdot \epsilon_i^2 + \epsilon_i - \epsilon_i^2 - \frac{1}{2} \cdot \epsilon_i^3 - 1\\
+& = & - \frac{3}{2} \cdot \epsilon_i^2 - \frac{1}{2} \cdot \epsilon_i^3
+\end{eqnarray*}
+So the accuracy of the approximation of the reciprocal square root is doubled at each step.
+
+Since the initial accuracy is about $8$ bits, it is possible to iterate two times on pure double precision 
+without any considerable loss of accuracy. After the two iterations about $31$ bits will be correct.
+The macro implements therefore:
+\begin{lstlisting}[caption={Newton iteration - double precision steps},firstnumber=1]
+r1 = 0.5 * r0 * (3 - m * (r0 * r0));
+r2 = 0.5 * r1 * (3 - m * (r1 * r1));
+\end{lstlisting}
+For these two iterations, 8 double precision multiplications and 2 additions are needed.
+
+The next iteration steps must be performed in double-double precision
+because the $53$ bit mantissa of a double cannot contain the about
+$60$ bit exact value $m \cdot r_2^2 \approx 1$ before cancellation in
+the substraction with $3$ and the multiplication by $r_2$.
+
+In order to exploit maximally the parallelism in the iteration equation, we rewrite it as
+\begin{eqnarray*}
+r_{3} & = & \frac{1}{2} \cdot r_2 \cdot \left( 3 - m \cdot r_2^2 \right) \\
+& = & \left( r_2 + \frac{1}{2} \cdot r_2 \right) - \frac{1}{2} \cdot \left( m \cdot r_2 \right) \cdot 
+\left( r_2 \cdot r_2 \right)
+\end{eqnarray*}
+Since multiplications by integer powers of $2$ are exact, it is
+possible to compute $r_2 + \frac{1}{2} \cdot r_2$ exactly as a
+double-double. Concurrently it is possible to compute $m \cdot r_2$
+and $r_2 \cdot r_2$ exactly as double-doubles by means of an exact
+multiplication.  The multiplication $\left( m \cdot r_2 \right) \cdot
+\left( r_2 \cdot r_2 \right)$ is then implemented as a double-double
+multiplication.  The multiplication by $\frac{1}{2}$ of the value
+obtained is exact and can be performed pairwise on the
+double-double. A final double-double addition leads to $r_3 = \left(
+r_2 + \frac{1}{2} \cdot r_2 \right) - \frac{1}{2} \cdot \left( m \cdot
+r_2 \right) \cdot \left( r_2 \cdot r_2 \right)$. Here, massive
+cancellation is no longer possible since the values added are
+approximately $\frac{3}{2} \cdot r_2$ and $\frac{1}{2} \cdot r_2$.
+
+These steps are implemented as follows:
+\begin{lstlisting}[caption={Newton iteration - first double-double step},firstnumber=1]
+Mul12(&r2Sqh, &r2Sql, r2, r2);    Add12(r2PHr2h, r2PHr2l, r2, 0.5 * r2);
+Mul12(&mMr2h, &mMr2l, m, r2);
+Mul22(&mMr2Ch, &mMr2Cl, mMr2h, mMr2l, r2Sqh, r2Sql);
+
+MHmMr2Ch = -0.5 * mMr2Ch;
+MHmMr2Cl = -0.5 * mMr2Cl;
+
+Add22(&r3h, &r3l, r2PHr2h, r2PHr2l, MHmMr2Ch, MHmMr2Cl);
+\end{lstlisting}
+
+The next iteration step provides enough accuracy for a double-double result.
+We rewrite the basic iteration equation once again as:
+\begin{eqnarray*}
+r_4 & = & \frac{1}{2} \cdot r_3 \cdot \left( 3 - m \cdot r_3^2 \right) \\
+& = & r_3 \cdot \left( \frac{3}{2} - \frac{1}{2} \cdot m \cdot r_3^2 \right) \\
+& = & r_3 \cdot \left( \frac{3}{2} - \frac{1}{2} \cdot \left( \left( m \cdot r_3^2 - 1 \right) + 1 \right) \right) \\
+& = & r_3 \cdot \left( 1 - \frac{1}{2} \cdot \left( m \cdot r_3^2 - 1 \right) \right)
+\end{eqnarray*}
+Further, we know that $r_3$, stored as a double-double, verifies $r_3
+= \hat{r} \cdot \left( 1 + \epsilon_3 \right)$ with $\left \vert
+\epsilon_3 \right \vert \leq 2^{-60}$. So we check that
+$$m \cdot r_3^2 = m \cdot \hat{r}^2 \cdot \left( 1 +
+\epsilon_3 \right)^2 = 1 + 2 \cdot \epsilon_3 + \epsilon_3^2$$
+Clearly, $\left \vert 2 \cdot \epsilon_3 + \epsilon_3^2 \right \vert <
+\frac{1}{2} \mUlp\left( 1 \right)$. So when squaring $r_{3\hi} + r_{3\lo}$ in double-double precision
+and multiplying it in double-double precision by $m$ produces a
+double-double $mMr3Sq_\hi + mMr3Sq_\lo = m \cdot \left( r_{3\hi} +
+r_{3\lo} \right)^2 \cdot \left( 1 + \epsilon \right)$, $\left \vert
+\epsilon \right \vert \leq 2^{-100}$ such that $mMr3Sq_\hi = 1$ in all
+cases.
+
+So we can implement the iteration equation 
+$$r_4 = r_3 \cdot \left( 1 - \frac{1}{2} \cdot \left( m \cdot r_3^2 - 1 \right) \right)$$
+as follows:
+\begin{lstlisting}[caption={Newton iteration - second double-double step},firstnumber=1]
+Mul22(&r3Sqh, &r3Sql, r3h, r3l, r3h, r3l); 
+Mul22(&mMr3Sqh, &mMr3Sql, m, 0, r3Sqh, r3Sql);
+
+Mul22(&r4h, &r4l, r3h, r3l, 1, -0.5 * mMr3Sql);
+\end{lstlisting}
+We since get $r_{4\hi} + r_{4\lo} = \hat{r} \cdot \left( 1 +
+\epsilon_4 \right)$ with $\left \vert \epsilon_4 \right \vert \leq
+2^{-102}$, the accuracy being limited by the accuracy of the last
+double-double multiplication operator.
+
+This approximation is than multiplied by $m$ in double-double
+precision, leading to an approximation $srtm_\hi + srtm_\lo = \sqrt{m}
+\cdot \left( 1 + \epsilon \right)$ with $\left \vert \epsilon \right \vert \leq
+2^{-100}$.
+
+Out of this value, the square root of the initial argument can be
+reconstructed by multiplying by $2^{\frac{E}{2}}$, which has already
+been stored in $xdb.d$. This multiplication is exact because it cannot
+produce a subnormal.
+
+These two steps are implemented as shown below:
+\begin{lstlisting}[caption={Multiplication $m \cdot \hat{r}$, reconstruction},firstnumber=1]
+Mul22(&srtmh,&srtml,m,0,r4h,r4l);
+
+/* Multiply componentwise by sqrt(2^E), which is an integer power of 2 that may not produce a subnormal */
+
+*resh = xdb.d * srtmh;
+*resl = xdb.d * srtml;
+\end{lstlisting}
+
+\subsubsection{Triple-double Newton iteration}
+For producing a triple-double approximate to $\hat{r}$ with an
+accuracy of at least $147$ bits, one more Newton iteration is
+needed. We apply the same equation as in the last double-double step,
+which reads:
+$$r_5 = r_4 \cdot \left( 1 - \frac{1}{2} \cdot \left( m \cdot r_4^2 -
+1 \right) \right)$$ Once again, the first component of the
+triple-double number holding an approximation to $m \cdot r_4^2$ is
+exactly equal to $1$. So by neglecting this component, we substract $1$ from it.
+Unfortunately, a renormalization step is needed after the multiplications for
+squaring $r_4$ and by $m$ because the values computed might be overlapped which would prevent us
+form substracting $1$ by neglecting a component.
+
+We implement thus:
+\begin{lstlisting}[caption={Newton iteration - triple-double step},firstnumber=1]
+Mul23(&r4Sqh, &r4Sqm, &r4Sql, r4h, r4l, r4h, r4l);                               
+Mul133(&mMr4Sqhover, &mMr4Sqmover, &mMr4Sqlover, m, r4Sqh, r4Sqm, r4Sql);        
+Renormalize3(&mMr4Sqh, &mMr4Sqm, &mMr4Sql, mMr4Sqhover, mMr4Sqmover, mMr4Sqlover);
+                                                                                                                 
+HmMr4Sqm = -0.5 * mMr4Sqm;                                                            
+HmMr4Sql = -0.5 * mMr4Sql;                                                            
+                                                                                        
+Mul233(&r5h,&r5m,&r5l,r4h,r4l,1,HmMr4Sqm,HmMr4Sql);                              
+\end{lstlisting}
+
+This approximation $r_{5\hi} + r_{5\mi} + r_{5\lo} = \hat{r} \cdot
+\left( 1 + \epsilon_5 \right)$, where $\left \vert \epsilon_5 \right
+\vert \leq 2^{-147}$ is then multiplied by $m$ in order to obtain a
+triple-double approximation of $\sqrt{m}$. Once renormalized result is
+exactly multiplied by $2^{\frac{E}{2}}$ stored in $xdb.d$.  We
+implement:
+\begin{lstlisting}[caption={Newton iteration - triple-double step},firstnumber=1]
+Mul133(&srtmhover, &srtmmover, &srtmlover,m,r5h,r5m,r5l);                     
+                                                                                     
+Renormalize3(&srtmh,&srtmm,&srtml,srtmhover,srtmmover,srtmlover);
+
+(*(resh)) = xdb.d * srtmh;
+(*(resm)) = xdb.d * srtmm;                                                         
+(*(resl)) = xdb.d * srtml;                                                         
+\end{lstlisting}
+
+\subsubsection{Accuracy bounds}
+
+TODO: see possibly available Gappa files meanwhile
+
+
diff --git a/src/crlibm/docs/latex/trigo.tex b/src/crlibm/docs/latex/trigo.tex
new file mode 100644
index 0000000..3d73f80
--- /dev/null
+++ b/src/crlibm/docs/latex/trigo.tex
@@ -0,0 +1,1804 @@
+This chapter is contributed by F. de~Dinechin with assistance of C.
+Daramy-Loirat and D. Defour.
+
+\section*{Introduction}
+This chapter describes the implementations of sine, cosine and
+tangent, as they share much of their code. The proof sketch below is
+supported by the Maple script \texttt{maple/trigo.mpl} and the Gappa
+scripts \texttt{gappa/trigoSinCosCase3.gappa} and
+\texttt{gappa/trigoTanCase2.gappa} of the \crlibm\ distribution. These scripts 
+implement the computations of error bounds and validity bounds for the
+various algorithmic paths described here.
+
+\section{Overview of the algorithms}
+
+\subsection{Exceptional cases}
+
+The three trigonometric functions return NaN for infinite and NaN
+arguments, and are defined otherwise. 
+
+An argument based on continued fractions to find the worst cases for
+range reduction may also be used to show that the sine and cosine of a
+floating-point number outside of $[-1,1]$ is always larger than
+$2^{-150}$, and therefore never flushes to zero nor to subnormal (see
+\cite{Muller97} p. 151 and following). Therefore
+$\tan(x)=\sin(x)/\cos(x)$ also remains larger than $2^{-150}$.
+
+This has two important consequences:
+
+\begin{itemize}
+\item as the output a trigonometric function is never a subnormal except for
+  inputs around zero (for which the value to return is trivial
+  anyway), we can safely use the rounding tests from Section
+  \ref{section:testrounding} p.~\pageref{section:testrounding}.
+
+\item as the cosine never flushes to zero, the tangent of a
+  floating-point number is never an infinity, and does not even come
+  close, so again we may safely use the rounding tests from Section
+  \ref{section:testrounding}.
+\end{itemize}
+
+For very small arguments,
+\begin{itemize}
+\item $\sin(x) = x-x^3/6 + O(x^5) = x(1-x^2/6) + O(x^5)$ where
+  $O(x^5)$ has the sign of $x$. Therefore $\sin(x)$ is rounded to $x$
+  or one of its floating-point neighbours as soon as $|x|<2^{-26}$.
+\item $\cos(x) = 1-x^2/2 + O(x^4)$ where $O(x^4)$ is positive.
+  Therefore $\cos(x)$ is rounded to $1$ in RN and RU mode if
+  $x<\sqrt{2^{-53}}$. In RD and RZ modes, we have $\cos(0)=1$ and
+  $\cos(x)=1-2^{-53}$ for $|x|<2^{-26}$.
+\item $\tan(x) = x+x^3/3 + O(x^5) = x(1+x^2/3) + O(x^5)$ where
+  $O(x^5)$ has the sign of $x$. Therefore $\tan(x)$ is rounded to $x$
+  or one of its neighbours for all the rounding  modes if $|x|<2^{-27}$.
+\end{itemize}
+
+
+\subsection{Range reduction}
+
+Most implementations of the trigonometric functions have two steps of range reduction: 
+\begin{itemize}
+\item first the input number $x$ is reduced to $y\in
+  [-\frac{\pi}{4}, \frac{\pi}{4}]$, with reconstruction using periodicity and
+  symmetry properties,
+\item then the reduced argument is further broken down as $y=a+z$,
+  with reconstruction using the formula for $\sin(a+z)$ and
+  $\cos(a+z)$, using tabulated values of $\sin(a)$ and
+  $\cos(a)$
+\end{itemize}
+
+We chose to implement range reduction in one step only, which
+computes an integer $k$ and a reduced argument y such that
+
+\begin{equation}
+  x = k\frac{\pi}{256} + y\label{eq:trigoargred}
+\end{equation}
+where $k$ is an integer and  $ |y| \leq {\pi}/{512}$.
+This step computes $y$ as a double-double: $y\approx y_h+y_l$. 
+
+In the following we note $$a=k\pi/256.$$ 
+
+Then we read off a table 
+
+$$sa_h+sa_l \approx sin(a)$$
+$$ca_h+ca_l \approx cos(a)$$
+
+Only 64 quadruples $(sa_h,sa_l,ca_h,ca_l)$ are tabulated (amounting to
+$64\times 8 \times 4 = 2048$ bytes), the rest is obtained by
+periodicity and symmetry, implemented as masks and integer operations
+on the integer $k$. For instance,  $a \mod 2\pi$ is implemented by $k \mod 512$,
+$\pi/2-a$ is implemented as $128-k$, etc.
+
+
+
+Then we use the reconstruction steps:
+
+\begin{equation}        
+  \sin(x) = \sin(a + y) =  \cos(a) \sin(y) +  \sin(a) \cos(y) 
+  \label{eq:sinapy}
+\end{equation}
+
+\begin{equation}
+  \cos(x) = \cos(a + y) = \cos(a) \cos(y) -  \sin(a) \sin(y) 
+  \label{eq:cosapy}
+\end{equation}
+
+\begin{equation} 
+  tan(x) = \frac{\sin(x)}{\cos(x)} 
+  \label{eq:tanapy}
+\end{equation}
+
+
+\subsection{Polynomial evaluation}
+
+
+To implement the previous equations, $\cos(y)$ and $\sin(y)$ are
+computed as unevaluated $1+t_c$ and $(y_h+y_l)(1+t_s)$ respectively,
+where $t_c$ and $t_s$ are doubles computed using a polynomial
+approximation of small degree:
+
+\begin{itemize}
+\item $t_s = y^2(s_3 + y^2(s_5 + y^2s_7)))$ with $s3$, $s5$ and
+$s7$ the Taylor coefficients.
+\item $t_c = y^2(c_2 + y^2(c_4 + y^2c_6))$ with $c2$, $c4$ and $c6$ the
+Taylor coefficients (or a more accurate minimax approximation).
+\end{itemize}
+
+
+
+\subsection{Reconstruction}
+
+\subsubsection{Sine}
+According to equation (\ref{eq:sinapy}), we have to compute: 
+ \begin{eqnarray*}
+  \sin(a+y) &=& \sin(a) \cos(y)  + \cos(a)\sin(y)  \\
+  & \approx& (sa_h+sa_l)(1+t_c) + (ca_h+ca_l)(y_h+y_l)(1+t_s)
+\end{eqnarray*}
+
+
+Figure~\ref{fig:sine-reconstruction} shows the worst-case respective
+orders of magnitude of the terms of this sum. The terms completely to the
+right of the vertical bar will be neglected, and a bound on the
+error thus entailed is computed in the following. Note that the term
+$ca_hy_h$ has to be computed exactly by a Mul12.
+
+Finally the reconstruction consists of adding together the lower-order
+terms in increasing order of magnitude, and computing the
+double-double result by an Add12.
+
+\begin{figure}[htbp]    
+  \begin{center}
+    \small
+    \setlength{\unitlength}{3ex}
+      \framebox{
+        \begin{picture}(22,9)(-3,-4.2)
+          \put(9.5,4){\line(0,-1){8}}  %\put(9,4){$\epsilon$}
+          
+          \put(4,3.2){$sa_h$} \put(0.05,3){\framebox(7.9,0.7){}}
+          \put(12,3.2){$sa_l$}  \put(8.05,3){\framebox(7.9,0.7){}}
+          
+          \put(6,2.2){$sa_ht_c$} \put(2.05,2){\framebox(7.9,0.7){}}
+          \put(14,2.2){$sa_lt_c$}  \put(10.05,2){\framebox(7.9,0.7){}}
+
+          \put(4.5,1.2){$ca_hy_h$} \put(0.55,1){\framebox(7.9,0.7){}}
+          \put(12.5,1.2){$ca_hy_h$}  \put(8.55,1){\framebox(7.9,0.7){}}
+
+          \put(11.5,0.2){$ca_hy_l $}  \put(7.55,0){\framebox(7.9,0.7){}}
+          \put(11.5,-0.8){$ca_ly_h $}  \put(7.55,-1){\framebox(7.9,0.7){}}
+
+         \put(6.5,-1.8){$ca_hy_ht_s$} \put(2.55,-2){\framebox(7.9,0.7){}}
+         \put(13.5,-2.8){$ca_hy_lt_s $}  \put(9.55,-3){\framebox(7.9,0.7){}}
+         \put(13.5,-3.8){$ca_ly_ht_s $}  \put(9.55,-4){\framebox(7.9,0.7){}}
+        
+       \end{picture}
+     }
+   \end{center}
+   \caption{The sine reconstruction}
+   \label{fig:sine-reconstruction}
+ \end{figure}
+ 
+ 
+
+\subsubsection{Cosine}
+According to equation (\ref{eq:cosapy}), we have to compute in double-double precision:
+ \begin{eqnarray*}
+  \cos(a+y) &=& \cos(a) \cos(y)  - \sin(a)\sin(y)  \\
+  & \approx& (ca_h+ca_l)(1+t_c) - (sa_h+sa_l)(y_h+y_l)(1+t_s)
+\end{eqnarray*}
+
+This is similar to the case of the sine, and the respective orders of
+magnitude are given by Figure~\ref{fig:sine-reconstruction}.
+
+\begin{figure}[htbp]
+  \begin{center}
+    \small \setlength{\unitlength}{3ex} \framebox{
+      \begin{picture}(22,9)(-3,-4.2)
+        \put(9.5,4){\line(0,-1){8}}
+%        \put(9,4){$\epsilon$}
+  
+        \put(4,3.2){$ca_h$} \put(0.05,3){\framebox(7.9,0.7){}}
+        \put(12,3.2){$ca_l$}  \put(8.05,3){\framebox(7.9,0.7){}}
+
+        \put(6,2.2){$ca_ht_c$} \put(2.05,2){\framebox(7.9,0.7){}}
+        \put(14,2.2){$ca_lt_c$}  \put(10.05,2){\framebox(7.9,0.7){}}
+
+        \put(4.5,1.2){$-sa_hy_h$} \put(0.55,1){\framebox(7.9,0.7){}}
+        \put(12.5,1.2){$-sa_hy_h$}  \put(8.55,1){\framebox(7.9,0.7){}}
+
+        \put(11.5,0.2){$-sa_hy_l $}  \put(7.55,0){\framebox(7.9,0.7){}}
+        \put(11.5,-0.8){$-sa_ly_h $}  \put(7.55,-1){\framebox(7.9,0.7){}}
+
+        \put(6.5,-1.8){$-sa_hy_ht_s$} \put(2.55,-2){\framebox(7.9,0.7){}}
+        \put(13.5,-2.8){$-sa_hy_lt_s $}  \put(9.55,-3){\framebox(7.9,0.7){}}
+        \put(13.5,-3.8){$-sa_ly_ht_s $}  \put(9.55,-4){\framebox(7.9,0.7){}}
+ 
+        \end{picture}
+      }
+    \end{center}\centering
+    
+    \caption{The cosine reconstruction}
+    \label{fig:cosine-reconstruction}
+  \end{figure}
+
+
+\subsubsection{Tangent}
+
+The tangent is obtained by the division of the sine by the cosine,
+using the \texttt{Div22} procedure which is accurate to  $2^{-104}$.
+
+
+\subsection{Precision of this scheme}
+
+As we have $|y|<2^{-7}$, this scheme computes these functions
+accurately to roughly $2^{53+13}$ bits, so these first steps are very
+accurate. 
+ 
+
+\subsection{Organisation of the code}
+
+
+The code for range reduction is shared by the three
+trigonometric functions. It is detailed and proven in
+Section~\ref{trigo:argred}.
+
+Then there are four procedures (currently implemented as macros for
+efficiency), respectively called \texttt{DoSinZero},
+\texttt{DoCosZero}, \texttt{DoSinNotZero} and \texttt{DoCosNotZero}
+which do the actual computation after range reduction as per
+Figures~\ref{fig:sine-reconstruction} and
+\ref{fig:cosine-reconstruction}. The tangent function is computed by
+dividing the sine by the cosine. These procedures are studied in
+section \ref{trigo:auxiliary}.
+
+Finally, each of the three trigonometric functions comes in four
+variants for the four rounding modes. These four variants differ in
+the beginning (special cases) and in the end (rounding), but share the
+bulk of the computation. The shared computation is called
+\verb!compute_trig_with_argred!.
+
+
+
+
+\section{Details of range reduction
+\label{trigo:argred}}
+
+\subsection{Which accuracy do we need for range reduction?}
+
+The additive reduction consists in adding or removing $N$ times a
+certain constant $C$ from the input argument. For trigonometric
+function this constant is usually equal to $\pi/2$ or $\pi/4$, in our
+case it is $\pi/128$. A naive range reduction based on
+machine precision for trigonometric function would be implemented as :
+
+\begin{equation}
+\begin{array}{rcl}
+k    &=&  \lfloor \frac{x}{C} \rfloor \\
+x^*  &=&  x-kC. \\
+\end{array}
+\label{chap6:eqn:rangereduction}
+\end{equation}
+
+Obviously, this subtraction cancels all the bits common to $x$ and $kC$:
+\begin{itemize}
+\item The absolute accuracy of $x^*$ with respect to the exact value
+  of $x-kC$ depends only on the precision used to compute the subtraction
+  and the product in $x-kC$ ($x$ is considered exact as it is the
+  input to the function).
+
+\item However, the relative accuracy of $x^*$ with respect to the
+  exact value of $x-kC$ also depends on this exact value. For a given
+  precision of the operations used in computing $x-kC$, the closer $x$
+  to $kC$, the smaller the exact value of $x-kC$, and the worse the
+  relative accuracy (or, in less formal terms, the more bits of the
+  results are lost to cancellation).
+\end{itemize}
+
+As the theorems for correct rounding of
+Section~\ref{section:testrounding} p.~\pageref{section:testrounding}
+depend on the relative accuracy of the evaluation (and therefore on
+the relative accuracy of the reduced argument), we have to prove
+bounds on the relative accuracy of range reduction.
+
+Formulated in simpler terms, how many bits can be lost in the
+subtraction $x-kC$ ? This number is related to the knowledge of the
+closest input number $x$ to a multiple of $C$. There exists an
+algorithm due to Kahan/Douglas and based on continued fraction to
+compute this number and therefore the number of bit lost (see
+\cite{Muller97} p. 151 and following).  We used a Maple version from
+\cite{Muller97} to determine than up to 62 bits may be cancelled
+during range reduction for a ieee double precision number. This Maple
+procedure is implemented as function
+\texttt{WorstCaseForAdditiveRangeReduction} in
+\texttt{maple/common-procedures.mpl}.
+
+One advantage of having $C=\pi/128$, however, is that this is only a
+concern when $x$ is close to a multiple of $\pi/2$ (that is, $k \mod
+128=0$): in the other cases (i.e. in the general, most frequent case)
+the reconstruction will add some tabulated non-zero value, so the
+error to consider in the range reduction is the absolute error.  Only
+in the cases when $k \mod 128=0$ do we need to have 62 extra bits to
+compute with. This is ensured by using a slower, more accurate range
+reduction. As a compensation, in this case when $k \mod 128=0$, there
+is no table to read and no reconstruction to perform: a simple
+polynomial approximation to the function suffices.
+
+
+
+\subsection{Details of the used scheme}
+
+We have 4 possible range reductions, depending on the magnitude of the
+input number (and the previous considerations):
+
+\begin{itemize}
+\item Cody and Waite with 2 constants (the fastest),
+\item Cody and Waite with 3 constants (almost as fast),
+\item Cody and Waite with 3 constants in double-double and $k$ a
+  64-bit int, and 
+\item Payne and Hanek, implemented in SCS (the slowest).
+\end{itemize}
+Each of these range reductions except Payne and Hanek is valid for $x$
+smaller than some bound. The computation of these bounds is detailed
+below.
+
+Section \ref{trigo:structargred} details the organization of this
+multi-level range reduction, and is followed by a detailed proof of
+each level.
+
+
+
+\subsection{Structure of the range reduction
+  \label{trigo:structargred}} The complete code is detailed below. To
+provide a complete picture to the reader it actually also includes the
+reconstruction.
+
+\begin{lstlisting}[caption={Multilevel range reduction \label{lst:trig:argred}},firstnumber=1]
+struct rrinfo_s {double rh; double rl; double x; int absxhi; int function;} ;
+typedef struct rrinfo_s rrinfo;
+#define changesign function /* saves one int in the rrinfo structure */
+
+static void ComputeTrigWithArgred(rrinfo *rri){ 
+  double sah,sal,cah,cal, yh, yl, yh2, ts,tc, kd; 
+  double kch_h,kch_l, kcm_h,kcm_l, th, tl,sh,sl,ch,cl;
+  int k, quadrant, index;
+  long long int kl;
+
+  if  (rri->absxhi < XMAX_CODY_WAITE_3) {
+    /* Compute k, deduce the table index and the quadrant */
+    DOUBLE2INT(k, rri->x * INV_PIO256);
+    kd = (double) k;
+    quadrant = (k>>7)&3;      
+    index=(k&127)<<2;
+    if((index == 0)) { 
+      /* Here a large cancellation on yh+yl would be a problem, so use double-double RR */
+      /* all this is exact */
+      Mul12(&kch_h, &kch_l,   kd, RR_DD_MCH);
+      Mul12(&kcm_h, &kcm_l,   kd, RR_DD_MCM);
+      Add12 (th,tl,  kch_l, kcm_h) ;
+      /* only rounding error in the last multiplication and addition */ 
+      Add22 (&yh, &yl,    (rri->x + kch_h) , (kcm_l - kd*RR_DD_CL),   th, tl) ;
+      goto computeZero;
+    } 
+    else {      
+      /* index <> 0, don't worry about cancellations on yh+yl */
+      if (rri->absxhi < XMAX_CODY_WAITE_2) {
+	/* CW 2: all this is exact but the rightmost multiplication */
+	Add12 (yh,yl,  (rri->x - kd*RR_CW2_CH),  (kd*RR_CW2_MCL) ) ; 
+      }
+      else { 
+	/* CW 3: all this is exact but the rightmost multiplication */
+	Add12Cond(yh,yl,  (rri->x - kd*RR_CW3_CH) -  kd*RR_CW3_CM,   kd*RR_CW3_MCL);
+      }
+    }
+    goto computeNotZero;
+  }
+
+  else if ( rri->absxhi < XMAX_DDRR ) {
+    /* x sufficiently small for a Cody and Waite in double-double */
+    DOUBLE2LONGINT(kl, rri->x*INV_PIO256);
+    kd=(double)kl;
+    quadrant = (kl>>7)&3;
+    index=(kl&127)<<2;
+    if(index == 0) { 
+      /* Here again a large cancellation on yh+yl would be a problem, 
+	 so we do the accurate range reduction */
+      RangeReductionSCS();   /*recomputes k, index, quadrant, and yh and yl*/
+      /* Now it may happen that the new k differs by 1 of kl, so check that */
+      if(index==0)   /* no surprise */
+	goto computeZero; 
+      else 
+	goto computeNotZero;
+    }
+    else {   /*  index<>0 : double-double range reduction*/
+      /* all this is exact */
+      Mul12(&kch_h, &kch_l,   kd, RR_DD_MCH);
+      Mul12(&kcm_h, &kcm_l,   kd, RR_DD_MCM);
+      Add12 (th,tl,  kch_l, kcm_h) ;
+      /* only rounding error in the last multiplication and addition */ 
+      Add22 (&yh, &yl,    (rri->x + kch_h) , (kcm_l - kd*RR_DD_CL),   th, tl) ;
+      goto computeNotZero;
+    }
+  } /* closes if ( absxhi < XMAX_DDRR ) */ 
+
+  else {
+    /* Worst case : x very large, sin(x) probably meaningless, we return
+       correct rounding but do't mind taking time for it */
+    RangeReductionSCS(); 
+    quadrant = (k>>7)&3;                                       
+    if(index == 0)
+      goto computeZero;
+    else 
+      goto computeNotZero;
+  }
+
+
+ computeZero:
+  switch(rri->function) {
+ 
+  case SIN: 
+    if (quadrant&1)
+      DoCosZero(&rri->rh, &rri->rl);
+    else 
+      DoSinZero(&rri->rh, &rri->rl);
+    rri->changesign=(quadrant==2)||(quadrant==3);
+    return;
+    
+  case COS: 
+    if (quadrant&1)
+      DoSinZero(&rri->rh, &rri->rl);
+    else 
+      DoCosZero(&rri->rh, &rri->rl);
+    rri->changesign= (quadrant==1)||(quadrant==2);
+    return;
+
+  case TAN: 
+    rri->changesign = quadrant&1;
+    if (quadrant&1) {
+      DoSinZero(&ch, &cl);
+      DoCosZero(&sh, &sl);
+    } else {
+      DoSinZero(&sh, &sl);
+      DoCosZero(&ch, &cl);
+    }
+    Div22(&rri->rh, &rri->rl, sh, sl, ch, cl);
+    return;
+  }
+  
+ computeNotZero:
+  if(index<=(64<<2)) {                                    
+    sah=sincosTable[index+0].d; /* sin(a), high part */   
+    sal=sincosTable[index+1].d; /* sin(a), low part  */   
+    cah=sincosTable[index+2].d; /* cos(a), high part */   
+    cal=sincosTable[index+3].d; /* cos(a), low part  */   
+  }else { /* cah <= sah */                                
+    index=(128<<2) - index;                               
+    cah=sincosTable[index+0].d; /* cos(a), high part */   
+    cal=sincosTable[index+1].d; /* cos(a), low part  */   
+    sah=sincosTable[index+2].d; /* sin(a), high part */   
+    sal=sincosTable[index+3].d; /* sin(a), low part  */   
+  }                                                       
+  yh2 = yh*yh ;
+  ts = yh2 * (s3.d + yh2*(s5.d + yh2*s7.d));	
+  tc = yh2 * (c2.d + yh2*(c4.d + yh2*c6.d ));	
+  switch(rri->function) {
+
+  case SIN: 
+    if (quadrant&1)   
+      DoCosNotZero(&rri->rh, &rri->rl);
+    else 
+      DoSinNotZero(&rri->rh, &rri->rl);
+    rri->changesign=(quadrant==2)||(quadrant==3);
+    return;
+
+  case COS: 
+    if (quadrant&1)   
+      DoSinNotZero(&rri->rh, &rri->rl);
+    else 
+      DoCosNotZero(&rri->rh, &rri->rl);
+    rri->changesign=(quadrant==1)||(quadrant==2);
+    return;
+
+  case TAN: 
+    rri->changesign = quadrant&1;
+    if (quadrant&1) {
+      DoSinNotZero(&ch, &cl);
+      DoCosNotZero(&sh, &sl);
+    } else {
+      DoSinNotZero(&sh, &sl);
+      DoCosNotZero(&ch, &cl);
+    }
+    Div22(&rri->rh, &rri->rl, sh, sl, ch, cl);
+    return;
+  }
+}
+\end{lstlisting}
+ 
+
+Here are some comments on the structure of this code (the details on
+actual range reduction come in the following sections).
+
+\begin{itemize}
+\item The DOUBLETOINT macro at line 13 is called only if
+  $x<\verb!XMAX_CODY_WAITE_3!$ (line 11). This constant is defined  (see
+  Listing~\ref{trigo:lst:cw3maple} below) such
+  that the conditions for this macro to work (see
+  Section~\ref{sec:double2int}) are fullfilled. 
+
+\item Similarly for the DOUBLETOLONGINT macro (see
+  Section~\ref{sec:double2longint}) at line 43, which is called for
+  inputs smaller than \verb!XMAX_DDR! defined in Listing
+  \ref{trigo:lst:cwddrmaple} below.
+
+\item There is one subtlety at lines 51 and following. There we take
+  the decision of computing a more accurate range reduction depending
+  on the value of $\mathit{index}=k\mod 256$. However, in the case
+  when $x\times\frac{256}{\pi}$ is very close to the middle between
+  two integers, it may happen (very rarely) that the value of $k\mod
+  256$ computed by this second range reduction differs from the first
+  by $\pm 1$. In such cases, both values will provide different but
+  equally valid reduced arguments, but we have to ensure that $k$ and
+  the reduced value match, hence the test line 52.
+\end{itemize}
+
+
+
+\subsection{Cody and Waite range reduction with two constants}
+
+Here we split $C$ into two floating-point constants $C_h$ and $C_l$
+such that $C_h$ holds 21 bits of the mantissa of $C$ (the rest being
+zeroes), and $C_l=\round(C-C_h)$.  The following gives the
+Maple code that computes these constants, and then computes the
+bound on which this range reduction is valid.
+
+\begin{lstlisting}[caption={Maple script for computing constants for Cody and Waite 2},
+  firstnumber=1,  language={sh}, numbers=none]% of course it's maple
+%Skip a line here, I don't know why, otherwise latex eats the first line
+
+bitsCh_0:=32:  # ensures at least 53+11 bits
+
+# 1/2 <= C/2^(expC+1) <1
+Ch:= round(evalf(  C * 2^(bitsCh_0-expC-1))) / (2^(bitsCh_0-expC-1)):
+# recompute bitsCh in case we are lucky (and we are for bitsCh_0=32)
+bitsCh:=1+log2(op(2,ieeedouble(Ch)[3])) :  # this means the log of the denominator
+
+Cl:=nearest(C - Ch):
+# Cody and Waite range reduction will work for |k|<kmax_cw2
+kmax_cw2:=2^(53-bitsCh):
+
+# The constants to move to the .h file
+RR_CW2_CH := Ch:
+RR_CW2_MCL := -Cl:
+XMAX_CODY_WAITE_2 := nearest(kmax_cw2*C):
+\end{lstlisting}
+
+The C code that performs the reduction in this case is the following:
+
+\begin{lstlisting}[caption={Cody and Waite range reduction with two
+    constants},firstnumber=31]
+	Add12 (yh,yl,  (x - kd*RR_CW2_CH),  (kd*RR_CW2_MCL) ) ;
+\end{lstlisting}
+
+Here only the rightmost multiplication involving a rounding: 
+\begin{itemize}
+\item The multiplication $\mathrm{kd}\otimes \mathrm{RR\_CW2\_CH}$ is
+  exact because $kd$ is a small integer and $\mathrm{RR\_CW2\_CH}$
+  has enough zeroes in the mantissa.
+\item The subtraction is exact thanks to Sterbenz Lemma.
+\item The \texttt{Add12} procedure is exact.
+\end{itemize}
+
+The following Maple code thus computes the maximum absolute error on
+the reduced argument (with respect to the ideal reduced argument) in
+this case.
+\begin{lstlisting}[caption={Maple script for computing absolute error for Cody and Waite 2},
+  firstnumber=1,  language={sh}, numbers=none]% of course it's maple
+
+delta_repr_C_cw2   := abs(C-Ch-Cl);
+delta_round_cw2    := kmax_cw2 * 1/2 * ulp(Cl) ;
+delta_cody_waite_2 := kmax_cw2 * delta_repr_C_cw2 + delta_round_cw2;
+# This is the delta on y, the reduced argument
+\end{lstlisting}
+
+
+\subsection{Cody and Waite range reduction with three constants}
+The C code that performs the reduction in this case is the following:
+
+\begin{lstlisting}[caption={Cody and Waite range reduction with three 
+    constants},firstnumber=35]
+	Add12Cond(yh,yl,  (x - kd*RR_CW3_CH) -  kd*RR_CW3_CM,   kd*RR_CW3_MCL);
+\end{lstlisting}
+
+Here again all the operations are exact except the rightmost multiplication. 
+
+The following Maple code computes the constants, the bound on $x$ for
+this reduction to work, and the resulting absolute error of the reduced
+argument with respect to the ideal reduced argument.
+
+\begin{lstlisting}[caption={Maple script for computing constants for
+    Cody and Waite 3\label{trigo:lst:cw3maple} },
+  language={sh}, numbers=none]% of course it's maple
+%Skip a line here, I don't know why, otherwise latex eats the first line
+
+bitsCh_0:=21:
+Ch:= round(evalf(  C * 2^(bitsCh_0-expC-1))) / (2^(bitsCh_0-expC-1)):
+# recompute bitsCh in case we are lucky
+bitsCh:=1+log2(op(2,ieeedouble(Ch)[3])) :  # this means the log of the denominator
+
+r := C-Ch:
+Cmed := round(evalf(  r * 2^(2*bitsCh-expC-1))) / (2^(2*bitsCh-expC-1)):
+bitsCmed:=1+log2(op(2,ieeedouble(Cmed)[3])) :
+
+Cl:=nearest(C - Ch - Cmed):
+
+kmax_cw3 := 2^31:# Otherwise we have integer overflow
+
+# The constants to move to the .h file
+RR_CW3_CH  := Ch;
+RR_CW3_CM  := Cmed:
+RR_CW3_MCL := -Cl:
+XMAX_CODY_WAITE_3 := nearest(kmax_cw3*C):
+
+# The error in this case (we need absolute error)
+delta_repr_C_cw3   := abs(C - Ch - Cmed - Cl):
+delta_round_cw3    := kmax_cw3 * 1/2 * ulp(Cl) :
+delta_cody_waite_3 := kmax_cw3 * delta_repr_C_cw3 + delta_round_cw3:
+# This is the delta on y, the reduced argument
+\end{lstlisting}
+
+\subsection{Cody and Waite range reduction in double-double\label{trigo:CWDD}}
+The C code that performs the reduction in this case is the following:
+
+\begin{lstlisting}[caption={Cody and Waite range reduction in
+    double-double},firstnumber=20]
+    /* all this is exact */
+    Mul12(&kch_h, &kch_l,   kd, RR_DD_MCH);
+    Mul12(&kcm_h, &kcm_l,   kd, RR_DD_MCM);
+    Add12 (th,tl,  kch_l, kcm_h) ;
+    /* only rounding error in the last multiplication and addition */ 
+    Add22 (&yh, &yl,    (x + kch_h) , (kcm_l - kd*RR_DD_CL),   th, tl) ;
+\end{lstlisting}
+
+
+The error and the bound are computed by the following Maple code.
+
+\begin{lstlisting}[caption={Maple script for computing constants for Cody and Waite
+    double-double\label{trigo:lst:cwddrmaple}},
+  language={sh}, numbers=none]% of course it's maple
+%Skip a line here, I don't know why, otherwise latex eats the first line
+
+# This max int value can be produced by DOUBLE2LONGINT
+kmax:=2^46-1:
+XMAX_DDRR:=nearest(kmax*C);
+
+#in this case we have C stored as 3 doubles
+Ch   := nearest(C):
+Cmed := nearest(C-Ch):
+Cl   := nearest(C-Ch-Cmed):
+
+RR_DD_MCH := -Ch:
+RR_DD_MCM := -Cmed:
+RR_DD_CL  := Cl:
+
+delta_repr_C := abs(C - Ch - Cmed - Cl):
+
+# and we have only exact Add12 and Mul12  operations. The only place
+# with possible rounding errors is:
+#       Add22 (pyh, pyl,    (x + kch_h) , (kcm_l - kd*RR_DD_CL),   th, tl) ;
+# where (x + kch_h) is exact (Sterbenz) with up to kmax bits of cancellation
+# and the error is simply the error in  (kcm_l - kd*RR_DD_CL)
+# At the very worst :
+delta_round :=
+              kmax * 1/2 * ulp(Cl) # for   kd*RR_DD_CL
+              + kmax*ulp(Cl)         # for the subtraction
+              + 2^(-100) * Pi/512 :    # for the Add22
+delta_RR_DD :=  kmax * delta_repr_C + delta_round:
+\end{lstlisting}
+
+The value of kmax defined here will be explained below in Section
+\ref{sec:trigo:maxvalred}.
+
+\subsection{Payne and Hanek range reduction }
+
+This range reduction is very classical (see K.C. Ng's
+paper\cite{Ng1992} or Muller's book \cite{Muller97}) and the code both
+too long and too simple to appear here. The Payne and Hanek reduction
+uses SCS computations which ensure relative accuracy of $2^{-200}$.
+The result is then converted to a double-double.  Even counting a
+worst-case cancellation of less than 70 bits, the final absolute error
+is much smaller than for the other reductions.
+
+\begin{lstlisting}[caption={Payne and Hanek error},
+  language={sh}, numbers=none]% of course it's maple
+%Skip a line here, I don't know why, otherwise latex eats the first line
+
+delta_PayneHanek := 2^(-100):
+\end{lstlisting}
+
+
+\subsection{Maximum error of range reduction }
+
+We have two cases here.
+
+\paragraph*{Case when $k\mod 256\ne 0$}
+
+In this case we will need the absolute error of range reduction to compute the
+total relative error of DoSinNotZero and
+DoCosNotZero: These procedures add tabulated values to the
+reduced argument. This error bound is computed by the following Maple code.
+
+\begin{lstlisting}[caption={Maple script computing the absolute error bound of range reduction}, firstnumber=1,
+  language={sh}, numbers=none]% of course it's maple
+%Skip a line here, I don't know why, otherwise latex eats the first line
+
+delta_ArgRed := max(delta_cody_waite_2, delta_cody_waite_3,
+                    delta_RR_DD, delta_PayneHanek):
+\end{lstlisting}
+
+We find that $\maxdelta_{\mathrm{argred}}\approx 2^{-71}$
+
+
+\paragraph*{Case when $k\mod 256= 0$}
+
+Here we directly need the relative error $\epsilon_{\mathrm{argred}}$
+on range reduction, which will be used below in Section
+\ref{sec:dosinzero}. Looking back at Listing~\ref{trigo:structargred}, we
+see that in this case we compute range reduction either in
+double-double, or in SCS. The following Maple code computes
+$\maxeps_{\mathrm{argred}}$.
+
+\begin{lstlisting}[caption={Maple script computing the relative error bound of range reduction}, firstnumber=1,
+  language={sh}, numbers=none]% of course it's maple
+%Skip a line here, I don't know why, otherwise latex eats the first line
+
+# First, what is the worst case for cancellation ?
+
+emax := ieeedouble(XMAX_DDRR)[2] +1 :
+# above emax, we will use Payne and Hanek so we do not worry
+
+(wcn, wce, wceps) := WorstCaseForAdditiveRangeReduction(2,53,-8, emax, C):
+wcx := wcn * 2^wce:
+wck := round(wcx/C):
+wcy := wcx - wck*C:
+
+log2(wcy);   # y > 2^(-67);
+
+# In these cases we use the double-double range reduction, for |k|<kmax_cw3
+# and the relative precision in the worst case is for wcy
+
+delta_round := kmax_cw3 * 1/2 * ulp(Cl)      # for   kd*RR_DD_CL
+              + kmax_cw3 * ulp(Cl) :         # for the subtraction
+
+delta_RR_DD :=  kmax_cw3 * delta_repr_C + delta_round:
+
+eps_ArgRed := (1+delta_RR_DD/wcy)*(1+2^(-100)) -1:
+\end{lstlisting}
+
+This script first computes the smallest possible reduced value thanks
+to the Kahan/Douglas algorithm. It then computes the absolute
+worst-case error of double-double reduction, divides it by the
+smallest possible value to get a relative error, and adds the relative
+error of the final Add22.
+
+ We find that
+$\maxeps_{\mathrm{argred}} \approx 2^{-69.6}$.
+
+
+\subsection{Maximum value of the reduced argument
+\label{sec:trigo:maxvalred}}
+
+For simplicity, we want to define a common upper bound $y_{\max}$ on
+$|\hat{y}|$, $|\mathtt{yh}+\mathtt{yl}|$ and $|\mathtt{yh}|$. This
+bound takes into account $\epsilon_{argred}$, an $\epsilon_{53}$ 
+for the case when it is a bound on $y_h$, and also an error due to the
+fact that we had a rounding error when computing
+$x\otimes\verb!INV_PIO256!$, so the reduced value may slightly exceed
+$\pi/512$. This rounding error is at most one half-ulp of $x\times
+256/\pi$, but cancellation may then scale it up. 
+
+More precisely, the \texttt{DOUBLE2INT} macro always returns the
+nearest integer of its argument, so we have
+$\intpart{x}=x+\epsilon_{-1}$. However its argument is
+$$x\otimes\verb!INV_PIO256! = x \times
+\verb!INV_PIO256!(1+\epsilon_{-53}) = x\times
+256/\pi(1+\epsilon_{-53})(1+\epsilon')  = x\times
+256/\pi(1+\epsilon_k)$$
+where $\epsilon'=\verb!INV_PIO256!\times256/\pi-1$ can be
+computed exactly.
+
+Therefore we have 
+
+$$k\ =\ \intpart{x\times \frac{256}{\pi}(1+\epsilon_k)}
+\ =\ x\times \frac{256}{\pi}(1+\epsilon_k) - f \quad\mbox{where} \quad |f|\le 1/2
+$$
+
+And, assuming this computation was done exactly,
+
+$$\hat{y}=x-k\frac{\pi}{256} = f\frac{\pi}{256} - x\epsilon_k$$
+
+In absolute value, $$\left|\hat{y}\right| \le \frac{\pi}{512} +
+|x|\maxeps_k$$
+where $\maxeps_k<\maxeps_{-52}$.
+
+Again to compute this value precisely we have to consider the various
+paths of the algorithm. The SCS range reduction is not concerned,
+since the Payne and Hanek algorithm used there does not compute $k$ in
+this manner. For the other paths, the worst case is of course for the
+larger $x$, in the double-double argument reduction. There we define
+$x_{\max} = k_{\max}*C$, hence  $\left|\hat{y}\right|
+\le \frac{\pi}{512} + 2^{k_{\max}}\frac{\pi}{256}\maxeps_k$ where
+$\maxeps_k<2^{-52}$.
+
+
+This is the reason for the bound on $x$ defined in \ref{trigo:CWDD}:
+although this range reduction could work for values up to
+$k_{\max}=2^{52}-1$, larger values would increase the maximum
+value of the reduced argument, decreasing the accuracy of the
+polynomial evaluation. With a smaller value of $k_{\max}$, we still have
+$\left|\hat{y}\right|$ close to $\pi/512$. 
+
+Finally we compute the common maximum value of $y_h$, $y_h+y_l$ and
+$\widehat{y}$ by taking into account the rounding errors and the
+less-than-ulp difference between $y_h$, $y_h+y_l$ and $\widehat{y}$.
+ 
+
+
+
+\section{Actual computation of sine and cosine
+  \label{trigo:auxiliary}}
+
+A sine or a cosine will actually be computed by one of DoSinZero,
+DoSinNotZero, DoCosZero and DoCosNotZero (with a possible change of sine).
+Section~\ref{sec:dosinnotzero} will show how we compute the maximum
+total error of DoSinNotZero and DoCosNotZero. As DoCosZero is a
+simpler, more accurate computation than DoCosNotZero, its worst-case
+error will be smaller than that of DoCosNotZero, and we do not need to
+compute it. We currently have only one rounding constant for the Zero and
+NotZero cases, because having separate constants would degrade performance.
+
+However, DoSinZero is slightly different in that it doesn't add a
+constant value at the end of the computation, as do the three others.
+Its error computation has to consider more relative errors than
+absolute errors. We therefore need to compute its error separately,
+which is done in the following section.
+
+This section \ref{sec:dosinzero} should also help understanding the
+method used to write the Gappa input file given in
+Section~\ref{sec:dosinnotzero}.
+
+
+
+\subsection{DoSinZero \label{sec:dosinzero} }
+Upon entering  DoSinZero, we have in
+$y_h+y_l$ an approximation to the ideal reduced value
+$\hat{y}=x-k\frac{\pi}{256}$ with a relative accuracy $\epsilon_{\mathrm{argred}}$:
+
+\begin{equation}
+  y_h+y_l = (x-k\frac{\pi}{256})(1+\epsilon_{\mathrm{argred}}) 
+  = \hat{y}(1+\epsilon_{\mathrm{argred}})
+  \label{eq:sinargrederror1}
+\end{equation}
+with, depending on the quadrant, $\sin(\hat{y}) = \pm\sin(x)$ or
+$\sin(\hat{y}) = \pm\cos(x)$ and similarly for $\cos(\hat{y})$. This
+just means that $\hat{y}$ is the ideal, errorless reduced value.
+
+
+In the following we will
+assume we are in the case $\sin(\hat{y}) = \sin(x)$, (the proof is
+identical in the other cases), therefore the relative error that we need
+to compute is
+\begin{equation}
+  \epsilon_{\mathrm{sinkzero}} = \frac{(\mathtt{*psh} + \mathtt{*psl})}{\sin(\mathtt{x})} -1 = \frac{(\mathtt{*psh} + \mathtt{*psl})}{\sin(\hat{y})} -1
+\end{equation}
+
+
+ \begin{lstlisting}[caption={DoSinZero},firstnumber=1]
+  yh2 = yh*yh;					   \
+  ts = yh2 * (s3.d + yh2*(s5.d + yh2*s7.d));	   \
+  Add12(*psh,*psl,   yh, yl+ts*yh);	           \
+\end{lstlisting}
+
+One may remark that we almost have the same code as we have for
+computing the sine of a small argument (without range reduction) in
+Section~\ref{sec:trigo:fastsine}. The difference is that we have as
+input a double-double $\mathtt{yh}+\mathtt{yl}$, which is itself an
+inexact term.
+
+At Line 4, the error of neglecting $y_l$ and the rounding error in the
+multiplication each amount to half an ulp:
+  $\mathtt{yh2}=\mathtt{yh}^2(1+\epsilon_{-53})$, 
+ with $\mathtt{yh} = (\mathtt{yh}+\mathtt{yl})(1+\epsilon_{-53}) = \hat{y}(1+\epsilon_{\mathrm{argred}})(1+\epsilon_{-53})$
+
+Therefore
+\begin{equation}
+  \mathtt{yh2}=\hat{y}^2(1+\epsilon_{\mathtt{yh2}})
+\end{equation}
+
+with
+\begin{equation}
+  \maxeps_{\mathtt{yh2}} = (1+\maxeps_{\mathrm{argred}})^2(1+\maxeps_{-53})^3 - 1
+\end{equation}
+
+Line 5 is a standard Horner evaluation. Its approximation error is defined by: 
+$$
+P_{\mathtt{ts}}(\hat{y}) = \frac{\sin(\hat{y})-\hat{y}}{\hat{y}}(1+\epsilon_{\mathrm{approxts}})
+$$
+
+This error is computed in Maple as in \ref{sec:trigo:fastsine}, only the interval changes:
+$$\maxeps_{\mathrm{approxts}} = \left\Vert \frac{xP_{\mathtt{ts}}(x)}{\sin(x)-x} -1 \right\Vert_{\infty}$$
+
+We also compute $\maxeps_{\mathrm{hornerts}}$, the bound on the relative error due
+to rounding in the Horner evaluation thanks to the
+\texttt{compute\_horner\_rounding\_error} procedure. This time, this procedure 
+takes into account the relative error carried by \texttt{yh2}, which is
+$\maxeps_{\mathtt{yh2}}$ computed above.
+We thus get the total relative error on \texttt{ts}:
+
+\begin{equation}
+  \mathtt{ts} = P_{\mathtt{ts}}(\hat{y})(1+\epsilon_{\mathrm{hornerts}}) = \frac{\sin(\hat{y})-\hat{y}}{\hat{y}}(1+\epsilon_{\mathrm{approxts}})(1+\epsilon_{\mathrm{hornerts}})
+  \label{eq:sink0ts}
+\end{equation}
+
+The final \texttt{Add12} is exact. Therefore the overall relative error is:
+
+\begin{eqnarray*}
+  \epsilon_{\mathrm{sinkzero}} 
+  &=& \frac{((\mathtt{yh}\otimes \mathtt{ts}) \oplus \mathtt{yl}) + \mathtt{yh}}{\sin(\hat{y})} -1 \\
+  &=& \frac{(\mathtt{yh}\otimes\mathtt{ts} + \mathtt{yl})(1+\epsilon_{-53}) + \mathtt{yh}}{\sin(\hat{y})} -1\\
+  &=& \frac{\mathtt{yh}\otimes\mathtt{ts} + \mathtt{yl} + \mathtt{yh}    \ +\  (\mathtt{yh}\otimes\mathtt{ts} + \mathtt{yl}).\epsilon_{-53}}{\sin(\hat{y})} -1\\
+\end{eqnarray*}
+
+Let us define for now 
+\begin{equation}
+  \delta_{\mathrm{addsin}} = (\mathtt{yh}\otimes\mathtt{ts} + \mathtt{yl}).\epsilon_{-53} 
+\label{eq:addsin}
+\end{equation}
+Then we have
+\begin{eqnarray*}
+  \epsilon_{\mathrm{sinkzero}} 
+  &=& \frac{(\mathtt{yh} + \mathtt{yl})\mathtt{ts}(1+\epsilon_{-53})^2 + \mathtt{yl} + \mathtt{yh}    \ +\  \delta_{\mathrm{addsin}} }{\sin(\hat{y})} -1\\
+\end{eqnarray*}
+
+Using (\ref{eq:sinargrederror1}) and (\ref{eq:sink0ts}) we get:
+\begin{eqnarray*}
+  \epsilon_{\mathrm{sinkzero}} 
+  &=& \frac{\hat{y}(1+\epsilon_{\mathrm{argred}})\times\frac{\sin(\hat{y})-\hat{y}}{\hat{y}}(1+\epsilon_{\mathrm{approxts}})(1+\epsilon_{\mathrm{hornerts}})(1+\epsilon_{-53})^2 + \mathtt{yl} + \mathtt{yh}    \ +\  \delta_{\mathrm{addsin}} }{\sin(\hat{y})} -1\\
+\end{eqnarray*}
+
+To lighten notations, let us define 
+\begin{equation}
+ \epsilon_{\mathrm{sin1}} = (1+\epsilon_{\mathrm{approxts}})(1+\epsilon_{\mathrm{hornerts}})(1+\epsilon_{-53})^2 \ -\ 1
+  \label{eq:epssin1}
+\end{equation}
+
+We get
+\begin{eqnarray*}
+  \epsilon_{\mathrm{sinkzero}} 
+  &=& \frac{(\sin(\hat{y})-\hat{y})(1+\epsilon_{\mathrm{sin1}}) + \hat{y}(1+\epsilon_{\mathrm{argred}})    \ +\   \delta_{\mathrm{addsin}} - \sin(\hat{y})}{\sin(\hat{y})}\\
+  &=& \frac{(\sin(\hat{y})-\hat{y}).\epsilon_{\mathrm{sin1}} + \hat{y}.\epsilon_{\mathrm{argred}}    \ +\ \delta_{\mathrm{addsin}}}{\sin(\hat{y})}\\
+\label{eq:sinkzero}
+\end{eqnarray*}
+
+Using the following bound:
+\begin{equation}
+  |\delta_{\mathrm{addsin}}| = |(\mathtt{yh}\otimes\mathtt{ts} + \mathtt{yl}).\epsilon_{-53}| \quad < \quad 2^{-53}\times |y|^3/3 
+\end{equation}
+ we may compute the value of $\maxeps_{\mathrm{sinkzero}}$ as an
+infinite norm under Maple. We get an error smaller than $2^{-67}.$ 
+
+
+
+\subsection{DoSinNotZero and DoCosNotZero\label{sec:dosinnotzero} }
+
+The proof would here be much longer than the previous one, in the same
+spirit. It would therefore be much more error prone. We probably would
+be even less confident in such a proof than if it was generated
+automatically using experimental software. Therefore, let us do just
+that: We will use \texttt{Gappa} (see
+\url{http://lipforge.ens-lyon.fr/projects/gappa/}), another
+development of the Arenaire project to automate the proof of numerical
+properties, including an interface to the automatic theorem prover
+Coq. Gappa will assist us in computing bounds (in the form of
+intervals) for all the errors entailed by our code.
+
+
+Here we need to compute the error bound for the following straight line of
+code.
+
+\begin{lstlisting}[caption={DoSinNotZero},firstnumber=1]
+  yh2 = yh*yh ;
+  ts = yh2 * (s3.d + yh2*(s5.d + yh2*s7.d));	
+  tc = yh2 * (c2.d + yh2*(c4.d + yh2*c6.d ));	
+  Mul12(&cahyh_h,&cahyh_l, cah, yh);				       
+  Add12(thi, tlo, sah,cahyh_h);					       
+  tlo = tc*sah+(ts*cahyh_h+(sal+(tlo+(cahyh_l+(cal*yh + cah*yl))))) ;  
+  Add12(*psh,*psl,  thi, tlo);	   			               
+\end{lstlisting}
+
+The additional information we have is 
+
+\begin{itemize}
+
+\item The range reduction total absolute error, such that 
+  \begin{equation}
+    y_h+y_l = (x-k\frac{\pi}{256})(1+\epsilon_{\mathrm{argred}}) 
+    = \hat{y}(1+\epsilon_{\mathrm{argred}})
+  \end{equation}
+
+\item The rounding error of the double-double tabulated values
+  $sa_h+sa_l$ and  $ca_h+ca_l$  ($\maxeps_{-104}$) and their ranges
+
+\item The approximation error of the polynomials used, computed in
+  Maple
+\end{itemize}
+
+We use Gappa to compute the evaluation error, then the total error.
+Currently, we actually have to lauch Gappa 63 times, one time for each
+of the possibles values of $a=k\pi/256$ that appear in our tables. The
+reason is that, in the current version of Gappa, we are unable to
+express the identity $sin^2(a) + cos^2(a) = 1$ in a useful manner.
+Without this identity, the only information that we could give to
+Gappa is that both $sin(a)$ and $cos(a)$ belong to $[-1,1]$, which
+leads to an overestimation of the error.
+
+The Maple script that computes the table of $(ca_h,ca_l,sa_h,sa_l)$,
+the polynomial coefficient, and the approximation errors, also outputs
+it in a form suitable for input to Gappa (for technical reasons they
+have to be substituted in the code using the Unix utility
+\texttt{sed}).  
+
+The input to Gappa is as follows:
+
+\lstinputlisting[caption={Gappa input to compute the error of DoSineNotZero},
+  language={sh}, numbers=none]{../../gappa/trigos/SinCosCase3.gappa}
+
+
+
+The max of the bounds computed by Gappa for all the
+values of this table is a little bit smaller than $2^{-66}$.
+Therefore, we take $\maxeps_{SinCosCase3}=2^{-66}$ for the
+trigonometric functions (because the reconstruction simply manipulates
+the signs and is therefore exact).
+
+In the very near future, this bound should be machine-checked by the
+Coq proof assistant.
+
+
+
+\section{Detailed examination of the sine}
+
+The sine begins with casting the high part of the absolute value of
+the input number into a 32-bit integer, to enable faster comparisons.
+However we have to be aware that we lost the lower part of \texttt{x},
+which had a value up to $(2^{31}-1)\ulp(x)$. This is taken care of in
+the procedure that converts a Maple high-precision number into an
+integer to which \texttt{x} will be compared (procedure
+\texttt{outputHighPart} in \texttt{trigo.mpl}).
+
+\begin{lstlisting}[caption={Casting to an int for faster comparisons \label{lst:trigo:takehighpart}},firstnumber=1]
+  db_number x_split;
+  x_split.d=x;
+  absxhi = x_split.i[HI] & 0x7fffffff;
+\end{lstlisting}
+
+
+\subsection{Exceptional cases in RN mode}
+\begin{lstlisting}[caption={Exceptional cases for sine RN},firstnumber=1]
+  /* SPECIAL CASES: x=(Nan, Inf) sin(x)=Nan */
+  if (absxhi>=0x7ff00000) return x-x;    
+   
+  else if (absxhi < XMAX_SIN_CASE2){
+    /* CASE 1 : x small enough sin(x)=x */
+    if (absxhi <XMAX_RETURN_X_FOR_SIN)
+      return x;
+\end{lstlisting}
+
+\subsection{Exceptional cases in RU mode}
+\begin{lstlisting}[caption={Exceptional cases for sine RU},firstnumber=1]
+  /* SPECIAL CASES: x=(Nan, Inf) sin(x)=Nan */
+  if (absxhi>=0x7ff00000) return x-x;    
+  
+  if (absxhi < XMAX_SIN_CASE2){
+
+    /* CASE 1 : x small enough, return x suitably rounded */
+    if (absxhi <XMAX_RETURN_X_FOR_SIN) {
+      if(x>=0.)
+	return x;
+      else {
+	x_split.l --;
+	return x_split.d;
+      }
+    }
+\end{lstlisting}
+\subsection{Exceptional cases in RD mode}
+\begin{lstlisting}[caption={Exceptional cases for sine RD},firstnumber=1]
+  /* SPECIAL CASES: x=(Nan, Inf) sin(x)=Nan */
+  if (absxhi>=0x7ff00000) return x-x;    
+  
+  if (absxhi < XMAX_SIN_CASE2){
+
+    /* CASE 1 : x small enough, return x suitably rounded */
+    if (absxhi <XMAX_RETURN_X_FOR_SIN) {
+      if(x<=0.)
+	return x;
+      else {
+	x_split.l --;
+	return x_split.d;
+      }
+    }
+\end{lstlisting}
+\subsection{Exceptional cases in RZ mode}
+\begin{lstlisting}[caption={Exceptional cases for sine RZ},firstnumber=1]
+  /* SPECIAL CASES: x=(Nan, Inf) sin(x)=Nan */
+  if (absxhi>=0x7ff00000) return x-x;    
+  
+  if (absxhi < XMAX_SIN_CASE2){
+
+    /* CASE 1 : x small enough, return x suitably rounded */
+    if (absxhi <XMAX_RETURN_X_FOR_SIN) {
+      x_split.l --;
+      return x_split.d;
+    }
+\end{lstlisting}
+
+
+\subsection{Fast approximation of sine for small arguments \label{sec:trigo:fastsine}}
+
+\begin{lstlisting}[caption={Sine, case 2},firstnumber=1]
+    xx = x*x;
+    ts = xx * (s3.d + xx*(s5.d + xx*s7.d ));
+    Add12(sh,sl, x, x*ts);
+\end{lstlisting}
+
+Here we have had no range reduction, therefore \texttt{x} is exact.
+We need to compute the relative error of $\mathtt{sh}+\mathtt{sl}$
+with respect to $\sin(\mathtt{x})$. As $\mathtt{sh}+\mathtt{sl}$ is
+the result of an (exact) \texttt{Add12}, the error is:
+
+\begin{equation}
+  \epsilon_{\mathrm{sinCase2}} = \frac{\mathtt{x}\otimes \mathtt{ts} + \mathtt{x}}{\sin(\mathtt{x})} -1 = \frac{\mathtt{x}\times\mathtt{ts}(1+\epsilon_{-53}) + \mathtt{x}}{\sin(\mathtt{x})} -1
+\label{eq:SinCase2Total}
+\end{equation}
+The polynomial used to compute \texttt{ts}
+approximates $\frac{\sin(x)-x}{x}$: 
+$$
+P_{\mathtt{ts}}(x) = \mathtt{s3}.x^2 + \mathtt{s5}.x^4 + \mathtt{s7}.x^6
+= \frac{\sin(x)-x}{x}(1+\epsilon_{\mathrm{approxts}})
+$$
+
+We compute a bound on this error in Maple as 
+$$\maxeps_{\mathrm{approxts}} = \left\Vert \frac{xP_{\mathtt{ts}}(x)}{\sin(x)-x} -1 \right\Vert_{\infty}[-x_{\mathrm{max}}...x_{\mathrm{max}}]$$
+
+We also compute $\epsilon_{\mathrm{hornerts}}$, the relative error due
+to rounding in the Horner evaluation thanks to the
+\texttt{compute\_horner\_rounding\_error} procedure. For this we need
+the relative error carried by \texttt{xx}, which is only due to the
+rounding error in the multiplication since \texttt{x} is exact:
+$$\mathtt{xx}=\mathtt{x}^2(1+\epsilon_{-53})$$
+
+We therefore have:
+
+$$\mathtt{ts} = P_{\mathtt{ts}}(\mathtt{x})(1+\epsilon_{\mathrm{hornerts}}) = \frac{\sin(\mathtt{x})-\mathtt{x}}{\mathtt{x}}(1+\epsilon_{\mathrm{approxts}})(1+\epsilon_{\mathrm{hornerts}})$$
+
+Reporting this in (\ref{eq:SinCase2Total}), we get 
+\begin{equation*}
+  \epsilon_{\mathrm{sinCase2}} = \frac{(\sin(\mathtt{x})-\mathtt{x})(1+\epsilon_{\mathrm{approxts}})(1+\epsilon_{\mathrm{hornerts}})(1+\epsilon_{-53}) + \mathtt{x}}{\sin(\mathtt{x})} -1
+\end{equation*}
+or,
+\begin{equation*}
+  \epsilon_{\mathrm{sinCase2}} =  \frac{\sin(\mathtt{x})-\mathtt{x}}{\sin(\mathtt{x})}\left((1+\epsilon_{\mathrm{approxts}})(1+\epsilon_{\mathrm{hornerts}})(1+\epsilon_{-53})\ -\ 1\right)
+\end{equation*}
+
+Finally
+\begin{equation}
+  \maxeps_{\mathrm{sinCase2}} =  \left\Vert\frac{\sin(\mathtt{x})-\mathtt{x}}{\sin(\mathtt{x})}\right\Vert_{\infty}((1+\maxeps_{\mathrm{approxts}})(1+\maxeps_{\mathrm{hornerts}})(1+\maxeps_{-53})\ -\ 1)
+  \label{eq:SinCase2Total2}
+\end{equation}
+ 
+
+
+
+\section{Detailed examination of the cosine}
+The bulk of the computation is shared with the sine.  The main
+differences are therefore in handling special values. We juste show
+the code here. The error computation for small arguments is similar to
+that of the sine, and is implemented in \texttt{maple/trigo.mpl}.
+
+\subsection{Round to nearest mode}
+\begin{lstlisting}[caption={Exceptional cases for cosine RN},firstnumber=1]
+double cos_rn(double x){ 
+  double tc, x2;
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    /* was : return x-x; 
+       but it's optimized out by Intel compiler (bug reported).
+       Who cares to be slow in this case anyway... */
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d-x_split.d;
+  }
+
+  if (rri.absxhi < XMAX_COS_CASE2){
+    /* CASE 1 : x small enough cos(x)=1. */
+    if (rri.absxhi <XMAX_RETURN_1_FOR_COS_RN)
+      return 1.;
+    else {
+      /* CASE 2 : Fast polynomial evaluation */
+      x2 = x*x;
+      tc = x2 * (c2.d + x2*(c4.d + x2*c6.d ));
+      Add12(rri.rh,rri.rl, 1.0, tc);
+      if(rri.rh == (rri.rh + (rri.rl * RN_CST_COS_CASE2)))	
+	return rri.rh;
+      else
+	return scs_cos_rn(x); 
+    }
+  }
+  else {
+  /* CASE 3 : Need range reduction */ 
+    rri.x=x;
+    rri.function=COS;
+    ComputeTrigWithArgred(&rri);
+    if(rri.rh == (rri.rh + (rri.rl * RN_CST_COS_CASE3)))	
+      if(rri.changesign) return -rri.rh; else return rri.rh;
+    else
+      return scs_cos_rn(x); 
+  }
+}
+\end{lstlisting}
+
+\subsection{RU mode}
+\begin{lstlisting}[caption={Exceptional cases for cosine RU},firstnumber=1]
+double cos_ru(double x){ 
+  double x2, tc, epsilon; 
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }
+   
+  if (rri.absxhi < XMAX_COS_CASE2){
+    /* CASE 1 : x small enough cos(x)=1. */
+    if (rri.absxhi <XMAX_RETURN_1_FOR_COS_RDIR)
+      return 1.;
+    else{
+      /* CASE 2 : Fast polynomial evaluation */
+      x2 = x*x;
+      tc = x2 * (c2.d + x2*(c4.d + x2*c6.d ));
+      Add12(rri.rh,rri.rl, 1, tc);
+      epsilon=EPS_COS_CASE2; 
+    }
+  }
+
+  else {
+    /* CASE 3 : Need range reduction */ 
+    rri.x=x;
+    rri.function=COS;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_COS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    }
+  }    
+  
+
+  TEST_AND_RETURN_RU(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_cos_ru(x);
+}
+\end{lstlisting}
+
+\subsection{RD mode}
+\begin{lstlisting}[caption={Exceptional cases for cosine RD},firstnumber=1]
+double cos_rd(double x){ 
+  double x2, tc, epsilon; 
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }   
+
+  if (rri.absxhi < XMAX_COS_CASE2){
+    if (x==0) return 1;
+    /* CASE 1 : x small enough cos(x)=1. */
+    if (rri.absxhi <XMAX_RETURN_1_FOR_COS_RDIR)
+      return ONE_ROUNDED_DOWN; 
+    else {   
+      /* CASE 2 :  Fast polynomial evaluation */
+      x2 = x*x;
+      tc = x2 * (c2.d + x2*(c4.d + x2*c6.d ));
+      Add12(rri.rh,rri.rl, 1, tc);
+      epsilon=EPS_COS_CASE2; 
+    }
+  }
+  else {
+  /* CASE 3 : Need range reduction */ 
+    rri.x=x;
+    rri.function=COS;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_COS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    }     
+  }
+
+  TEST_AND_RETURN_RD(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_cos_rd(x);
+}
+\end{lstlisting}
+
+\subsection{RZ mode}
+\begin{lstlisting}[caption={Exceptional cases for cosine RZ},firstnumber=1]
+double cos_rz(double x){ 
+  double x2, tc, epsilon; 
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }   
+
+  if (rri.absxhi < XMAX_COS_CASE2){
+    if (x==0) return 1;
+    /* CASE 1 : x small enough cos(x)=1. */
+    if (rri.absxhi <XMAX_RETURN_1_FOR_COS_RDIR)
+      return ONE_ROUNDED_DOWN; 
+    else {
+      /* CASE 2 : Fast polynomial evaluation */
+      x2 = x*x;
+      tc = x2 * (c2.d + x2*(c4.d + x2*c6.d ));
+      Add12(rri.rh,rri.rl, 1, tc);
+      epsilon=EPS_COS_CASE2; 
+    }
+  }
+  else {
+    /* CASE 3 : Need range reduction */ 
+    rri.x=x;
+    rri.function=COS;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_COS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    } 
+  }
+
+  TEST_AND_RETURN_RZ(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_cos_rz(x);
+}
+\end{lstlisting}
+
+\section{Detailed examination of the tangent}
+
+\subsection{Total relative error}
+In the general case, we compute the tangent by using successively the
+macros for computing the sine and the cosine (each accurate to
+$\maxeps_{SinCosCase3}$), then dividing sine by cosine using the Div22
+macro, accurate to $2^{-100}<<\maxeps_{SinCosCase3}$ (see lines 146-156
+of listing \ref{lst:trig:argred}). The overall error is thus bounded
+by $$\maxeps_{tan} = 2.1\maxeps_{SinCosCase3} .$$
+
+
+\subsection{RN mode}
+\begin{lstlisting}[caption={Exceptional cases for tangent RN},firstnumber=1]
+double tan_rn(double x){  
+  double x2, p5, tt;
+  rrinfo rri;
+  db_number x_split, rndcst;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d; 
+  }   
+
+  if (rri.absxhi < XMAX_TAN_CASE2){ 
+    if (rri.absxhi < XMAX_RETURN_X_FOR_TAN) 
+      return x;
+    /* Dynamic computation of the rounding constant */
+    rndcst.i[HI] = 0x3ff00000 + (((rri.absxhi & 0x000fffff)+0x00100000) >> (0x3ff+2 - (rri.absxhi>>20))) ;
+    rndcst.i[LO] =0xffffffff;
+    /* Fast Taylor series */
+    x2 = x*x;
+    p5 = t5.d + x2*(t7.d + x2*(t9.d + x2*t11.d));
+    tt = x2*(t3h.d + (t3l.d +x2*p5));
+    Add12(rri.rh, rri.rl, x, x*tt);  
+    /* Test if round to nearest achieved */ 
+    if(rri.rh == (rri.rh + (rri.rl * rndcst.d)))
+      return rri.rh;
+    else
+      return scs_tan_rn(x); 
+  }
+  else {
+    /* Otherwise : Range reduction then standard evaluation */
+    rri.x=x;
+    rri.function=TAN;
+    ComputeTrigWithArgred(&rri);
+
+    /* Test if round to nearest achieved */ 
+    if(rri.rh == (rri.rh + (rri.rl * RN_CST_TAN_CASE3)))
+      if(rri.changesign) return -rri.rh; else return rri.rh;
+    else
+      return scs_tan_rn(x); 
+  }    
+}
+\end{lstlisting}
+
+There is a peculiarity in lines 19 and 20: We compute the rounding
+constant dynamically, out of the value of $x$. The idea here is that
+in the neighborhood of zero, both $tan$ and its approximation are
+equivalent to $x$ with no order-2 term, therefore the relative error
+$\maxeps$ is equivalent to $x^2$ and therefore $\maxeps/x$ will vanish
+as $x\rightarrow 0$ (of course, in the presence of rounding error this
+has to be proven more rigorously - we will use Gappa below).  As the
+error constant is computed out of $\maxeps$ (see
+Theorem~\ref{th:roundingRN1} page~\pageref{th:roundingRN1}), for $x$
+sufficiently small we can compute $e$ out of $x$ and get a finer
+rounding constant, hence a lower probability of going through the
+accurate phase.
+
+The lines 19-20 implement $$\mathtt{rndcst} \approx 1 + 2^{-2}|x|$$ 
+with  
+$$\mathtt{rndcst} \ge 1 + 2^{-2}|x|$$ ensured by line 20.
+
+To prove that that this rounding constant is correct, we just have to
+check that it fulills the requirements of Theorem \ref{th:roundingRN1}.
+
+Let us note $\maxeps_{TanCase2}$ simply $\maxeps$ in this section.
+First, we compute in Gappa (file\\ \texttt{maple/trigoTanCase2.gappa} below),
+using the same constants (produced by the same Maple) as in the C
+code, a bound $M$ on $\dfrac{\maxeps}{|x|}$. We find that, for
+$x<2^{-4}$, we have 
+$$\maxeps_{TanCase2} < 2^{-60.9} $$
+(hence the $k$ of Theorem \ref{th:roundingRN1} may be chosen as $k=7$) and
+$$\dfrac{\maxeps}{|x|} < M=2^{-56.5} .$$
+Or, $$|x| > \maxeps/M$$
+Therefore, 
+$$\mathtt{rndcst} > 1 + 2^{-2}/M\maxeps$$. 
+
+It is now trivial to check that $2^{-2}/M >
+\dfrac{2^{54}}{(1-2^{-7})(1-2^{-53})}$, therefore for any $x$
+the value of $\mathtt{rndcst}$ thus computed allows to determine
+correct rounding according to Theorem \ref{th:roundingRN1}. 
+
+Note that the computation of the rounding constant, although complex, is performed in
+integer arithmetic and independently of the evaluation of the polynomial.
+Therefore both computations may be carried out in parallel in a superscalar processor.
+
+The input to Gappa is as follows. Note that it needs a bound on
+$\dfrac{p(x)-\tan(x)}{x \tan(x)}$ which has been computed as an infinite
+norm in Maple.
+
+
+\lstinputlisting[caption={Gappa input file to prove the previous bounds on $\maxeps_{TanCase2}$ and $\maxeps_{TanCase2}/x$},
+  language={sh}, numbers=none]{../../gappa/trigos/TanCase2.gappa}
+
+
+
+
+\subsection{RU mode}
+\begin{lstlisting}[caption={Exceptional cases for tangent RU},firstnumber=1]
+double tan_ru(double x){  
+  double epsilon, p5, tt, x2;
+  db_number x_split;
+  rrinfo rri;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }   
+  
+  if (rri.absxhi < XMAX_TAN_CASE2){
+    if (rri.absxhi < XMAX_RETURN_X_FOR_TAN) {
+      if(x<=0.)
+	return x;
+      else {
+	x_split.l ++;
+	return x_split.d;
+      }
+    }
+    else {
+      /* Fast Taylor series */
+      x2 = x*x;
+      p5 = t5.d + x2*(t7.d + x2*(t9.d + x2*t11.d));
+      tt = x2*(t3h.d + (t3l.d +x2*p5));
+      Add12(rri.rh, rri.rl, x, x*tt);  
+
+      /* TODO dynamic computation of error constant */
+      TEST_AND_RETURN_RU(rri.rh, rri.rl, EPS_TAN_CASE2);
+
+      /* if the previous block didn't return a value, launch accurate phase */
+      return  scs_tan_ru(x);
+    }
+  }
+  else { 
+    /* Normal case: Range reduction then standard evaluation */
+    rri.x=x;
+    rri.function=TAN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_TAN_CASE3; 
+    if(rri.changesign) {
+      rri.rh= -rri.rh; 
+      rri.rl=-rri.rl;
+    }
+  }
+  
+  TEST_AND_RETURN_RU(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return  scs_tan_ru(x);
+}
+\end{lstlisting}
+
+\subsection{RD mode}
+\begin{lstlisting}[caption={Exceptional cases for tangent RD},firstnumber=1]
+double tan_rd(double x){  
+  double epsilon, p5, tt, x2;
+  rrinfo rri;
+  db_number x_split;
+
+  
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000){
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+
+  }   
+  
+  if (rri.absxhi < XMAX_TAN_CASE2){
+    if (rri.absxhi < XMAX_RETURN_X_FOR_TAN) {
+      if(x>=0.)
+	return x;
+      else {
+	x_split.l ++;
+	return x_split.d;
+      }
+    }
+    
+    /* Fast Taylor series */
+    x2 = x*x;
+    p5 = t5.d + x2*(t7.d + x2*(t9.d + x2*t11.d));
+    tt = x2*(t3h.d + (t3l.d +x2*p5));
+    Add12(rri.rh, rri.rl, x, x*tt);  
+      
+    TEST_AND_RETURN_RD(rri.rh, rri.rl, EPS_TAN_CASE2);
+
+    /* if the previous block didn't return a value, launch accurate phase */
+    return  scs_tan_rd(x);
+  }
+  
+  else { 
+    /* normal case: Range reduction then standard evaluation */
+    rri.x=x;
+    rri.function=TAN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_TAN_CASE3; 
+    if(rri.changesign) {
+      rri.rh= -rri.rh; 
+      rri.rl=-rri.rl;
+    }
+  }
+  
+  TEST_AND_RETURN_RD(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return  scs_tan_rd(x);
+}
+\end{lstlisting}
+
+\subsection{RZ mode}
+\begin{lstlisting}[caption={Exceptional cases for tangent RZ},firstnumber=1]
+double tan_rz(double x){  
+  double epsilon, p5, tt, x2;
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }   
+  
+  if (rri.absxhi < XMAX_TAN_CASE2){
+    if (rri.absxhi < XMAX_RETURN_X_FOR_TAN) {
+      return x;
+    }
+    else{ 
+      /* Fast Taylor series */
+      x2 = x*x;
+      p5 = t5.d + x2*(t7.d + x2*(t9.d + x2*t11.d));
+      tt = x2*(t3h.d + (t3l.d +x2*p5));
+      Add12(rri.rh, rri.rl, x, x*tt);  
+
+      TEST_AND_RETURN_RZ(rri.rh, rri.rl, EPS_TAN_CASE2);
+
+      /* if the TEST_AND_RETURN block didn't return a value, launch accurate phase */
+      return  scs_tan_rz(x);
+    }
+  }
+  else { 
+    /* Normal case: Range reduction then standard evaluation */
+    rri.x=x;
+    rri.function=TAN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_TAN_CASE3; 
+    if(rri.changesign) {
+      rri.rh = -rri.rh; 
+      rri.rl = -rri.rl;
+    }
+  }
+
+  TEST_AND_RETURN_RZ(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return  scs_tan_rz(x); 
+}
+\end{lstlisting}
+
+ 
+
+
+\section{Accurate phase}
+
+For simplicity, the accurate phase (in file \texttt{trigo\_accurate.c}) always
+computes a Payne and Hanek range reduction to $[-\pi/4, \pi/4]$,
+then a polynomial evaluation using a Taylor formula.
+
+The results of the search for worst cases are the following so far:
+
+\begin{center}
+  \begin{tabular}{|c|c|c|}
+    \hline
+    Function & interval & worst-case accuracy \\
+    \hline
+    \hline
+       $\sin(x)$ &  $|x|< 2^{-17}$                            & $2^{-126}$      \\
+                 &  $ 2^{-17} \le |x| \le 2+\frac{4675}{8192}$& $2^{-119}$     \\
+    \hline
+       $\cos(x)$ &  $2^{-25} \le |x| \le 2^{-22}$            & $2^{-142}$       \\
+                 &  $2^{-22} \le |x| \le 2^{-18}$            & $2^{-136}$       \\
+                 &  $2^{-18} \le |x| \le 2^{-17}$            & $2^{-114}$       \\
+                 &  $2^{-17} \le |x| \le \frac{12867}{8192}$ & $2^{-112}$       \\
+    \hline
+       $\tan(x)$ &  $2^{-25} \le |x| \le 2^{-18}$            & $2^{-132}$       \\
+                 &  $2^{-18} \le |x| \le \arctan(2)$         & $2^{-111}$       \\
+    \hline
+  \end{tabular}
+\end{center}
+
+The polynomials used are Pade approximation computed in
+\texttt{maple/trigo.mpl}. This maple script produces the \texttt{trigo.h} file, and also prints out the
+approximation error, as follows.
+\begin{itemize}
+\item of degree 25 for sine, with an approximation error
+  lower than $2^{-125}$ on $[-\pi/4, \pi/4]$, and lower than
+  $2^{-158}$ for $|x|< 2^{-17}$,
+
+\item of degree 26 for cosine, with an approximation error
+  lower than $2^{-132}$ on $[-\pi/4, \pi/4]$, and lower than
+  $2^{-168}$ for $|x|< 2^{-18}$,
+
+\item of degree 69 for the tangent, with an approximation error lower
+  than $2^{-30}$ on $[-\pi/4, \pi/4]$, and lower than
+  $2^{-163}$ for $|x|< 2^{-18}$.
+\end{itemize}
+
+The polynomial evaluation is an Horner scheme in SCS, ensuring better
+than $2^{-200}$ accumulated roundoff errors. Therefore, the overall
+evaluation error for the accurate phase is lower than the worst case accuracy for
+each function on each interval of the previous table.
+
+This Maple script, and \crlibm\ in general, are designed to allow easy
+increase of the accuracy, should cases worst than those of this table
+be found in the future.
+
+
+\section{Performance results}
+
+Table~\ref{tbl:sine_abstime} gives performance results for input numbers with random
+mantissa and exponents uniformely distributed between -20 and 40, by the command:\\
+\verb!tests/crlibm_testperf sin RN 10000!.
+
+In this case the second step was taken 3 times out of 10000.
+
+Which input interval should be used to measure the performance of
+trigonometric functions is an open question for us. For larger
+exponents, \texttt{libultim} is faster than \texttt{crlibm}.
+
+\begin{table}[!htb]
+\begin{center}
+\renewcommand{\arraystretch}{1.2}
+\begin{tabular}{|l|r|r|r|}
+\hline
+ \multicolumn{4}{|c|}{Pentium III / Linux Debian sarge / gcc 3.3}   \\ 
+ \hline
+                        & min time       & avg time     & max time        \\ 
+ \hline
+ \texttt{libm}          & 108           &        118    & 142      \\ 
+ \hline
+ \texttt{mpfr}          & 16715         &      67153    & 186925      \\ 
+ \hline
+ \texttt{libultim}      & 91            &        300    & 1294619      \\ 
+ \hline
+\texttt{crlibm}         & 81            &        229    & 13616      \\ 
+ \hline
+\end{tabular}
+\end{center}
+\caption{Absolute timings for the sine (arbitrary units)
+  \label{tbl:sine_abstime}}
+\end{table}
+
+Results for the cosine are very similar. The tangent leaves more room
+for improvement, as Table~\ref{tbl:tan_abstime} shows. The culprit is
+the Div22 procedure, which is very expensive. 
+
+Directed rounding mode have a penalty of about 50 cycles on a Pentium
+III, due to the heavy use of integer 64-bit arithmetic.
+
+\begin{table}[!htb]
+\begin{center}
+\renewcommand{\arraystretch}{1.2}
+\begin{tabular}{|l|r|r|r|}
+\hline
+ \multicolumn{4}{|c|}{Pentium III / Linux Debian sarge / gcc 3.3}   \\ 
+ \hline
+                        & min time       & avg time     & max time        \\ 
+ \hline
+ \texttt{libm}          & 158           &        167    & 183      \\ 
+ \hline
+ \texttt{mpfr}          & 22759         &      80108    & 222550      \\ 
+ \hline
+ \texttt{libultim}      & 113           &        428    & 1357592      \\ 
+ \hline
+ \texttt{crlibm}         & 105           &        367    & 33830      \\ 
+ \hline
+\end{tabular}
+\end{center}
+\caption{Absolute timings for the tangent (arbitrary units)
+  \label{tbl:tan_abstime}}
+\end{table}
+
+
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: "crlibm"
+%%% End: 
diff --git a/src/crlibm/docs/latex/trigpi.tex b/src/crlibm/docs/latex/trigpi.tex
new file mode 100644
index 0000000..79f9377
--- /dev/null
+++ b/src/crlibm/docs/latex/trigpi.tex
@@ -0,0 +1,292 @@
+This chapter is contributed by F. de Dinechin.
+
+
+\section{Overview}
+The trigpi functions are defined as follows:
+\begin{eqnarray}
+ \sinpi(x) &=& sin(\pi x) \\
+ \cospi(x) &=& cos(\pi x) \\
+ \tanpi(x) &=& tan(\pi x)  
+\end{eqnarray}
+
+These functions are similar to the trigonometric functions, with
+two main differences:
+\begin{itemize}
+\item Their first argument reduction is exact, and relatively easy: It
+  consists in removing the integer part of $x$, as e.g.
+  $\sinpi(x+n)=\pm \sinpi(x)$ for $n\in\N$. As an important consequence, their
+  worst-case critical accuracy is known on $\F$ as soon as it is known
+  on  the interval $[0 1]$.
+\item Their Taylor expansion, on the other hand, has irrational
+  coefficients, which requires more careful handling around zero.
+\end{itemize}
+
+Apart from these two differences, we use the same secondary argument
+reduction as for the trigonometric functions in chapter
+\ref{chap:trigo}. Indeed, we even use the same tabulated values:
+first, decompose the input value as follows: 
+
+\begin{equation}
+  \pi x = k\frac{\pi}{256} + \pi y\label{eq:trigpiargred}
+\end{equation}
+where  $k$  is an integer and  $ |y| \leq {1}/{512}$.
+
+Contrary to the usual trig functions, $y$ so defined is an exact
+double: this second argument reduction is errorless, too. Actually, it
+is performed in the same operations that compute the first.
+
+Then, denoting $a=k\pi/256$, 
+we read off a table the following triple-double values: 
+
+$$sa_h+sa_m+sa_l \approx sin(a)$$
+$$ca_h+ca_m+ca_l \approx cos(a)$$
+
+Only 64 pairs of triple-doubles  are tabulated (amounting to
+$64\times 8 \times 6 = 3$ Kbytes), the rest is obtained by
+periodicity and symmetry, implemented as masks and integer operations
+on the integer $k$. For instance,  $a\mod 2\pi$ is implemented by $k\mod 512$,
+$\pi/2-a$ is implemented as $128-k$, etc.
+
+
+Then we use the reconstruction steps:
+
+\begin{equation}        
+  \sinpi(x) = \sin(a + \pi y) =  \cos(a) \sinpi(y) +  \sin(a) \cospi(y) 
+  \label{eq:sinpiapy}
+\end{equation}
+
+\begin{equation}
+  \cospi(x) = \cos(a + \pi y) = \cos(a) \cospi(y) -  \sin(a) \sinpi(y) 
+  \label{eq:cospiapy}
+\end{equation}
+
+\begin{equation} 
+  tanpi(x) = \frac{\sinpi(x)}{\cospi(x)} 
+  \label{eq:tanpiapy}
+\end{equation}
+
+
+
+\section{Special cases for $\cos(\pi x)$ }
+
+$\cospi$ should return a NaN on infinities and NaN.
+
+In all the rounding modes, we have $\cospi(x)=1$ for all the even integer
+ values of $|x|$, and $\cospi(x)=-1$ for all the odd integer values of
+ $|x|$.
+
+
+ In all the rounding modes, we have $\cospi(x)=1$ for all the even
+ integer values of $|x|$, and $\cospi(x)=-1$ for all the odd integer
+ values of $|x|$. We have $\cospi(x)=+0$ for all the half-integer
+ values of $x$. One could discuss whether having alternate $+0$ and
+ $-0$ would not be better, but there will be a conflict between
+ $\cos(\pi+x)=-\cos(x)$ and $\cos(-x)=\cos(x)$ for e.g. $x=0.5\pi$.
+ Our choice ($+0$ only) is inspired by the LIA2 standard.
+
+
+ Concerning small inputs, we have the Taylor expansion:
+
+  \begin{equation}
+    \cos(\pi x) = 1-(\pi x)^2/2 + O(x^4)\label{eq:cospiTaylor}
+  \end{equation}
+ where $O(x^4)$ is positive.
+
+ Therefore $\cos(\pi x)$ is rounded to $1$ in RN and RU mode if $(\pi
+ x)^2<{2^{-53}}$. We test this with a constant $C$ which is defined as
+ the upper 32 bits of $\sqrt(2^{-53})/4$.
+
+ In RD and RZ modes, we have $\cospi(0)=1$ and $\cospi(x)=1-2^{-53}$
+ for $0<|x|<C$. 
+
+\subsection{Worst case accuracy}
+
+The worst case accuracy has been computed only for $x \in [2^{-24},
+1]$ (the previous discussion shows that it is enough), with a worst
+case accuracy of $2^{-110}$.
+
+
+
+\section{Special cases for $\sin(\pi x)$}
+$\sinpi$ should return a NaN on infinities and NaN.
+
+In all the rounding modes, we return $\sinpi(x)=+0$ for all the positive
+integer values of $|x|$, and $\sinpi(x)=-0$ for all the negative integer
+values of $|x|$. We have $\sinpi(x)=\pm 1$ for  the half-integer
+values of $|x|$. 
+
+For small numbers, the Taylor expansion is
+\begin{equation}
+  \sin(\pi x) = \pi x - (\pi x)^3/6 + O(x^5) = \pi x(1-(\pi
+  x)^2/6) + O(x^5)\label{eq:sinpiTaylor}
+\end{equation}
+  where $O(x^5)$ has the sign of $x$. 
+
+The situation is therefore more complex than for the radian
+trigonometrics.
+
+\subsection{Worst case accuracy}
+
+The worst case accuracy has been computed only for $x \in [2^{-57},
+1]$, with a worst case accuracy of $2^{-111}$. For smaller arguments,
+equation (\ref{eq:sinpiTaylor}) shows that the worst case arguments
+will be the same: the worst-cases (up to a certain limit) become those
+of $\pi x$, and may be deduced for each binade of $x<2^{-55}$.
+
+\subsection{Subnormal numbers}
+This is no longer true for subnormals, however, as the relative error
+becomes an absolute error there. In the subnormal domain, we use the
+following argument: the worst-case search over the small normal
+binades show that $\pi x$ cannot have more than 58 identical ones or
+zero after the mantissa.  Supposing that there exist a worst case in
+the subnormal binade, it may not have more than 53 + 58 identical
+bits.
+
+As computing with denormals is tricky -- and, on some systems, very
+slow --, we chose in this case to evaluate $\pi x$ in SCS, and to use
+the SCS-to-double functions to manage the subnormal rounding. SCS
+accuracy (210 bits) is a large overkill considering the 53+58 required
+bits. If $x$ is a subnormal number, then $\pi x$ is an approximation to
+$\sinpi(x)$ accurate to $2^{-2000}$ according to
+(\ref{eq:sinpiTaylor}). 
+
+
+
+\subsection{Computing $\pi x$ for small arguments}
+As $\pi$ is transcendental, we need a two-step approach even for the
+small arguments.  We therefore want to ensure that the bound on the
+error of approximating $sin(\pi x)$ with $sin(\pi x)$ is between
+$2^{-60}$ and $2^{-64}$.  This bound is given by
+(\ref{eq:sinpiTaylor}): For $x<2^{-31}$, we have $(\pi x)^2/6
+<2^{-61.28}$.  We may then use an algorithm that efficiently computes
+an approximation to $\pi x$ with a relative rounding error smaller
+than $2^{-74}$. The total relative error will be smaller than
+$2^{-61}$.
+
+If the rounding test fails, the accurate computation (of $\sinpi(x)$,
+not of $\pi\times x$) has to be launched.
+
+There exists an algorithm, due to Brisebarre and Muller, which
+computes the correctly rounded value of $\pi x$, for any
+double-precision number $x$, in two FMA operations.  Its proof is a
+variation of the Kahan/Douglas algorithm mentionned in Chapter
+\ref{chap:trigo}. Unfortunately, it is of little use here. A first
+problem is that it requires an FMA, however an equivalent algorithm
+using double-double arithmetic should be easy to derive. A more
+important problem is that it is only relevant if one may prove that
+the correctly rounded value of $\pi x$ is also the correctly rounded
+value of $\sin(\pi x)$. This happens when the relative difference
+between $\pi x$ and $\sin(\pi x)$ is smaller than the worst-case
+critical accuracy, which is $2^{-110}$ for
+$x<2^{-31}$. We conclude, again from (\ref{eq:sinpiTaylor}) that this
+algorithm is useful for $x<2^{-55}$.
+As we have a two-step approach anyway, the cost of an additional test
+is difficult to justify. 
+
+However, if an FMA is available, we will use the Brisebarre/Muller sequence of two
+FMAs to evaluate $\pi x$ using  a double-double
+approximation to $\pi$.
+
+In the general case, we will be contented with an approximation to
+$\pi x$ accurate to anything much more than $2^{-60}$, as suggested
+before. Let us start with the straightforward double-double multiplication:\\
+\texttt{ Mul12(\&rh,\&rl, x,0, PIH, PIL);}\\
+where $x$ is completed with a zero and \texttt{PIH} and \texttt{PIL}
+form a double-double approximation to $\pi$. This would provide much
+too much accuracy, so the algorithm is adapted to the specific case as
+follows:
+\begin{itemize}
+\item In the previous algorithm, all the multiplications by zero are of course optimised out;
+\item The previous algorithm first splits \texttt{x} into \texttt{xh}
+  and \texttt{xl}, and does the same for \texttt{PIH}. An obvious
+  optimisation is to pre-split \texttt{PIH} into \texttt{PIHH} and
+  \texttt{PIHM}.
+\item A last optimisation is to neglect the term \texttt{xl*PIL}.
+\end{itemize}
+
+The final algorithm is therefore :
+\begin{lstlisting}[caption={Multiplication by $\pi$ \label{lst:trigpi:pix}},firstnumber=1]
+  const double c  = 134217729.; /* 2^27 +1 */   
+  double t, xh, xl;                           
+  /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+  t = x*c;     
+  xh = (x-t)+t;
+  xl = x-xh;   
+
+  Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIL + xl*PIHM) );               
+\end{lstlisting}
+
+The splitting is exact (Dekker). In the Add12, all the multiplications
+are exact except \texttt{xh*PIL}. The \texttt{Add12} itself is also
+exact. The error is therefore purely due to the three additions, and
+lead to a conservative majoration of the relative error of $2^{-53-22}
+= 2^{-75}$. 
+
+
+
+\section{$\tan(\pi x)$}
+
+\subsection{Worst case accuracy}
+
+The worst case accuracy has been computed only for $x \in [2^{-25},
+2^{-5}]$, with a worst case accuracy of $2^{-111}$. 
+
+\subsection{Special cases}
+
+
+$\tanpi$ should return a NaN on infinities and NaN.
+
+In all the rounding modes, we return $\tanpi(x)=0$ with the sign of $x$ for all
+integer values of $|x|$. We have $\tanpi(x)=\pm \infty$ for  the half-integer
+values of $|x|$. 
+
+For small numbers, the Taylor expansion is
+\begin{equation}
+  \tan(\pi x) = \pi x + (\pi x)^3/3 + O(x^5) 
+  = \pi x(1+(\pi x)^2/3) + O(x^5)\label{eq:tanpiTaylor}
+\end{equation}
+where $O(x^5)$ has the sign of $x$. 
+
+The handling of special cases will be similar to those of $\sinpi$. The
+first step for small arguments now has an overall relative error
+bounded by $2^{-60}$.
+ 
+
+\section{ $\arctan(\pi x)$}
+
+\subsection{Proven correctly-rounded domain}
+
+The search for worst cases is not finished yet (work in progress).
+Correct rounding is currently proven on $[\tan(2^{-25}\pi),
+\tan(2^{-5}\pi)]$.
+
+\subsection{Implementation}
+This function is the inverse of $\tanpi$ and is thus defined as follows:
+$$\atanpi(x) = \frac{1}{\pi}\arctan(x)$$
+
+Its implementation is very simply derived from that of $\arctan$ by a
+final multiplication by an approximation to $1/\pi$. 
+
+\begin{itemize}
+\item In the first step, we use a double-double approximation to
+  $1/\pi$ (accurate to $2^{-105}$) and a Dekker double-double
+  multiplication (which should actually be sped up, in the absence of
+  FMA, by pre-splitting the constant as exposed above for $\sinpi$ and
+  $\tanpi$).  The overall error of this final multiplication is below
+  $2^{-100}$, and practically doesn't even change the rounding
+  constants.
+
+\item In the second step (currently still SCS) we similarly multiply 
+  by an SCS approximation to $1/\pi$ with an  error well below $2^{-200}$
+  which barely impacts the  overall error ($2^{-136}$, 
+  see chapter \ref{chap:atan}).
+\end{itemize}
+
+Care has to be taken of the special cases, though. To keep things
+simple, the SCS accurate phase is launched for small arguments to
+avoid problems with subnormals. This should also be improved.
+
+
+
+Implementations of $\asinpi$ and $\acospi$ along the same lines should
+follow soon.
diff --git a/src/crlibm/docs/latex/tripledoubleprocedures.tex b/src/crlibm/docs/latex/tripledoubleprocedures.tex
new file mode 100644
index 0000000..e8c5088
--- /dev/null
+++ b/src/crlibm/docs/latex/tripledoubleprocedures.tex
@@ -0,0 +1,3280 @@
+\documentclass[a4paper,10pt,twoside]{article}
+
+\usepackage{a4wide}
+\usepackage[latin1]{inputenc} 
+\usepackage[T1]{fontenc} 
+\usepackage{url}
+
+\usepackage{amstext,latexsym,amsfonts,amssymb}
+
+
+
+
+\newcommand{\http}{http://}
+\newtheorem{theorem}{Theorem}[section]
+\newtheorem{lemma}[theorem]{Lemma}
+\newtheorem{proposition}[theorem]{Proposition}
+\newtheorem{corollary}[theorem]{Corollary}
+\newtheorem{definition}[theorem]{Definition}
+\newtheorem{algorithm}[theorem]{Algorithm}
+\newenvironment{proof}[1][Proof]{\begin{trivlist}
+\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
+\newcommand{\qed}{\nobreak \ifvmode \relax \else \ifdim \lastskip<1.5em \hskip-\lastskip
+\hskip1.5em plus0em minus0.5em \fi \nobreak \vrule height0.75em width0.5em depth0.25em\fi}
+\newcommand{\N}{\ensuremath{\mathbb {N}}}
+\newcommand{\Z}{\ensuremath{\mathbb {Z}}}
+\newcommand{\F}{\ensuremath{\mathbb {F}}}
+\newcommand{\R}{\ensuremath{\mathbb {R}}}
+\newcommand{\hi}{\ensuremath{\mathit{h}}}
+\newcommand{\mi}{\ensuremath{\mathit{m}}}
+\newcommand{\lo}{\ensuremath{\mathit{l}}}
+\newcommand{\E}{\ensuremath{\mathcal{E}}}
+\newcommand{\ouvguill}{``} 
+\newcommand{\fermguill}{''}
+\newcommand{\Add}{{\bf Add12}}
+\newcommand{\AddDD}{{\bf Add22}}
+\newcommand{\AddDTT}{{\bf Add233}}
+\newcommand{\AddTT}{{\bf Add33}}
+\newcommand{\MulDT}{{\bf Mul23}}
+\newcommand{\Mul}{{\bf Mul12}}
+\newcommand{\MulDD}{{\bf Mul22}}
+\newcommand{\MulDTT}{{\bf Mul233}}
+\newcommand{\mAdd}{\ensuremath{\mathbf{Add12}}}
+\newcommand{\mAddDD}{\ensuremath{\mathbf{Add22}}}
+\newcommand{\mAddDTT}{\ensuremath{\mathbf{Add233}}}
+\newcommand{\mAddTT}{\ensuremath{\mathbf{Add33}}}
+\newcommand{\mMul}{\ensuremath{\mathbf{Mul12}}}
+\newcommand{\mMulDD}{\ensuremath{\mathbf{Mul22}}}
+\newcommand{\mMulDT}{\ensuremath{\mathbf{Mul23}}}
+\newcommand{\mMulDTT}{\ensuremath{\mathbf{Mul233}}}
+\newcommand{\mUlp}{\ensuremath{\mathrm{ulp}}}
+\newcommand{\nan}{\ensuremath{\mathrm{NaN}}}
+\newcommand{\sgn}{\ensuremath{\mathrm{sgn}}}
+\renewcommand{\succ}{\ensuremath{\mathrm{succ}}}
+\newcommand{\pred}{\ensuremath{\mathrm{pred}}}
+\newcommand{\xor}{\ensuremath{\mbox{ }\mathrm{XOR}\mbox{ }}}
+\renewcommand{\epsilon}{\varepsilon}
+
+
+
+\title{Basic building blocks\\for a triple-double intermediate format\\{\small (corrected version)}}
+
+\author{Christoph Quirin Lauter}  
+
+\date{\today}
+
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+The implementation of correctly rounded elementary functions needs high
+intermediate accuracy before final rounding. This accuracy can be provided by (pseudo-)
+expansions of size three, i.e. a triple-double format. 
+
+The report presents all basic operators for such a format. Triple-double numbers can be
+redundant. A renormalization procedure is presented and proven. Elementary functions' 
+implementations need addition and multiplication sequences. These operators must take 
+operands in double, double-double and triple-double format. The results must be accordingly
+in one of the formats. Several procedures are presented. Proofs are given for their 
+accuracy bounds.
+
+Intermediate triple-double results must finally be correctly rounded to double precision. 
+Two effective rounding sequences are presented, one for round-to-nearest mode, one for 
+the directed rounding modes. Their complete proofs constitute half of the report. 
+\end{abstract}
+
+
+\section{Introduction}
+The implementation of correctly rounded double precision elementary functions needs high accuracy intermediate 
+formats \cite{Muller97,Defour-thesis,crlibmweb,DinDefLau2004LIP}. To give an order of magnitude, in most cases
+$120$ bits of intermediate accuracy are needed for assuring the correct rounding property \cite{DinDefLau2004LIP}.
+In contrast, the native IEEE 754 double precision format offers $53$ bits of accuracy. Well-know techniques
+allow to double this accuracy \cite{Dek71}. Nevertheless the resulting accuracy, $106$ bits, is not sufficient. 
+Tripling it would be enough.\par
+Using expansions of floating point numbers allows to expand still more the accuracy of a native floating point type.
+An expansion is a non-evaluated sum of some floating point numbers in a floating  
+point format \cite{Finot-thesis, Pri91, She97}. However the techniques for manipulating general expansions presented
+in literature are too costly for the implementation of elementary functions.\par
+In this report, we are going to consider expansions of three double
+precision floating point numbers, i.e. we are going to investigate on a triple
+double format. In our case, we will hence manipulate floating
+point numbers $(x_\hi + x_\mi + x_\lo)$ with $x_\hi, x_\mi, x_\lo \in \F$.\par
+After making some definitions and an analysis of a procedure that we call
+renormalization, we will consider addition and multiplication procedures for
+triple-double numbers. These will also comprise operations linking the triple
+double format with the native double and a double-double format.\par
+In the end,
+we will present and prove in particular two final rounding sequences for correctly
+rounding a triple-double number to the base double format.
+\section{Definitions}
+It will be necessary to define a normal form of a triple-double number
+because it is clear that the triple-double floating point format - or that of
+(pseudo-)expansions in general - is redundant: there exist numbers 
+$\hat{x}$ such that there are different triplets $(x_\hi ,x_\mi ,x_\lo ) \in \F^3$ 
+such that $\hat{x} = x_\hi + x_\mi + x_\lo$. It is easy to see that a
+representation in such a format is unique if the numbers forming the expansion
+are ordered by decreasing 0 and if the latter are such that there is
+no (binary) digit represented by two bits of the significands of two different
+numbers of the expansion. The sign bit has in this case the same role as an
+additional bit of the significant \cite{Finot-thesis}.\par
+As we will see, the need for a normal form for each triple-double number is
+not directly motivated by needs of the addition and multiplication operators
+we will have to define. As long as the latter operate correctly, i.e. between
+known error bounds, on numbers whose representation in a triple-double format is not unique, we are not
+obliged to recompute normal forms. On the other hand, when we want to round
+down such a higher precision number to a native double (in one of the
+different rounding modes), a normal form will be needed. If we could not
+provide one, we would assist to a explosion of different cases to be handled
+by the rounding sequence.\\
+Let us first define some notations that are needed for the analysis of numerical algorithms like 
+the ones that we are going to consider. 
+\begin{definition}[Predecessor and successor of a floating point number] \label{predsuccdef} ~\\
+Let be $x \in \F$ a floating point number. Let be $<$ the total ordering on $\F$. \\
+If $x$ is positive or zero we will design by $x^+$ the direct successor of $x$ in $\F$ with regard to $<$ 
+and we will notate $x^-$ its predecessor.\\
+If $x$ is negative we will design by $x^-$ the successor and by $x^+$ the predecessor of $x$.\\
+In any case, we will design by $\succ\left( x \right)$ the successor of $x$ in $\F$ with regard to $<$ and 
+$\pred\left(x\right)$ its predecessor.
+\end{definition}
+This definition \ref{predsuccdef} is inspired by \cite{Defour-thesis}.
+\begin{definition}[Unit on the last place -- the $\mUlp$~ function] \label{defulp} ~ \\ 
+Let be $x \in \F$ a double precision number and let be $x^+$ its
+successor (resp. predecessor if $x$ is negative). \\
+So
+$$\mUlp \left( x \right) = \left \lbrace 
+                   \begin{array}{lll} x^+ - x & \mbox{ if } & x \geq 0 \mbox{ and } x^+ \not = + \infty \\ 
+                     2 \cdot \mUlp\left( \frac{x}{2} \right) & \mbox{ if } & x \not = + \infty \mbox{ but } x^+ = + \infty\\
+                     \mUlp \left( -x \right) & \mbox{ if } & x < 0 \end{array} \right.$$ 
+\end{definition}  
+This definition is inspired by \cite{Defour-thesis}, too. Compare \cite{Muller05INRIA} 
+for further research on the subject of the $\mUlp$~ function.\\~\par
+Concerning the overlap we define finally:
+\begin{definition}[Overlap]\label{defoverlap}~\\
+Let $x_\hi, x_\lo \in \F$ be two non-subnormal double precision numbers. \\
+We will say that $x_\hi$ and $x_\lo$ overlap iff
+$$\left \vert x_\lo \right \vert \geq \mUlp\left( \left \vert x_\hi \right 
+\vert \right)$$~\\
+Let be $x_\hi, x_\mi, x_\lo \in \F$ the components of a triple-double
+number. We will suppose that they are not subnormals.\\
+So, we will say that there is overlap iff 
+$x_\hi$ and $x_\mi$ or $x_\mi$ and $x_\lo$ or $x_\hi$ and $x_\lo$ overlap.
+\end{definition}
+\begin{definition}[Normal form]~\\
+Let be $x_\hi, x_\mi, x_\lo \in \F$ three non-subnormal floating point numbers
+forming the triple-double number $x_\hi + x_\mi + x_\lo$. \\
+We will say that $x_\hi + x_\mi + x_\lo$ are in normal form iff there is no
+overlap between its components.
+Further, we will say that $x_\hi + x_\mi + x_\lo$ is normalised.
+\end{definition} \par
+Having made this definition, let us remark that it is deeply inspired by our
+direct needs and not by abstract analysises on how to represent real
+numbers. Anyway, the fact that an expansion is not overlapping is not a
+sufficient condition for its representing an unique floating point number.\par
+The implementation of addition and multiplication operators will be finally be
+based on computations on the components of the operands (or partial products
+in the case of a multiplication) followed by a final summing up for
+regaining the triple-double base format. As we do not statically know the
+magnitudes of the triple-double operands and its components, we will not be
+able to guarantee that in any case there will not be any overlap in the
+result. On the other hand, we strive to develop a renormalization sequence for
+recomputing normal forms. These will be handy, as we already said, for the
+final rounding and, if needed, i.e. if sufficiently good static bounds can not
+be given, before handing over a result as an operand to a following operation. 
+Such a renormalization sequence must guarantee that for each triple-double in
+argument (if needed verifying some preconditions on an initial overlap), the
+triple-double number returned will be normalised and that the sum of the
+components for the first number is exactly the same as the one of the
+components of the latter.\par
+\begin{definition}[The \Add~ algorithm] \label{adddef} ~ \\
+Let {\bf A} be an algorithm taking as arguments two double precision numbers $x,y \in \F$ and
+returning two double precision floating point numbers $r_\hi, r_\lo \in \F$.\\
+We will call {\bf A} the \Add~ algorithm iff it verifies that\\
+\begin{itemize}
+\item $\forall x,y \in \F. r_\hi + r_\lo = x + y$
+\item $\forall x,y \in \F. \left \vert r_\lo \right \vert \leq 2^{-53} \cdot \left \vert r_\hi \right \vert$
+\item $r_\hi = \circ\left( x + y \right)$ \\
+$r_\lo = x + y - r_\hi$
+\end{itemize} ~\\
+i.e. iff it makes an exact addition of two floating point numbers such that
+the components of the double-double expansion in result are non-overlapping
+and if the most significant one is the floating point number nearest to the
+sum of the numbers in argument.
+\end{definition} 
+\begin{definition}[The \Mul~ algorithm] \label{muldef} ~ \\
+Let {\bf A} be an algorithm taking as arguments two double precision numbers $x,y \in \F$ and
+returning two double precision floating point numbers $r_\hi, r_\lo \in \F$.\\
+We will call {\bf A} the \Mul~ algorithm iff it verifies that\\
+\begin{itemize}
+\item $\forall x,y \in \F. r_\hi + r_\lo = x \cdot y$
+\item $\forall x,y \in \F. \left \vert r_\lo \right \vert \leq 2^{-53} \cdot \left \vert r_\hi \right \vert$
+\item $r_\hi = \circ\left( x \cdot y \right)$ \\
+$r_\lo = x \cdot y - r_\hi$
+\end{itemize} ~\\
+i.e. iff it makes an exact multiplication of two floating point numbers such that
+the components of the double-double expansion in result are non-overlapping
+and if the most significant one is the floating point number nearest to the
+sum of the numbers in argument.
+\end{definition}
+We will pass over the existence proof of such algorithms. Consult \cite{Dek71} on this subject. \par
+Let us now give some main lemmas that can be deduced from the definition \ref{defulp} of the 
+$\mUlp$~ function. 
+\begin{lemma}[The $\mUlp$~ functions with regard to upper bounds] \label{ulpmajor} ~ \\
+Let be $x_\hi$ and $x_\lo$ two non-subnormal floating point numbers. \\
+So
+$$\left \vert x_\lo \right \vert < \mUlp\left( x_\hi \right) \Rightarrow
+\left \vert x_\lo \right \vert \leq 2^{-52} \cdot \left \vert x_\hi \right \vert$$
+\end{lemma}
+\begin{proof} ~ \\
+Let us suppose that $\left \vert x_\lo \right \vert < \mUlp\left(x_\hi
+\right)$ and that 
+$\left \vert x_\lo \right \vert > 2^{-52} \cdot \left \vert x_\hi \right \vert$.\\
+So we get the following inequality
+$$2^{-52} \cdot \left \vert x_\hi \right \vert < \mUlp\left( x_\hi \right)$$
+Without loss of generality, let us suppose now that 
+$x_\hi > 0$ and that $x_\hi^+ \not = + \infty$ where $x_\hi^+$ is the
+successor of 
+$x_\hi$ in the ordered set of floating point numbers.\\
+So we know by the definition of non-subnormal floating point number in double
+precision that there exists
+$m \in \N$ and $e \in \Z$ such that
+$x_\hi = 2^e \cdot m$ with $2^{52} \leq m < 2^{53}$. Anyway, one can check that
+$$x_\hi^+ = \left \lbrace \begin{array}{lll} 2^e \cdot \left(m + 1 \right) & \mbox{ if } & m+1 < 2^{53} \\
+                                             2^{e+1} \cdot 2^{52} & \mbox{ otherwise} & \end{array} \right.$$
+So 2 cases must be treated separately:\\~\\
+{\bf 1st case: $x_\hi^+ = 2^e \cdot \left( m + 1 \right)$} \\ 
+So we get
+\begin{eqnarray*}
+2^e \cdot \left( m + 1 \right) - 2^e \cdot m & > & 2^{-52} \cdot 2^e \cdot m \\
+1 & > &  2^{-52} \cdot m 
+\end{eqnarray*}
+In contrast, $m \geq 2^{52}$, so we obtain the strict inequality $1 > 1$
+which contradicts the hypotheses. \\~\\
+{\bf 2nd case: $x_\hi^+ = 2^{e+1} \cdot 2^{52}$} \\ 
+In this case, we know that $m=2^{53} - 1$. \\
+We can deduce that 
+\begin{eqnarray*}
+2^{e+1} \cdot 2^{52} - 2^e \cdot \left( 2^{53} - 1\right) & > & 2^{-52} \cdot 2^e \cdot \left( 2^{53} - 1 \right) \\
+1 & > &  2 - 2^{-52}
+\end{eqnarray*}
+This last inequality is a direct contradiction with the hypotheses.\qed
+\end{proof}
+\begin{lemma}[Commutativity of the $x^+$ and $x^-$ operators with unary $-$] \label{commut} ~ \\
+Let be $x \in \F$ a positive floating point number.\\
+So, 
+$$\left( - x\right)^+ = -\left(x^+\right)$$
+and
+$$\left( - x\right)^- = -\left(x^-\right)$$
+\end{lemma}
+\begin{proof} ~ \\
+Since the set of the floating point numbers is symmetrical around $0$, we get
+$$\left( -x\right)^+ = \pred\left( -x \right) = -\succ\left( x \right) = - \left(x^+\right)$$
+and
+$$\left( -x\right)^- = \succ\left( -x \right) = -\pred\left( x \right) = - \left(x^-\right)$$\qed
+\end{proof}
+\begin{lemma}[$x^+$ and $x^-$ for an integer power of $2$] \label{poweroftwo} ~ \\
+Let be $x \in \F$ a non-subnormal floating point number such that it exists $e \in \Z$ such that
+$$x=\pm2^e \cdot 2^p$$
+where $p \geq 2$ is the format's precision.\\
+So,
+$$x - x^-= \frac{1}{2} \cdot \left( x^+ - x \right)$$
+\end{lemma}
+\begin{proof} ~\\
+If $x > 0$, we get
+$$x - x^- = 2^e \cdot 2^p - 2^{e-1} \cdot \left( 2^{p+1} - 1 \right) = 2^{e-1}$$
+and
+$$x^+ - x = 2^e \cdot \left( 2^p + 1 \right) - 2^e \cdot 2^p = 2^e$$
+If $x$ is negative it suffices to apply lemma \ref{commut}.\qed
+\end{proof}
+\begin{lemma}[$x^+$ and $x^-$ for a float different from an integer power of $2$] \label{notpoweroftwo} ~\\
+Let be $x \in \F$ a non-subnormal floating point number such that it does not exist any $e \in \Z$ 
+such that $$x=\pm2^e \cdot 2^p$$
+where $p \geq 2$ is the format's precision.\\
+So,
+$$x - x^- = x^+ - x$$
+\end{lemma}
+\begin{proof} ~ \\
+If $x > 0$ we know that there exist $e \in \Z$ and $m \in \N$ such that
+$$x = 2^e \cdot m$$
+with
+$$2^p < m < 2^{p-1}$$
+because $x$ is not exactly an integer power of $2$. \\
+Further, one checks that 
+$$x^+ = 2^e \cdot \left( m + 1 \right)$$
+even if $m = 2^{p-1} -1$ and that 
+$$x^- = 2^e \cdot \left( m - 1 \right)$$
+because the lower bound given for $m$ is strict. \\
+So one gets
+\begin{eqnarray*}
+x - x^- & = & 
+2^e \cdot m - 2^e \cdot \left(m - 1 \right) \\
+& = & 2^e \\
+& = & 2^e \cdot \left( m + 1 \right) - 2^e \cdot m \\
+& = & x^+ - x
+\end{eqnarray*}
+If $x$ is negative it suffices to apply lemma \ref{commut}.\qed
+\end{proof}
+\begin{lemma}[Factorized integer powers of $2$ and the operators $x^+$ and $x^-$] \label{multhalf} ~\\
+Let be $x \in \F$ a non-subnormal floating point number such that $\frac{1}{2} \cdot x$ is still not subnormal.\\
+So,
+$$\left(\frac{1}{2} \cdot x \right)^+ = \frac{1}{2} \cdot x^+$$
+and
+$$\left(\frac{1}{2} \cdot x \right)^- = \frac{1}{2} \cdot x^-$$
+\end{lemma}
+\begin{proof} ~ \\
+Without loss of generality let us suppose that $x$ is positive. Otherwise we easily apply lemma \ref{commut}. \\
+So, if $x$ can be written $x = 2^e \cdot m$ with $m + 1 \leq 2^{p+1}$ where $p$ is the precision then
+$$\left( \frac{1}{2} \cdot x \right)^+ = \left( 2^{e-1} \cdot m \right)^+ = 2^{e-1} \cdot \left(m+1\right) = \frac{1}{2} \cdot x^+$$
+Otherwise, 
+$$\left( \frac{1}{2} \cdot x \right)^+ = \left( 2^{e-1} \cdot \left( 2^{p+1} -1 \right) \right)^+ 
+= 2^{e-1+1} \cdot 2^p = \frac{1}{2} \cdot x^+$$
+One can check that one obtains a completely analogous result for $x^-$.\qed
+\end{proof}
+\begin{lemma}[Factor $3$ of an integer power of $2$ in argument of the $x^+$ operator] \label{succtroisfoispuissdeux} ~ \\
+Let be $x \in \F$ a positive floating point number such that $x$ is not subnormal, $x^+$ and $\left( 3 \cdot x \right)^+$ 
+are different from $+\infty$, and that $\exists e \in \Z \mbox{ . } x = 2^e \cdot 2^p$ where $p \geq 3$ is the precision
+of the format $\F$.\\
+So the following equation holds
+$$\left( 3 \cdot x \right)^+ + \mUlp\left( x \right) = 3 \cdot x^+$$
+\end{lemma}
+\begin{proof} ~ \\
+We can easily check the following 
+\begin{eqnarray*}
+\left( 3 \cdot x \right)^+ + \mUlp\left( x \right) & = & \left( 3 \cdot x \right) + \left( x^+ - x \right) \\
+& = & \left( 3 \cdot 2^e \cdot 2^p \right)^+ + \left( 2^e \cdot 2^p \right)^+ - 2^e \cdot 2^p \\
+& = & \left( \left( 2 + 1 \right) \cdot 2^e \cdot 2^p \right)^+ + 2^e \cdot \left( 2^p + 1 \right) - 2^e \cdot 2^p \\
+& = & \left( 2 \cdot 2^e \cdot 2^p + 2 \cdot \frac{1}{2} \cdot 2^e \cdot 2^p \right)^+ + 2^e \\
+& = & \left( 2^{e+1} \cdot \left( 2^p + 2^{p-1} \right) \right)^+ + 2^e \\
+& = & 2^{e+1} \cdot \left( 2^p + 2^{p-1} + 1 \right) + 2^e \\
+& = & 2^{e+1} \cdot \left( 2^p + 2^{p-1} \right) + 2^{e+1} + 2^e \\
+& = & 2^{e+1} \cdot \left( 2^p + 2^{p-1} \right) + 3 \cdot 2^e \\
+& = & 3 \cdot 2^e \cdot 2^p + 3 \cdot 2^e \\
+& = & 3 \cdot 2^e \cdot \left( 2^p + 1 \right) \\
+& = & 3 \cdot \left( 2^e \cdot 2^p \right)^+ \\
+& = & 3 \cdot x^+ 
+\end{eqnarray*}
+\qed
+\end{proof}
+\begin{lemma}[Monotony of the $\mUlp$ function] \label{ulpmonoton} ~ \\
+The $\mUlp$ function is monotonic for non-subnormal positive floating point numbers and it is monotonic for non-subnormal 
+negative floating point numbers, i.e. 
+$$\forall x,y \in \F \mbox{ . } denorm < x \leq y \Rightarrow \mUlp\left( x \right) \leq \mUlp\left( y \right)$$
+$$\lor$$
+$$\forall x,y \in \F \mbox{ . } x \leq y < -denorm \Rightarrow \mUlp\left( x \right) \geq \mUlp\left( y \right)$$
+where $denorm$ is the greatest positive subnormal.
+\end{lemma}
+\begin{proof} ~ \\
+As a matter of fact it suffices to show that the $\mUlp$ function is monotonic for non-subnormal floating point numbers 
+and to apply its definition \ref{defulp} for the negative case.\\
+Let us suppose so that we have two floating point numbers $x, y \in \F$ such that $denorm < x < y$. 
+Without loss of generality we suppose that $x^+ \not = + \infty$ and that 
+$y^+ \not = + \infty$. Otherwise we apply definition \ref{defulp} of the $\mUlp$ function and lemma \ref{multhalf}.\\
+So we get
+$$\mUlp\left( y \right) - \mUlp\left( x \right) = y^+ - y - x^+ + x$$
+It suffices now to show that 
+$$y^+ - x^+ - y + x \geq 0$$
+We can suppose that we would have
+\begin{eqnarray*}
+x & = & 2^{e_x} \cdot m_x \\
+y & = & 2^{e_y} \cdot m_y 
+\end{eqnarray*}
+with $e_x, e_y \in \Z$, $2^p \leq m_x, m_y < 2^{p+1} - 1$.\\
+Since $y > x$, we clearly see that
+$$\left( e_y, m_y \right) \geq_{\mbox{lex}} \left( e_x, m_x \right)$$ \\
+So four different cases are possible:
+\begin{enumerate}
+\item \begin{eqnarray*}
+x^+ & = & 2^{e_x} \cdot \left( m_x + 1 \right) \\
+y^+ & = & 2^{e_y} \cdot \left( m_y + 1 \right)
+\end{eqnarray*}
+Hence
+\begin{eqnarray*}
+y^+ - x^+ - y + x & = & 2^{e_y} \cdot \left( m_y + 1 \right) - 2^{e_x} \cdot \left( m_x + 1 \right) - 2^{e_y} \cdot m_y + 2^{e_x} \cdot m_x \\
+& = & 2^{e_y} - 2^{e_x} \\
+& \geq & 0
+\end{eqnarray*}
+\item \begin{eqnarray*}
+x^+ & = & 2^{e_x} \cdot \left( m_x + 1 \right) \\
+y^+ & = & 2^{e_y+1} \cdot 2^p
+\end{eqnarray*}
+which yields to
+\begin{eqnarray*}
+y^+ - x^+ - y + x & = & 2^{e_y+1} \cdot 2^p - 2^{e_x} \cdot \left( m_x + 1 \right) - 2^{e_y} \cdot \left( 2^{p+1} - 1 \right) + 2^{e_x} \cdot m_x \\
+& = & 2^{e_y} - 2^{e_x} \\
+& \geq & 0
+\end{eqnarray*}
+\item \begin{eqnarray*}
+x^+ & = & 2^{e_x+1} \cdot 2^p \\
+y^+ & = & 2^{e_y} \cdot \left( m_y  + 1 \right)
+\end{eqnarray*}
+One checks that
+\begin{eqnarray*}
+y^+ - x^+ - y + x & = & 2^{e_y} \cdot \left( m_y + 1 \right) - 2^{e_x+1} \cdot 2^p - 2^{e_y} \cdot m_y + 2^{e_x} \cdot \left( 2^{p+1} - 1 \right) \\
+& = & 2^{e_y} - 2^{e_x} \\
+& \geq & 0
+\end{eqnarray*}
+\item \begin{eqnarray*}
+x^+ & = & 2^{e_x+1} \cdot 2^p \\
+y^+ & = & 2^{e_y+1} \cdot 2^p
+\end{eqnarray*}
+Thus
+\begin{eqnarray*}
+y^+ - x^+ - y + x & = & 2^{e_y+1} \cdot 2^p - 2^{e_x+1} \cdot 2^p - 2^{e_y} \cdot \left( 2^{p+1} - 1 \right) + 2^{e_x} \cdot \left( 2^{p-1} - 1\right) \\
+& = & 2^{e_y} - 2^{e_x} \\
+& \geq & 0
+\end{eqnarray*}
+\end{enumerate}
+This finishes the proof.\qed
+\end{proof}
+\section{A normal form and renormalization procedures}
+Let us now analyse a renormalization algorithm. We will prove its
+correctness be a series of lemmas and a final theorem. \\
+Let be the following procedure:
+\begin{algorithm}[Renormalization] \label{renorm}~\\
+{\bf In: $a_\hi, a_\mi, a_\lo \in \F$} verifying the following preconditions:\\
+{\bf Preconditions: }
+\begin{itemize}
+\item None of the numbers $a_\hi, a_\mi, a_\lo$ is subnormal
+\item $a_\hi$ and $a_\mi$ do not overlap in more than $51$ bits
+\item $a_\mi$ and $a_\lo$ do not overlap in more than $51$ bits
+\end{itemize}
+which means formally:
+\begin{eqnarray*}
+\left \vert a_\mi \right \vert & \leq & 2^{-2} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-2} \cdot \left \vert a_\mi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-4} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+{\bf Out: $r_\hi, r_\mi, r_\lo \in \F$}
+\begin{eqnarray*}
+\left(t_{1\hi}, t_{1\lo}\right) & \gets & \mAdd\left(a_\mi,a_\lo\right) \\
+\left(r_\hi, t_{2\lo}\right) & \gets & \mAdd\left(a_\hi, t_{1\hi}\right) \\
+\left(r_\mi, r_\lo\right) & \gets & \mAdd\left(t_{2\lo}, t_{1\lo}\right)
+\end{eqnarray*}
+\end{algorithm}
+Consult also \cite{Finot-thesis} on the subject of this algorithm.
+Let us give now some lemmas on the properties of the values returned by 
+algorithm \ref{renorm} and on the intermediate ones.
+\begin{lemma}[Exact sum] \label{exact} ~\\
+For each triple-double number $a_\hi + a_\mi + a_\lo$, algorithm \ref{renorm} 
+returns a triple-double number $r_\hi + r_\mi + r_\lo$ such that
+$$a_\hi + a_\mi + a_\lo = r_\hi + r_\mi + r_\lo$$
+\end{lemma}
+\begin{proof} ~\\
+This fact is a trivial consequence of the properties of the \Add~ algorithm. \qed
+\end{proof}
+\begin{lemma}[Rounding of the middle component] \label{properties}~\\
+For each triple-double number $a_\hi + a_\mi + a_\lo$, algorithm \ref{renorm} 
+returns a triple-double number $r_\hi + r_\mi + r_\lo$ such that
+$$r_\mi = \circ \left( r_\mi + r_\lo \right)$$
+The same way, the intermediate and final value will verify the following properties:
+\begin{eqnarray*}
+t_{1\hi} & = & \circ \left( a_\mi + a_\lo \right) \\
+r_\hi & = & \circ \left( a_\hi + t_{1\hi} \right) \\
+\left \vert t_{1\lo} \right \vert & \leq & 2^{-53} \cdot \left \vert t_{1\hi} \right \vert \\ 
+\left \vert t_{2\lo} \right \vert & \leq & 2^{-53} \cdot \left \vert r_\hi \right \vert \\ 
+\end{eqnarray*}
+In particular, $r_\mi$ will not be equal to $0$ if $r_\lo$ is not equal to $0$.
+\end{lemma}
+\begin{proof} ~\\
+This fact is a trivial consequence of the properties of the \Add~ algorithm. \qed
+\end{proof}
+\begin{lemma}[Upper bounds] \label{major}~\\
+For all arguments of algorithm \ref{renorm}, 
+the intermediate and final values 
+$t_{1\hi}$, $t_{1\lo}$, $t_{2\lo}$ and $r_\mi$
+can be bounded upwards as follows:
+\begin{eqnarray*}
+\left \vert t_{1\hi} \right \vert & \leq & 2^{-1} \cdot \left \vert a_\hi \right \vert \\
+\left \vert t_{1\lo} \right \vert & \leq & 2^{-54} \cdot \left \vert a_\hi \right \vert \\
+\left \vert t_{2\lo} \right \vert & \leq & 2^{-52} \cdot \left \vert a_\hi \right \vert \\
+\left \vert t_\mi \right \vert & \leq & 2^{-51} \cdot \left \vert a_\hi \right \vert 
+\end{eqnarray*}
+\end{lemma}
+\begin{proof} ~\\
+\begin{enumerate}
+\item {\bf Upper bound for $\left \vert t_{1\hi} \right \vert$:}\\
+We have supposed that 
+\begin{eqnarray*}
+\left \vert a_\mi \right \vert & \leq & 2^{-2} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-4} \cdot \left \vert a_\hi \right \vert 
+\end{eqnarray*}
+So we can check that
+\begin{eqnarray*}
+\left \vert t_{1\hi} \right \vert & \leq & \left \vert a_\mi \right \vert + \left \vert a_\lo \right \vert + 
+2^{-54} \cdot \left \vert a_\hi \right \vert\\
+& \leq & 2^{-2} \cdot \left \vert a_\hi \right \vert + 2^{-4} \cdot \left \vert a_\hi \right \vert + 
+2^{-54} \cdot \left \vert a_\hi \right \vert \\
+& \leq & 2^{-1} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+\item {\bf Upper bound for $\left \vert t_{1\lo} \right \vert$:}\\
+Using the properties of the \Add~ algorithm we can get to know that
+$$\left \vert t_{1\lo} \right \vert \leq 2^{-53} \cdot \left \vert t_{1\hi} \right \vert$$
+which yields finally to
+$$\left \vert t_{1\lo} \right \vert \leq 2^{-54} \cdot \left \vert a_\hi \right \vert$$
+\item {\bf Upper bound for $\left \vert t_{2\lo} \right \vert$:}
+\begin{eqnarray*}
+\left \vert t_{2\lo} \right \vert & \leq & 2^{-53} \cdot \left \vert r_\hi \right \vert \\
+& \leq & 2^{-53} \cdot \circ \left( \left \vert a_\hi \right \vert + \left \vert t_{1\hi} \right \vert \right) \\
+& \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert + 2^{-53} \cdot \left \vert t_{1\hi} \right \vert + 2^{-106} \cdot \left \vert a_\hi \right \vert +
+2^{-106} \cdot \left \vert t_{1\hi} \right \vert \\
+& \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert + 2^{-54} \cdot \left \vert a_\hi \right \vert + 2^{-106} \cdot \left \vert a_\hi \right \vert +
+2^{-107} \cdot \left \vert a_\hi \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+\item {\bf Upper bound for $\left \vert r_\mi \right \vert$:}
+\begin{eqnarray*}
+\left \vert r_\mi \right \vert & \leq & \left \vert t_{2\lo} \oplus t_{1\lo} \right \vert \\
+& \leq & \left \vert t_{2\lo} \right \vert + \left \vert t_{1\lo} \right \vert + 2^{-53} \cdot \left \vert t_{2\lo} + t_{1\lo} \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert a_\hi \right \vert + 2^{-54} \cdot \left \vert a_\hi \right \vert + 2^{-105} \cdot \left \vert a_\hi \right \vert +
+2^{-107} \cdot \left \vert a_\hi \right \vert \\
+& \leq & 2^{-51} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+\end{enumerate} ~ \qed
+\end{proof}
+\begin{lemma}[Special case for $r_\hi = 0$] \label{specialcaseinzero}~\\
+For all arguments verifying the preconditions of algorithm \ref{renorm}, 
+$r_\hi$ will not be equal to $0$ if $r_\mi$ is not equal to $0$. \\
+Formally:
+$$r_\hi = 0 \Rightarrow r_\mi = 0$$
+\end{lemma}
+\begin{proof} ~\\
+Let us suppose that $r_\hi = 0$ and that $r_\mi \not = 0$. So we get
+\begin{eqnarray*}
+\left \vert r_\hi \right \vert & = & \left \vert \circ \left( a_\hi + t_{1\hi} \right) \right \vert \\
+& \geq & \left \vert \circ \left( 2^{-1} \cdot a_\hi \right) \right \vert \\
+& = & 2^{-1} \left \vert a_\hi \right \vert
+\end{eqnarray*}
+because we have already shown that $$\left \vert t_{1\hi} \right \vert \leq 2^{-1} \cdot \left \vert a_\hi \right \vert$$
+So for $r_\hi$ being equal to $0$, $a_\hi$ must be equal to $0$.\\
+In contrast, this yields to $t_{1\hi} = 0$ because $$r_\hi = \circ \left( 0 + t_{1\hi} \right) = t_{1\hi}$$
+This implies that $t_{1\lo} = 0$ because of the properties of the \Add~
+procedure. 
+The same way, we get $t_{2\lo} = 0$.\\
+We can deduce from this that
+$$0 \not = r_\mi = \circ \left( 0 + 0 \right) = 0$$ which is a contradiction.\qed
+\end{proof}
+\begin{lemma}[Lower bound for $\left \vert r_\hi \right \vert$] \label{minor}~\\
+For all arguments verifying the preconditions of algorithm \ref{renorm}, 
+the final result
+$r_\hi$
+can be bounded in magnitude as follows:
+$$\left \vert r_\hi \right \vert \geq 2^{-1} \cdot \left \vert a_\hi \right \vert$$
+\end{lemma}
+\begin{proof} ~\\
+We have that 
+$$r_\hi = a_\hi \oplus t_{1\hi}$$
+Clearly, if $a_\hi$ and $t_{1\hi}$ have the same sign, we get
+$$\left \vert r_\hi \right \vert \geq \left \vert a_\hi \right \vert \geq 2^{-1} \cdot \left \vert a_\hi \right \vert$$
+Otherwise - $a_\hi$ and $t_{1\hi}$ are now of the opposed sign - we have
+already seen that 
+$$\left \vert t_{1\hi} \right \vert \leq 2^{-1} \cdot \left \vert a_\hi \right \vert$$
+So, in this case, too, we get
+$$\left \vert r_\hi \right \vert \geq 2^{-1} \cdot \left \vert a_\hi \right \vert$$ \qed
+\end{proof}
+\begin{corollary}[Additional property on the \Add~procedure] \label{addsupp} ~\\
+Let be $r_\hi$ and $r_\lo$ two double precision floating point numbers returned
+by the \Add~ procedure. \\
+So
+$$\left \vert r_\lo \right \vert \leq \frac{1}{2} \cdot \mUlp\left( r_\hi \right)$$
+\end{corollary}
+\begin{proof} ~\\
+By the definition \ref{adddef} of the \Add~ procedure, we have
+$r_\hi + r_\lo = x + y$ and $r_\hi = \circ \left( x + y \right)$ and $r_\lo = x+y -r_\lo$.
+Thus the number $r_\lo = \left( x + y \right) - \circ \left( x + y \right) = 
+\left( x + y \right) - \left( x \oplus y \right)$ is the absolute error of correctly 
+rounded IEEE 754 addition. It is bounded by $\frac{1}{2} \cdot \mUlp\left( r_\hi \right)$ which
+gives us the desired result.\qed
+\end{proof}
+\begin{theorem}[Correctness of the renormalization algorithm \ref{renorm}] ~\\
+For all arguments verifying the preconditions of procedure \ref{renorm}, 
+the values returned 
+$r_\hi$, $r_\mi$ and $r_\lo$ will not overlap 
+unless they are all equal to $0$ and their sum will be exactly the sum of the
+values in argument $a_\hi$, $a_\mi$ and $a_\lo$.
+\end{theorem}
+\begin{proof} ~ \\
+The fact that the sum of the values returned is exactly equal to the sum of
+the values in argument has already been proven by lemma \ref{exact}.\\
+Without loss of generality, we will now suppose that neither $r_\hi$ nor
+$r_\mi$ will be $0$ in which case all values returned would be equal to $0$ 
+as we have shown it by lemmas \ref{specialcaseinzero} and \ref{properties}.\\
+Using lemma \ref{properties}, we know already that $r_\mi$ and $r_\lo$ do not
+overlap. 
+Let us show now that $r_\hi$ and $r_\mi$ do not overlap 
+by proving that the following inequality is true
+$$\left \vert r_\mi \right \vert \leq \frac{3}{4} \cdot \mUlp\left( r_\hi
+\right) < \mUlp\left( r_\hi \right)$$ 
+There are two different cases to be treated. \\ ~ \\
+{\bf 1st case: $t_{2\lo} = 0$} \\
+We know that  
+$$r_\mi = \circ \left( t_{2\lo} + t_{1\lo} \right) = \circ \left( 0 + t_{1\lo} \right) = t_{1\lo}$$
+When showing lemma \ref{major}, we have already proven that
+$$\left \vert t_{1\lo} \right \vert \leq 2^{-54} \cdot \left \vert a_\hi \right \vert$$
+Using lemma \ref{minor}, we therefore know that
+$$\left \vert r_\mi \right \vert \leq 2^{-53} \cdot \left \vert r_\hi \right \vert$$
+which is the result we wanted to prove.\\ ~ \\
+{\bf 2nd case: $t_{2\lo} \not = 0$} \\
+Still using lemma \ref{major}, we have shown that
+$$\left \vert t_{1\hi} \right \vert \leq 2^{-1} \cdot \left \vert a_\hi \right \vert$$
+In consequence, when the IEEE 754 \cite{IEEE754} addition $r_\hi = a_\hi \oplus t_{1\hi}$ is
+ported out, the rounding will be done at a bit of weight heigher than one 
+$\mUlp\left(t_{1\hi} \right)$ because $t_{2\lo}$ is strictly greater than $0$
+and because $a_\hi$ and $t_{1\hi}$ 
+do not completely overlap. Therefore we can check that
+$$\left \vert t_{2\lo} \right \vert \geq \mUlp\left( t_{1\hi} \right)$$
+With the result of lemma \ref{major} we already mentioned, we can deduce that  
+$$\left \vert t_{2\lo} \right \vert \leq \frac{1}{2} \cdot \mUlp\left( t_{1\hi} \right) \leq \frac{1}{2} \cdot \left \vert t_{2\lo} \right \vert$$
+So one can verify the following upper bound using among others lemma \ref{addsupp}:
+\begin{eqnarray*}
+\left \vert r_\mi \right \vert & = & \left \vert \circ \left(t_{2\lo} + t_{1\lo} \right) \right \vert \\
+& \leq & \circ \left( \frac{3}{2} \cdot \left \vert t_{2\lo} \right \vert \right) \\
+& \leq & \circ \left( \frac{3}{4} \cdot \mUlp \left( r_\hi \right) \right) \\
+& = & \frac{3}{4} \cdot \mUlp \left( r_\hi \right)
+\end{eqnarray*}
+One remarks that the last simplification is correct here because $\mUlp$ is
+always equal to an integer power of $2$ and because the precision of a double
+is greater than $4$ bits.\qed
+\end{proof} 
+\section{Operators on double-double numbers}
+Since we dispose now of a renormalization procedure which is effective and
+proven, we can now consider the different addition and multiplication
+operators we need. They will surely work finally on expansions of size $3$,
+but the double-double format \cite{Dek71} must be analysed, too, because it is at the base
+of the triple-double format. We already mentioned that on definition and
+analysis of this operators, we need not care such a lot of the overlap in the
+components of a triple-double number any more: as long as the overlap does
+not make us loose a too much of the final accuracy because several bits of the
+\ouvguill significand\fermguill~ are represented twice, overlap is not of an
+issue for intermediate values. At the end of triple-double computations, it
+will be sufficient to apply once the renormalization procedure. In order to
+measure the consequences of an overlap in the operands on final accuracy and
+in order to be able to follow the increase of the overlap during computations
+in triple-double, we will indicate for each operator which produces a triple
+double result or which takes a triple-double operand not only a bound for
+relative and absolute rounding errors but also a bound for the maximal overlap
+of the values returned. All this bounds will be parameterised by a variable
+representing the maximal overlap of the triple-double arguments. 
+\subsection{The addition operator \AddDD}
+Let us analyse first the following addition procedure:
+\begin{algorithm}[\AddDD] \label{addDDref} ~ \\
+{\bf In:} two double-double numbers, $a_\hi + a_\lo$ and $b_\hi + b_\lo$ \\
+{\bf Out:} a double-double number $r_\hi + r_\lo$ \\
+{\bf Preconditions on the arguments:} $$\left \vert a_\lo \right \vert \leq 2^{-53} \cdot \left \vert a_\hi \right \vert$$
+                                $$\left \vert b_\lo \right \vert \leq 2^{-53} \cdot \left \vert b_\hi \right \vert$$ 
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$t_1 \gets a_\hi \oplus b_\hi$ \\
+{\bf if} $\left \vert a_\hi \right \vert \geq \left \vert b_\hi \right \vert$ {\bf then} 
+\begin{center}
+\begin{minipage}[b]{40mm}
+$t_2 \gets a_\hi \ominus t_1$ \\
+$t_3 \gets t_2 \oplus b_\hi$ \\
+$t_4 \gets t_3 \oplus b_\lo$ \\
+$t_5 \gets t_4 \oplus a_\lo$ 
+\end{minipage}
+\end{center}
+{\bf else} 
+\begin{center}
+\begin{minipage}[b]{40mm}
+$t_2 \gets b_\hi \ominus t_1$ \\
+$t_3 \gets t_2 \oplus a_\hi$ \\
+$t_4 \gets t_3 \oplus a_\lo$ \\
+$t_5 \gets t_4 \oplus b_\lo$ 
+\end{minipage}
+\end{center}
+{\bf end if} \\
+$\left( r_\hi, r_\lo \right) \gets \mAdd\left( t_1, t_5 \right)$
+\end{minipage}
+\end{center}
+\end{algorithm}
+Compare \cite{crlibmweb} concerning algorithm \ref{addDDref}.
+\begin{theorem}[Relative error of algorithm \ref{addDDref} \AddDD~ without
+    occurring of cancellation\label{theoAddDDref}] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\lo$ the double-double arguments of algorithm \ref{addDDref} \AddDD.\\
+If $a_\hi$ and $b_\hi$ have the same sign, so we know that
+$$r_\hi + r_\lo = \left(\left(a_\hi + a_\lo \right) + \left( b_\hi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq 2^{-103,5}$$
+\end{theorem}
+\begin{proof} \label{AddDDpreuve} ~ \\
+Since the algorithm \AddDD~ ends by a call to the \Add~ procedure, it suffices
+to show that
+$$t_1 + t_5 = \left(\left(a_\hi + a_\lo \right) + \left( b_\hi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+Further, since the two branches of the algorithm are symmetrical, we can
+suppose that $\left \vert a_\hi \right \vert \geq \left \vert b_\hi \right \vert$
+and consider only one branch without loss of generality.
+Finally, we remark that the following lines of the \AddDD~ procedure
+constitute a non-conditional \Add~ with arguments $a_\hi$ and
+$b_\hi$ and the result $t_1 + t_3$:
+\begin{center}
+\begin{minipage}[b]{50mm}
+$t_1 = a_\hi \oplus b_\hi$ \\
+$t_2 = a_\hi \ominus t_1$ \\
+$t_3 = t_2 \oplus b_\hi$ 
+\end{minipage}
+\end{center}
+Thus, we get
+\begin{eqnarray*}
+t_5 & = & t_4 \oplus a_\lo \\
+& = & \left( t_4 + a_\lo \right) \cdot \left( 1 + \epsilon_1 \right) \\
+& = & \left( \left( t_3 + bl \right) \cdot \left( 1 + \epsilon_2 \right) + a_\lo \right) \cdot \left( 1 + \epsilon_1 \right) \\
+& = & t_3 + a_\lo + b_\lo + \delta
+\end{eqnarray*}
+with
+$$\delta = t_3\cdot\epsilon_2 + b_\lo\cdot\epsilon_2 + t_3\cdot\epsilon_1 + b_\lo\cdot\epsilon_1 + t_3\cdot\epsilon_2\cdot\epsilon_2 
++ b_\lo\cdot\epsilon_2\cdot\epsilon_2 + a_\lo\cdot\epsilon_1$$
+For giving an upper bound for $\left \vert \delta \right \vert$, let us first
+give an upper bound for $\left \vert t_3 \right \vert$, $\left \vert a_\lo \right \vert$ and
+$b_\lo$ as function of $\left \vert a_\hi + b_\hi \right \vert$ using the
+following bounds that we know already:
+\begin{eqnarray*}
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert b_\hi \right \vert \\
+\left \vert t_3 \right \vert & \leq & 2^{-53} \cdot \left \vert t_1 \right \vert 
+\end{eqnarray*}
+We get therefore
+\begin{eqnarray*}
+\left \vert t_3 \right \vert & \leq & 2^{-53} \cdot \left \vert t_1 \right \vert \\
+& = & 2^{-53} \cdot \left \vert a_\hi \oplus b_\hi \right \vert \\
+& \leq & 2^{-53} \cdot \left \vert a_\hi + b_\hi \right \vert + 2^{-106} \cdot \left \vert a_\hi + b_\lo \right \vert 
+\end{eqnarray*}
+and than
+\begin{eqnarray*}
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+& \leq & 2^{-53} \cdot \left \vert a_\hi + b_\hi \right \vert 
+\end{eqnarray*}
+The last bound is verified because we suppose that $a_\hi$ and $b_\hi$ have the
+same sign. \\
+Finally, since $\left \vert a_\hi \right \vert \geq \left \vert b_\hi \right \vert$, 
+\begin{eqnarray*}
+\left \vert b_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert b_\hi \right \vert \\
+& \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+& \leq & 2^{-53} \cdot \left \vert a_\hi + b_\hi \right \vert 
+\end{eqnarray*} 
+Thus we get for $\left \vert \delta \right \vert$:
+\begin{eqnarray*}
+\left \vert \delta \right \vert & \leq & \left \vert a_\hi + b_\hi \right \vert \cdot \left(
+                                         2^{-106} + 2^{-159} + 2^{-106} + 2^{-106} + 2^{-159} + 
+                                         2^{-106} + 2^{-159} + 2^{-212} + 2^{-212} + 2^{-106} \right) \\
+& \leq & \left \vert a_\hi + b_\hi \right \vert \cdot \left( 2^{-104} + 2^{-106} + 2^{-158} + 2^{-159} + 2^{-211} \right)
+\end{eqnarray*}
+Let us now give a lower bound for $\left \vert a_\hi + a_\lo + b_\hi + b_\lo
+\right \vert$ as a function of $\left \vert a_\hi + b_\hi \right \vert$
+in order to be able to give a relative error bound for the procedure
+\AddDD. We have that 
+\begin{eqnarray*}
+\left \vert a_\lo + b_\lo \right \vert & \leq & \left \vert a_\lo \right \vert + \left \vert b_\lo \right \vert \\
+& \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert + 2^{-53} \cdot \left \vert b_\hi \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert a_\hi \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert a_\hi + b_\hi \right \vert 
+\end{eqnarray*}
+So we can check that
+$$\left \vert a_\hi + a_\lo + b_\hi + b_\lo \right \vert \geq \left( 1 - 2^{-52} \right) \cdot \left \vert a_\hi + b_\hi \right \vert$$
+Concerning $\left \vert \delta \right \vert$, this yields to
+$$\left \vert \delta \right \vert \leq 
+\left \vert a_\hi + a_\lo + b_\hi + b_\lo \right \vert \cdot \frac{1}{1-2^{-52}} \cdot 
+\left( 2^{-104} + 2^{-106} + 2^{-158} + 2^{-159} + 2^{-211} \right)$$
+One easily checks that 
+$$ \frac{1}{1-2^{-52}} \cdot \left( 2^{-104} + 2^{-106} + 2^{-158} + 2^{-159} + 2^{-211} \right) \leq 2^{-103,5}$$
+from which one trivially deduces the affirmation.\qed
+\end{proof}
+\begin{theorem}[Relative error of algorithm \ref{addDDref} \AddDD~ with a
+    bounded cancellation\label{theoAddDDrefborn}] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\lo$ the double-double arguments of \ref{addDDref} \AddDD.\\
+If $a_\hi$ and $b_\hi$ are of different sign and if one can check that
+$$\left \vert b_\hi \right \vert \leq 2^{-\mu} \cdot \left \vert a_\hi \right
+\vert$$ for $\mu \geq 1$ \\
+so the returned result will verify 
+$$r_\hi + r_\lo = \left(\left(a_\hi + a_\lo \right) + \left( b_\hi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq 2^{-103}\cdot \frac{1-2^{-\mu - 1}}{1-2^{-\mu}-2^{-52}} \leq 2^{-102}$$
+\end{theorem}
+\begin{proof} ~ \\
+Let us reuse the results obtained at the proof \ref{AddDDpreuve} and let us
+start by giving an upper bound for $\left \vert b_\lo \right \vert$
+as a function of $\left \vert a_\hi  \right \vert$:
+$$\left \vert b_\lo \right \vert \leq 2^{-53} \cdot \left \vert b_\hi \right \vert \leq 2^{-53-\mu} \cdot \left \vert a_\hi \right \vert$$
+Let us now continue with a lower bound for $\left \vert a_\hi + b_\hi \right
+\vert$ still as a function of $\left \vert a_\hi \right \vert$:
+$$\left \vert a_\hi + b_\hi \right \vert \geq \left \vert a_\hi \right \vert \cdot \left( 1 - 2^{-\mu} \right)$$
+We get in consequence
+$$\left \vert a_\lo \right \vert \leq \frac{2^{-53}}{1-2^{-\mu}} \cdot \left \vert a_\hi + b_\hi \right \vert$$
+and
+$$\left \vert b_\lo \right \vert \leq \frac{2^{-53-\mu}}{1-2^{-\mu}} \cdot \left \vert a_\hi + b_\hi \right \vert$$
+Thus we can check that
+$$\left \vert \delta \right \vert \leq \left \vert a_\hi + b_\hi \right \vert \cdot 2^{-103} \cdot \frac{1-2^{-\mu-1}}{1-2^{-\mu}}$$
+Once again, we must give a lower bound for $\left \vert a_\hi + a_\lo + b_\hi
+  + b_\lo \right \vert$
+with regard to $\left \vert a_\hi + b_\hi \right \vert$:
+We know that 
+\begin{eqnarray*}
+\left \vert a_\lo + b_\lo \right \vert & \leq & \left \vert a_\lo \right \vert + \left \vert b_\lo \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert a_\hi \right \vert \\
+& \leq & \frac{2^{-52}}{1-2^{-\mu}} \cdot \left \vert a_\hi + b_\hi \right \vert
+\end{eqnarray*}
+So
+$$\left \vert a_\hi + a_\lo + b_\hi + b_\lo \right \vert \geq \left \vert a_\hi + b_\hi \right \vert \cdot \frac{1-2^{-\mu}-2^{-52}}{1-2^{-\mu}}$$
+Thus we get for $\left \vert \delta \right \vert$
+\begin{eqnarray*}
+\left \vert \delta \right \vert & \leq & \left \vert a_\hi + a_\lo + b_\hi + b_\lo \right \vert \cdot \frac{1-2^{-\mu}}{1-2^{-\mu}-2^{-52}} \cdot 
+2^{-103} \cdot \frac{1-2^{-\mu-1}}{1-2^{-\mu}} \\
+& = & \left \vert a_\hi + a_\lo + b_\hi + b_\lo \right \vert \cdot 2^{-103} \cdot \frac{1-2^{-\mu-1}}{1-2^{-\mu}-2^{-52}}
+\end{eqnarray*}
+So finally the following inequality is verified for the relative error $\epsilon$:
+$$\left \vert \epsilon \right \vert \leq 2^{-103} \cdot \frac{1-2^{-\mu-1}}{1-2^{-\mu}-2^{-52}}$$
+We can still give a less exact upper bound for this term by one that does not
+depend on $\mu$ because $\mu \geq 1$:
+$$\frac{1-2^{-\mu-1}}{1-2^{-\mu}-2^{-52}}\leq\frac{\frac{3}{4}}{\frac{1}{2}-2^{-52}}\leq 2$$
+so
+$$\left \vert \epsilon \right \vert \leq 2^{-102}$$\qed
+\end{proof}
+\begin{theorem}[Absolute error of algorithm \ref{addDDref} \AddDD~
+    (general case)\label{addDDerrabs}] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\lo$ the double-double arguments of algorithm \ref{addDDref} \AddDD.\\
+The result $r_\hi + r_\lo$ returned by the algorithm verifies
+$$r_\hi + r_\lo = \left(a_\hi + a_\lo \right) + \left( b_\hi + b_\lo \right) + \delta$$
+where $\delta$ is bounded as follows:
+$$\left \vert \delta \right \vert \leq \max\left( 2^{-53} \cdot \left \vert a_\lo + b_\lo \right \vert, 
+                                                  2^{-102} \cdot \left \vert a_\hi + a_\lo + b_\hi + b_\lo \right \vert \right)$$
+\end{theorem}
+\begin{proof} ~ \\
+Without loss of generality, we can now suppose that 
+$$\frac{1}{2} \cdot \left \vert a_\hi \right \vert \leq \left \vert b_\hi \right \vert \leq \left \vert a_\hi \right \vert$$
+and that $a_\hi$ and $b_\hi$ have different signs
+because for all other cases, the properties we have to show are a direct
+consequence of theorems \ref{theoAddDDref} and \ref{theoAddDDrefborn}.\\
+So we have 
+$$\frac{1}{2} \cdot \left \vert a_\hi \right \vert \leq \left \vert b_\hi \right \vert \leq 2 \cdot \left \vert a_\hi \right \vert$$
+and
+$$\frac{1}{2} \cdot \left \vert b_\hi \right \vert \leq \left \vert a_\hi \right \vert \leq 2 \cdot \left \vert b_\hi \right \vert$$
+So the floating point operation
+$$t_1 = a_\hi \oplus b_\hi$$
+is exact by Sterbenz' lemma \cite{Ste74}.
+In consequence, $t_3$ will be equal to $0$ because, as we have already
+mentioned, the operations computing $t_1$ and $t_3$ out of $a_\hi$ and $b_\hi$ 
+constitute a \Add~ whose properties assure that
+$$t_3 = a_\hi + b_\hi - t_1$$
+We can deduce that
+$$t_4 = t_3 \oplus b_\lo = b_\lo$$
+and can finally check that
+$$t_5 = t_4 \oplus a_\lo = \left( t_4 + a_\lo \right) \cdot \left( 1 + \epsilon^* \right)$$
+with
+$$\left \vert \epsilon^* \right \vert \leq 2^{-53}$$
+So we get
+$$r_\hi + r_\lo = t_1 + t_5 = \left( a_\hi + a_\lo + b_\hi + b_\lo \right) + \delta$$
+with
+$$\left \vert \delta \right \vert \leq 2^{-53} \cdot \left \vert a_\lo + b_\lo \right \vert$$
+which yields to the bound to be proven
+$$\left \vert \delta \right \vert = \max\left( 2^{-53} \cdot \left \vert a_\lo + b_\lo \right \vert, 
+                                               2^{-102} \cdot \left \vert a_\hi + a_\lo + b_\hi + b_\lo \right \vert \right)$$ \qed
+\end{proof}
+\begin{theorem}[Output overlap of algorithm \ref{addDDref} \AddDD] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\lo$ the double-double arguments of algorithm \ref{addDDref} \AddDD.\\
+So the values $r_\hi$ and $r_\lo$ returned by the algorithm will not overlap
+at all and will verify 
+$$\left \vert r_\lo \right \vert \leq 2^{-53} \cdot \left \vert r_\hi \right \vert$$
+\end{theorem}
+\begin{proof} ~\\
+The proof of the affirmed property is trivial because the procedure \AddDD~
+ends by a call to sequence \Add~ which assures it.\qed 
+\end{proof}
+\subsection{The multiplication operator \MulDD}
+Let us now consider the multiplication operator \MulDD:
+\begin{algorithm}[\MulDD] \label{mulDDref} ~ \\
+{\bf In:} two double-double numbers, $a_\hi + a_\lo$ and $b_\hi + b_\lo$ \\
+{\bf Out:} a double-double number $r_\hi + r_\lo$ \\
+{\bf Preconditions on the arguments:} $$\left \vert a_\lo \right \vert \leq 2^{-53} \cdot \left \vert a_\hi \right \vert$$
+                            $$\left \vert b_\lo \right \vert \leq 2^{-53} \cdot \left \vert b_\hi \right \vert$$ 
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( t_1, t_2 \right) \gets \mMul\left( a_\hi, b_\hi \right)$ \\
+$t_3 \gets a_\hi \otimes b_\lo$ \\
+$t_4 \gets a_\lo \otimes b_\hi$ \\
+$t_5 \gets t_3 \oplus t_4$ \\
+$t_6 \gets t_2 \oplus t_5$ \\
+$\left(r_\hi, r_\lo \right) \gets \mAdd\left( t_1, t_6 \right)$\\
+\end{minipage}
+\end{center}
+\end{algorithm}
+Compare also to \cite{crlibmweb} concerning algorithm \ref{mulDDref}.
+\begin{theorem}[Relative error of algorithm \ref{mulDDref} \MulDD] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\lo$ the double-double arguments of algorithm \ref{mulDDref} \MulDD.\\
+So the values returned $r_\hi$ and $r_\lo$ verify
+$$r_\hi + r_\lo = \left(\left(a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq 2^{-102}$$
+Further $r_\hi$ and $r_\lo$ will not overlap at all and verify
+$$\left \vert r_\lo \right \vert \leq 2^{-53} \cdot \left \vert r_\hi \right \vert$$
+\end{theorem}
+\begin{proof} ~ \\
+Since algorithm \ref{mulDDref} ends by a call to the \Add~ procedure, 
+the properties of the latter yield to the fact that $r_\hi$ and $r_\lo$
+do not overlap at all and that $\left \vert r_\lo \right \vert \leq 2^{-53} \cdot \left \vert r_\hi \right \vert$.\\
+In order to give upper bounds for the relative and absolute error of the
+algorithm, let us express $t_6$ as a function of $t_2$, $a_\hi$, $a_\lo$,
+$b_\hi$ and $b_\lo$ joined by the error term $\delta$.\\
+We get
+\begin{eqnarray*}
+t_6 & = & t_2 \oplus \left( a_\hi \otimes b_\lo \oplus a_\lo \otimes b_\hi \right) \\
+& = & \left( t_2 + \left(a_\hi \cdot b_\lo \cdot \left( 1 + \epsilon_1 \right) + a_\lo \cdot b_\hi \cdot \left( 1 + \epsilon_2 \right) \right) \cdot
+\left(1 + \epsilon_3 \right) \right)\cdot \left( 1 + \epsilon_4 \right)
+\end{eqnarray*}
+where $\left \vert \epsilon_i \right \vert \leq 2^{-53}$, $i=1,2,3,4$.\\
+Simplifying this expression, we van verify that 
+$$t_6 = t_2 + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + \delta$$
+with
+\begin{eqnarray*}
+\left \vert \delta \right \vert & \leq & \left \vert a_\lo \cdot b_\lo + a_\hi \cdot b_\lo \cdot \epsilon_1 + a_\lo \cdot b_\hi \cdot \epsilon_2 +
+a_\hi \cdot b_\lo \cdot \epsilon_3 + a_\hi \cdot b_\lo \cdot \epsilon_1 \cdot \epsilon_3 + a_\lo \cdot b_\hi \cdot \epsilon_3 +
+a_\lo \cdot b_\hi \cdot \epsilon_1 \cdot \epsilon_3 \right.\\
+& & \left. + a_\hi \cdot b_\lo \cdot \epsilon_4 + a_\lo \cdot b_\hi \cdot \epsilon_4 +
+a_\hi \cdot b_\lo \cdot \epsilon_1 \cdot \epsilon_4 + a_\lo \cdot b_\hi \cdot \epsilon_2 \cdot \epsilon_4 + 
+a_\hi \cdot b_\lo \cdot \epsilon_3 \cdot \epsilon_4 \right. \\ 
+& & \left. + a_\hi \cdot b_\lo \cdot \epsilon_1 \cdot \epsilon_3 \cdot \epsilon_4 + a_\lo \cdot b_\hi \cdot \epsilon_3 \cdot \epsilon_4 + a_\lo \cdot b_\hi \cdot \epsilon_2 \cdot \epsilon_3 \cdot \epsilon_4 \right \vert \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 7 \cdot 2^{-106} + 6 \cdot 2^{-159} + 2^{-211} \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot 2^{-103}
+\end{eqnarray*}
+For checking the given bound, we have supposed the following inequalities:
+$$\left \vert a_\lo \right \vert \leq 2^{-53} \cdot \left \vert a_\hi \right \vert$$
+and
+$$\left \vert a_\lo \right \vert \leq 2^{-53} \cdot \left \vert a_\hi \right \vert$$
+Let us now give a lower bound for 
+$\left \vert \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo
+  \right)\right \vert$ as a function of
+$\left \vert a_\hi \cdot b_\hi \right \vert$. For doing so, we give an upper
+bound for 
+$\left \vert a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\lo \right \vert$. \\
+We verify since:
+\begin{eqnarray*} 
+\left \vert a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\lo \right \vert & \leq & 
+\left \vert a_\hi \cdot b_\lo \right \vert + \left \vert a_\lo \cdot b_\hi \right \vert + \left \vert a_\lo \cdot b_\lo \right \vert \\
+& \leq & 2^{-53} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-53} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 
+2^{-106} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \\
+& \leq & 2^{-51} \cdot \left \vert a_\hi \cdot b_\hi \right \vert 
+\end{eqnarray*}
+This yields to
+\begin{eqnarray*}
+\left \vert \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right) \right \vert & \geq &
+\left \vert a_\hi \cdot b_\hi \right \vert \cdot \left(1 - 2^{-51} \right) \\
+& \geq & \frac{1}{2} \cdot \left \vert a_\hi \cdot b_\hi \right \vert 
+\end{eqnarray*}
+from which we deduce that
+$$\left \vert \delta \right \vert \leq 2^{-102} \cdot \left \vert \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right) \right \vert$$
+which gives us as an bound for the relative error
+$$r_\hi + r_\lo = \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right) \cdot \left(1 + \epsilon \right)$$
+with
+$\left \vert \epsilon \right \vert \leq 2^{-102}$. \qed
+\end{proof}
+\section{Addition operators for triple-double numbers}
+\subsection{The addition operator \AddTT}
+We are going to consider now the addition operator \AddTT. We will only
+analyse a simplified case where the arguments' values verify some bounds
+statically known.
+\begin{algorithm}[\AddTT] \label{addTTref} ~ \\
+{\bf In:} two triple-double numbers, $a_\hi + a_\mi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\hi \right \vert & \leq & \frac{3}{4} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\mi \right \vert & \leq & 2^{-\alpha_o} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-\alpha_u} \cdot \left \vert a_\mi \right \vert \\
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert \\
+\alpha_o & \geq & 4 \\
+\alpha_u & \geq & 1 \\
+\beta_o & \geq & 4 \\
+\beta_u & \geq & 1 \\
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left(r_\hi, t_1 \right) \gets \mAdd\left( a_\hi, b_\hi \right)$ \\
+$\left(t_2, t_3 \right) \gets \mAdd\left( a_\mi, b_\mi \right)$ \\
+$\left(t_7, t_4 \right) \gets \mAdd\left( t_1, t_2 \right)$ \\
+$t_6 \gets a_\lo \oplus b_\lo$ \\
+$t_5 \gets t_3 \oplus t_4$ \\
+$t_8 \gets t_5 \oplus t_6$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAdd\left( t_7, t_8 \right)$
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{addTTref} \AddTT\label{theoAddTT}] ~ \\
+Let be $a_\hi + a_\mi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ the triple-double
+arguments of algorithm \ref{addTTref} \AddTT~ verifying the given 
+preconditions.\\
+So the following egality will hold for the returned values $r_\hi$, $r_\mi$ and $r_\lo$ 
+$$r_\hi + r_\mi + r_\lo = \left(\left(a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded by:
+$$\left \vert \epsilon \right \vert \leq 2^{-\min\left(\alpha_o + \alpha_u,\beta_o + \beta_u\right) - 47} + 
+2^{-\min\left( \alpha_o, \beta_o\right) - 98}$$
+The returned values $r_\mi$ and $r_\lo$ will not overlap at all and the
+overlap of $r_\hi$ and $r_\mi$ will be bounded by the following expression:
+$$\left \vert r_\mi \right \vert \leq 2^{-\min\left( \alpha_o, \beta_o \right) + 5} \cdot \left \vert r_\hi \right \vert$$
+\end{theorem}
+\begin{proof} ~ \\
+The procedure \ref{addTTref} ends by a call to the \Add~ sequence. One can
+trivially deduce that $r_\mi$ and $r_\lo$ do not overlap at all and verify 
+$$\left \vert r_\lo \right \vert \leq 2^{-53} \cdot \left \vert r_\mi \right \vert$$
+Further, it suffices that the bounds given at theorem \ref{theoAddTT} hold for
+$t_7$ and $t_8$ because 
+the last addition computing $r_\mi$ and $r_\lo$ will be exact.
+The same way, one can deduce the following inequalities out of the properties
+of the \Add~ procedure. They will become useful during this proof. 
+$$\left \vert t_1 \right \vert \leq 2^{-53} \cdot \left \vert r_\hi \right \vert$$
+$$\left \vert t_3 \right \vert \leq 2^{-53} \cdot \left \vert t_2 \right \vert$$
+$$\left \vert t_4 \right \vert \leq 2^{-53} \cdot \left \vert t_7 \right \vert$$
+Let us start the proof by giving bounds for the magnitude of $r_\hi$ with
+regard to $a_\hi$:\\
+We have on the one hand
+\begin{eqnarray*}
+\left \vert r_\hi \right \vert & = & \left \vert \circ\left( a_\hi + b_\hi \right) \right \vert \\
+& = & \circ \left( \left \vert a_\hi + b_\hi \right \vert \right) \\
+& \leq & \circ \left( \left \vert a_\hi \right \vert + \left \vert b_\hi \right \vert \right) \\
+& \leq & \circ \left( \left \vert a_\hi \right \vert + \frac{3}{4} \cdot \left \vert a_\hi \right \vert \right) \\
+& \leq & \circ \left( 2 \cdot \left \vert a_\hi \right \vert \right) \\
+& = & 2 \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+and on the other
+\begin{eqnarray*}
+\left \vert r_\hi \right \vert & = & \circ \left( \left \vert a_\hi + b_\hi \right \vert \right) \\
+& \geq & \circ \left( \frac{1}{4} \cdot \left \vert a_\hi \right \vert \right) \\
+& = & \frac{1}{4} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+So we know that $\frac{1}{4} \cdot \left \vert a_\hi \right \vert \leq \left \vert r_\hi \right \vert \leq 2 \cdot \left \vert a_\hi \right \vert$.\\
+It is now possible to give the following upper bounds for 
+$\left \vert t_1 \right \vert$, $\left \vert t_2 \right \vert$, 
+$\left \vert t_3 \right \vert$, $\left \vert t_7 \right \vert$, $\left \vert
+  t_4 \right \vert$, $\left \vert t_6 \right \vert$ and $\left \vert t_6 \right \vert$:
+\begin{eqnarray*}
+\left \vert t_1 \right \vert & \leq & 2^{-53} \cdot \left \vert r_\hi \right \vert \\
+& \leq & 2^{-53} \cdot 2^2 \cdot \left \vert a_\hi \right \vert \\
+& = & 2^{-51} \cdot \left \vert a_\hi \right \vert 
+\end{eqnarray*}
+\begin{eqnarray*}
+\left \vert t_2 \right \vert & \leq & \circ \left( \left \vert a_\mi + b_\mi \right \vert \right)  \\
+& \leq & \circ \left( \left \vert a_\mi \right \vert + \left \vert b_\mi \right \vert \right) \\
+& \leq & \circ \left( 2^{-\alpha_o} \cdot \left \vert a_\hi \right \vert + 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \right) \\
+& \leq & \circ \left( 2^{-\alpha_o} \cdot \left \vert a_\hi \right \vert + 2^{-\beta_o} \cdot \frac{3}{4} \cdot \left \vert a_\hi \right \vert \right) \\
+& \leq & \circ \left( 2^{-\min\left(\alpha_o,\beta_o\right) + 1} \cdot \left \vert a_\hi \right \vert \right) \\
+& = & 2^{-\min\left(\alpha_o,\beta_o\right) + 1} \cdot \left \vert a_\hi \right \vert 
+\end{eqnarray*}
+\begin{eqnarray*}
+\left \vert t_3 \right \vert & \leq & 2^{-53} \cdot \left \vert t_2 \right \vert \\
+& \leq & 2^{-53} \cdot 2^{-\min\left(\alpha_o,\beta_o\right) + 1} \cdot \left \vert a_\hi \right \vert \\
+& = & 2^{-\min\left(\alpha_o,\beta_o\right)-52} \cdot \left \vert a_\hi \right \vert 
+\end{eqnarray*}
+\begin{eqnarray*}
+\left \vert t_7 \right \vert & \leq & \circ \left( \left \vert t_1 + t_2 \right \vert \right) \\
+& \leq & \circ \left( \left \vert t_1 \right \vert + \left \vert t_2 \right \vert \right) \\
+& \leq & \circ \left( 2^{-51} \cdot \left \vert a_\hi \right \vert + 2^{-\min\left(\alpha_o,\beta_o\right) + 1} 
+\cdot \left \vert a_\hi \right \vert \right) \\
+& \leq & \circ \left( 2^{-\min\left(\alpha_o,\beta_o\right) + 2} \cdot \left \vert a_\hi \right \vert \right) \\
+& = & 2^{-\min\left(\alpha_o,\beta_o\right) + 2} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+\begin{eqnarray*}
+\left \vert t_4 \right \vert & \leq & 2^{-53} \cdot \left \vert t_7 \right \vert \\
+& \leq & 2^{-53} \cdot 2^{-\min\left(\alpha_o,\beta_o\right)+2} \cdot \left \vert a_\hi \right \vert \\
+& = & 2^{-\min\left(\alpha_o,\beta_o\right) -51} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+\begin{eqnarray*}
+\left \vert t_6 \right \vert & \leq & \circ \left( \left \vert a_\lo \right \vert + \left \vert b_\lo \right \vert \right) \\
+& \leq & \circ \left( 2^{-\alpha_o} \cdot 2^{-\alpha_u} \cdot \left \vert a_\hi \right \vert + 
+                      2^{-\beta_o} \cdot 2^{-\beta_u} \cdot \frac{3}{4} \cdot \left \vert a_\hi \right \vert \right) \\
+& \leq & \circ \left( 2^{-\min\left(\alpha_o + \alpha_u,\beta_o + \beta_u\right) + 1} \cdot \left \vert a_\hi \right \vert \right) \\
+& = & 2^{-\min\left(\alpha_o + \alpha_u,\beta_o + \beta_u\right) + 1} \cdot \left \vert a_\hi \right \vert 
+\end{eqnarray*}
+and finally
+\begin{eqnarray*}
+\left \vert t_5 \right \vert & \leq & \circ \left( \left \vert t_3 \right \vert + \left \vert t_4 \right \vert \right) \\
+& \leq & \circ \left( 2^{-\min\left(\alpha_o,\beta_o\right) -52} \cdot \left \vert a_\hi \right \vert + 
+2^{-\min\left(\alpha_o,\beta_o\right)-51} \cdot \left \vert a_\hi \right \vert \right) \\
+& \leq & \circ \left( 2^{-\min\left(\alpha_o,\beta_o\right) -50} \cdot \left \vert a_\hi \right \vert \right) \\
+& = & 2^{-\min\left(\alpha_o,\beta_o\right)-50} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+Using the fact that the addition \Add~ is exact, it is easy to show that we
+have exactly
+$$r_\hi + t_7 + t_3 + t_4 = a_\hi + a_\mi + b_\hi + b_\mi$$
+Further, we can check 
+\begin{eqnarray*}
+t_8 & = & \left( t_3 \oplus_2 t_4 \right) \oplus_1 \left( a_\lo \oplus_3 b_\lo \right) \\
+& = & t_3 + t_4 + a_\lo + b_\lo + \delta
+\end{eqnarray*}
+with
+\begin{eqnarray*}
+\left \vert \delta \right \vert & \leq & \left \vert t_3 \right \vert \cdot \epsilon_3 + \left \vert t_4 \right \vert \cdot \epsilon_2 +
+\left \vert a_\lo \right \vert \cdot \epsilon_3 + \left \vert b_\lo \right \vert \cdot \epsilon_3 + \left \vert t_3 \right \vert \cdot \epsilon_1
++ \left \vert t_4 \right \vert \cdot \epsilon_1 + \left \vert t_3 \right \vert \cdot \epsilon_1 \cdot \epsilon_2 \\
+& & + \left \vert t_4 \right \vert \cdot \epsilon_1 \cdot \epsilon_2 + \left \vert a_\lo \right \vert \cdot \epsilon_1 +
+\left \vert b_\lo \right \vert \cdot \epsilon_2 + \left \vert a_\lo \right \vert \cdot \epsilon_1 \cdot \epsilon_3 +
+\left \vert b_\lo \right \vert \cdot \epsilon_1 \cdot \epsilon_3 
+\end{eqnarray*}
+where for $i\in\left\lbrace 1,2,3 \right\rbrace$, $\epsilon_i$ is the relative
+error bound of the floating point addition $\oplus_i$ and verifies
+$$\left \vert \epsilon_i \right \vert \leq 2^{-53}$$
+So we get immediately 
+$$r_\hi + r_\mi + r_\lo = r_\hi + t_7 + t_8 = \left( a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right) + \delta$$
+Let us now express $\left \vert \left( a_\hi + a_\mi + a_\lo \right) + \left(
+    b_\hi + b_\mi + b_\lo \right) \right \vert$ 
+as a function of 
+$\left \vert a_\hi \right \vert$: 
+\begin{eqnarray*}
+\left \vert a_\hi + a_\mi + a_\lo \right \vert & \leq & \left \vert a_\hi \right \vert + \left \vert a_\mi \right \vert + 
+\left \vert a_\lo \right \vert \\
+& \leq & \left \vert a_\hi \right \vert + 2^{-\alpha_o} \cdot \left \vert a_\hi \right \vert + 
+2^{-\alpha_o-\alpha_u} \cdot \left \vert a_\hi \right \vert \\
+& \leq & 2 \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+and, the same way round, 
+\begin{eqnarray*}
+\left \vert b_\hi + b_\mi + b_\lo \right \vert & \leq & 2 \cdot \left \vert b_\hi \right \vert \\
+& \leq & \frac{3}{2} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+which allows for noting
+$$\left \vert \left( a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right) \right \vert \leq 2^2 \cdot \left \vert a_\hi \right \vert$$
+In order to give a lower bound for this term, let us prove an upper bound for 
+$\left \vert b_\hi + a_\mi + b_\mi + a_\lo + b_\lo \right \vert$ as follows
+\begin{eqnarray*}
+\left \vert b_\hi + a_\mi + b_\mi + a_\lo + b_\lo \right \vert & \leq & 
+\left \vert b_\hi \right \vert + \left \vert a_\mi \right \vert + \left \vert b_\mi \right \vert + \left \vert a_\lo \right \vert + 
+\left \vert b_\lo \right \vert \\
+& \leq & \frac{3}{4} \cdot \left \vert a_\hi \right \vert + 2^{-\alpha_o} \cdot \left \vert a_\hi \right \vert + 
+2^{-\beta_o} \cdot \frac{3}{4} \cdot \left \vert a_\hi \right \vert + 2^{-\alpha_o-\alpha_u} \cdot \left \vert a_\hi \right \vert \\ & & 
++ 2^{-\beta_o-\beta_u} \cdot \frac{3}{4} \cdot \left \vert a_\hi \right \vert \\
+& \leq & \frac{7}{8} \cdot \left \vert a_\hi \right \vert 
+\end{eqnarray*}
+So we get
+$$\left \vert \left( a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right) \right \vert 
+\geq \frac{1}{8} \cdot \left \vert a_\hi \right \vert$$
+Using this bounds, we can give upper bounds for the absolute error $\left
+  \vert \delta \right \vert$ first as a function of $\left \vert a_\hi \right
+\vert$ and than as a function of 
+$\left \vert \left( a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi +
+    b_\lo \right) \right \vert$ for
+deducing finally a bound for the relative error. \\
+So we get
+\begin{eqnarray*}
+\left \vert \delta \right \vert & \leq & \left \vert t_3 \right \vert \cdot \epsilon_3 + \left \vert t_4 \right \vert \cdot \epsilon_2 +
+\left \vert a_\lo \right \vert \cdot \epsilon_3 + \left \vert b_\lo \right \vert \cdot \epsilon_3 + \left \vert t_3 \right \vert \cdot \epsilon_1
++ \left \vert t_4 \right \vert \cdot \epsilon_1 + \left \vert t_3 \right \vert \cdot \epsilon_1 \cdot \epsilon_2 \\
+& & + \left \vert t_4 \right \vert \cdot \epsilon_1 \cdot \epsilon_2 + \left \vert a_\lo \right \vert \cdot \epsilon_1 +
+\left \vert b_\lo \right \vert \cdot \epsilon_2 + \left \vert a_\lo \right \vert \cdot \epsilon_1 \cdot \epsilon_3 +
+\left \vert b_\lo \right \vert \cdot \epsilon_1 \cdot \epsilon_3 \\
+& \leq & \left \vert a_\hi \right \vert \cdot \epsilon^\prime
+\end{eqnarray*}
+with
+\begin{eqnarray*}
+\epsilon^\prime & \leq & 
+2^{-53} \cdot 2^{-\min\left(\alpha_o,\beta_o\right)-52} \\ & + &
+2^{-53} \cdot 2^{-\min\left(\alpha_o,\beta_o\right)-51} \\ & + &
+2^{-53} \cdot 2^{-\alpha_o-\alpha_u} \\ & + &
+2^{-53} \cdot 2^{-\beta_o-\beta_u} \\ & + &
+2^{-53} \cdot 2^{-\min\left(\alpha_o,\beta_o\right)-52} \\ & + & 
+2^{-53} \cdot 2^{-\min\left(\alpha_o,\beta_o\right)-51} \\ & + &
+2^{-106} \cdot 2^{-\min\left(\alpha_o,\beta_o\right)-52} \\ & + & 
+2^{-106} \cdot 2^{-\min\left(\alpha_o,\beta_o\right)-51} \\ & + &
+2^{-53} \cdot 2^{-\alpha_o-\alpha_u} \\ & + & 
+2^{-53} \cdot 2^{-\beta_o-\beta_u} \\ & + & 
+2^{-106} \cdot 2^{-\alpha_o-\alpha_u} \\ & + &
+2^{-106} \cdot 2^{-\beta_o-\beta_u} \\ 
+& \leq & 2^{-\min\left(\alpha_o,\beta_o\right)-101} + 2^{-\min\left(\alpha_o+\alpha_u,\beta_o+\beta_u\right)-50}
+\end{eqnarray*}
+This yields to
+$$r_\hi + r_\mi + r_\lo = \left( \left( a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right) \right) \cdot 
+\left(1 + \epsilon \right)$$
+with
+$$\left \vert \epsilon \right \vert \leq 2^{-\min\left(\alpha_o,\beta_o\right)-98} + 2^{-\min\left(\alpha_o+\alpha_u,\beta_o+\beta_u\right)-47}$$
+In order to finish the prove, it suffices now to give an upper bound for the
+maximal overlap between $r_\hi$ and $r_\mi$ because we have already shown that
+$r_\mi$ and $r_\lo$ do not overlap at all.\\
+So we can check 
+\begin{eqnarray*}
+\left \vert r_8 \right \vert & \leq & \circ \left( \left \vert t_5 \right \vert + \left \vert t_6 \right \vert \right) \\
+& \leq & \circ \left( 2^{-\min\left(\alpha_o,\beta_o\right)-50} \cdot \left \vert a_\hi \right \vert + 
+2^{-\min\left(\alpha_o+\alpha_u,\beta_o+\beta_u\right)+1} \cdot \left \vert a_\hi \right \vert \right)\\
+& \leq & \circ \left( 2^{-\min\left(\alpha_o,\beta_o\right)-48} \cdot \left \vert r_\hi \right \vert + 
+2^{-\min\left(\alpha_o+\alpha_u,\beta_o+\beta_u\right)+3} \cdot \left \vert r_\hi \right \vert \right)
+\end{eqnarray*}
+and continue by giving the following upper bound
+\begin{eqnarray*}
+\left \vert r_\mi \right \vert & = & \circ \left( \left \vert t_7 + t_8 \right \vert \right) \\
+& \leq & \circ \left( \left \vert t_7 \right \vert + \left \vert t_8 \right \vert \right) \\
+& \leq & \circ \left( 2^{-\min\left(\alpha_o,\beta_o\right)+4} \cdot \left \vert r_\hi \right \vert + 
+\circ \left( 2^{-\min\left(\alpha_o,\beta_o\right)-48} \cdot \left \vert r_\hi \right \vert + 
+2^{-\min\left(\alpha_o+\alpha_u,\beta_o+\beta_u\right)+3} \cdot \left \vert r_\hi \right \vert \right) \right) \\
+& \leq & \circ \left( \left \vert r_\hi \right \vert \cdot \left( 2^{-\min\left(\alpha_o,\beta_u\right)+4} + 
+2^{-\min\left(\alpha_o,\beta_o\right)-48} + 2^{-\min\left(\alpha+\alpha_u,\beta_o+\beta_u\right)+3} + \right. \right. \\
+& & \left. \left. 2^{-\min\left(\alpha_o,\beta_o\right) -101} + 2^{-\min\left(\alpha_o+\alpha_u,\beta_o+\beta_u\right)-50} \right) \right) \\
+& \leq & 2^{-\min\left(\alpha_o,\beta_o\right)+5} \cdot \left \vert r_\hi \right \vert
+\end{eqnarray*}
+This is the maximal overlap bound we were looking for; the proof is therefore finished.\qed
+\end{proof}
+\begin{theorem}[Special case of algorithm \ref{addTTref} \AddTT] ~ \\
+Let be $a_\hi + a_\mi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ the triple-double
+arguments of algorithm \ref{addTTref} \AddTT~ such that 
+$$a_\hi = a_\mi = a_\lo = 0$$
+So the values $r_\hi$, $r_\mi$ and $r_\lo$ returned will be exactly equal to 
+$$r_\hi + r_\mi + r_\lo = b_\hi + b_\mi + b_\lo$$
+The values $r_\mi$ and $r_\lo$ will not overlap at all. The overlap of $r_\hi$
+and $r_\mi$ must still be evaluated.
+\end{theorem}
+\begin{proof} ~\\
+We will suppose that the \Add~ procedure is exact for $a_\hi=a_\mi=a_\lo=0$ if even we are using its unconditional 
+version. Under this hypothesis, we get thus: 
+\begin{eqnarray*}
+r_\hi & = & \circ \left( 0 + b_\hi \right) = b_\hi \\
+t_1 & = & 0 + b_\hi - b_\hi = 0 \\
+t_2 & = & b_\mi \\
+t_3 & = & 0 \\
+t_7 & = & \circ \left( 0 + b_\mi \right) = b_\mi \\
+t_4 & = & 0 \\
+t_6 & = & 0 \oplus b_\lo = b_\lo \\
+t_5 & = & 0 \oplus 0 = 0 \\
+t_8 & = & 0 \oplus b_\lo = b_\lo \\
+r_\mi + r_\lo & = & b_\mi + b_\lo 
+\end{eqnarray*}
+In consequence, the following holds for the values returned:
+$$r_\hi + r_\mi + r_\lo = b_\hi + b_\mi + b_\lo$$
+Clearly $r_\mi$ and $r_\lo$ do not overlap because the \Add~ procedure the algorithm calls at its last line assures this
+property.\qed
+\end{proof}
+\subsection{The addition operator \AddDTT}
+Let us consider now the addition operator \AddDTT. We will only analyse a simplified case where the arguments of the
+algorithm verify statically known bounds.
+\begin{algorithm}[\AddDTT] \label{addDTTref} ~ \\
+{\bf In:} a double-double number $a_\hi + a_\lo$ and a triple-double number $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert b_\hi \right \vert & \leq & 2^{-2} \cdot \left \vert a_\hi \right \vert \\
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( r_\hi, t_1 \right) \gets \mAdd\left( a_\hi, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mAdd\left( a_\lo, b_\mi \right)$ \\
+$\left( t_4, t_5 \right) \gets \mAdd\left( t_1, t_2 \right)$ \\
+$t_6 \gets t_3 \oplus b_\lo$ \\
+$t_7 \gets t_6 \oplus t_5$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAdd\left( t_4, t_7 \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{addDTTref} \AddDTT] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ the values taken in argument of algorithm \ref{addDTTref} \AddDTT. 
+Let the preconditions hold for this values.\\
+So the following holds for the values returned by the algorithm $r_\hi$, $r_\mi$ and $r_\lo$ 
+$$r_\hi + r_\mi + r_\lo = \left(\left(a_\hi + a_\mi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded by
+$$\left \vert \epsilon \right \vert \leq 2^{-\beta_o - \beta_u - 52} + 2^{-\beta_o - 104} + 2^{-153}$$
+The values $r_\mi$ and $r_\lo$ will not overlap at all and the overlap of $r_\hi$ and $r_\mi$ will be bounded by:
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+with
+$$\gamma \geq \min\left( 45, \beta_o - 4, \beta_o + \beta_u - 2 \right)$$
+\end{theorem}
+\begin{proof} ~ \\
+We know using the properties of the \Add~ procedure that 
+\begin{eqnarray*}
+r_\hi + t_1 & = & a_\hi + b_\hi \\
+t_2 + t_3 & = & a_\lo + b_\mi \\
+t_4 + t_5 & = & t_1 + t_2 \\
+r_\mi + r_\lo = t_4 + t_7 
+\end{eqnarray*}
+Supposing that we dispose already of a term of the following form
+$$t_7 = t_5 + t_3 + b_\lo + \delta$$
+with a bounded $\left \vert \delta \right \vert$,
+we can note that 
+$$r_\hi + r_\mi + r_\lo = \left( a_\hi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right) + \delta$$
+Let us now express $t_7$ by $t_5$, $t_3$ and $b_\lo$:
+\begin{eqnarray*}
+t_7 & = & t_5 \oplus t_6 \\
+& = & t_5 \oplus \left( t_3 \oplus b_\lo \right) \\
+& = & \left( t_5 + \left( t_3 + b_\lo \right) \cdot \left( 1 + \epsilon_1 \right) \right) \cdot \left( 1 + \epsilon_2 \right)
+\end{eqnarray*}
+with $\left \vert \epsilon_1 \right \vert \leq 2^{-53}$ and $\left \vert \epsilon_2 \right \vert \leq 2^{-53}$.\\
+We get in consequence
+$$t_7 = t_5 + t_3 + b_\lo + t_3 \cdot \epsilon_1 + b_\lo \cdot \epsilon_1 + t_5 \cdot \epsilon_2 + t_3 \cdot \epsilon_2 + b_\lo \cdot \epsilon_2 +
+t_3 \cdot \epsilon_1 \cdot \epsilon_2 + b_\lo \cdot \epsilon_1 \cdot \epsilon_2$$
+and we can verify that the following upper bound holds for the absolute error $\delta$:
+\begin{eqnarray*}
+\left \vert \delta \right \vert & = & 
+\left \vert t_3 \cdot \epsilon_1 + b_\lo \cdot \epsilon_1 + t_5 \cdot \epsilon_2 + t_3 \cdot \epsilon_2 + b_\lo \cdot \epsilon_2 +
+t_3 \cdot \epsilon_1 \cdot \epsilon_2 + b_\lo \cdot \epsilon_1 \cdot \epsilon_2 \right \vert \\
+& \leq & 2^{-53} \cdot \left \vert t_3 \right \vert + 2^{-53} \cdot \left \vert b_\lo \right \vert + 2^{-53} \cdot \left \vert t_5 \right \vert + 
+2^{-53} \cdot \left \vert b_\lo \right \vert + 2^{-106} \cdot \left \vert t_3 \right \vert + 2^{-106} \cdot \left \vert b_\lo \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert t_3 \right \vert + 2^{-51} \cdot \left \vert b_\lo \right \vert + 2^{-53} \cdot \left \vert t_5 \right \vert
+\end{eqnarray*}
+Let us get now some bounds for $\left \vert t_3 \right \vert$, $\left \vert b_\lo \right \vert$ and 
+$\left \vert t_5 \right \vert$, all as a function of
+$\left \vert a_\hi \right \vert$:
+$$\left \vert b_\lo \right \vert \leq 2^{-\beta_o-\beta_u} \cdot \left \vert b_\hi \right \vert \leq 
+2^{-\beta_o-\beta_u-2} \cdot \left \vert a_\hi \right \vert$$
+which can be obtained using the preconditions' hypotheses. Further
+\begin{eqnarray*}
+\left \vert t_3 \right \vert & \leq & 2^{-53} \cdot \left \vert t_2 \right \vert \\
+& = & 2^{-53} \cdot \left \vert \circ \left( a_\lo + b_\mi \right) \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert a_\lo + b_\mi \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert a_\lo \right \vert + 2^{-52} \cdot \left \vert b_\mi \right \vert \\
+& \leq & 2^{-105} \cdot \left \vert a_\hi \right \vert + 2^{-\beta_o-52} \cdot \left \vert b_\hi \right \vert \\
+& \leq & 2^{-105} \cdot \left \vert a_\hi \right \vert + 2^{-\beta_o-54} \cdot \left \vert a_\hi \right \vert
+\end{eqnarray*}
+and finally
+\begin{eqnarray*}
+\left \vert t_5 \right \vert & \leq & 2^{-53} \cdot \left \vert t_4 \right \vert \\
+& = & 2^{-53} \cdot \left \vert \circ \left( t_1 + t_2 \right) \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert t_1 + t_2 \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert t_1 \right \vert + 2^{-52} \cdot \left \vert t_2 \right \vert \\
+& \leq & 2^{-105} \cdot \left \vert r_\hi \right \vert + 2^{-52} \cdot \left \vert \circ \left( a_\lo + b_\mi \right) \right \vert \\
+& \leq & 2^{-105} \cdot \left \vert \circ \left( a_\hi + b_\hi \right) \right \vert + 2^{-51} \cdot \left \vert a_\lo + b_\mi \right \vert \\
+& \leq & 2^{-104} \cdot \left \vert a_\hi + b_\hi \right \vert + 2^{-51} \cdot \left \vert a_\lo \right \vert + 
+2^{-51} \cdot \left \vert b_\mi \right \vert \\
+& \leq & 2^{-104} \cdot \left \vert a_\hi \right \vert + 2^{-106} \cdot \left \vert a_\hi \right \vert + 
+2^{-104} \cdot \left \vert a_\hi \right \vert + 2^{-\beta_o-53} \cdot \left \vert a_\hi \right \vert \\
+& \leq & \left \vert a_\hi \right \vert \cdot \left( 2^{-102} + 2^{-\beta_o -53} \right)
+\end{eqnarray*}
+So we have
+\begin{eqnarray*}
+\left \vert \delta \right \vert & \leq & \left \vert a_\hi \right \vert \cdot 
+\left( 2^{-157} + 2^{-\beta_o-106} + 2^{-\beta_o-\beta_u-53} + 2^{-155} + 2^{-\beta_o-106} \right) \\
+& \leq & \left \vert a_\hi \right \vert \cdot 
+\left( 2^{-\beta_o-\beta_u-53} + 2^{-\beta_o-105} + 2^{-154} \right)
+\end{eqnarray*}
+Let us now give a lower bound for 
+$\left \vert \left( a_\hi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right) \right \vert$ as a function of
+$\left \vert a_\hi \right \vert$ by getting out an upper bound for 
+$\left \vert a_\lo + b_\hi + b_\mi + b_\lo \right \vert$ as such a function:
+\begin{eqnarray*}
+\left \vert a_\lo + b_\hi + b_\mi + b_\lo \right \vert & \leq & 
+\left \vert a_\lo \right \vert + \left \vert b_\hi \right \vert + \left \vert b_\mi \right \vert + \left \vert b_\lo \right \vert \\
+& \leq & \left \vert a_\hi \right \vert \cdot \left( 2^{-53} + 2^{-2} + 2^{-\beta_o-2} + 2^{-\beta_o-\beta_u-2} \right)
+\end{eqnarray*}
+Since $\beta_o \geq 1$, $\beta_u \geq 1$ we can check that 
+$$\left \vert a_\lo + b_\hi + b_\mi + b_\lo \right \vert \leq 2^{-1} \cdot \left \vert a_\hi \right \vert$$
+In consequence
+$$\left \vert a_\hi + \left( a_\lo + b_\hi + b_\mi + b_\lo \right) \right \vert \geq \frac{1}{2} \cdot \left \vert a_\hi \right \vert$$
+Using this lower bound, we can finally give an upper bound for the relative error $\epsilon$ of the considered procedure:
+$$r_\hi + r_\mi + r_\lo = \left( \left( a_\hi + a_\lo \right) + \left( b_\hi + b_\mi + b_\lo \right) \right) \cdot \left( 1 + \epsilon \right)$$
+with
+$$\left \vert \epsilon \right \vert \leq 2^{-\beta_o-\beta_u-52} + 2^{-\beta_o-104} + 2^{-153}$$
+Last but not least, let us now analyse the additional overlaps generated by the procedure. It is clear that 
+$r_\mi$ and $r_\lo$ do not overlap at all because they are computed by the \Add~ procedure. 
+Let us merely examine now the overlap of $r_\hi$ and $r_\mi$. \\
+We begin by giving a lower bound for $r_\hi$ as a function of $a_\hi$:
+\begin{eqnarray*}
+\left \vert r_\hi \right \vert & = & \left \vert \circ \left( a_\hi + b_\hi \right) \right \vert \\
+& \geq & \circ \left( \left \vert a_\hi + b_\hi \right \vert \right) \\
+& \geq & \circ \left( \frac{3}{4} \cdot \left \vert a_\hi \right \vert \right) \\
+& \geq & \circ \left( \frac{1}{2} \cdot \left \vert a_\hi \right \vert \right) \\
+& = & \frac{1}{2} \cdot \left \vert a_\hi \right \vert 
+\end{eqnarray*}
+Let us then find an upper bound for $\left \vert r_\mi \right \vert$ 
+using also here a term which is a function of $\left \vert a_\hi \right \vert$:
+\begin{eqnarray*}
+\left \vert r_\mi \right \vert & = & \left \vert \circ \left( r_\mi + r_\lo \right) \right \vert \\
+& \leq & 2 \cdot \left \vert r_\mi + r_\lo \right \vert \\
+& = & 2 \cdot \left \vert t_4 + t_7 \right \vert \\
+& \leq & 2 \cdot \left \vert t_4 \right \vert + 2 \cdot \left \vert t_5 + t_3 + b_\lo + \delta \right \vert \\
+& \leq & 2 \cdot \left \vert t_4 \right \vert + 2 \cdot \left \vert t_5 \right \vert + 
+2 \cdot  \left \vert t_3 \right \vert + 2 \cdot \left \vert b_\lo \right \vert + 2 \cdot \left \vert \delta \right \vert \\
+& \leq & 2 \cdot \left \vert t_4 \right \vert + \left \vert a_\hi \right \vert \cdot \left( 2^{-101} + 2^{-\beta_o-52} \right) \\
+& & + \left \vert a_\hi \right \vert \cdot \left( 2^{-104} + 2^{-\beta_o-53} \right) +
+\left \vert a_\hi \right \vert \cdot 2^{-\beta_o-\beta_u-1} \\
+& & +
+\left \vert a_\hi \right \vert \cdot \left( 2^{-\beta_o-\beta_u-52} + 2^{-\beta_o-104} + 2^{-153}\right) 
+\end{eqnarray*}
+By bounding finally still $\left \vert t_4 \right \vert$ by a term that is function of $\left \vert a_\hi \right \vert$
+\begin{eqnarray*}
+\left \vert t_4 \right \vert & = & \left \vert \circ \left( t_1 + t_2 \right) \right \vert \\
+& \leq & 2 \cdot \left \vert t_1 \right \vert + 2 \cdot \left \vert t_2 \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert r_\hi \right \vert + 2 \cdot \left \vert \circ \left( a_\lo + b_\mi \right) \right \vert \\
+& \leq & 2^{-51} \cdot \left \vert a_\hi + b_\hi \right \vert + 4 \cdot \left \vert a_\lo + b_\mi \right \vert \\
+& \leq & \left \vert a_\hi \right \vert \cdot \left( 2^{-\beta_o} + 2^{-49} \right)
+\end{eqnarray*}
+we obtain
+\begin{eqnarray*}
+\left \vert r_\hi \right \vert & \leq & \left \vert a_\hi \right \vert \cdot 
+\left( 2^{-48} \right. \\
+& & + 2^{-\beta_o+1} \\
+& & + 2^{-101} \\
+& & + 2^{-\beta_o-52} \\
+& & + 2^{-104} \\
+& & + 2^{-\beta_o-53} \\
+& & + 2^{-\beta_o-\beta_u-1} \\
+& & + 2^{-\beta_o-\beta_u-52} \\
+& & + 2^{-\beta_o-104} \\
+& & \left. + 2^{-153} \right) \\
+& \leq & \left \vert a_\hi \right \vert \cdot 
+\left( 2^{-47} + 2^{-\beta_o+2} + 2^{-\beta_o-\beta_u} \right)
+\end{eqnarray*}
+We finally check that we have
+$$\left \vert r_\mi \right \vert \leq \left \vert r_\hi \right \vert \cdot \left( 2^{-46} + 2^{-\beta_o+3} + 2^{-\beta_o-\beta_u+1} \right)$$
+from which we can deduce the following bound 
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+with
+$$\gamma \geq \min\left( 45, \beta_o-4, \beta_o+\beta_u-2 \right)$$
+This finishes the proof.\qed
+\end{proof}
+\section{Triple-double multiplication operators}
+\subsection{The multiplication procedure \MulDT}
+Let us go on with an analysis of the multiplication procedure \MulDT. 
+\begin{algorithm}[\MulDT] \label{mulDTref} ~ \\
+{\bf In:} two double-double numbers $a_\hi + a_\lo$ and $b_\hi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert b_\hi \right \vert \\
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( r_\hi, t_1 \right) \gets \mMul\left( a_\hi, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mMul\left( a_\hi, b_\lo \right)$ \\
+$\left( t_4, t_5 \right) \gets \mMul\left( a_\lo, b_\hi \right)$ \\
+$t_6 \gets a_\lo \otimes b_\lo$ \\
+$\left( t_7, t_8 \right) \gets \mAddDD\left( t_2, t_3, t_4, t_5 \right)$ \\
+$\left( t_9, t_{10} \right) \gets \mAdd\left( t_1, t_6 \right)$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAddDD\left( t_7, t_8, t_9, t_{10} \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{mulDTref} \MulDT] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\lo$ the values taken by arguments of algorithm \ref{mulDTref} \MulDT \\
+So the following holds for the values returned $r_\hi$, $r_\mi$ and $r_\lo$:
+$$r_\hi + r_\mi + r_\lo = \left(\left(a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq 2^{-149}$$
+The values returned $r_\mi$ and $r_\lo$ will not overlap at all and the overlap of $r_\hi$ and $r_\mi$ will be bounded as
+follows:
+$$\left \vert r_\mi \right \vert \leq 2^{-48} \cdot \left \vert r_\hi \right \vert$$
+\end{theorem}
+\begin{proof} ~ \\
+Since algorithm \ref{mulDTref} is relatively long, we will proceed by analysing sub-sequences. So let us consider
+first the following sequence:
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( t_2, t_3 \right) \gets \mMul\left( a_\hi, b_\lo \right)$ \\
+$\left( t_4, t_5 \right) \gets \mMul\left( a_\lo, b_\hi \right)$ \\
+$\left( t_7, t_8 \right) \gets \mAddDD\left( t_2, t_3, t_4, t_5 \right)$ 
+\end{minipage}
+\end{center}
+Clearly $t_7$ and $t_8$ will not overlap. The same way $t_2$ and $t_3$ and $t_4$ and $t_5$ will not overlap and 
+we know that we have exactly the following egalities
+\begin{eqnarray*}
+t_2 + t_3 & = & a_\hi \cdot b_\lo \\
+t_4 + t_5 & = & b_\hi \cdot a_\lo 
+\end{eqnarray*}
+Further we can check that 
+\begin{eqnarray*}
+\left \vert t_3 \right \vert & \leq & 2^{-53} \cdot \left \vert \circ \left( a_\hi \cdot b_\lo \right) \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert a_\hi \cdot b_\lo \right \vert 
+\end{eqnarray*}
+and similarly
+$$\left \vert t_5 \right \vert \leq 2^{-52} \cdot \left \vert b_\hi \cdot a_\lo \right \vert$$
+So we have on the one side
+\begin{eqnarray*}
+2^{-53} \cdot \left \vert t_3 + t_5 \right \vert & \leq & 2^{-53} \cdot \left \vert t_3 \right \vert + 2^{-53} \cdot \left \vert t_5 \right \vert \\
+& \leq & 2^{-105} \cdot \left \vert a_\hi \cdot b_\lo \right \vert + 2^{-105} \cdot \left \vert b_\hi \cdot a_\lo \right \vert 
+\end{eqnarray*}
+and on the other
+\begin{eqnarray*}
+2^{-102} \cdot \left \vert t_2 + t_3 + t_4 + t_5 \right \vert & \leq & 2^{-102} \cdot \left \vert 
+                 b_\hi \cdot a_\lo + a_\hi \cdot b_\lo \right \vert \\
+& \leq & 2^{-102} \cdot \left \vert b_\hi \cdot a_\lo \right \vert + 2^{-102} \cdot \left \vert a_\hi \cdot b_\lo \right \vert 
+\end{eqnarray*}
+Using theorem \ref{addDDerrabs} it is possible to note 
+$$t_7 + t_8 = a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + \delta_1$$
+with
+$$\left \vert \delta_1 \right \vert \leq 2^{-102} \cdot \left \vert a_\hi \cdot b_\lo \right \vert + 
+                                         2^{-102} \cdot \left \vert a_\lo \cdot b_\hi \right \vert$$ 
+Let us now consider the following sub-sequence of algorithm \ref{mulDTref}:
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( r_\hi, t_1 \right) \gets \mMul\left( a_\hi, b_\hi \right)$ \\
+$t_6 \gets a_\lo \otimes b_\lo$ \\
+$\left( t_9, t_{10} \right) \gets \mAdd\left( t_1, t_6 \right)$ 
+\end{minipage}
+\end{center}
+Trivially $t_9$ and $t_{10}$ do not overlap.
+Additionally, one sees that we have exactly
+$$r_\hi + t_1 = a_\hi \cdot b_\hi$$ 
+and, exactly too, 
+$$t_9 + t_{10} = t_1 + t_6$$
+So using
+$$t_6 = a_\lo \otimes b_\lo = a_\lo \cdot b_\lo \cdot \left( 1 + \epsilon \right)$$
+where $\left \vert \epsilon \right \vert \leq 2^{-53}$ we get
+\begin{eqnarray*}
+r_\hi + t_9 + t_{10} & = & r_\hi + t_1 + t_6 \\
+& = & a_\hi \cdot b_\hi + t_6 \\
+& = & a_\hi \cdot b_\hi + a_\lo \cdot b_\lo + \delta_2
+\end{eqnarray*}
+with
+$$\left \vert \delta_2 \right \vert \leq 2^{-53} \cdot \left \vert a_\lo \cdot b_\lo \right \vert$$
+Let us now bound $\left \vert t_9 \right \vert$ with regard to $\left \vert a_\hi \cdot b_\hi \right \vert$:\\
+We have
+\begin{eqnarray*}
+\left \vert t_9 \right \vert & \leq & \circ \left( \left \vert t_1 \right \vert + \left \vert t_6 \right \vert \right) \\
+& \leq & \circ \left( \left \vert t_1 \right \vert + \circ \left( \left \vert a_\lo \cdot b_\lo \right \vert \right) \right) \\
+& \leq & \circ \left( \left \vert t_1 \right \vert + \circ \left( 2^{-106} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \right) \right) \\
+& \leq & \circ \left( 2^{-53} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-105} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \right) \\
+& \leq & 2^{-51} \cdot \left \vert a_\hi \cdot b_\hi \right \vert 
+\end{eqnarray*}
+With inequalities given, we can bound now the absolute and relative error of algorithm \MulDT~ \ref{mulDTref}. \\
+We know already that
+$$t_7 + t_8 = a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + \delta_1$$
+where
+$$\left \vert \delta_1 \right \vert \leq 2^{-102} \cdot \left \vert a_\hi \cdot b_\lo \right \vert + 
+                                         2^{-102} \cdot \left \vert b_\hi \cdot a_\lo \right \vert$$
+and
+$$r_\hi + t_9 + t_{10} = a_\hi \cdot b_\hi + a_\lo \cdot b_\lo + \delta_2$$
+where
+$$\left \vert \delta_2 \right \vert \leq 2^{-53} \cdot \left \vert a_\lo \cdot b_\lo \right \vert$$
+One remarks that
+\begin{eqnarray*}
+\left \vert t_8 \right \vert & \leq & 2^{-53} \cdot \left \vert t_7 \right \vert \\
+\left \vert t_{10} \right \vert & \leq & 2^{-53} \cdot \left \vert t_9 \right \vert 
+\end{eqnarray*}
+and easily checks that
+$$2^{-53} \cdot \left \vert t_{10} + t_8 \right \vert \leq 2^{-101} \cdot \left \vert t_9 \right \vert + 2^{-101} \cdot \left \vert t_7 \right \vert$$
+and that
+$$2^{-102} \cdot \left \vert t_9 + t_{10} + t_7 + t_8 \right \vert \leq 2^{-101} \cdot \left \vert t_9 \right \vert + 
+                                                                        2^{-101} \cdot \left \vert t_7 \right \vert$$
+So by means of the theorem \ref{addDDerrabs}, we obtain that
+$$r_\mi + r_\lo = t_9 + t_{10} + t_7 + t_8 + \delta_3$$
+where
+$$\left \vert \delta_3 \right \vert \leq 2^{-101} \cdot \left \vert t_9 \right \vert + 2^{-101} \cdot \left \vert t_7 \right \vert$$
+So finally we get 
+$$r_\hi + r_\mi + r_\lo = a_\hi \cdot b_\hi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\lo + \delta$$
+where
+\begin{eqnarray*}
+\left \vert \delta \right \vert & = & \left \vert \delta_1 + \delta_2 + \delta_3 \right \vert \\
+& \leq & \left \vert \delta_1 \right \vert + \left \vert \delta_2 \right \vert + \left \vert \delta_3 \right \vert \\
+& \leq & 2^{-102} \cdot \left \vert a_\lo \cdot b_\hi \right \vert \\
+& & + 2^{-102} \cdot \left \vert a_\hi \cdot b_\lo \right \vert \\
+& & + 2^{-53} \cdot \left \vert a_\lo \cdot b_\lo \right \vert \\
+& & + 2^{-152} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \\
+& & + 2^{-101} \cdot \left \vert t_7 \right \vert
+\end{eqnarray*}
+And for $\left \vert t_7 \right \vert$ we obtain the following inequalities
+\begin{eqnarray*}
+\left \vert t_7 \right \vert & \leq & \circ \left( \left \vert t_7 + t_8 \right \vert \right) \\
+& \leq & 2 \cdot \left \vert t_7 + t_8 \right \vert \\
+& \leq & 2 \cdot \left(\left \vert a_\hi \cdot b_\lo \right \vert + 
+                       \left \vert a_\lo \cdot b_\hi \right \vert + 
+                       2^{-102} \cdot \left \vert a_\lo \cdot b_\hi \right \vert + 
+                       2^{-102} \cdot \left \vert a_\hi \cdot b_\lo \right \vert \right) \\
+& \leq & 8 \cdot \left \vert a_\hi \cdot b_\lo \right \vert
+\end{eqnarray*}
+In consequence we can check
+$$\left \vert \delta \right \vert \leq 2^{-150} \cdot \left \vert a_\hi \cdot b_\hi \right \vert$$
+Let us give now an upper bound for $\left \vert a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\lo \right \vert$ as a function of
+$\left \vert a_\hi \cdot b_\hi \right \vert$:\\
+We have
+\begin{eqnarray*}
+\left \vert a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\lo \right \vert & \leq & 
+\left \vert a_\hi \cdot b_\lo \right \vert + \left \vert a_\lo \cdot b_\hi \right \vert + \left \vert a_\lo \cdot b_\lo \right \vert \\
+& \leq & 2^{-51} \cdot \left \vert a_\hi \cdot b_\hi \right \vert
+\end{eqnarray*}
+from which we deduce that
+\begin{eqnarray*}
+\left \vert a_\hi \cdot b_\hi + \left( a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\lo \right) \right \vert & \geq & 
+\left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 1 - 2^{-51} \right) \\
+& \geq & \frac{1}{2} \cdot \left \vert a_\hi \cdot b_\hi \right \vert
+\end{eqnarray*}
+Thus
+$$\left \vert \delta \right \vert \leq 
+2^{-149} \cdot \left \vert a_\hi \cdot b_\hi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\lo \right \vert$$
+So we can finally give an upper bound for the relative error $\epsilon$ of the multiplication procedure \MulDT~ 
+defined by algorithm \ref{mulDTref}:
+$$r_\hi + r_\mi + r_\lo = \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\lo \right) \cdot \left( 1 + \epsilon \right)$$
+with
+$$\left \vert \epsilon \right \vert \leq 2^{-149}$$
+Before concluding, we must still analyse the overlap of the different components of the triple-double number returned
+by the algorithm. It is clear that $r_\mi$ and $r_\lo$ do not overlap because the \AddDD~ brick ensures this. 
+Let us now consider the magnitude of $r_\mi$ with regard to the one of $r_\hi$.\\
+We give first a lower bound for $\left \vert r_\hi \right \vert$:
+\begin{eqnarray*}
+\left \vert r_\hi \right \vert & = & \left \vert \circ \left( a_\hi \cdot b_\hi \right) \right \vert \\
+& \geq & \circ \left( \left \vert a_\hi \cdot b_\hi \right \vert \right) \\
+& \geq & \frac{1}{2} \cdot \left \vert a_\hi \cdot b_\hi \right \vert
+\end{eqnarray*}
+and then an upper bound for $\left \vert r_\mi \right \vert$:
+\begin{eqnarray*}
+\left \vert r_\mi \right \vert & \leq & \circ \left( \left \vert r_\mi + r_\lo \right \vert \right) \\
+& \leq & \circ \left( \left \vert t_7 + t_8 \right \vert + \left \vert t_9 + t_{10} \right \vert + \delta_3 \right) \\
+& \leq & \circ \left( \left \vert a_\hi \cdot b_\lo \right \vert + \left \vert a_\lo \cdot b_\hi \right \vert + \delta_1 +
+                      \left \vert t_9 \right \vert + \left \vert t_{10} \right \vert + \delta_3 \right) \\
+& \leq & \circ \left( \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 
+                      2^{-53} + 2^{-53} + 2^{-155} + 2^{-155} + 2^{-51} + 2^{-104} + 2^{-152} + 2^{-151} \right) \right) \\
+& \leq & 2^{-49} \cdot \left \vert a_\hi \cdot b_\hi \right \vert
+\end{eqnarray*}
+From this we can deduce the final bound 
+$$\left \vert r_\mi \right \vert \leq 2^{-48} \cdot \left \vert r_\hi \right \vert$$\qed
+\end{proof}
+\subsection{The multiplication procedure \MulDTT}
+Let us concentrate now on the multiplication sequence \MulDTT. 
+\begin{algorithm}[\MulDTT] \label{mulDTTref} ~ \\
+{\bf In:} a double-double number $a_\hi + a_\lo$  and a triple-double number $b_\hi + b_\mi + b_\lo$ \\
+{\bf Out:} a triple-double number $r_\hi + r_\mi + r_\lo$ \\
+{\bf Preconditions on the arguments:}
+\begin{eqnarray*}
+\left \vert a_\lo \right \vert & \leq & 2^{-53} \cdot \left \vert a_\hi \right \vert \\
+\left \vert b_\mi \right \vert & \leq & 2^{-\beta_o} \cdot \left \vert b_\hi \right \vert \\
+\left \vert b_\lo \right \vert & \leq & 2^{-\beta_u} \cdot \left \vert b_\mi \right \vert 
+\end{eqnarray*}
+with
+\begin{eqnarray*}
+\beta_o & \geq & 2 \\
+\beta_u & \geq & 1 
+\end{eqnarray*}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{60mm}
+$\left( r_\hi, t_1 \right) \gets \mMul\left( a_\hi, b_\hi \right)$ \\
+$\left( t_2, t_3 \right) \gets \mMul\left( a_\hi, b_\mi \right)$ \\
+$\left( t_4, t_5 \right) \gets \mMul\left( a_\hi, b_\lo \right)$ \\
+$\left( t_6, t_7 \right) \gets \mMul\left( a_\lo, b_\hi \right)$ \\
+$\left( t_8, t_9 \right) \gets \mMul\left( a_\lo, b_\mi \right)$ \\
+$t_{10} \gets a_\lo \otimes b_\lo$ \\
+$\left( t_{11}, t_{12} \right) \gets \mAddDD\left( t_2, t_3, t_4, t_5 \right)$ \\
+$\left( t_{13}, t_{14} \right) \gets \mAddDD\left( t_6, t_7, t_8, t_9 \right)$ \\
+$\left( t_{15}, t_{16} \right) \gets \mAddDD\left( t_{11}, t_{12}, t_{13}, t_{14} \right)$ \\
+$\left( t_{17}, t_{18} \right) \gets \mAdd\left( t_1, t_{10} \right)$ \\
+$\left( r_\mi, r_\lo \right) \gets \mAddDD\left( t_{17}, t_{18}, t_{15}, t_{16} \right)$ \\
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Relative error of algorithm \ref{mulDTTref} \MulDTT] ~ \\
+Let be $a_\hi + a_\lo$ and $b_\hi + b_\mi + b_\lo$ the values in argument of algorithm \ref{mulDTTref} \MulDTT~ such that 
+the given preconditions hold.\\
+So the following will hold for the values $r_\hi$, $r_\mi$ and $r_\lo$ returned
+$$r_\hi + r_\mi + r_\lo = \left(\left(a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\mi + b_\lo \right)\right) \cdot \left(1 + \epsilon\right)$$
+where $\epsilon$ is bounded as follows:
+$$\left \vert \epsilon \right \vert \leq \frac{2^{-99 - \beta_o} + 2^{-99 - \beta_o - \beta_u} + 2^{-152}}
+                                              {1 - 2^{-53} - 2^{-\beta_o + 1} - 2^{-\beta_o - \beta_u + 1}}
+                                    \leq 2^{-97 - \beta_o} + 2^{-97 - \beta_o - \beta_u} + 2^{-150}$$
+The values $r_\mi$ and  $r_\lo$ will not overlap at all and the following bound will be verified for the overlap of 
+$r_\hi$ and $r_\mi$:
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+where
+$$\gamma \geq \min\left( 48, \beta_o - 4, \beta_o + \beta_u - 4 \right)$$
+\end{theorem}
+\begin{proof} ~ \\
+During this proof we will once again proceed by basic bricks that we will assemble in the end.\\
+Let us therefore start by the following one:
+\begin{center}
+\begin{minipage}[b]{60mm}
+$\left( t_2, t_3 \right) \gets \mMul\left( a_\hi, b_\mi \right)$ \\
+$\left( t_4, t_5 \right) \gets \mMul\left( a_\hi, b_\lo \right)$ \\
+$\left( t_{11}, t_{12} \right) \gets \mAddDD\left( t_2, t_3, t_4, t_5 \right)$
+\end{minipage}
+\end{center}
+Since we have the exact egalities
+$$t_2 + t_3 = a_\hi \cdot b_\mi$$
+and
+$$t_4 + t_5 = a_\hi \cdot b_\lo$$
+and since we know that $t_2$ and $t_3$ and $t_4$ and $_5$ do not overlap, 
+it suffices to apply the bound proven at theorem \ref{addDDerrabs}. 
+So we can check on the one hand
+\begin{eqnarray*}
+2^{-53} \cdot \left \vert t_3 + t_5 \right \vert & \leq & 2^{-53} \cdot \left \vert t_3 \right \vert + 2^{-53} \cdot \left \vert t_5 \right \vert \\
+& \leq & 2^{-106} \cdot \left \vert t_2 \right \vert + 2^{-106} \cdot \left \vert t_4 \right \vert \\
+& \leq & 2^{-105} \cdot \left \vert a_\hi \cdot b_\mi \right \vert + 2^{-105} \cdot \left \vert a_\hi \cdot b_\lo \right \vert \\
+& \leq & 2^{-105-\beta_o} \cdot \left \vert a_\hi \cdot b_\mi \right \vert + 2^{-105-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\lo \right \vert
+\end{eqnarray*}
+and on the other
+\begin{eqnarray*}
+2^{-102} \cdot \left \vert t_2 + t_3 + t_4 + t_5 \right \vert & = & 
+2^{-102} \cdot \left \vert a_\hi \cdot b_\mi + a_\hi \cdot b_\lo \right \vert \\
+& \leq & 2^{-102} \cdot \left \vert a_\hi \cdot b_\mi \right \vert + 2^{-102} \cdot \left \vert a_\hi \cdot b_\lo \right \vert \\
+& \leq & 2^{-102-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-102-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\lo \right \vert
+\end{eqnarray*}
+In consequence, using the mentioned theorem, we obtain
+$$t_{11} + t_{12} = a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + \delta_1$$
+with
+$$\left \vert \delta_1 \right \vert \leq 
+2^{-102-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-102-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\lo \right \vert$$
+Let us continue with the following part of the algorithm:
+\begin{center}
+\begin{minipage}[b]{60mm}
+$\left( t_6, t_7 \right) \gets \mMul\left( a_\lo, b_\hi \right)$ \\
+$\left( t_8, t_9 \right) \gets \mMul\left( a_\lo, b_\mi \right)$ \\
+$\left( t_{13}, t_{14} \right) \gets \mAddDD\left( t_6, t_7, t_8, t_9 \right)$ 
+\end{minipage}
+\end{center}
+We have
+\begin{eqnarray*}
+2^{-53} \cdot \left \vert t_7 + t_9 \right \vert & \leq & 2^{-53} \cdot \left \vert t_7 \right \vert + 2^{-53} \cdot \left \vert t_9 \right \vert \\
+& \leq & 2^{-106} \cdot \left \vert t_6 \right \vert + 2^{-106} \cdot \left \vert t_8 \right \vert \\
+& \leq & 2^{-105} \cdot \left \vert a_\lo \cdot b_\hi \right \vert + 2^{-105} \cdot \left \vert a_\lo \cdot b_\mi \right \vert \\
+& \leq & 2^{-158} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-158-\beta_o} \cdot \left \vert a_\hi b_\hi \right \vert 
+\end{eqnarray*}
+and
+\begin{eqnarray*}
+2^{-102} \cdot \left \vert t_6 + t_7 + t_8 + t_9 \right \vert & = &  2^{-102} \cdot \left \vert a_\lo \cdot b_\hi + a_\lo \cdot b_\mi \right \vert \\
+& \leq & 2^{-102} \cdot \left \vert a_\lo \cdot b_\hi \right \vert + 2^{-102} \cdot \left \vert a_\lo \cdot b_\mi \right \vert \\
+& \leq & 2^{-155} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-155-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert
+\end{eqnarray*}
+So we get
+$$t_{13} + t_{14} = a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + \delta_2$$
+with
+$$\left \vert \delta_2 \right \vert \leq 
+2^{-155} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-155-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert$$
+Let us now consider the brick that produces $t_{15}$ and $t_{16}$ out of the values in argument.
+By the properties of the \AddDD~ procedure, $t_{11}$ and $t_{12}$ and $t_{13}$ and $t_{14}$ do not overlap at all and
+verify thus the preconditions of the next \AddDD~ brick that will compute $t_{15}$ and $t_{16}$.
+So it suffices to apply once again the absolute error bound of this procedure for obtaining
+$$t_{15} + t_{16} = t_{11} + t_{12} + t_{13} + t_{14} + \delta_3$$ with $\left \vert \delta_3 \right \vert$ which remains to be 
+estimated.\\
+So we have on the one hand
+\begin{eqnarray*}
+2^{-53} \cdot \left \vert t_{12} + t_{14} \right \vert & \leq & 2^{-53} \cdot \left \vert t_{12} \right \vert + 2^{-53} \cdot
+\left \vert t_{14} \right \vert \\
+& \leq & 2^{-106} \cdot \left \vert t_{11} \right \vert + 2^{-106} \cdot \left \vert t_{13} \right \vert 
+\end{eqnarray*}
+-- which is an upper bound that can still be estimated by
+\begin{eqnarray*}
+\left \vert t_{11} \right \vert & = & \left \vert \circ \left( t_{11} + t_{12} \right) \right \vert \\
+& \leq & \left \vert \left( t_{11} + t_{12} \right) \cdot \left( 1 + 2^{-53} \right) \right \vert \\
+& \leq & 2 \cdot \left \vert t_{11} + t_{12} \right \vert \\
+& \leq & 2 \cdot \left \vert a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + \delta_1 \right \vert \\
+& \leq & 2 \cdot \left( \left \vert a_\hi \cdot b_\mi \right \vert + \left \vert a_\hi \cdot b_\lo \right \vert + \left \vert \delta_1 \right \vert 
+\right) \\
+& \leq & 2 \cdot \left( 2^{-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 
+2^{-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\hi \right \vert +  
+2^{-\beta_o-102} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-\beta_o-\beta_u-102} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-\beta_o+2} + 2^{-\beta_o-\beta_u+2} \right)
+\end{eqnarray*}
+which means, using also the following inequalities that
+\begin{eqnarray*}
+\left \vert t_{13} \right \vert & = & \left \vert \circ \left( t_{13} + t_{14} \right) \right \vert \\
+& \leq & 2 \cdot \left \vert t_{13} + t_{14} \right \vert \\
+& \leq & 2 \cdot \left \vert a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + \delta_2 \right \vert \\
+& \leq & 2 \cdot \left( \left \vert a_\lo \cdot b_\hi \right \vert + \left \vert a_\lo \cdot b_\mi \right \vert + \left \vert \delta_2 \right \vert 
+\right) \\
+& \leq & 2 \cdot \left( 2^{-53} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 
+2^{-53-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert +  
+2^{-155} \cdot \left \vert a_\hi \cdot b_\hi \right \vert +  
+2^{-155-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert 
+\right) \\
+& \leq & 2^{-50} \cdot \left \vert a_\hi \cdot b_\hi \right \vert
+\end{eqnarray*}
+we can finally check that we have on the one side
+$$2^{-53} \cdot \left \vert t_{12} + t_{14} \right \vert \leq \left \vert a_\hi \cdot b_\hi \right \vert \cdot 
+\left( 2^{-\beta_o-104} + 2^{-\beta_o-\beta_u-104} + 2^{-156} \right)$$
+And on the other
+\begin{eqnarray*}
+2^{-102} \cdot \left \vert t_{11} + t_{12} + t_{13} + t_{14} \right \vert & \leq & 
+2^{-102} \cdot \left \vert a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + \delta_1 + \delta_2 \right \vert \\
+& \leq & 2^{-102} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \cdot \\
+& & \left( 2^{-\beta_o} \right. \\ & & + 2^{-\beta_o-\beta_u} \\ & & + 2^{-53} \\ & & + 2^{-\beta_o-53} \\ & & + 2^{-\beta_o-102} \\ 
+& & + 2^{-\beta_o-\beta_u-102} \\ & & + 2^{-155} \\ & & \left. + 2^{-\beta_o-155} \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left(
+2^{-\beta_o-101} + 2^{-\beta_o-\beta_u-101} + 2^{-154} \right)
+\end{eqnarray*}
+So we know that 
+$$t_{15} + t_{16} = t_{11} + t_{12} + t_{13} + t_{14} + \delta_3$$
+with
+$$\left \vert \delta_3 \right \vert \leq \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left(
+2^{-\beta_o-101} + 2^{-\beta_o-\beta_u-101} + 2^{-154} \right)$$
+With this result we can note now
+$$t_{15} + t_{16} = a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + \delta_4$$
+with
+\begin{eqnarray*}
+\left \vert \delta_4 \right \vert & \leq & 
+\left \vert a_\hi \cdot b_\hi \right \vert \cdot \\
+& & \left( 2^{-\beta_o-102} \right. \\
+& & + 2^{-\beta_o-\beta_u-102} \\
+& & + 2^{-155} \\
+& & + 2^{-\beta_o-155} \\
+& & + 2^{-\beta_o-101} \\
+& & \left. + 2^{-\beta_o-\beta_u-101} \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-\beta_o-100} + 2^{-\beta_o-\beta_u-100} + 2^{-155} \right)
+\end{eqnarray*}
+Let us give now an upper bound for $\delta_5$ defined by the following expression:
+$$r_\mi + r_\lo = t_1 + a_\lo \cdot b_\lo + t_{15} + t_{16} + \delta_5$$
+It is clear that $t_{17}$ and $t_{18}$ do not overlap. In contrast the \Add~ operation which adds $t_1$ to $t_{10}$ is 
+necessary because $t_1$ and $t_{10}$ can overlap and even \ouvguill overtake\fermguill~ each other: 
+$$\left \vert t_1 \right \vert \geq 2^{-106} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \lor t_1 = 0$$
+and
+$$\left \vert t_{10} \right \vert \leq 2^{-\beta_o-\beta_u-52} \cdot \left \vert a_\hi \cdot b_\hi \right \vert$$
+The same argument tells us that the \Add~ must be conditional. \\
+So we have
+$$t_{17} + t_{18} = t_1 + t_{10}$$
+and
+$$t_{10} = a_\lo \cdot b_\lo + \delta^\prime$$
+with
+$$\left \vert \delta^\prime \right \vert \leq 2^{-106-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\hi \right \vert$$
+Let us apply once again the bound for the absolute error of the \AddDD~ procedure:\\
+So we have on the one hand
+\begin{eqnarray*}
+2^{-53} \cdot \left \vert t_{18} + t_{16} \right \vert & \leq & 
+2^{-53} \cdot \left \vert t_{18} \right \vert + 2^{-53} \cdot \left \vert t_{18} \right \vert \\
+& \leq & 2^{-106} \cdot \left \vert t_{17} \right \vert + 2^{-106} \cdot \left \vert t_{15} \right \vert
+\end{eqnarray*}
+We can estimate this by
+\begin{eqnarray*}
+\left \vert t_{17} \right \vert & \leq & \left \vert \circ \left( t_1 + t_{10} \right) \right \vert \\
+& \leq & 2 \cdot \left \vert t_1 + t_{10} \right \vert \\
+& \leq & 2 \cdot \left \vert t_1 \right \vert + 2 \cdot \left \vert t_{10} \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert r_\hi \right \vert + 2 \cdot \left \vert \circ \left( a_\lo \cdot b_\lo \right) \right \vert \\
+& \leq & 2^{-52} \cdot \left \vert \circ \left( a_\hi \cdot b_\hi \right) \right \vert + 2^2 \cdot \left \vert a_\lo \cdot b_\lo \right \vert \\
+& \leq & 2^{-51} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 2^{-51-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\hi \right \vert 
+\end{eqnarray*}
+and by
+\begin{eqnarray*}
+\left \vert t_{15} \right \vert & = & \left \vert \circ \left( t_{15} + t_{16} \right) \right \vert \\
+& \leq & 2 \cdot \left \vert t_{15} + t_{16} \right \vert \\
+& \leq & 2 \cdot \left \vert 
+a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + \delta_4 \right \vert \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 
+2^{-\beta_o+1} + 2^{-\beta_o-\beta_u+1} + 2^{-52} + 2^{-\beta_o-52} + 2^{-\beta_o-99} + 2^{-\beta_o-\beta_u-99} + 2^{-154}  \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-\beta_o+2} + 2^{-\beta_o-\beta_u+2} + 2^{-51}  \right)
+\end{eqnarray*}
+So finally, we have on the one hand 
+\begin{eqnarray*}
+2^{-53} \cdot \left \vert t_{18} + t_{16} \right \vert & \leq & 
+\left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-157} + 2^{-157-\beta_o-\beta_u} + 2^{-104-\beta_o} + 
+2^{-104-\beta_o-\beta_u} + 2^{-157}  \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-\beta_o-104} + 2^{-\beta_o-\beta_u-103} + 2^{-156} \right)
+\end{eqnarray*}
+And on the other
+\begin{eqnarray*}
+2^{-102} \cdot \left \vert t_{17} + t_{18} + t_{15} + t_{16} \right \vert & \leq &
+2^{-102} \cdot \left \vert t_1 + a_\lo \cdot b_\lo + \delta^\prime + a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + 
+a_\lo \cdot b_\hi \right. \\ & & \left. + a_\lo \cdot b_\mi + \delta_4 \right \vert \\
+& \leq & 2^{-102} \cdot \left( 2^{-53} \cdot \left \vert r_\hi \right \vert \right. \\
+& & + 2^{-53-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \\
+& & + 2^{-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \\
+& & + 2^{-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \\
+& & + 2^{-53} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \\
+& & + 2^{-53-\beta_o} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \\
+& & + 2^{-106-\beta_o-\beta_u} \cdot \left \vert a_\hi \cdot b_\hi \right \vert \\
+& & \left. + \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-100-\beta_o} + 2^{-100-\beta_o-\beta_u} + 2^{-155} \right) \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-101-\beta_o} + 2^{-101-\beta_o-\beta_u} + 2^{-153} \right)
+\end{eqnarray*}
+which means that we finally obtain the following
+$$r_\mi + r_\lo = t_1 + a_\lo \cdot b_\lo + a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + \delta_6$$
+with
+$$\left \vert \delta_6 \right \vert \leq \left \vert \delta_4 + \delta_5 \right \vert$$
+where
+$$\left \vert \delta_5 \right \vert \leq 
+\left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-101-\beta_o} + 2^{-101-\beta_o-\beta_u} + 2^{-153} \right)$$
+Thus we can check that
+\begin{eqnarray*}
+\left \vert \delta_6 \right \vert & \leq & 
+\left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-100-\beta_o} + 2^{-100-\beta_o-\beta_u} + 2^{-155} +
+2^{-101-\beta_o} + 2^{-101-\beta_o-\beta_u} + 2^{-153} \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-99-\beta_o} + 2^{-99-\beta_o-\beta_u} + 2^{-152} \right)
+\end{eqnarray*}
+Let us now integrate the different intermediate results:\\
+Since we know that the following egality is exact
+$$r_\hi + t_1 = a_\hi \cdot b_\hi$$
+we can check that
+$$r_\hi + r_\mi + r_\lo = \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\mi + b_\lo \right) + \delta_6$$
+We continue by giving a lower bound for 
+$\left \vert \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\mi + b_\lo \right) \right \vert$
+using a term which is a function of $\left \vert a_\hi \cdot b_\hi \right \vert$. We do so for being able to give
+a relative error bound.
+We first bound $$\left \vert a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + a_\lo \cdot b_\lo \right \vert$$
+by such a term.\\
+We have
+\begin{eqnarray*}
+\left \vert a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + a_\lo \cdot b_\lo \right \vert & \leq & 
+\left \vert a_\hi \cdot b_\mi \right \vert + 
+\left \vert a_\hi \cdot b_\lo \right \vert + 
+\left \vert a_\lo \cdot b_\hi \right \vert + 
+\left \vert a_\lo \cdot b_\mi \right \vert + 
+\left \vert a_\lo \cdot b_\lo \right \vert \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 2^{-\beta_o}  + 
+2^{-\beta_o-\beta_u} + 
+2^{-53}  \right. \\ & & \left.  + 
+2^{-\beta_o-53} + 
+2^{-\beta_o-53} \right) \\
+& \leq & 2^{-\beta_o+1} \cdot \left \vert a_\hi \cdot b_\hi \right \vert + 
+2^{-\beta_o-\beta_u+1} \cdot \left \vert a_\hi \cdot b_\hi \right \vert  \\ & & + 
+2^{-53} \cdot \left \vert a_\hi \cdot b_\hi \right \vert
+\end{eqnarray*}
+and we get
+$$\left \vert \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\mi + b_\lo \right) \right \vert \geq 
+\left \vert a_\hi \cdot b_\hi \right \vert \cdot \left( 1 - 2^{-53} - 2^{-\beta_o+1} -2^{-\beta_o-\beta_u+1} \right)$$
+from which we deduce (since $\beta_o \geq 2$, $\beta_u \geq 1$) 
+$$\left \vert a_\hi \cdot b_\hi \right \vert \leq \frac{1}{1 - 2^{-53} - 2^{-\beta_o+1} -2^{-\beta_o-\beta_u+1}} \cdot 
+\left \vert \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\mi + b_\lo \right) \right \vert$$
+Using this inequality we can finally give a bound for the relative error $\epsilon$ as follows:
+$$r_\hi + r_\mi + r_\lo = \left( a_\hi + a_\lo \right) \cdot \left( b_\hi + b_\mi + b_\lo \right) \cdot \left( 1 + \epsilon \right)$$
+with
+$$\left \vert \epsilon \right \vert \leq 
+\frac{2^{-99-\beta_o} + 2^{-99-\beta_o-\beta_u} + 2^{-152}}{1 - 2^{-53} - 2^{-\beta_o+1} -2^{-\beta_o-\beta_u+1}}$$
+Let us recall that for this inequality, $\beta_o \geq 2$, $\beta_u \geq 1$ must hold which is the case.\\
+It is certainly possible to estimate $\left \vert \epsilon \right \vert$ by a term which is slightly less exact:
+$$\left \vert \epsilon \right \vert \leq 2^{-97 - \beta_o} + 2^{-97 - \beta_o - \beta_u} + 2^{-150}$$
+because
+$$1 - 2^{-53} - 2^{-\beta_o+1} -2^{-\beta_o-\beta_u+1} \geq \frac{1}{4}$$
+for $\forall \beta_o \geq 2, \beta_u \geq 1$.\\~\\
+In order to finish this proof, we must still give an upper bound for the maximal overlap generated by the 
+algorithm \ref{mulDTTref} \MulDTT.
+Clearly $r_\mi$ and $r_\lo$ do not overlap because of the properties of the basic brick \AddDD.
+Let us give an upper bound for the overlap between $r_\hi$ and $r_\mi$ giving a term of the following form: 
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+where we constate a lower bound for $\gamma$ using a term in $\beta_o$ and $\beta_u$.\\
+Let us start by giving a lower bound for $r_\hi$ as a function of $\left \vert a_\hi \cdot b_\hi \right \vert$.\\ We have
+\begin{eqnarray*}
+\left \vert r_\hi \right \vert & = & \left \vert \circ \left( a_\hi \cdot b_\hi \right) \right \vert \\
+& \geq & \frac{1}{2} \cdot \left \vert a_\hi \cdot b_\hi \right \vert
+\end{eqnarray*}
+Then, let us give an upper bound for $\left \vert r_\mi \right \vert$ using a function of 
+$\left \vert a_\hi \cdot b_\hi \right \vert$:
+\begin{eqnarray*}
+\left \vert r_\mi \right \vert & \leq & \left \vert \circ \left( r_\mi + r_\lo \right) \right \vert \\
+& \leq & 2 \cdot \left \vert r_\mi + r_\lo \right \vert \\
+& \leq & 
+2 \cdot \left \vert t_1 + a_\lo \cdot b_\lo + a_\hi \cdot b_\mi + a_\hi \cdot b_\lo + a_\lo \cdot b_\hi + a_\lo \cdot b_\mi + \delta_6 \right \vert \\
+& \leq & 2 \cdot \left \vert a_\hi \cdot b_\hi \right \vert \cdot \\
+& & \cdot \left( 
+2^{-52} + 
+2^{-\beta_o-\beta_u-53} + 
+2^{-\beta_o} + 
+2^{-\beta_o-\beta_u} + 
+2^{-53} + 
+2^{-\beta_o-53} +  \right. \\ & & \left. 
+2^{-\beta_o-99} + 
+2^{-\beta_o-\beta_u-99} + 
+2^{-152} \right) \\
+& \leq & \left \vert a_\hi \cdot b_\hi \right \vert
+\cdot \left( 
+2^{-50} + 
+2^{-\beta_o-2} + 
+2^{-\beta_o-\beta_u+2} \right)
+\end{eqnarray*}
+This implies that 
+\begin{eqnarray*}
+\left \vert r_\mi \right \vert & \leq & 2 \cdot \left \vert r_\hi \right \vert \cdot \left( 
+2^{-50} + 
+2^{-\beta_o-2} + 
+2^{-\beta_o-\beta_u+2} \right) \\
+& \leq & \left \vert r_\hi \right \vert \cdot \left( 
+2^{-49} + 
+2^{-\beta_o-3} + 
+2^{-\beta_o-\beta_u+3} \right)
+\end{eqnarray*}
+From which we can deduce 
+$$\left \vert r_\mi \right \vert \leq 2^{-\gamma} \cdot \left \vert r_\hi \right \vert$$
+with
+$$\gamma \geq \min \left( 48, \beta_o - 4, \beta_o -\beta_u -4 \right)$$
+This result finishes the proof.\qed
+\end{proof}
+\section{Final rounding procedures}
+The renormalisation sequence and all computational basic operators on triple-double numbers have been presented only
+for one reason: allowing for implementing efficiently elementary functions in double precision 
+\cite{Defour-thesis, crlibmweb, DinDefLau2004LIP}. For obtaining this 
+goal we are still lacking an important basic brick: the final rounding of a triple-double number into a double precision
+number. This rounding must be possible in each of the $4$ known rounding modes \cite{IEEE754}. In particular, we will 
+distinguish between the round-to-nearest sequence and the ones for the directed rounding modes.\\ 
+Let us start this discussion by introducing some notations:\\
+We will notate
+\begin{itemize}
+\item $\circ \left( x \right) \in \F$ the rounding to the nearest double precision number of a real number $x \in \R$,
+\item $\vartriangle \left( x \right) \in \F$ the rounding towards $+\infty$ of a real $x \in \R$ into double precision,
+\item $\triangledown \left( x \right) \in \F$ the rounding towards $-\infty$ of a real $x \in \R$ into double precision and
+\item $\diamond \left( x \right) \in \F$ the rounding towards $0$ of a real number $x \in \R$ into a double pr\'ecision number.
+\end{itemize}
+Since the directed rounding modes behave all in a similar fashion we will make a slight abuse of our notations. An 
+unspecified directed rounding mode will be notated also $\diamond \left( x \right)$.
+\begin{definition}[Correct rounding procedure] \label{defprocarrcorr} ~ \\
+Let be {\bf A} a procedure taking a non-overlapping triple-double number $x_\hi + x_\mi + x_\lo$ as argument. This number be 
+such that 
+$x_\mi = \circ \left( x_\mi + x_\lo \right)$.
+Let the procedure {\bf A} return a double precision number $x^\prime$.\\
+So we will say that {\bf A} is a correct rounding procedure for round-to-nearest-ties-to-even mode iff
+for all possible entries
+$$x^\prime = \circ \left( x_\hi + x_\mi + x_\lo \right)$$
+The same way {\bf A} is a correct rounding procedure for a directed rounding mode iff for all possible entries
+$$x^\prime = \diamond \left( x_\hi + x_\mi + x_\lo \right)$$
+\end{definition}
+In the sequel we will present two algorithms for final rounding -- one for round-to-nearest mode, the other one for 
+the directed modes -- and we will prove their correctness with regard to definition \ref{defprocarrcorr}.
+\subsection{Final rounding to the nearest even}
+\begin{lemma}[Generation of half an $\mUlp$ or a quarter of an $\mUlp$] \label{genmiquartulp} ~\\
+Let be $x$ a non-subnormal floating point number different from $\pm 0$, $\pm \infty$ and $\nan$ and such that $x^-$ 
+is not a subnormal number. \\
+Given the following instruction sequence:
+\begin{center}
+$t_1 \gets x^-$ \\
+$t_2 \gets x \ominus t_1$ \\
+$t_3 \gets t_2 \otimes \frac{1}{2}$ 
+\end{center}
+we know that 
+\begin{itemize}
+\item if it exists a $k \in \Z$ such that $x=2^k$ exactly so 
+$$\left \vert t_3 \right \vert = \frac{1}{4} \cdot \mUlp \left( x \right)$$
+\item if it does not exist any $k \in \Z$ such that $x=2^k$ exactly so
+$$\left \vert t_3 \right \vert = \frac{1}{2} \cdot \mUlp \left( x \right)$$
+\end{itemize}
+\end{lemma}
+\begin{proof} ~\\
+Without loss of generality, we can suppose that $x$ is positive because the definition of $x^-$ and all floating
+point operations are symmetrical with regard to the sign \cite{IEEE754} and because the egalities to be proven ignore it.
+Additionally since the floating point multiplication by an integer power of $2$ is always exact, it suffices to 
+show that $t_2 = \frac{1}{2} \cdot \mUlp \left( x \right)$ if $x$ is exactly an integer power of $2$ and that
+$t_2 = \mUlp\left( x \right)$ otherwise.\\
+Let us begin by showing that we have the exact equation 
+$$t_2 = x - x^-$$
+which means that the floating point substraction is exact. This is the case by Sterbenz' lemma \cite{Ste74} if 
+$$\frac{1}{2} \cdot x \leq x^- \leq 2 \cdot x$$
+So let us show this inequality. \\
+Since $x \not = 0$ and since it is not subnormal we know already that $x^- \not = 0$. 
+Additionally $x^- > 0$ because $x > 0$ and $x^-$ is its direct predecessor with regard to $<$.
+Further by definition \ref{predsuccdef}, it is trivial to see that 
+$\forall y \in \F.\left( y^- \right)^+ = y = \left( y^+ \right)^-$.\\
+Since $x$ is positive and since $x^-$ is therefore its predecessor with regard to $<$ we have
+$$x^- < x < 2 \cdot x$$
+Let us suppose now that 
+$$x^- < \frac{1}{2} \cdot x$$
+Since $x$ is not subnormal and since it is positive, there exist $e \in \Z$ and  $m \in \N$ such that
+$$x = 2^e \cdot m$$
+with
+$$2^{p-1} \leq m < 2^p$$ 
+where $p \geq 2$ is the format's precision; in particular, for double precision, $p=53$.\\
+Given that $x^-$ is not subnormal neither and positive, too, it is the predecessor of $x$ and verifies
+$$x^- = \left \lbrace \begin{array}{lll} 2^e \cdot \left(m - 1 \right) & \mbox{ if } & m-1 \geq 2^{p-1} \\
+                                             2^{e-1} \cdot \left( 2^p - 1 \right) & \mbox{ otherwise} & \end{array} \right.$$
+So two cases must be treated separately:\\~\\
+{\bf 1st case: $x^- = 2^e \cdot  \left( m -1 \right)$ } \\ ~ \\
+We get here with the hypotheses supposed 
+\begin{eqnarray*}
+x^- & < & \frac{1}{2} \cdot x \\
+2^e \cdot \left( m - 1 \right) & < & \frac{1}{2} \cdot 2^e \cdot m \\
+m-1 & < & \frac{1}{2} \cdot m \\
+m & < & 2 
+\end{eqnarray*}
+In contrast $m \geq 2^{p-1}$ and $p\geq2$; so we have contradiction in this case. \\ ~ \\
+{\bf 2nd case: $x^- = 2^{e-1} \cdot  \left( 2^p -1 \right)$ } \\ ~ \\
+We can check 
+\begin{eqnarray*}
+x^- & < & \frac{1}{2} \cdot x \\
+2^{e-1} \cdot \left( 2^{p-1} - 1 \right) & < & \frac{1}{2} \cdot 2^e \cdot m \\
+2^{e-1} \cdot \left( 2^{p-1} - 1 \right) & < & 2^{e-1} \cdot m \\
+2^p - 1 < m
+\end{eqnarray*}
+In contrast $m<2^p$, thus $2^p - 1 < m < 2^p$.
+This is a contradiction because the inequalities are strict and $m \in \N$. \\ ~ \\
+So Sterbenz' lemma \cite{Ste74} can be applied and we get the exact equation
+$$t_2 = x - x^-$$
+It is now important to see that 
+$$x^+ = \left \lbrace \begin{array}{lll} 2^e \cdot \left(m + 1 \right) & \mbox{ if } & m+1 < 2^p \\
+                                             2^{e+1} \cdot 2^{p-1} & \mbox{ otherwise} & \end{array} \right.$$
+Further, without loss of generality, we can suppose that $x^+ \not = + \infty$ and that therefore
+$$\mUlp \left( x \right) = x^+ - x$$
+If ever we could not suppose this, it would suffice to apply definition \ref{defulp} of the 
+$\mUlp$ function which would only change the exponent $e$ by $1$ in the sequel.\\
+So at this stage of the proof, two different cases are to be treated: 
+$x$ is or is not exactly an integer power of $2$. \\ ~ \\
+{\bf 1st case: $x$ is not exactly an integer power of $2$ } \\ ~ \\
+So we get $x=2^e \cdot m$ with $2^{p-1} < m < 2^p$ from which we deduce that $m-1 \geq 2^{p-1}$ and that, finally,
+$$x^- = 2^e \cdot \left(m - 1 \right)$$
+So still two sub-cases present themselves: \\ ~ \\
+{\bf case a): $x^+ = 2^e \cdot \left( m + 1 \right)$} \\ ~ \\
+We can check that 
+\begin{eqnarray*}
+\mUlp \left( x \right) & = & x^+ - x \\
+& = & 2^e \cdot \left( m + 1 \right) - 2^e \cdot m \\
+& = & 2^e \cdot \left(m + 1 - m \right) \\
+& = & 2^e
+\end{eqnarray*}
+and
+\begin{eqnarray*}
+t_2 & = & x - x^- \\
+& = & 2^e \cdot m - 2^e \cdot \left( m - 1 \right) \\
+& = & 2^e \cdot \left( m - m + 1 \right) \\
+& = & 2^e
+\end{eqnarray*}
+So we know that
+$$t_2 = \mUlp \left( x \right)$$ ~ \\
+{\bf case b): $x^+ = 2^e \cdot \left( m + 1 \right)$} \\ ~ \\
+So in order to get $x^+$ being equal to $2^e \cdot \left( m + 1 \right)$, we must have $m+1 \geq 2^p$. \\
+In contrast we can show that $m+1 \leq 2^p$ as follows: \\
+Let us suppose that $m+1 > 2^p$. Since $m < 2^p$ because $x$ is not subnormal we get
+$$2^p - 1 < m < 2^p$$
+In contrast, the inequalities are strict and $m \in \N$, thus contradiction. \\
+We therefore know that
+$$m=2^p - 1$$
+So we get
+\begin{eqnarray*}
+\mUlp \left( x \right) & = & x^+ - x \\
+& = & 2^{e+1} \cdot 2^{p-1} - 2^e \cdot \left( 2^p - 1 \right) \\
+& = & 2^e \cdot 2^p - 2^e \cdot 2^p + 2^e \\
+& = & 2^e
+\end{eqnarray*}
+and
+\begin{eqnarray*}
+t_2 & = & x - x^- \\
+& = & 2^e \cdot \left( 2^p - 1 \right) - 2^e \cdot \left( 2^p - 2 \right) \\
+& = & 2^e \cdot 2^p - 2^e - 2^e \cdot 2^p + 2 \cdot 2^e \\
+& = & 2^e
+\end{eqnarray*}
+Thus we have still 
+$$t_2 = \mUlp \left( x \right)$$ ~ \\
+{\bf 2nd case: $x$ is exactly an integer power of $2$ } \\ ~ \\
+So in this case we verify that $$x=2^e \cdot 2^{p-1}$$ and therefore $m=2^{p-1}$. \\
+In consequence, $$x^+ = 2^e \cdot \left(2^{p-1} + 1 \right)$$ because we got
+$2^{p-1} + 1 < 2^p$ since $p \geq 2$. \\
+The same way $$x^- = 2^{e-1} \cdot \left(2^p - 1 \right)$$ because, trivially, $2^{p-1} - 1 < 2^{p-1}$.\\
+So we get
+\begin{eqnarray*}
+\mUlp \left( x \right) & = & x^+ - x \\
+& = & 2^e \cdot \left( 2^{p-1} + 1 \right) - 2^e \cdot 2^{p-1} \\
+& = & 2^e \cdot 2^{p-1} + 2^e - 2^e \cdot 2^{p-1} \\
+& = & 2^e
+\end{eqnarray*}
+and
+\begin{eqnarray*}
+t_2 & = & x - x^- \\
+& = & 2^e \cdot 2^{p-1} - 2^{e-1} \cdot \left( 2^p - 1 \right) \\
+& = & 2^e \cdot 2^{p-1} - 2^{e-1} \cdot 2^p + 2^{e-1} \\
+& = & 2^{e-1} \\
+& = & \frac{1}{2} \cdot 2^e
+\end{eqnarray*}
+Thus we can check that
+$$t_2 = \frac{1}{2} \cdot \mUlp \left( x \right)$$ \qed
+\end{proof}
+\begin{lemma}[Generation of half an $\mUlp$] \label{genmiulp} ~\\
+Let be $x$ a non-subnormal floating point number different from $\pm 0$, $\pm\infty$ and $\nan$.\\
+Let be the following instruction sequence:
+\begin{center}
+$t_1 \gets x^+$ \\
+$t_2 \gets t_1 \ominus x$ \\
+$t_3 \gets t_2 \otimes \frac{1}{2}$ 
+\end{center}
+So the following holds 
+$$\left \vert t_3 \right \vert = \frac{1}{2} \cdot \mUlp \left( x \right)$$
+and one knows that
+\begin{center}
+$x > 0$ iff $t_3 > 0$
+\end{center}
+\end{lemma}
+\begin{proof} ~ \\
+In the beginning we will show the first equation; the equivalence of the signs will be shown below. 
+So, without loss of generality, we can suppose that $x$ is positive because the definition of $x^+$ and all
+floating point operations are symmetrical with regard to the sign \cite{IEEE754} 
+and because the equation to be shown ignorates it. 
+Further since the floating point multiplication by an integer power of $2$ is always exact, it suffices to show that 
+$t_2 = \frac{1}{2} \cdot \mUlp \left( x \right)$.\\
+Let us still start the proof by showing that the substraction
+$$t_2 \gets t_1 \ominus x$$ 
+is exact by Sterbenz' lemma \cite{Ste74}. We must therefore show that 
+$$\frac{1}{2} \cdot x \leq x^+ \leq 2 \cdot x$$
+Since $x$ is positive and since $x^+$ is its direct successor in the ordered set of the floating point numbers, we know
+already that $x < x^+$.
+So trivially, we get $$\frac{1}{2} \cdot x < x < x^+$$
+Let us suppose now that 
+$$x^+ > 2 \cdot x$$
+Since $x$ is not subnormal and since it is positive, there exist $e \in \Z$ and $m \in \N$ such that
+$$x = 2^e \cdot m$$
+with
+$$2^{p-1} \leq m < 2^p$$
+where $p\geq 2$ is the precision of the format.\\
+Further we know that 
+$$x^+ = \left \lbrace \begin{array}{lll} 2^e \cdot \left(m + 1 \right) & \mbox{ if } & m+1 < 2^p \\
+                                         2^{e+1} \cdot 2^{p-1} & \mbox{ otherwise} & \end{array} \right.$$
+So two different cases show up: \\ ~ \\
+{\bf 1st case: $x^+ = 2^e \cdot \left( m + 1 \right)$} \\ ~ \\
+We have 
+\begin{eqnarray*}
+x^+ & > & 2 \cdot x \\
+2^e \cdot \left( m + 1 \right) & > & 2 \cdot 2^e \cdot m \\
+m+1 & > & 2 \cdot m \\
+1 & > & m
+\end{eqnarray*}
+In contrast, $m \geq 2^{p-1}$ and $p \geq 2$, thus contradiction. \\ ~ \\
+{\bf 2nd case: $x^+ = 2^{e+1} \cdot 2^{p-1}$} \\ ~ \\
+So in this case, we have $m+1\geq 2^p$ and therefore $m=2^p - 1$ because $m \leq 2^p - 1$ holds 
+since $x$ is not subnormal.\\
+We get thus
+\begin{eqnarray*}
+x^+ & > & 2 \cdot x \\
+2^{e+1} \cdot 2^{p-1} & > & 2 \cdot 2^e \cdot \left( 2^p - 1 \right) \\
+2^e \cdot 2^p & > & 2 \cdot 2^e \cdot 2^p - 2 \cdot 2^e \\
+2^p & > & 2 \cdot 2^p - 2 \\
+2 > 2^p
+\end{eqnarray*}
+In contrast $p\geq2$ which is contradictory.\\
+So we can apply Sterbenz' lemma \cite{Ste74} and we get immediately that
+$$t_2 = x^+ - x = \mUlp \left( x \right)$$ by the definition of the $\mUlp$ function \\
+Let us show now that
+$$x > 0 \mbox{ iff } t_3 > 0$$
+Let us suppose that $x$ is positive. In consequence $x^+$ is its successor with regard to $<$ and we get
+$$x^+ - x > 0$$ which means that
+\begin{eqnarray*}
+t_2 & = & x^+ \ominus x \\
+& = & \circ \left( x^+ - x \right) \\
+& > & 0
+\end{eqnarray*}
+because the rounding function is monotonic for positive numbers.\\
+In contrast, if $x$ is negative $x^+$ is its predecessor with regard to $<$ and we get thus $x^+ - x < 0$. \\
+We conclude in this case in the same way.\qed
+\end{proof}
+\begin{lemma}[Signs of the generated values] \label{gensigne} ~\\
+Let be $x \in \F$ a non-subnormal floating point number different from $0$.\\
+Given the following instruction sequence
+\begin{center}
+$t_1 \gets x^-$ \\
+$t_2 \gets x \ominus t_1$ \\
+$t_3 \gets t_2 \otimes \frac{1}{2}$ \\
+$t_4 \gets x^+$ \\
+$t_5 \gets t_4 \ominus x$ \\
+$t_6 \gets t_5 \otimes \frac{1}{2}$ 
+\end{center}
+the values $t_3$ and $t_6$ have the same sign.
+\end{lemma}
+\begin{proof} ~\\
+It is clear that it suffices to show that $t_2$ and $t_5$ have the same sign. Because of definition \ref{predsuccdef} 
+of $x^+$ and $x^-$, we are obliged to treat two different cases which depend on whether $x$ is positive or not.\\ ~ \\
+{\bf 1st case: $x>0$} \\ ~ \\
+So $x^+$ is the successor of $x$ with regard to the order $<$ on the floating point numbers and $x^-$ 
+is its predecessor. Formally we have 
+$$x^- < x < x^+$$
+Thus
+\begin{eqnarray*}
+x - x^- & > & 0 \\
+x^+ - x & > & 0 
+\end{eqnarray*}
+Due to the monotony of the rounding function, we obtain
+\begin{eqnarray*}
+\circ \left( x - x^- \right) & > & \circ \left( 0 \right) \\
+\circ \left( x^+ - x \right) & > & \circ \left( 0 \right)
+\end{eqnarray*}
+and thus, since $0$ is exactly representable,
+\begin{eqnarray*}
+x \ominus x^- & > & 0 \\
+x^+ \ominus x & > & 0 
+\end{eqnarray*}
+which is the fact to be shown. \\ ~ \\
+{\bf 2nd case: $x<0$} \\ ~ \\
+We get in this case that $x^+ < x < x^-$ and we finish the proof in a complete analogous way to the 1st case.\qed
+\end{proof}
+In the sequel, we will use the sign function $\sgn\left( x \right)$ which we define as follows:
+$$\forall x \in \R\mbox{ . }\sgn\left( x \right) = \left \lbrace \begin{array}{cl} -1 & \mbox{ if } x < 0 \\
+                                                                           0 & \mbox{ if } x = 0 \\
+                                                                           1 & \mbox{ otherwise} \end{array} \right.$$
+\begin{lemma}[Equivalence between a $\xor$ and a floating point multiplication] \label{equivxormult} ~ \\
+Let be $x, y \in \F$ two floating point numbers such that $x \not = 0$, $y \not = 0$. \\
+So, \vspace{-5mm}
+\begin{center}
+$$x \otimes y \geq 0$$
+implies
+$$x > 0 \xor y > 0$$
+\end{center}
+\end{lemma}
+\begin{proof} ~ \\
+Clearly $x \otimes y \geq 0$ implies $\circ \left( x \cdot y \right) \geq 0$. By monotony of the rounding function, this yields to 
+$x \cdot y \geq 0$. Trivially one sees that this means that $x \geq 0 \xor y \geq 0$. Since the equations are not possible
+by hypothesis, we can conclude.\qed
+\end{proof}
+\begin{lemma}[Round-to-nearest-ties-to-even of the lower significance parts] \label{arrpairfaible} ~ \\
+Let be $x_\mi$ and $x_\lo$ two non-subnormal floating point numbers such that 
+$\exists e \in \Z \mbox{ . } 2^e = t$ such that $x_\mi = t^-$
+and that $x_\lo = \frac{1}{4} \cdot \mUlp\left( t \right)$. \\
+So,
+$$x_\mi \not = \circ \left( x_\mi + x_\lo \right)$$
+Similar, let be $x_\mi$ and $x_\lo$ two non-subnormal floating point numbers such that  
+$\exists e \in \Z \mbox{ . } 2^e = t$ such that $x_\mi = t^+$
+and that $x_\lo = \frac{1}{2} \cdot \mUlp\left( t \right)$. \\
+So,
+$$x_\mi \not = \circ \left( x_\mi - x_\lo \right)$$
+\end{lemma}
+\begin{proof} ~\\
+In both cases $t$ is representable as a floating point number because $x_\mi$ is not subnormal.
+Since $t$ is an integer power of $2$, the significand of $t$ is even. 
+Therefore the significand of $x_\mi$ is odd in both cases because $x_\mi$ is either the direct predecessor or the direct
+successor of $t$. \\
+Let us show now that $\left \vert x_\lo \right \vert = \frac{1}{2} \cdot \mUlp\left(x_\mi \right)$.
+If $x_\mi = t^-$ then we can deduce
+\begin{eqnarray*}
+\frac{1}{2} \cdot \mUlp\left( x_\mi \right) & = & \frac{1}{2} \cdot \left( x_\mi^+ - x_\mi \right) \\
+& = & \frac{1}{2} \cdot \left( t - t^- \right) \\
+& = & - \frac{1}{4} \cdot \left( t^+ - t \right) \\
+& = & - \frac{1}{4} \cdot \mUlp\left( t \right) \\
+& = & - x_\lo
+\end{eqnarray*}
+using amongst others lemma \ref{poweroftwo}. 
+If $x_\mi = t^+$ then we know that $x_\mi$ is not an integer power of $2$ because $t$ is one and we are supposing that the 
+format's precision $p$ is greater than $2$ bits. So it exists $e \in \Z$ and $m = 2^p$ such that $t = 2^e \cdot m$
+\begin{eqnarray*}
+\frac{1}{2} \cdot \mUlp\left( x_\mi \right) & = & \frac{1}{2} \cdot \left( x_\mi^+ - x_\mi \right) \\
+& = & \frac{1}{2} \cdot \left( 2^e \cdot \left( m + 2 \right) - 2^e \cdot \left( m + 1 \right) \right) \\
+& = & \frac{1}{2} \cdot \left( 2^e \cdot \left( m + 1 \right) - 2^e \cdot m \right) \\
+& = & \frac{1}{2} \cdot \mUlp\left( t \right) \\
+& = & x_\lo
+\end{eqnarray*}
+So, in both cases, $x_\mi + x_\lo$ is located exactly at the middle of two floating point numbers that can be expressed 
+with the exponent of $x_\mi$ or its successor and its predecessor.
+Since $x_\mi$ has an odd significand the rounding with done away from it.\qed
+\end{proof}
+\begin{algorithm}[Final rounding to the nearest (even)] \label{algarrpres} ~ \\
+{\bf In:} a triple-double number $x_\hi + x_\mi + x_\lo$ \\
+{\bf Out:} a double precision number $x^\prime$ returned by the algorithm \\
+{\bf Preconditions on the arguments:}
+\begin{itemize}
+\item $x_\hi$ and $x_\mi$ as well as $x_\mi$ and $x_\lo$ do not overlap
+\item $x_\mi = \circ \left( x_\mi + x_\lo \right)$
+\item $x_\hi \not = 0$, $x_\mi \not = 0$ and $x_\lo \not = 0$  
+\item $\circ \left( x_\hi + x_\mi \right) \not \in \left \lbrace x_\hi^-, x_\hi, x_\hi^+ \right \rbrace \Rightarrow 
+\left \vert \left( x_\hi + x_\mi \right) - \circ\left( x_\hi + x_\mi \right) \right \vert \not = 
+\frac{1}{2} \cdot \mUlp\left( \circ \left( x_\hi + x_\mi \right) \right)$
+\end{itemize}
+{\bf Algorithm:} \\
+\begin{center}
+\begin{minipage}[b]{80mm}
+$t_1 \gets x_\hi^-$ \\
+$t_2 \gets x_\hi \ominus t_1$ \\
+$t_3 \gets t_2 \otimes \frac{1}{2}$ \\
+$t_4 \gets x_\hi^+$ \\
+$t_5 \gets t_4 \ominus x_\hi$ \\
+$t_6 \gets t_5 \otimes \frac{1}{2}$ 
+\\ ~ \\
+{\bf if} $\left( x_\mi \not = -t_3 \right)$ {\bf and} $\left( x_\mi \not = t_6 \right)$ {\bf then} 
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{70mm}
+\vspace{-2.4mm}
+{\bf return } $\left( x_\hi \oplus x_\mi \right)$
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf else} 
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{70mm}
+{\bf if} $\left( x_\mi \otimes x_\lo > 0.0 \right)$ {\bf then} 
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{60mm}
+{\bf if} $\left( x_\hi \otimes x_\lo > 0.0 \right)$ {\bf then} 
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{50mm}
+\vspace{-2.4mm}
+{\bf return } $x_\hi^+ $
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf else}
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{50mm}
+\vspace{-2.4mm}
+{\bf return } $x_\hi^- $
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf end if} 
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf else}
+\vspace{-2.4mm}
+\begin{center}
+\begin{minipage}[b]{60mm}
+\vspace{-2.4mm}
+{\bf return } $x_\hi $
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf end if} 
+\end{minipage}
+\end{center}
+\vspace{-2.4mm}
+{\bf end if} 
+\end{minipage}
+\end{center}
+\end{algorithm}
+\begin{theorem}[Correctness of the final rounding procedure \ref{algarrpres}]\label{corralgpluspres} ~\\
+Let be {\bf A} the algorithm \ref{algarrpres} said \ouvguill Final rounding to the nearest (even)\fermguill.
+Let be $x_\hi + x_\mi + x_\lo$ triple-double number for which the preconditions of algorithm {\bf A} hold.
+Let us notate $x^\prime$ the double precision number returned by the procedure. \\
+So
+$$x^\prime = \circ \left( x_\hi + x_\mi + x_\lo \right)$$
+i.e. {\bf A} is a correct rounding procedure for round-to-nearest-ties-to-even mode.
+\end{theorem}
+\begin{proof} ~ \\
+During this proof we will proceed as follows: one easily sees that the presented procedure can only return four
+different results which are $x_\hi \oplus x_\mi$, $x_\hi$, $x_\hi^+$ and $x_\hi^-$. 
+The choices made by the branches of the algorithm imply for each of this results additional hypotheses on the 
+arguments' values. It will therefore suffice to show for each of this four choices that the rounding of the 
+arguments is equal to the result returned under this hypotheses. In contrast, the one that can be easily 
+deduced from the tests on the branches, which use a floating point multiplication in fact, are not particularly 
+adapted to what is needed in the proof. Using amongst others lemma \ref{equivxormult}, one sees that 
+$9$ different simply analysable cases are possible out of which one is a special one and $8$ have a very regular form:
+\begin{enumerate}
+\item If the first branch is taken, we know that
+$$x_\mi \not = \sgn\left( x_\hi \right) \cdot \frac{1}{2} \cdot \mUlp \left( x_\hi \right)$$
+and that 
+$$x_\mi \not = - \sgn\left( x_\hi \right) \cdot \left \lbrace 
+\begin{array}{ll} \frac{1}{4} \cdot \mUlp \left( x_\hi \right) & \mbox{ if } \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+                  \frac{1}{2} \cdot \mUlp \left( x_\hi \right) & \mbox{ otherwise} \end{array} \right.$$
+as per lemmas \ref{genmiquartulp}, \ref{genmiulp} and \ref{gensigne}.
+In this case $x_\hi \oplus x_\mi$ will be returned.
+\item If the first branch is not taken, we know already very well the absolute value of $x_\mi$:
+we can therefore suppose that
+$$\left \vert x_\mi \right \vert = \left \lbrace 
+\begin{array}{ll} \frac{1}{4} \cdot \mUlp \left( x_\hi \right) & \mbox{ if } \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+                  \frac{1}{2} \cdot \mUlp \left( x_\hi \right) & \mbox{ otherwise} \end{array} \right.$$
+It is thus natural that $x_\mi$ does not play any role in the following computations of the value to be returned but by its
+sign.
+Using \ref{equivxormult} we know that the two tests that follow are equivalent to  
+{{\bf if} $x_\mi > 0 \xor x_\lo > 0$} and to {{\bf if} $x_\hi > 0 \xor x_\lo > 0$}. 
+It is easy to check that the values returned depending on the signs of  
+$x_\hi$, $x_\mi$ and $x_\lo$ obey to this scheme:
+\begin{center}
+\begin{tabular}{l|ccc|cc|c|c}
+Case & $x_\hi$ & $x_\mi$ & $x_\lo$ & $x_\mi \xor x_\lo$ & $x_\hi \xor x_\lo$ & 
+Return val. $x^\prime$ & Interpreted val. $x^\prime$ \\
+\hline 
+a.) & + & + & + & + & + & $x_\hi^+$ & $\succ\left( x_\hi \right)$ \\
+b.) & + & + & - & - & - & $x_\hi$ & $x_\hi$ \\
+c.) & + & - & + & - & + & $x_\hi$ & $x_\hi$ \\
+d.) & + & - & - & + & - & $x_\hi^-$ & $\pred\left( x_\hi \right)$ \\
+e.) & - & + & + & + & - & $x_\hi^-$ & $\succ\left( x_\hi \right)$ \\
+f.) & - & + & - & - & + & $x_\hi$ & $x_\hi$ \\
+g.) & - & - & + & - & - & $x_\hi$ & $x_\hi$ \\
+h.) & - & - & - & + & + & $x_\hi^+$ & $\pred\left( x_\hi \right)$
+\end{tabular}
+\end{center}
+We see now that the returned value $x^\prime$ expressed as $x_\hi$, $\succ\left(x_\hi\right)$ or $\pred\left(x_\hi\right)$ in 
+cases a.) through d.) are equivalent to cases h.) through e.). 
+We will consider them thus equivalently; of course, doing so, we will not any longer be able to suppose anything 
+concerning the magnitude and the sign of $x_\hi$.
+\end{enumerate}
+Let us start the proof by showing the correctness of the first case.
+Since $x_\hi$ and $x_\mi$ do not overlap by hypothesis, we know by definition \ref{defoverlap} that 
+$$\left \vert x_\mi \right \vert < \mUlp\left( x_\hi \right)$$
+So we can notate the following
+$$x_\mi \in I^\prime_1 \cup I^\prime_2 \cup I^\prime_3 \cup I^\prime_4 \cup I^\prime_5 \cup I^\prime_6$$
+with
+\begin{eqnarray*}
+I^\prime_1 & = & \left] - \mUlp\left( x_\hi \right) ; -\frac{3}{4} \cdot \mUlp\left(x_\hi \right) \right] \\
+I^\prime_2 & = & \left] -\frac{3}{4} \cdot \mUlp\left(x_\hi \right) ; 
+- \frac{1}{2} \cdot \mUlp\left(x_\hi \right) \right[ \\
+I^\prime_3 & = & \left[ - \frac{1}{2} \cdot \mUlp\left(x_\hi \right); -\tau \right[ \\
+I^\prime_4 & = & \left] -\tau ; 0 \right] \\
+I^\prime_5 & = & \left[ 0; \frac{1}{2} \cdot \mUlp\left(x_\hi\right) \right[ \\
+I^\prime_6 & = & \left ] \frac{1}{2} \cdot \mUlp\left( x_\hi \right) ; \mUlp\left( x_\hi \right) \right [
+\end{eqnarray*}
+where
+$$\tau = \left \lbrace 
+\begin{array}{ll} \frac{1}{4} \cdot \mUlp \left( x_\hi \right) & \mbox{ if } \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+                  \frac{1}{2} \cdot \mUlp \left( x_\hi \right) & \mbox{ otherwise} \end{array} \right.$$
+This is equivalent to claiming
+$$x_\mi \in I_1 \cup I_2 \cup I_3 \cup I_4 \cup I_5 \cup I_6$$
+where
+\begin{eqnarray*}
+I_1 & = & \left [ \left( -\mUlp\left( x_\hi \right) \right)^- ; 
+\left( -\frac{3}{4} \cdot \mUlp\left(x_\hi \right) \right)^+ \right] \\
+I_2 & = & \left [ \left( \frac{3}{4} \cdot \mUlp\left( x_\hi \right) \right)^- ; 
+\left(- \frac{1}{2} \cdot \mUlp\left(x_\hi \right)\right)^+ \right] \\
+I_3 & = & \left [ \left( -\frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right)^- ; \left( -\tau \right)^+ \right] \\
+I_4 & = & \left [ \left( -\tau \right)^- ; 0 \right] \\
+I_5 & = & \left [ 0 ; \left( \frac{1}{2} \cdot \mUlp\left(x_\hi\right) \right)^- \right] \\
+I_6 & = & \left [ \left(\frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right)^+ ; \left( \mUlp\left( x_\hi \right) \right)^- \right ]
+\end{eqnarray*}
+because $x_\mi$ is a floating point number and because all bounds of the intervals are floating point numbers, too. So
+we can express their predecessors and successors by $z^+$ and $z^-$. Thus $\forall i=1,\dots,6 \mbox{ . } I^\prime_i = I_i$. 
+It is clear that the set of floating point numbers $I_3$ is empty if 
+$\tau = \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$.\\
+Further we know that $x_\mi$ and $x_\lo$ do not overlap and that $x_\mi = \circ \left( x_\mi + x_\lo \right)$ by hypothesis.
+This means that 
+$$\left \vert x_\lo \right \vert \leq \frac{1}{2} \cdot \mUlp \left( x_\mi \right) \leq \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right)$$
+and we can write 
+$$x_\mi + x_\lo \in \left( J_1 \cup J_2 \cup J_3 \cup J_4 \cup J_5 \cup J_6\right) \backslash U$$
+with
+\begin{eqnarray*}
+J_1 & = & \left [ \left( -\mUlp\left( x_\hi \right) \right)^- 
+- \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right) ; 
+\left( - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) \right)^+
++ \frac{1}{2} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right) \right] \\
+J_2 & = & \left[ \left( - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) \right)^- 
+- \frac{1}{2} \cdot \mUlp \left( \mUlp\left( x_\hi \right) \right) ;
+\left(-\frac{1}{2} \cdot \mUlp\left(x_\hi \right)\right)^+ 
++ \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right) \right] \\
+J_3 & = & \left [ \left(- \frac{1}{2} \cdot \mUlp\left(x_\hi \right)\right)^- 
+- \frac{1}{2} \cdot \mUlp\left( \xi_1 \right) ;                   
+\left( -\tau \right)^+ + \frac{1}{2} \cdot \mUlp\left( \xi_1 \right) \right] \\
+J_4 & = & \left [ \left( -\tau \right)^- - \frac{1}{2} \cdot \mUlp\left( \xi_2 \right) ; 0 \right] \\
+J_5 & = & \left [ 0; 
+\left( \frac{1}{2} \cdot \mUlp\left(x_\hi\right) \right)^- + \frac{1}{2} \cdot \mUlp\left( \xi_3 \right) \right] \\
+J_6 & = & \left [ \left(\frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right)^+ 
+- \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right); 
+\left( \mUlp\left( x_\hi \right) \right)^- + \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right) \right ]
+\end{eqnarray*}
+where
+\begin{eqnarray*}
+\xi_1 & = & \frac{1}{2} \cdot \mUlp\left(x_\hi\right) \in I_3 \\
+\xi_2 & = & \tau \in I_4 \\
+\xi_3 & = & \frac{1}{2} \cdot \mUlp\left(x_\hi\right) \in I_5
+\end{eqnarray*}
+and where $U$ is the set of the impossible cases for $x_\mi + x_\lo$. The word \ouvguill impossible\fermguill~ refers here 
+to the facts caused by the property that $x_\mi = \circ \left( x_\mi + x_\lo \right)$. \\
+Let us still remark that the intervals $J_3$, $J_4$ and $J_5$ are well defined as per lemma \ref{ulpmonoton} 
+and that it is important to see that it does not suffice to estimate their bounds by the less exact inequality
+that follows:
+$$\mUlp \left( x_\mi \right) \leq \mUlp\left( \mUlp \left( x_\hi \right) \right)$$
+which would mean that 
+$$\xi_i = \mUlp\left( x_\hi \right)$$
+Since the images of the $\mUlp$ function are always integer powers of $2$, the difference of their predecessors and
+themselves can be as small as half an $\mUlp$ of an $\mUlp$ of $x_\hi$ which would be a too inexact estimate. \\
+Let us continue now with the simplification of the bounds of the intervals $J_i$. The purpose of this  
+will be showing that $x_\mi + x_\lo$ are always intervals such that one can decide the rounding 
+$\circ \left( x_\hi + \left( x_\mi + x_\lo \right) \right)$
+without using the rule of even rounding. Let us remark already that we know that $\forall i=1,\dots,6 \mbox{ . } I_i \subseteq J_i$.\\
+Since $\mUlp\left( x_\hi \right)$ is a non-subnormal floating point number that is positive and equal to an integer power
+of $2$, we get using lemmas \ref{commut} and \ref{poweroftwo} that 
+\begin{eqnarray*}
+\left( - \mUlp\left( x_\hi \right)  \right)^- - \frac{1}{2} \cdot \mUlp\left(  \mUlp\left( x_\hi \right)  \right) & = & 
+- \mUlp\left( x_\hi \right)^- - \frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^+ -  \mUlp\left( x_\hi \right)  \right) \\
+& = & - \mUlp\left( x_\hi \right)  + \left(  \mUlp\left( x_\hi \right)  - \mUlp\left( x_\hi \right)^- \right) \\ & & - 
+\frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^+ -  \mUlp\left( x_\hi \right)  \right) \\
+& = & - \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+and similarly
+\begin{eqnarray*}
+ \mUlp\left( x_\hi \right)^- + \frac{1}{2} \cdot \mUlp\left(  \mUlp\left( x_\hi \right)  \right) & = &  
+\mUlp\left( x_\hi \right)^- + \frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^+ -  \mUlp\left( x_\hi \right)  \right) \\
+& = &  \mUlp\left( x_\hi \right)^- + \left(  \mUlp\left( x_\hi \right)  -  \mUlp\left( x_\hi \right)^- \right) \\ 
+& = &  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+Further, still analogously to the previous cases and using lemma \ref{multhalf},
+\begin{eqnarray*}
+\left( \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right)^- + \frac{1}{2} \cdot \mUlp\left( \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right) 
+& = & 
+\frac{1}{2} \cdot  \mUlp\left( x_\hi \right)^- + \frac{1}{4} \mUlp\left(  \mUlp\left( x_\hi \right)  \right) \\
+& = & \frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^- + \frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^+ 
+-  \mUlp\left( x_\hi \right)  \right) \right) \\
+& = & \frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^- +  \mUlp\left( x_\hi \right)  -  \mUlp\left( x_\hi \right)^- \right) \\
+& = & \frac{1}{2} \cdot  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+and
+\begin{eqnarray*}
+\left( \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right)^+ - \frac{1}{2} \cdot \mUlp\left(  \mUlp\left( x_\hi \right)  \right) & = & 
+\frac{1}{2} \cdot  \mUlp\left( x_\hi \right)^+ - \frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^+ -  \mUlp\left( x_\hi \right)  \right) \\
+& = & \frac{1}{2} \cdot  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+Then
+\begin{eqnarray*}
+\left( - \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right)^- - \frac{1}{2} \cdot \mUlp\left( \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right) 
+& = & - \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)^- - \frac{1}{4} \cdot \left(  \mUlp\left( x_\hi \right)^+ -  \mUlp\left( x_\hi \right)  \right) \\
+& = & \frac{1}{2} \cdot \left( - \mUlp\left( x_\hi \right)^- - \left(  \mUlp\left( x_\hi \right)  -  \mUlp\left( x_\hi \right)^- \right) \right) \\
+& = & - \frac{1}{2} \cdot  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+further, using also lemma \ref{succtroisfoispuissdeux},
+\begin{eqnarray*}
+\left( - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) \right)^+
++ \frac{1}{2} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right) 
+& = & - \frac{1}{4} \cdot \left( 3 \cdot \mUlp\left( x_\hi \right) \right)^+ + 
+\frac{1}{2} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right) \\
+& = & - \frac{1}{4} \cdot \left( 3 \cdot \mUlp\left( x_\hi \right)^+ - \mUlp\left( \mUlp\left( x_\hi \right)\right)\right)
+\\ & & + \frac{1}{2} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right) \\
+& = & - \frac{3}{4} \cdot \mUlp\left( x_\hi \right)^+ + 
+\frac{3}{4} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right) \\
+& = & \frac{3}{4}\cdot\left( \mUlp\left( x_\hi \right)^+ -\mUlp\left( x_\hi\right) -\mUlp\left( x_\hi \right)^+ \right) \\
+& = & -\frac{3}{4} \cdot \mUlp\left( x_\hi \right)
+\end{eqnarray*}
+and, still with the same lemmas,
+\begin{eqnarray*}
+\left( - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) \right)^- 
+- \frac{1}{2} \cdot \mUlp \left( \mUlp\left( x_\hi \right) \right) 
+& = & \frac{1}{4} \left( - 3 \mUlp\left( x_\hi \right) \right)^- - 
+\frac{1}{2} \mUlp\left( \mUlp\left( x_\hi \right) \right) \\
+& = & \frac{1}{4} \cdot \left( 3 \cdot \mUlp\left( x_\hi \right) - \left( 3 \cdot \mUlp\left( x_\hi \right) \right)^- 
+- 3 \cdot \mUlp\left( x_\hi \right) \right) \\
+& & - \frac{1}{2} \cdot \mUlp \left( \mUlp \left( x_\hi \right) \right) \\
+& = & \frac{1}{4} \cdot \left( \left( 3 \cdot \mUlp\left( x_\hi \right) \right)^+ - 
+6 \cdot \mUlp\left( x_\hi \right) \right) - \frac{1}{2} \cdot \mUlp \left( \mUlp \left( x_\hi \right) \right) \\
+& = & \frac{1}{4} \cdot \left( 3 \cdot \mUlp\left( x_\hi \right) \right)^+ - \frac{3}{2} \cdot \mUlp\left( x_\hi \right) 
+- \frac{1}{2} \cdot \mUlp \left( \mUlp \left( x_\hi \right) \right) \\
+& = & \frac{1}{4} \cdot \left( 3 \cdot \mUlp\left( x_\hi \right)^+ - \mUlp\left(\mUlp\left(x_\hi\right)\right) \right)\\
+& & - \frac{3}{2} \cdot \mUlp\left( x_\hi \right) - \frac{1}{2} \cdot \mUlp \left( \mUlp\left( x_\hi \right) \right) \\
+& = & \frac{3}{4} \cdot \left( \mUlp\left( x_\hi \right)^+ - 2 \cdot \mUlp\left( x_\hi \right) - 
+\mUlp\left( \mUlp \left( x_\hi \right) \right) \right) \\
+& = & \frac{3}{4} \cdot \left( \mUlp\left( x_\hi \right)^+ - 2 \cdot \mUlp\left( x_\hi \right) - 
+\mUlp\left( x_\hi\right)^+ + \mUlp\left( x_\hi \right) \right) \\
+& = & - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+and finally
+\begin{eqnarray*}
+\left( - \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right)^+ + \frac{1}{2} \cdot \mUlp\left(  \mUlp\left( x_\hi \right)  \right) 
+& = & \frac{1}{2} \cdot \left( - \mUlp\left( x_\hi \right)^+ +  \mUlp\left( x_\hi \right)^+ -  \mUlp\left( x_\hi \right)  \right) \\
+& = & - \frac{1}{2} \cdot  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+For each bound that depends on $\tau$ we are obliged to treat two different cases.\\
+Let us suppose first that
+$$\tau = \frac{1}{4} \cdot \mUlp \left( x_\hi \right) $$
+So we get
+\begin{eqnarray*}
+\left( - \frac{1}{4} \cdot  \mUlp\left( x_\hi \right)  \right)^- - \frac{1}{2} \cdot \mUlp\left( \frac{1}{4} \cdot  \mUlp\left( x_\hi \right)  \right) 
+& = & \frac{1}{4} \cdot \left( - \mUlp\left( x_\hi \right)^- - \frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^+ 
+-  \mUlp\left( x_\hi \right)  \right) \right) \\
+& = & \frac{1}{4} \cdot \left( - \mUlp\left( x_\hi \right)^- - \left(  \mUlp\left( x_\hi \right)^- -  \mUlp\left( x_\hi \right)  \right) \right) \\
+& = & \frac{1}{4} \cdot \left( - \mUlp\left( x_\hi \right)^- -  \mUlp\left( x_\hi \right)^- +  \mUlp\left( x_\hi \right)  \right) \\
+& = & \frac{1}{4} \cdot  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+and
+\begin{eqnarray*} 
+\left( - \frac{1}{4} \cdot  \mUlp\left( x_\hi \right)  \right)^+ + \frac{1}{2} \cdot \mUlp\left( \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right)
+& = & \frac{1}{4} \cdot \left( - \mUlp\left( x_\hi \right)^+ +  \mUlp\left( x_\hi \right)^+ -  \mUlp\left( x_\hi \right)  \right) \\
+& = & - \frac{1}{4} \cdot  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+Let us suppose now
+$$\tau = \frac{1}{2} \cdot \mUlp \left( x_\hi \right) $$
+We get thus 
+\begin{eqnarray*}
+\left( - \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right)^- - \frac{1}{2} \cdot \mUlp\left( \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right) 
+& = & \frac{1}{2} \cdot \left( - \mUlp\left( x_\hi \right)^- - \frac{1}{2} \cdot \left(  \mUlp\left( x_\hi \right)^+ 
+-  \mUlp\left( x_\hi \right)  \right) \right) \\
+& = & \frac{1}{2} \cdot \left( - \mUlp\left( x_\hi \right)^- - \left(  \mUlp\left( x_\hi \right)^- -  \mUlp\left( x_\hi \right)  \right) \right) \\
+& = & \frac{1}{2} \cdot \left( - \mUlp\left( x_\hi \right)^- -  \mUlp\left( x_\hi \right)^- +  \mUlp\left( x_\hi \right)  \right) \\
+& = & \frac{1}{2} \cdot  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+and
+\begin{eqnarray*} 
+\left( - \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right)^+ + \frac{1}{2} \cdot \mUlp\left( \frac{1}{2} \cdot  \mUlp\left( x_\hi \right)  \right)
+& = & \left(- \frac{1}{2} \cdot  \mUlp\left( x_\hi \right) \right)^+ + \frac{1}{4} \cdot \mUlp\left(  \mUlp\left( x_\hi \right)  \right) \\
+& \leq & \left(- \frac{1}{2} \cdot  \mUlp\left( x_\hi \right) \right)^+ + \frac{1}{2} \cdot \mUlp\left(  \mUlp\left( x_\hi \right)  \right) \\
+& = & -\frac{1}{2} \cdot  \mUlp\left( x_\hi \right) 
+\end{eqnarray*}
+Finally, for all cases, we observe the following intervals:
+$$x_\mi + x_\lo \in \left( J_1 \cup J_2 \cup J_3 \cup J_4 \cup J_5 \cup J_6 \right) \backslash U$$
+with
+\begin{eqnarray*}
+J_1 & = & \left[ - \mUlp\left( x_\hi \right) ; - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) \right] \\
+J_2 & = & \left[ - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) ; - \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right] \\
+J_3 & = & \left[ - \frac{1}{2} \cdot \mUlp\left( x_\hi \right) ; - \tau \right] \\
+J_4 & = & \left[ - \tau ; 0 \right] \\
+J_5 & = & \left[ 0 ; \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right] \\
+J_6 & = & \left[ \frac{1}{2} \cdot \mUlp\left( x_\hi \right) ; \mUlp\left( x_\hi \right) \right] 
+\end{eqnarray*}
+Let us now consider more precisely the set $U$ if impossible cases due to the property that
+$x_\mi = \circ \left( x_\mi + x_\lo \right)$ and due to the fact that $x_\lo \not = 0$: \\
+Let us show that $\frac{1}{2} \cdot \mUlp\left( x_\hi \right) \in U$, i.e. 
+$$x_\mi + x_\lo \not = \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$$
+Let us suppose that this would not be the case. We would get
+$$x_\mi + x_\lo = \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$$
+As $x_\mi \not = \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$ as per hypothesis in this branch of the algorithm and because 
+$x_\lo \not = 0$, there must exist a number $\mu \in \R \backslash \left \lbrace 0 \right \rbrace$ such that
+$x_\mi = \frac{1}{2} \cdot \mUlp\left( x_\hi \right) + \mu$ and that $x_\lo = -\mu$. \\
+Since $x_\lo = \mu$  must hold, $\mu$ must be a floating point number. 
+Further $$\left \vert \mu \right \vert = \left \vert x_\lo \right \vert \leq \frac{1}{2} \cdot \mUlp\left( x_\mi \right)$$
+must be justified.
+So there exist two floating point numbers $\frac{1}{2} \cdot \mUlp\left( x_\hi \right)$ and $x_\mi$ such that 
+their difference verifies
+\begin{eqnarray*}
+\left \vert x_\mi - \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right \vert & = & \left \vert 
+\frac{1}{2} \cdot \mUlp\left( x_\hi \right) + \mu - \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right \vert \\
+& = & \left \vert \mu \right \vert \\
+& \leq & \frac{1}{2} \cdot \mUlp\left( x_\mi \right) 
+\end{eqnarray*}
+which is possible only if $x_\mi$ is exactly an integer power of $2$. In contrast, as 
+$\frac{1}{2} \cdot \mUlp\left( x_\hi \right)$ is the only one in the interval that is possible for $x_\mi$, which is 
+by the way 
+$\left] \frac{1}{4} \cdot \mUlp\left( x_\hi \right) ; \mUlp\left( x_\hi \right) \right[$, we obtain a contradiction. \\
+Using a completely analogous argument, one sees further that
+$$-\tau \in U$$
+Clearly $0 \in U$ because $x_\lo \not = 0$ and it is less in magnitude than $x_\mi$. \\
+Let us show finally that
+$-\mUlp\left( x_\hi \right) \in U$ and that $\mUlp\left( x_\hi \right) \in U$.\\
+Let us suppose that we would have
+$$\left \vert x_\mi + x_\lo \right \vert = \mUlp\left( x_\hi \right)$$
+In contrast we know that $\left \vert x_\mi \right \vert < \mUlp\left( x_\hi \right)$. 
+Since $x_\mi$ is a floating point number, this means that 
+$$\left \vert x_\mi \right \vert \leq \mUlp\left( x_\hi \right)^-$$
+which yields to
+\begin{eqnarray*}
+\left \vert x_\lo \right \vert & \geq & \mUlp\left( x_\hi \right) - \mUlp\left( x_\hi \right)^- \\
+& = & \frac{1}{2} \cdot \left( \mUlp\left(x_\hi \right)^+ - \mUlp\left( x_\hi \right) \right) \\
+& = & \frac{1}{2} \cdot \mUlp \left( \mUlp \left( x_\hi \right) \right)
+\end{eqnarray*}
+Further we know that $\left \vert x_\mi \right \vert \leq \mUlp\left( x_\hi \right)^-$ and that
+$\left \vert x_\lo \right \vert \leq \frac{1}{2} \cdot \mUlp\left( x_\mi \right)$.
+So we can check that 
+\begin{eqnarray*}
+\left \vert x_\lo \right \vert & \leq & \frac{1}{2} \cdot \mUlp\left( x_\mi \right) \\
+& = & \frac{1}{2} \cdot \left( \left( \mUlp\left( x_\hi \right)^- \right)^+ - \mUlp\left( x_\hi \right)^+ \right) \\
+& = & \frac{1}{2} \cdot \left( \mUlp\left( x_\hi \right) - \mUlp\left( x_\hi \right)^- \right) \\
+& = & \frac{1}{4} \cdot \mUlp \left( \mUlp \left( x_\hi \right) \right)
+\end{eqnarray*}
+We have thus obtained a contradiction to the hypothesis that says that 
+$-\mUlp\left( x_\hi \right) \not \in U$ and that $\mUlp\left( x_\hi \right) \not \in U$. \\
+Let us still show that in the case where $x_\hi$ is an integer power of $2$, i.e. 
+$\exists e \in \Z \mbox{ . } x_\hi = 2^e$, $-\frac{3}{4} \cdot \mUlp\left( x_\hi \right) \in U$.
+Since $x_\lo \not = 0$, using a similar argument as the one given above, the problem can be reduced to showing
+that $x_\mi = - \frac{3}{4} \cdot \mUlp \left( x_\hi \right)$ is impossible if $x_\hi$ is an integer power of $2$.
+Let us suppose the contrary. Since $x_\hi$ is an integer power of $2$, its significand is even. In consequence 
+the significand of $x_\hi^-$ is odd and the one of $x_\hi^{--}$ is again even. So 
+$\circ\left( x_\hi + x_\mi \right) = x_\hi^{--}$ because $x_\hi + x_\mi$ is at the exact middle between
+$x_\hi^{--}$ and $x_\hi^{-}$ and the significand of $x_\hi^{--}$ is even. It follows that 
+$\left( x_\hi + x_\mi \right) - \circ\left( x_\hi + x_\mi \right) = 
+\frac{1}{2} \cdot \mUlp \left( \circ\left( x_\hi + x_\mi \right) \right)$ which is impossible as per hypothesis. \par
+Having shown which numbers are in $U$, we can rewrite our intervals as follows
+$$x_\mi + x_\lo \in J^\prime_1 \cup J^\prime_2 \cup J^\prime_3 \cup J^\prime_4 \cup J^\prime_5 \cup J^\prime_6$$
+with
+\begin{eqnarray*}
+J^\prime_1 & = & \left] - \mUlp\left( x_\hi \right) ; - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) \right] \\
+J^\prime_2 & = & \left] - \frac{3}{4} \cdot \mUlp\left( x_\hi \right) ; 
+- \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right[ \\
+J^\prime_3 & = & \left] - \frac{1}{2} \cdot \mUlp\left( x_\hi \right) ; - \tau \right[ \\
+J^\prime_4 & = & \left] - \tau ; 0 \right] \\
+J^\prime_5 & = & \left[ 0 ; \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \right[ \\
+J^\prime_6 & = & \left] \frac{1}{2} \cdot \mUlp\left( x_\hi \right) ; \mUlp\left( x_\hi \right) \right[
+\end{eqnarray*}
+One can trivially check that the rounding $\circ \left( x_\hi + \left( x_\mi + x_\lo \right) \right)$ can be decided without
+using the rule for even rounding.
+In particular the cases present themselves as follows \cite{IEEE754}:
+$$\circ \left( x_\hi + \left( x_\mi + x_\lo\right) \right) = \left \lbrace
+\begin{array}{ll}
+x_\hi^{--} & \mbox{ if } x_\mi + x_\lo \in J^\prime_1 \land \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+x_\hi^- & \mbox{ if } x_\mi + x_\lo \in J^\prime_1 \land \lnot \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+x_\hi^- & \mbox{ if } x_\mi + x_\lo \in J^\prime_2\\
+x_\hi^- & \mbox{ if } x_\mi + x_\lo \in J^\prime_3\\
+x_\hi & \mbox{ if } x_\mi + x_\lo \in J^\prime_4 \\
+x_\hi & \mbox{ if } x_\mi + x_\lo \in J^\prime_5\\
+x_\hi^+ & \mbox{ if } x_\mi + x_\lo \in J^\prime_6\\
+\end{array} \right.$$
+which can be compared to 
+$$\circ \left( x_\hi + x_\mi \right) = \left \lbrace
+\begin{array}{ll}
+x_\hi^{--} & \mbox{ if } x_\mi \in I^\prime_1 \land \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+x_\hi^- & \mbox{ if } x_\mi \in I^\prime_1 \land \lnot \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+x_\hi^- & \mbox{ if } x_\mi \in I^\prime_2\\
+x_\hi^- & \mbox{ if } x_\mi \in I^\prime_3\\
+x_\hi & \mbox{ if } x_\mi \in I^\prime_4 \\
+x_\hi & \mbox{ if } x_\mi \in I^\prime_5\\
+x_\hi^+ & \mbox{ if } x_\mi \in I^\prime_6\\
+\end{array} \right.$$
+Additionally we check that 
+$$\forall i=1, \dots ,6 \mbox{ . } J^\prime_i \subseteq I^\prime_i$$
+We would therefore get an immediate contradiction if we supposed that 
+$$\circ \left( x_\hi + \left( x_\mi + x_\lo \right) \right) \not = \circ \left( x_\hi + x_\mi \right)$$
+This finishes the proof for the first case.\\ ~ \\
+Let us consider now subcases a.) through d.) of the second main case of the proof. We have already shown that
+the subcases h.) through e.) are equal to the first ones. 
+Without loss of generality we will only analyse the case where $x_\hi > 0$. 
+The set of the floating point numbers as well as the rounding function $\circ \left( \hat{x} \right)$ 
+are symmetrical around $0$. 
+We can therefore suppose that 
+$$x_\mi = - \left \lbrace \begin{array}{ll} 
+\frac{1}{4} \cdot \mUlp\left(x_\hi \right) & \mbox{if } \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+\frac{1}{2} \cdot \mUlp\left(x_\hi \right) & \mbox{otherwise} \end{array} \right.$$
+or that 
+$$x_\mi = \frac{1}{2} \cdot \mUlp\left(x_\hi \right)$$
+depending on whether $x_\mi$ is negative or positive.\\
+It is clear that one can suppose that
+$$\left \vert x_\mi + x_\lo \right \vert < \mUlp\left( x_\hi \right)$$
+because otherwise we would have $\left \vert x_\lo \right \vert \geq \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$ whilst
+$\left \vert x_\lo \right \vert \leq 2^{-53} \cdot \mUlp\left( x_\hi \right)$.\\
+Let us treat now the four cases one after another:
+{
+\renewcommand{\labelenumi}{\alph{enumi}.)}
+\begin{enumerate}
+\item We can suppose in this case that $x_\mi > 0$ and that $x_\lo > 0$: \\
+So
+$$\mUlp\left( x_\hi \right) > x_\mi + x_\lo > \frac{1}{2} \cdot \mUlp\left(x_\hi \right)$$
+Thus since the inequalities are strict
+$$\circ \left( x_\hi + \left( x_\mi + x_\lo \right) \right) = x_\hi^+ = \succ\left( x_\hi \right)$$
+which is the number returned by the algorithm.
+\item We have here $x_\mi > 0$ and $x_\lo < 0$: \\
+So the same way, we know that 
+$$x_\mi + x_\lo < \frac{1}{2} \cdot \mUlp\left(x_\hi \right)$$
+Additionally, we know that $x_\lo \geq -2^{-53} \cdot \mUlp\left(x_\hi \right) > -\frac{1}{4} \cdot \mUlp\left( x_\hi \right)$.
+This yields thus to 
+$$\circ \left( x_\hi + \left( x_\mi + x_\lo \right) \right) = x_\hi$$
+The correctness of the algorithm is therefore verified also in this case.
+\item In this case one knows that $x_\mi < 0$ and $x_\lo > 0$. In consequence
+$$x_\mi = - \tau$$
+with $$\tau = \left \lbrace \begin{array}{ll} 
+\frac{1}{4} \cdot \mUlp\left(x_\hi \right) & \mbox{if } \exists e \in \Z \mbox{ . } 2^e = x_\hi \\
+\frac{1}{2} \cdot \mUlp\left(x_\hi \right) & \mbox{otherwise} \end{array} \right.$$
+Thus we get
+$$\frac{1}{4} \cdot \mUlp\left( x_\hi \right) > 2^{-53} \cdot \mUlp \left( x_\hi \right) > x_\mi + x_\lo > -\tau$$
+mentioning analogous arguments as the ones given above. This yields to
+$$\circ \left( x_\hi + \left( x_\mi + x_\lo \right) \right) = x_\hi$$
+which is the number returned by the algorithm.
+\item Finally if $x_\mi < 0$ and $x_\lo < 0$ one checks that
+$$-2 \cdot \tau < x_\mi + x_\lo < -\tau$$
+The lower bound given for $x_\mi + x_\lo$ can be explained as follows. 
+If $\tau = \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$, it trivially holds due to the bound:
+$$\left \vert x_\mi + x_\lo \right \vert < \mUlp\left( x_\hi \right)$$
+We have already indicated this bound.
+Otherwise we know that $\tau = \frac{1}{4} \cdot \mUlp\left( x_\hi \right)$ and that $x_\mi = -\tau$.
+Since $\left \vert x_\lo \right \vert \leq 2^{-53} \cdot \left \vert x_\mi \right \vert$, one gets
+$$x_\mi + x_\lo > - \left( \frac{1}{4} + 2^{-55} \right) \cdot \mUlp\left( x_\hi \right) > -2 \cdot \tau$$
+Thus the bounds obtained for $x_\mi + x_\lo$ imply always that
+$$\circ \left( x_\hi + \left( x_\mi + x_\lo \right) \right) = x_\hi^- = \pred\left( x_\hi \right)$$
+Thus in this subcase, too, and therefore in all cases, the algorithm returns a floating point number $x^\prime$ 
+which is equal to $\circ \left( x_\hi + x_\mi + x_\lo \right)$.
+\end{enumerate}
+}
+By this final statement we have finished the proof.\qed
+\end{proof}
+\subsection{Final rounding for the directed modes}
+As we have already mentioned, the three directed rounding modes behave all in a similar fashion. On the one hand
+we have 
+$$\forall \hat{x} \in \R \mbox{ . } \diamond \left( \hat{x} \right) = \left \lbrace 
+\begin{array}{ll}
+\triangledown \left( \hat{x} \right) & \mbox{ if } \hat{x} < 0 \\
+\vartriangle \left( \hat{x} \right) & \mbox{ otherwise}
+\end{array} \right. $$
+On the other hand, one can check that 
+$$\forall \hat{x} \in \R \mbox{ . } \vartriangle \left( \hat{x} \right) = - \triangledown \left( - \hat{x} \right)$$
+The given equations are also verified on the set of the floating point numbers $\F$ \cite{Defour-thesis, IEEE754}. 
+We will therefore refrain from treating each directed rounding mode separately but we will consider them all in 
+common. So slightly deriving from our notations, we will notate $\diamond$ the rounding function of all possible three
+directed rounding modes.\par
+Further we suppose that we dispose of a correct rounding procedure for each directed rounding mode capable
+of rounding a double number $x_\hi + x_\lo$. This procedure will return in fact $\diamond \left( x_\hi + x_\lo \right)$
+\cite{crlibmweb, Defour-thesis}. 
+For constructing a correct rounding procedure for triple-double precision, we will try to give a reduction 
+procedure for reducing a triple-double number into a double-double number such that the directed 
+rounding of both triple-double and double-double numbers be equal. 
+\begin{lemma}[Directed rounding decision] \label{decarrdir} ~ \\
+Let be $x \in \F$ a floating point number. \\
+Let be $\mu, \nu \in \R$ two real numbers such that $\left \vert \mu \right \vert < \mUlp\left( x \right)$ and
+$\left \vert \nu \right \vert < \mUlp\left( x \right)$  and that
+$$\sgn\left( \mu \right) = \sgn\left( \nu \right)$$
+So the following equation holds
+$$\diamond \left( x + \mu \right) = \diamond\left( x + \nu \right)$$
+\end{lemma}
+\begin{proof} ~ \\
+We know by definition of the rounding mode, e.g. by the one of rounding $\vartriangle$ towards $+\infty$ that
+$$\forall y \in \F, \mu \in \R, \left \vert \mu \right \vert < \mUlp\left( y \right) \mbox{ . }
+\vartriangle \left( y + \rho \right) = \left \lbrace \begin{array}{ll} 
+\succ\left(y\right) & \mbox{ if } \rho > 0 \\
+y & \mbox{ otherwise}
+\end{array} \right. $$
+In fact, the rounding result $\vartriangle\left( y + \rho \right)$ is the smallest floating point number greater or equal 
+to 
+$y + \rho$. \\
+Since $x$ is a floating point number and as 
+$\pred\left( x \right) < x + \mu < \succ\left( x \right)$ and $\pred\left( x \right) < x + \mu < \succ\left( x \right)$ 
+because $\left \vert \mu \right \vert < \mUlp\left( x \right)$ and $\left \vert \mu \right \vert < \mUlp\left( x \right)$, 
+supposing that $\diamond \left( x + \mu \right) \not = \diamond \left( x + \nu \right)$ would yield to an immediate contradiction.\qed
+\end{proof}
+\begin{lemma}[Disturbed directed rounding] \label{arrdirper} ~ \\
+Let be $\hat{x} \in \R$ a real number and $x = \circ\left( \hat{x} \right) \in \F$ the (even) floating point number nearest to 
+$\hat{x}$. 
+Let be $\xi\left(\hat{x}\right) = \hat{x} - x$. \\
+Let be $\delta \in \R$ such that
+$$\left \vert \delta \right \vert < \left \vert \xi\left(\hat{x}\right) \right \vert$$
+So the following equation holds 
+$$\diamond \left( \hat{x} \right) = \diamond \left( \hat{x} + \delta \right)$$
+\end{lemma}
+Let us remark still that the inequality in hypothesis 
+-- $\left \vert \delta \right \vert < \left \vert \xi\left( \hat{x} \right) \right \vert$ --
+must be assured to be strict.
+\begin{proof} ~ \\
+We know already that 
+$$\diamond \left( \hat{x} + \delta \right) = \diamond \left( x + \xi\left( \hat{x} \right) + \delta \right)$$
+Let us show now that $\xi\left( \hat{x} \right)$ and $\xi\left( \hat{x} \right) + \delta$ have the same sign. 
+Let us therefore suppose that this would not be the case.  
+Without loss of generality, it suffices to consider the case where $\xi\left( \hat{x} \right)$ is positive; the 
+inverse case can be treated completely analogously. \\
+Thus $$\xi\left( \hat{x} \right) \geq 0$$ and $$\xi\left( \hat{x} \right) + \delta < 0$$
+In consequence $$\xi\left( \hat{x} \right) < - \delta$$
+On the other hand $$\left \vert \delta \right \vert < \left \vert \xi\left( \hat{x} \right) \right \vert$$
+Thus
+$$0 \leq \xi\left( \hat{x} \right) < \xi\left( \hat{x} \right)$$
+which yields to 
+$$\xi\left( \hat{x} \right) = 0$$ 
+In this case we know that $$\delta = 0$$ as per the hypotheses of the theorem. Thus contradiction and we know that 
+$\xi\left( \hat{x} \right)$ and $\xi\left( \hat{x} \right) + \delta$ have really the same sign.\\
+It is clear that $\xi\left( \hat{x} \right) \leq \frac{1}{2} \cdot \mUlp\left( x \right)$ because the rounding of $\hat{x}$ 
+towards $x$ is done to the nearest floating point number. In consequence, since $\delta < \xi\left( \hat{x} \right)$ we obtain
+$$\xi\left( \hat{x} \right) + \delta < \mUlp\left( x \right)$$
+As $x$ is a floating point number it suffices thus to conclude using lemma \ref{decarrdir} 
+by putting $\mu = \xi\left( \hat{x} \right)$ and
+$\nu = \xi\left( \hat{x} \right) + \delta$.\qed
+\end{proof}
+\begin{lemma}[Reduction of a triple-double into a double-double -- simple case] \label{moinsquunmiulp} ~ \\
+Let be $x_\hi + x_\mi + x_\lo \in \F + \F + \F$ a non-overlapping triple-double number such that $x_\lo$ is not subnormal, such that 
+$x_\mi = \circ \left( x_\mi + x_\lo \right)$ and such that $\left \vert x_\mi \right \vert < \tau$ where
+$$\tau = \left \lbrace \begin{array}{ll} 
+\frac{1}{4} \cdot \mUlp\left( x_\hi \right) & \mbox{ if } \exists e \in \Z \mbox{ . } 2^e = \left \vert x_\hi \right \vert \land 
+\sgn\left( x_\mi \right) = -\sgn\left( x_\hi \right)\\
+\frac{1}{2} \cdot \mUlp\left( x_\hi \right) & \mbox{ otherwise} \end{array} \right.$$
+Given the instruction sequence below:
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( t_1, t_2 \right) \gets \mAdd\left( x_\hi, x_\mi \right)$ \\
+$t_3 \gets t_2 \oplus x_\lo$
+\end{minipage}
+\end{center}
+the following equation holds after the execution of the sequence
+$$\diamond\left( t_1 + t_3 \right) = \diamond\left( x_\hi + x_\mi + x_\lo \right)$$
+\end{lemma}
+\begin{proof} ~ \\
+Due to the hypothesis that $\left \vert x_\mi \right \vert < \tau$ we can suppose that $x_\hi = \circ \left( x_\hi + x_\mi \right)$. 
+In consequence, using the properties of the \Add~ procedure, we know that we have exactly
+$$t_1 = \circ \left( x_\hi + x_\mi \right) = x_\hi$$
+and
+$$t_2 = x_\hi + x_\mi - t_1 = x_\mi$$
+So since as per hypothesis we have $x_\mi = \circ \left( x_\mi + x_\lo \right)$, we know also that 
+$t_3$ verifies exactly
+$$t_3 = x_\mi \oplus x_\lo = \circ\left( x_\mi + x_\lo \right) = x_\mi$$
+Let us put now
+$$\delta = x_\lo$$
+and
+$$\hat{x} = t_1 + t_3$$
+Clearly we get
+\begin{eqnarray*}
+\xi\left( \hat{x} \right) & = & \hat{x} - \circ\left( \hat{x} \right) \\
+& = & t_1 + t_3 - \circ\left( t_1 + t_3 \right) \\
+& = & x_\hi + x_\mi - \circ\left( x_\hi + x_\mi \right) \\
+& = & x_\hi + x_\mi - x_\hi \\
+& = & x_\mi
+\end{eqnarray*}
+Let us show now that
+$$\left \vert \delta \right \vert < \left \vert \xi\left( \hat{x} \right) \right \vert$$
+Amongst other by the lemma's hypotheses and due to the fact that $x_\mi \not = 0$, we can check that
+\begin{eqnarray*}
+\left \vert \xi\left( \hat{x} \right) \right \vert 
+& = & \left \vert x_\mi \right \vert \\
+& > & 2^{-53} \cdot \left \vert x_\mi \right \vert \\
+& \geq & \left \vert x_\lo \right \vert 
+\end{eqnarray*}
+The inequality the lemma \ref{arrdirper} asks for in hypothesis is well verified.\\
+So as per the same lemma \ref{arrdirper} we know that
+$$\diamond \left( \hat{x} + \delta \right) = \diamond\left( \hat{x} \right)$$
+This means that 
+$$\diamond \left( x_\hi + x_\mi + x_\lo \right) = \diamond\left( t_1 + t_3 \right)$$
+which is the equation that was to be shown.\qed
+\end{proof}
+\begin{lemma}[Reduction of a triple-double into a double-double -- difficult case] \label{plusdunmiulp} ~ \\
+Let be $x_\hi + x_\mi + x_\lo \in \F + \F + \F$ a non-overlapping triple-double number such that $x_\lo$ is not subnormal, such that
+$x_\mi = \circ \left( x_\mi + x_\lo \right)$ and that $\left \vert x_\mi \right \vert \geq \tau$ where
+$$\tau = \left \lbrace \begin{array}{ll} 
+\frac{1}{4} \cdot \mUlp\left( x_\hi \right) & \mbox{ if } \exists e \in \Z \mbox{ . } 2^e = \left \vert x_\hi \right \vert \land 
+\sgn\left( x_\mi \right) = -\sgn\left( x_\hi \right)\\
+\frac{1}{2} \cdot \mUlp\left( x_\hi \right) & \mbox{ otherwise} \end{array} \right.$$
+Given the instruction sequence below
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( t_1, t_2 \right) \gets \mAdd\left( x_\hi, x_\mi \right)$ \\
+$t_3 \gets t_2 \oplus x_\lo$
+\end{minipage}
+\end{center}
+the following equation holds after the execution of the sequence
+$$\diamond\left( t_1 + t_3 \right) = \diamond\left( x_\hi + x_\mi + x_\lo \right)$$
+\end{lemma}
+\begin{proof} ~ \\
+Without loss of generality, let us suppose in the sequel that $x_\hi > 0$. This is legitime because the set of the 
+floating point numbers is symmetrical around $0$. In fact it suffices to apply lemma \ref{commut} and 
+definition \ref{defulp} in order to obtain a proof for each case.\\
+In what follows we will proceed as that: we will decompose the problem in several cases and subcases that we will 
+treat one after another. For each of this subcases we will show either directly the desired result or the fact that 
+$\left \vert t_2 \right \vert \geq \left \vert x_\lo \right \vert$.
+In the end we will prove that this fact yields to the correctness of the lemma in each case.\\
+Let us start by considering the case where $\tau = \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$. 
+Thus $x_\hi$ is not an exact integer power of $2$.\\
+We therefore get 
+$$\frac{1}{2} \leq \left \vert x_\mi \right \vert < \mUlp\left( x_\hi \right)$$
+which is equivalent to
+$$\frac{1}{2} \leq \left \vert x_\mi \right \vert \leq \mUlp\left( x_\hi \right)^-$$
+because $x_\mi$ is a floating point number.\\
+We can check now that
+$$t_1 = \circ \left( x_\hi + x_\mi \right) = \left \lbrace \begin{array}{ll} 
+x_\hi^+ & \mbox{ if } x_\mi > 0 \\
+x_\hi & \mbox{ if } x_\mi = \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \mbox{ and the significand of } x_\hi \mbox{ is even} \\
+x_\hi^- & \mbox{ if } x_\mi < 0
+\end{array} \right.$$
+This implies the handling of three different subcases. \\
+Let as treat first the case where $t_1 = x_\hi$: \\
+We get here
+\begin{eqnarray*}
+t_2 & = & x_hi + x_\mi - t_1 \\
+& = & x_\hi + x_\mi - x_\hi \\
+& = & x_\mi 
+\end{eqnarray*}
+and further
+\begin{eqnarray*}
+t_3 & = & t_2 \oplus x_\lo \\
+& = & x_\mi \oplus x_\lo \\
+& = & \circ \left( x_\mi + x_\lo \right) \\
+& = & x_\mi 
+\end{eqnarray*}
+as per the hypothesis on the arguments.  \\
+So let us put
+\begin{eqnarray*}
+\hat{x} & = & t_1 + t_3 \\
+\delta & = & x_\lo 
+\end{eqnarray*}
+Thus
+\begin{eqnarray*}
+\hat{x} & = & x_\hi + x_\mi \\
+\xi\left( \hat{x} \right) & = & \circ \left( \hat{x} \right) \\
+& = & \circ \left( t_1 + t_2 \right) \\
+& = & t_2 \\
+& = & t_3
+\end{eqnarray*}
+and
+$$\left \vert \delta \right \vert < \left \vert \xi\left( \hat{x} \right) \right \vert$$
+because
+$$\left \vert x_\lo \right \vert \leq 2^{-53} \cdot \left \vert x_\mi \right \vert$$
+et $$x_\mi \not = 0$$
+Applying lemma \ref{arrdirper} we thus obtain 
+$$\diamond \left( t_1 + t_3 \right) = \diamond \left( x_\hi + x_\mi + x_\lo \right)$$
+Let us continue with the case where $t_1 = x_\hi^+$: \\
+We get here
+\begin{eqnarray*}
+t_2 & = & x_\hi + x_\mi + t_1 \\
+& = & x_\hi + x_\mi - x_\hi^+ \\
+& = & - \left( x_\hi^+ - x_\hi \right) + x_\mi \\
+& = & - \mUlp\left( x_\hi \right) + x_\mi \\
+& \leq & -\mUlp\left( x_\hi \right) + \mUlp\left( x_\hi \right)^- \\
+& = & - \left( \mUlp\left( x_\hi \right) - \mUlp\left( x_\hi \right)^- \right) \\
+& = & - \frac{1}{2} \cdot \left( \mUlp\left( x_\hi \right)^+ - \mUlp\left( x_\hi \right) \right) \\
+& = & - \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right)
+\end{eqnarray*}
+Thus
+$$\left \vert t_2 \right \vert \geq \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right)$$
+In contrast $\left \vert x_\lo \right \vert \leq \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right)$
+as per hypothesis which implies 
+$$\left \vert t_2 \right \vert \geq \left \vert x_\lo \right \vert$$
+Let us finally check the properties to be show for the third and last subcase, supposing now that
+$t_1 = x_\hi^-$. \\
+Since $x_\hi$ is not exactly an integer power of $2$, we can check the following applying amongst other 
+lemma \ref{notpoweroftwo}:
+\begin{eqnarray*}
+t_2 & = & x_\hi + x_\mi - t_1 \\
+& = & x_\hi + x_\mi - x_\hi^- \\
+& = & x_\hi^+ - x_\hi + x_\mi \\
+& = & \mUlp\left( x_\hi \right) + x_\mi \\
+& \geq & \mUlp\left( x_\hi \right) - \mUlp\left( x_\hi \right)^- \\
+& = & \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right)
+\end{eqnarray*}
+We therefore still get
+$$\left \vert t_2 \right \vert \geq \left \vert x_\lo \right \vert$$
+using the same argument as the one given above. \\ ~ \\
+Let us handle now the case where $\tau = \frac{1}{4} \cdot \mUlp\left( x_\hi \right)$: \\
+We can suppose in this case that $x_\hi$ is an exact integer power of $2$ and that $x_\mi$ is negative 
+because we had already supposed that $x_\hi$ is positive and because we know that 
+$\sgn\left( x_\hi \right) = -\sgn\left( x_\mi \right)$. We get further the following bounds for $x_\mi$:
+$$\frac{1}{4} \cdot \mUlp\left( x_\hi \right) \leq \left \vert x_\mi \right \vert \leq \mUlp\left( x_\hi \right)^-$$
+which means that
+$$-\mUlp\left( x_\hi \right)^- \leq x_\mi \leq -\frac{1}{4} \cdot \mUlp\left( x_\hi \right)$$
+still because $x_\mi$ is a floating point number. \\
+Since $x_\hi$ is an integer power of $2$ and as for this reason, its significand is even, one can check that
+$$t_1 = \circ \left( x_\hi + x_\mi \right) = \left \lbrace \begin{array}{ll} 
+x_\hi & \mbox{ if } x_\mi = -\frac{1}{4} \cdot \mUlp\left( x_\hi \right) \\
+x_\hi^- & \mbox{ if } -\frac{1}{2} \cdot \mUlp\left( x_\hi \right) < x_\mi < -\frac{1}{4} \cdot \mUlp\left( x_\hi \right) \\
+x_\hi^- & \mbox{ if } x_\mi = -\frac{1}{2} \cdot \mUlp\left( x_\hi \right) \\
+x_\hi^- & \mbox{ if } -\frac{3}{4} \cdot \mUlp\left( x_\hi \right) < x_\mi < -\frac{1}{2} \cdot \mUlp\left( x_\hi \right) \\
+x_\hi^{--} & \mbox{ if } -\mUlp\left( x_\hi \right)^- \leq x_\mi \leq -\frac{3}{4} \cdot \mUlp\left( x_\hi \right)
+\end{array} \right.
+$$
+The assertion that $t_1 = x_\hi^-$ if $x_\mi = -\frac{1}{2} \cdot \mUlp\left( x_\hi \right)$ can be explained as follows:\\
+We have 
+\begin{eqnarray*}
+x_\hi + x_\mi & = & x_\hi - \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \\
+& = & x_\hi - \frac{1}{2} \cdot \left( x_\hi^+ - x_\hi \right) \\
+& = & x_\hi - \left( x_\hi - x_\hi^- \right) \\
+& = & x_\hi^- 
+\end{eqnarray*}
+Thus $$\circ \left( x_\hi + x_\mi \right) = \circ \left( x_\hi^- \right) = x_\hi^-$$
+because $x_\hi^-$ is clearly a floating point number.
+Let us consider now first the cases where we have equations, i.e. the cases where 
+$x_\mi = -\frac{1}{4} \cdot \mUlp\left( x_\hi \right)$ and
+$x_\mi = - \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$: \\
+Let us commence by the case where $x_\mi = -\frac{1}{4} \cdot \mUlp\left( x_\hi \right)$: \\
+We get here
+\begin{eqnarray*}
+t_2 & = & x_\hi + x_\mi - t_1 \\
+& = & x_\hi + x_\mi - x_\hi \\
+& = & x_\mi 
+\end{eqnarray*}
+and we can check that the following holds by the hypotheses on the arguments
+\begin{eqnarray*}
+t_3 & = & x_\mi \oplus x_\lo \\
+& = & \circ \left( x_\mi + x_\lo \right) \\
+& = & x_\mi 
+\end{eqnarray*}
+Let us put now
+\begin{eqnarray*}
+\hat{x} & = & t_1 + t_3 \\
+\delta & = & x_\lo \\
+\xi\left( \hat{x} \right) & = & \circ\left( \hat{x} \right) - \hat{x} = t_3
+\end{eqnarray*}
+So by applying lemma \ref{arrdirper}, we get
+$$\diamond \left( t_1 + t_3 \right) = \diamond \left( x_\hi + x_\mi + x_\lo \right)$$
+because 
+$$\left \vert x_\lo \right \vert \leq 2^{-53} \cdot \left \vert x_\mi \right \vert$$
+and $x_\mi \not = 0$ which is a hypothesis of the lemma to prove. \\
+Let us now handle the second of these particular cases, i.e. the cases where  
+$x_\mi = -\frac{1}{2} \cdot \mUlp\left( x_\hi \right)$: \\
+We get
+\begin{eqnarray*}
+t_2 & = & x_\hi + x_\mi - t_1 \\
+& = & x_\hi + x_\mi - x_\hi^- \\
+& = & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) + x_\mi \\
+& = & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) - \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \\
+& = & 0 
+\end{eqnarray*}
+So in consequence we have
+\begin{eqnarray*}
+t_3 & = & t_2 \oplus x_\lo \\
+& = & 0 \oplus x_\lo \\
+& = & x_\lo
+\end{eqnarray*}
+And we thus obtain finally
+\begin{eqnarray*}
+\diamond \left( x_\hi + x_\mi + x_\lo \right) & = & \diamond \left( t_1 + t_2 + x_\lo \right) \\
+& = & \diamond \left( t_1 + 0 + x_\lo \right) \\
+& = & \diamond \left( t_1 + t_3 \right)
+\end{eqnarray*}
+Let us now analyse the other principal cases, starting with the case where 
+$$-\frac{1}{2} \cdot \mUlp\left( x_\hi \right) < x_\mi < -\frac{1}{4} \cdot \mUlp\left( x_\hi \right)$$
+This inequality bounding $x_\mi$ is in fact equivalent to the following one because $x_\mi$ is a floating point number:
+$$-\frac{1}{2} \cdot \mUlp\left( x_\hi \right)^- \leq x_\mi \leq -\frac{1}{4} \cdot \mUlp\left( x_\hi \right)^+$$
+So we can check
+\begin{eqnarray*}
+t_2 & = & x_\hi + x_\mi - t_1 \\
+& = & x_\hi + x_\mi - x_\hi^- \\
+& = & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) + x_\mi \\
+& \geq & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) - \frac{1}{2} \cdot \mUlp\left( x_\hi \right)^- \\
+& = & \frac{1}{2} \cdot \left( \mUlp\left( x_\hi \right) - \mUlp\left( x_\hi \right)^- \right) \\
+& = & \frac{1}{4} \mUlp\left( \mUlp\left( x_\hi \right) \right)
+\end{eqnarray*}
+In contrast we know that
+$$\left \vert x_\lo \right \vert \leq \frac{1}{2} \cdot \mUlp \left( x_\mi \right)$$
+Since in the currently treated case the following holds
+$$\left \vert x_\mi \right \vert \leq \frac{1}{2} \cdot \mUlp\left( x_\hi \right)$$
+we get as per lemma \ref{multhalf} 
+$$\left \vert x_\lo \right \vert \leq \frac{1}{4} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right)$$
+which yields to
+$$\left \vert t_2 \right \vert \geq \left \vert x_\lo \right \vert$$
+Let us now consider the second and one but not least case. We suppose here that
+$$-\frac{3}{4} \cdot \mUlp\left( x_\hi \right) < x_\mi < -\frac{1}{2} \cdot \mUlp\left( x_\hi \right)$$
+which is equivalent to 
+$$-\left(\frac{3}{4} \cdot \mUlp\left( x_\hi \right)\right)^- \leq x_\mi < -\frac{1}{2} \cdot \mUlp\left( x_\hi \right)^+$$
+We therefore get
+\begin{eqnarray*}
+t_2 &= & x_\hi + x_\mi - t_1 \\
+& = & x_\hi + x_\mi - x_\hi^- \\
+& = & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) + x_\mi \\
+& \leq & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) - \frac{1}{2} \cdot \mUlp\left( x_\hi \right)^+ \\
+& = & -\frac{1}{2} \cdot \left( \mUlp\left( x_\hi \right)^+ - \mUlp\left( x_\hi \right) \right) \\
+& = & -\frac{1}{2} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right)
+\end{eqnarray*}
+which gives us
+$$\left \vert t_2 \right \vert \geq \frac{1}{2} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right)$$
+We can deduce from that, still using the argument that 
+$\left \vert x_\lo \right \vert \leq \frac{1}{2} \cdot \mUlp\left( \mUlp \left( x_\hi \right) \right)$, that
+$$\left \vert t_2 \right \vert \geq \left \vert x_\lo \right \vert $$
+Let us finally handle the last case where $-\mUlp\left( x_\hi \right)^- \leq x_\mi \leq - \frac{3}{4} \cdot \mUlp\left( x_\hi \right)$: \\
+Using the property that $x_\hi^-$ is an exact integer power of $2$ and using further 
+lemma \ref{notpoweroftwo}, we can check now that
+\begin{eqnarray*}
+t_2 & = & x_\hi + x_\mi - t_1 \\
+& = & x_\hi + x_\mi - x_\hi^{--} \\
+& = & x_\hi + x_\mi - x_\hi^{--} + x_\hi^- - x_\hi^- \\
+& = & x_\hi - x_\hi^- + x_\mi + x_\hi^- - x_\hi^{--} \\
+& = & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) + x_\mi + \left( x_\hi^- \right)^+ - x_\hi^- \\
+& = & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) + x_\mi + x_\hi - x_\hi^- \\
+& = & \frac{1}{2} \cdot \mUlp\left( x_\hi \right) + x_\mi + \frac{1}{2} \cdot \mUlp\left( x_\hi \right) \\
+& = & \mUlp\left( x_\hi \right) + x_\mi \\
+& \geq & \mUlp\left( x_\hi \right) + \mUlp\left( x_\hi \right)^- \\
+& = & \frac{1}{2} \cdot \mUlp\left( \mUlp\left( x_\hi \right) \right)
+\end{eqnarray*}
+In consequence we still get the same upper bound for $\left \vert x_\lo \right \vert$, i.e.
+$$\left \vert t_2 \right \vert \geq \left \vert x_\lo \right \vert$$
+Since we have now treated all the cases that have been showing up, it suffices now to show that the upper bound
+already mentioned yields to the property to be proven. Once again, we decompose the problem in cases and subcases.\\
+Let us start by showing the property for the equation $\left \vert t_2 \right \vert = \left \vert x_\lo \right \vert$: \\
+If $\sgn\left( t_2 \right) = \sgn\left( x_\lo \right)$ we get
+\begin{eqnarray*}
+t_3 & = & t_2 \oplus x_\lo \\
+& = & x_\lo \oplus x_\lo \\
+& = & \circ \left( 2 \cdot x_\lo \right) \\
+& = & 2 \cdot x_\lo
+\end{eqnarray*}
+So we have exactly
+$$t_1 + t_3 = x_\hi + x_\mi + x_\lo$$
+and thus
+$$\diamond \left( t_1 + t_3 \right) = \diamond \left( x_\hi + x_\mi + x\lo \right)$$
+Otherwise, we have $\sgn\left( t_2 \right) = -\sgn\left( x_\lo \right)$ and get
+\begin{eqnarray*}
+t_3 & = & t_2 \oplus x_\lo \\
+& = & - x_\lo \oplus x_\lo \\
+& = & 0 
+\end{eqnarray*}
+exactly.
+This means finally that
+\begin{eqnarray*}
+\diamond \left( t_1 + t_3 \right) & = & \diamond \left( t_1 \right) \\
+& = & \diamond \left( t_1 + t_2 - t_2 \right) \\
+& = & \diamond \left( x_\hi + x_\mi + x_\lo \right)
+\end{eqnarray*}
+In the end let us consider the case where one can suppose that 
+$\left \vert t_2 \right \vert > \left \vert x_\lo \right \vert$: \\
+We can suppose here
+\begin{eqnarray*}
+t_3 & = & t_2 \oplus x_\lo \\
+& = & t_2 + x_\lo + \delta
+\end{eqnarray*}
+with
+$$\left \vert \delta \right \vert \leq 2^{-53} \cdot \left \vert t_2 + x_\lo \right \vert$$
+Let us show now that $t_2$ and $t_3$ have the same sign. For doing so let us suppose that this would not be true.\\
+Clearly, $t_2$ and $t_2 + x_\lo$ have the same sign because we know that 
+$\left \vert t_2 \right \vert > \left \vert x_\lo \right \vert$. \\
+So in order to have $\sgn\left( t_2 \right) = -1 \cdot \sgn\left( t_3 \right)$ to hold, we must have
+$$\left \vert \delta \right \vert > \left \vert t_2 + x_\lo \right \vert$$
+Thus we would obtain 
+$$2^{-53} \cdot \left \vert t_2 + x_\lo \right \vert > \left \vert t_2 + x_\lo \right \vert$$
+which is not true because 
+$$t_2 + x_\lo = 0$$
+This would yield to $\left \vert t_2 \right \vert = \left \vert x_\lo \right \vert$ which is excluded by hypotheses. 
+Thus, contradiction. \\
+The values $t_2$ and $t_3$ have therefore the same sign. By applying lemma \ref{decarrdir}, we get:
+$$\diamond \left( t_1 + t_2 \right) = \diamond \left( t_1 + t_3 \right)$$
+Let us show now that
+$$\diamond \left( t_1 + t_2 \right) = \diamond \left( x_\hi + x_\mi + x_\lo \right)$$
+in order to be able to conclude. \\
+For doing so, let us put
+\begin{eqnarray*}
+\hat{x} & = & t_1 + t_2 \\
+\delta^\prime & = & x_\lo \\
+\xi\left( \hat{x} \right) & = & t_2 
+\end{eqnarray*}
+and let us check that
+\begin{eqnarray*}
+\left \vert \delta^\prime \right \vert 
+& = & \left \vert x_\lo \right \vert \\
+& < & \left \vert t_2 \right \vert \\
+& = & \left \vert \xi\left(\hat{x}\right) \right \vert
+\end{eqnarray*}
+We can now apply lemma \ref{arrdirper} and obtain:
+$$\diamond \left( t_1 + t_3 \right) = \diamond \left( x_\hi + x_\mi + x_\lo \right)$$
+This is the equation to be shown.\qed
+\end{proof}
+\begin{theorem}[Directed final rounding of a triple-double number] \label{arrdir} ~ \\
+Let be $x_\hi + x_\mi + x_\lo \in \F + \F + \F$ a non-overlapping triple-double number. \\
+Let be $\diamond$ a directed rounding mode.\\
+Let be {\bf A} the following instruction sequence:
+\begin{center}
+\begin{minipage}[b]{50mm}
+$\left( t_1, t_2 \right) \gets \mAdd\left( x_\hi, x_\mi \right)$ \\
+$t_3 \gets t_2 \oplus x_\lo$ \\
+{\bf return } $\diamond\left( t_1 + t_3 \right)$
+\end{minipage}
+\end{center}
+So {\bf A} is a correct rounding procedure for the rounding mode $\diamond$.
+\end{theorem}
+\begin{proof} ~\\
+Trivial as per lemmas \ref{moinsquunmiulp} and \ref{plusdunmiulp}.\qed
+\end{proof}
+\bibliographystyle{plain} 
+\bibliography{elem-fun.bib}
+\end{document} 
\ No newline at end of file
diff --git a/src/crlibm/double-extended.h b/src/crlibm/double-extended.h
new file mode 100644
index 0000000..584767d
--- /dev/null
+++ b/src/crlibm/double-extended.h
@@ -0,0 +1,496 @@
+#ifndef __DOUBLE_EXTENDED_H
+#define __DOUBLE_EXTENDED_H
+
+#if (defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64))
+#include <fpu_control.h>
+typedef long double double_ext;
+#endif
+#if defined(CRLIBM_TYPECPU_ITANIUM) && defined(__INTEL_COMPILER)
+typedef __fpreg double_ext;
+#endif
+
+
+/* For debugging */
+typedef union {
+  int i[3];                 
+  long double d;
+} db_ext_number;
+
+
+#define DE_EXP 2
+#define DE_MANTISSA_HI 1
+#define DE_MANTISSA_LO 0
+
+#define print_ext(_s, _y) {\
+db_ext_number _yy; _yy.d=_y; \
+printf("%s %04x %08x %08x \n",_s, 0xffff&_yy.i[DE_EXP], _yy.i[DE_MANTISSA_HI], _yy.i[DE_MANTISSA_LO]);  \
+}
+
+/**************************************************************************************/
+/*********************************Rounding tests***************************************/
+/**************************************************************************************/
+
+
+/* These test work by observing the bits of your double-extended after the 53rd.
+
+   mask should be  7ff   if you trust your 64 bits (hum)
+                   7fe   if you trust 63 (if you have proven that maxepsilon<2^(-63) )
+                   7fc                62
+                   7f8                61
+                   7f0                60   etc
+ */
+
+/* Mask constants for rounding test */ 
+
+#define ACCURATE_TO_64_BITS 0x7ff
+#define ACCURATE_TO_63_BITS 0x7fe
+#define ACCURATE_TO_62_BITS 0x7fc
+#define ACCURATE_TO_61_BITS 0x7f8
+#define ACCURATE_TO_60_BITS 0x7f0
+#define ACCURATE_TO_59_BITS 0x7e0
+
+
+#if (defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64))
+
+static const unsigned short RN_Double     = (_FPU_DEFAULT & ~_FPU_EXTENDED)|_FPU_DOUBLE;
+static const unsigned short RN_DoubleDown = (_FPU_DEFAULT & ~_FPU_EXTENDED & ~_FPU_RC_NEAREST)|_FPU_DOUBLE | _FPU_RC_DOWN;
+static const unsigned short RN_DoubleUp   = (_FPU_DEFAULT & ~_FPU_EXTENDED & ~_FPU_RC_NEAREST)|_FPU_DOUBLE | _FPU_RC_UP;
+static const unsigned short RN_DoubleExt  = _FPU_DEFAULT;
+
+#define DOUBLE_EXTENDED_MODE  _FPU_SETCW(RN_DoubleExt)
+#define DOUBLE_UP_MODE        _FPU_SETCW(RN_DoubleUp)
+#define DOUBLE_DOWN_MODE      _FPU_SETCW(RN_DoubleDown)
+#define BACK_TO_DOUBLE_MODE   _FPU_SETCW(RN_Double)
+
+
+/*  
+Two rounding tests to the nearest.  On Pentium 3, gcc3.3, the second
+is faster by 12 cycles (and also improves the worst-case time by 60
+cycles since it doesn't switch processor rounding mode in this
+case). However it uses a coarser error estimation.
+*/
+
+#define DE_TEST_AND_RETURN_RN_ZIV(y,rncst)  \
+{ double yh, yl;                            \
+  yh = (double) y;                          \
+  yl = y-yh;                                \
+  BACK_TO_DOUBLE_MODE;                      \
+  if(yh==yh + yl*rncst)   return yh;        \
+  DOUBLE_EXTENDED_MODE;                     \
+}
+
+
+#define DE_TEST_AND_RETURN_RN(_y, _mask)                    \
+{                                                           \
+  db_ext_number _z;   double _yd;                           \
+  int _lo;                                                  \
+  _z.d = _y;                                                \
+  _yd = (double) _y;                                        \
+  _lo = _z.i[DE_MANTISSA_LO] &(_mask);                      \
+  if((_lo!=(0x3ff&(_mask))) && (_lo!= (0x400&(_mask)))) {   \
+    BACK_TO_DOUBLE_MODE;                                    \
+    return _yd;                                             \
+  }                                                         \
+}
+
+
+#define DE_TEST_AND_RETURN_RD(_y, _mask)                                        \
+{                                                           			\
+  double _result; int _bits;                                                    \
+  db_ext_number _z;                                     			\
+  _z.d = _y;                                                			\
+  DOUBLE_DOWN_MODE;                                                             \
+  _bits = _z.i[DE_MANTISSA_LO] &(_mask);     			                \
+  _result = (double)(_y);	                                                \
+  if( (_bits != (0xfff&(_mask)))  && (_bits != (0x000&(_mask))) ) {             \
+    BACK_TO_DOUBLE_MODE;	                                                \
+    return _result;                                                             \
+    }                                                                           \
+  DOUBLE_EXTENDED_MODE;                                                         \
+}
+#define DE_TEST_AND_RETURN_RU(_y, _mask)                                        \
+{                                                           			\
+  double _result; int _bits;                                                    \
+  db_ext_number _z;                                     			\
+  _z.d = _y;                                                			\
+  DOUBLE_UP_MODE;                                                               \
+  _bits = _z.i[DE_MANTISSA_LO] &(_mask);     			                \
+  _result = (double)(_y);	                                                \
+  if( (_bits != (0xfff&(_mask)))  && (_bits != (0x000&(_mask))) ) {             \
+    BACK_TO_DOUBLE_MODE;	                                                \
+    return _result;                                                             \
+    }                                                                           \
+  DOUBLE_EXTENDED_MODE;                                                         \
+}
+
+
+/* Use this one if you want a final computation step to overlap with		
+   the rounding test. Examples: multiplication by a sign or by a power of 2 */	
+										
+#define DE_TEST_AND_RETURN_RN2(_ytest, _yreturn, _mask)      \
+{                                                            \
+  db_ext_number _z;   double _y_return_d;                    \
+  int _bits;                                                 \
+  _z.d = _ytest;                                             \
+  _y_return_d = (double) (_yreturn);                         \
+  _bits = _z.i[DE_MANTISSA_LO] &(_mask);                     \
+  if((_bits!=(0x3ff&(_mask))) && (_bits!= (0x400&(_mask)))) {\
+    BACK_TO_DOUBLE_MODE;                                     \
+    return _y_return_d;                                      \
+  }                                                          \
+}
+
+
+
+
+/* Slow macros with two changes of precision, but who cares, they are
+   used at the end of the second step */
+#define RETURN_SUM_ROUNDED_DOWN(_rh, _rl)   {\
+  double _result;        \
+  DOUBLE_DOWN_MODE;      \
+  _result = (_rh+_rl);	 \
+  BACK_TO_DOUBLE_MODE;	 \
+  return _result;        \
+}
+
+#define RETURN_SUM_ROUNDED_UP(_rh, _rl)   {\
+  double _result;        \
+  DOUBLE_UP_MODE;        \
+  _result = (_rh+_rl);	 \
+  BACK_TO_DOUBLE_MODE;	 \
+  return _result;        \
+}
+
+#else /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+
+
+
+
+
+#if !defined(CRLIBM_TYPECPU_ITANIUM)
+#error "This file should be compiled only for IA32 or IA64 architecture "
+#endif
+
+/* TODO Add what it takes to compile under HP-UX */
+#if !defined(__INTEL_COMPILER)
+#error "Use icc, version 8.1 or higher to compile for IA64 architecture"
+#endif
+
+
+#define DOUBLE_EXTENDED_MODE {}
+#define BACK_TO_DOUBLE_MODE {}
+
+
+
+
+
+#define DE_TEST_AND_RETURN_RN(_y, _mask)                                     \
+{   uint64_t _mantissa, _bits; double _yd;                                   \
+    _yd = _Asm_fma(2/*_FR_D*/, 1.0, _y, 0.0, 0/*SF0*/);                      \
+    _mantissa = _Asm_getf(4/*_FR_SIG*/, _y);                                 \
+    _bits =  _mantissa & (0x7ff&(_mask));                                    \
+    if(__builtin_expect(                                                     \
+         (_bits!=(0x3ff&(_mask)))  && (_bits != (0x400&(_mask))),            \
+         1+1==2))                                                            \
+      return _yd;                                                            \
+}
+
+
+/* Slower by 5 cycles as of 2005... Let us keep it, you never know */
+#define DE_TEST_AND_RETURN_RN_ZIV(y,rncst)  \
+{ double yh, yl;                            \
+  yh = (double) y;                          \
+  yl = y-yh;                                \
+  if(__builtin_expect(yh == yh + yl*rncst, 1+1==2))   return yh;        \
+}
+
+/* Use this one if you want a final computation step to overlap with
+   the rounding test. Examples: multiplication by a sign or by a power of 2 */
+
+#define DE_TEST_AND_RETURN_RN2(_ytest, _yreturn, _mask)                      \
+{   uint64_t _mantissa, _bits;                                               \
+    _mantissa = _Asm_getf(4/*_FR_SIG*/, _ytest);                             \
+    _bits =  _mantissa & (0x7ff&(_mask));                                    \
+    if(__builtin_expect(                                                     \
+         (_bits!=(0x3ff&(_mask)))  && (_bits != (0x400&(_mask))),            \
+         1+1==2))                                                            \
+      return _yreturn;                                                       \
+}
+
+
+#define DE_TEST_AND_RETURN_RD(_y, _mask)                                     \
+{   uint64_t _mantissa, _bits; double _yd;                                   \
+    _yd = _Asm_fma(2/*_FR_D*/, -1.0, _y, 0.0, 3/*SF3*/);                     \
+    _mantissa = _Asm_getf(4/*_FR_SIG*/, _y);                                 \
+    _bits =  _mantissa & (0x7ff&(_mask));                                    \
+    if(__builtin_expect(                                                     \
+         (_bits!=(0x000&(_mask)))  && (_bits != (0x7ff&(_mask))),            \
+         1+1==2))                                                            \
+      return -_yd;                                                           \
+}
+
+#define DE_TEST_AND_RETURN_RU(_y, _mask)                                     \
+{   uint64_t _mantissa, _bits; double _yd;                                   \
+    _yd = _Asm_fma(2/*_FR_D*/, 1.0, _y, 0.0, 3/*SF3*/);                      \
+    _mantissa = _Asm_getf(4/*_FR_SIG*/, _y);                                 \
+    _bits =  _mantissa & (0x7ff&(_mask));                                    \
+    if(__builtin_expect(                                                     \
+         (_bits!=(0x000&(_mask)))  && (_bits != (0x7ff&(_mask))),            \
+         1+1==2))                                                            \
+      return _yd;                                                            \
+}
+
+#define RETURN_SUM_ROUNDED_DOWN(_rh, _rl) \
+   return -_Asm_fma(2/*_FR_D*/, -1.0, _rh, -_rl, 3/*SF3*/);
+
+#define RETURN_SUM_ROUNDED_UP(_rh, _rl) \
+   return _Asm_fma(2/*_FR_D*/, 1.0, _rh, _rl, 3/*SF3*/);
+
+
+#if 0
+
+/* This test doesn'use SF2 and SF3  Kept as a model for Pentium implementation, to erase afterwards */
+
+#define DE_TEST_AND_RETURN_RU(_y, _mask)                                     \
+{                                                           		     \
+  db_ext_number _z;   double    _yd;                        		     \
+  unsigned long int _mantissa, _y_double, _isNegative ,_wasRoundedUp, _bits; \
+  _yd=(double) _y;                                                           \
+  _mantissa = _Asm_getf(4/*_FR_SIG*/, _y);                                   \
+  _y_double = _Asm_getf(2/*_FR_D*/, _yd);                                    \
+  _bits =  _mantissa & (0x7ff&(_mask));                                      \
+  _wasRoundedUp = ((_mantissa >>11) & 1) != (_y_double & 1);       	     \
+  _bits =  _mantissa & (0x7ff&(_mask));                                      \
+  _isNegative = _y_double >> 63;                      		    	     \
+  if(_isNegative) {    							     \
+    if(_wasRoundedUp) { /* RN was RD */	                                     \
+      if( _bits != (0x7ff&(_mask)) ) {                          	     \
+        _y_double--;                                                         \
+        return (double) _Asm_setf(2/*_FR_D*/, _y_double);                    \
+      } /* else launch accurate phase */ 				     \
+    }									     \
+    else{ /* RN was RU, so need to check  */                    	     \
+      if( _bits != (0x000&(_mask)) ) {                          	     \
+        return    _yd;                                           	     \
+      } /* else launch accurate phase */ 				     \
+    }									     \
+  }									     \
+  else{ /* Positive number */                                                \
+    if(_wasRoundedUp) { /* RN was RU */                                      \
+      if( _bits != (0x7ff&(_mask)) ) {                          	     \
+        return  _yd;                                            	     \
+      } /* else launch accurate phase */ 				     \
+    }									     \
+    else{ /* RN was RD,  */                                                  \
+      if( _bits != (0x000&(_mask)) ) {                          	     \
+        _y_double++; /* beware, does not work for -0 */                      \
+        return (double) _Asm_setf(2/*_FR_D*/, _y_double);                    \
+      } /* else launch accurate phase */ 				     \
+    }                                                                        \
+  }									     \
+}
+
+
+
+
+#define DE_TEST_AND_RETURN_RD(_y, _mask)                                     \
+{                                                           		     \
+  db_ext_number _z;   double    _yd;                        		     \
+  unsigned long int _mantissa, _y_double, _isNegative ,_wasRoundedUp, _bits; \
+  _yd=(double) _y;                                                           \
+  _mantissa = _Asm_getf(4/*_FR_SIG*/, _y);                                   \
+  _y_double = _Asm_getf(2/*_FR_D*/, _yd);                                    \
+  _bits =  _mantissa & (0x7ff&(_mask));                                      \
+  _wasRoundedUp = ((_mantissa >>11) & 1) != (_y_double & 1);       	     \
+  _bits =  _mantissa & (0x7ff&(_mask));                                      \
+  _isNegative = _y_double >> 63;                      		    	     \
+  if(_isNegative) {    							     \
+    if(_wasRoundedUp) { /* RN was RD */	                                     \
+      if( _bits != (0x7ff&(_mask)) ) {                          	     \
+        return (double) _y;                                           	     \
+      } /* else launch accurate phase */ 				     \
+    }									     \
+    else{ /* RN was RU  */                                       	     \
+      if( _bits != (0x000&(_mask)) ) {                          	     \
+        _y_double++;                                                         \
+        return (double) _Asm_setf(2/*_FR_D*/, _y_double);                    \
+      } /* else launch accurate phase */ 				     \
+    }									     \
+  }									     \
+  else{ /* Positive number */                                                \
+    if(_wasRoundedUp) { /* RN was RU */                                      \
+      if( _bits != (0x7ff&(_mask)) ) {                          	     \
+        _y_double--;                                                         \
+        return (double) _Asm_setf(2/*_FR_D*/, _y_double);                    \
+      } /* else launch accurate phase */ 				     \
+    }									     \
+    else{ /* RN was RD,  */                                                  \
+      if( _bits != (0x000&(_mask)) ) {                          	     \
+        return (double) _y;                                           	     \
+      } /* else launch accurate phase */ 				     \
+    }                                                                        \
+  }									     \
+}									     
+
+#endif  /* 0 */
+
+
+
+#endif /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+
+
+
+
+
+
+
+/**************************************************************************************/
+/************************Double double-extended arithmetic*****************************/
+/**************************************************************************************/
+
+
+
+#define Add12_ext(prh, prl, a, b)       \
+{                                       \
+  double_ext _z, _a, _b;                \
+  _a = a;   _b = b;                     \
+  *prh = _a + _b;                       \
+  _z = *prh - _a;                       \
+  *prl = _b - _z;                       \
+}
+
+
+
+
+#if (defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64))
+#define Mul12_ext(prh,prl,u,v)                         \
+{                                                      \
+  const double_ext _c  = 4294967297.L; /* 2^32 +1 */   \
+  double_ext _up, _u1, _u2, _vp, _v1, _v2;             \
+  double_ext _u =u, _v=v;                              \
+                                                       \
+  _up = _u*_c;         _vp = _v*_c;                    \
+  _u1 = (_u-_up)+_up;  _v1 = (_v-_vp)+_vp;             \
+  _u2 = _u-_u1;        _v2 = _v-_v1;                   \
+                                                       \
+  *prh = _u*_v;                                        \
+  *prl = _u1*_v1 - *prh;                               \
+  *prl = *prl + _u1*_v2;                               \
+  *prl = *prl + _u2*_v1;                               \
+  *prl = *prl + _u2*_v2;                               \
+}
+
+#define Mul22_ext(prh,prl, ah,al, bh,bl)               \
+{                                                      \
+  double_ext mh, ml;                                  \
+  Mul12_ext(&mh,&ml,(ah),(bh));		               \
+  ml += (ah)*(bl) + (al)*(bh);			       \
+  Add12_ext(prh,prl, mh,ml);                           \
+}
+
+#define FMA22_ext(prh,prl, ah,al, bh,bl, ch,cl)        \
+{                                                      \
+  Mul22_ext(prh,prl, (ah),(al), (bh),(bl));            \
+  Add22_ext(prh,prl, ch,cl, *prh, *prl);               \
+}
+
+
+
+#else  /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+
+
+
+
+
+
+#define Mul12_ext( prh,prl, a, b )                              \
+    {                                                           \
+      *prh = (a) * (b);                                         \
+      *prl = _Asm_fms( 3/*_PC_NONE*/, (a), (b), *prh, 1 );      \
+    }
+
+
+#if 0 /* transcription of Alexey's */
+#define Mul22_ext( prh,prl, ah,al, bh,bl ) \
+    {                                                            \
+        double_ext _t1,_t2,_t3;                                  \
+        *prh = (ah) * (bh);                                      \
+        _t1 = (ah)*(bl);                                         \
+        _t2 = _Asm_fms( 3/*_PC_NONE*/, (ah), (bh), *prh, 1 );    \
+        _t3 = (al) * (bh) + _t1;                                 \
+        *prl = (_t2 + _t3);                                      \
+    }
+#else
+#define Mul22_ext( prh,prl, ah,al, bh,bl )                \
+{                                                         \
+  double_ext ph, pl;                                      \
+  ph = (ah)*(bh);                                         \
+  pl = _Asm_fms( 3/*_PC_NONE*/, ah, bh, ph, 1/*_SF1*/ );  \
+  pl = (ah)*(bl) + pl;                                    \
+  pl = (al)*(bh) + pl;                                    \
+  Add12_ext(prh,prl, ph,pl);                              \
+}
+#endif
+
+/* res = a*b + c, assume |a*b| <= |c|
+ *   res, a and b in X format
+ *   c in L format
+ */
+
+#if 0
+#define FMA22_ext(prh,prl, ah,al, bh,bl, ch,cl)        \
+{                                                      \
+  Mul22_ext(prh,prl, (ah),(al), (bh),(bl));            \
+  Add22_ext(prh,prl, ch,cl, *prh, *prl);               \
+}
+#else
+#define FMA22_ext( prh,prl, ah,al,  bh,bl, ch,cl) \
+    {                                                                                      \
+        double_ext __xfmagxxx_r_hi__,__xfmagxxx_r_lo__,                                    \
+                __xfmagxxx_t1__,__xfmagxxx_t2__,                                           \
+                __xfmagxxx_t3__,__xfmagxxx_t4__;                                           \
+        __xfmagxxx_r_hi__ = ah * bh + ch;                                                  \
+        __xfmagxxx_t1__ = al * bh + cl;                                                    \
+        __xfmagxxx_t2__ = __xfmagxxx_r_hi__ - ch;                                          \
+        __xfmagxxx_t3__ = ah * bl + __xfmagxxx_t1__;                                       \
+        __xfmagxxx_t4__ = _Asm_fms( 3/*_PC_NONE*/, ah, bh, __xfmagxxx_t2__, 1/*_SF1*/ );   \
+        __xfmagxxx_r_lo__ = (__xfmagxxx_t3__ + __xfmagxxx_t4__);                           \
+        *prh = __xfmagxxx_r_hi__; *prl = __xfmagxxx_r_lo__;                                \
+    }
+#endif
+
+#endif    /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+
+
+
+
+
+
+
+
+#define  Div22_ext(prh,prl,xh,xl,yh,yl)             \
+{                                                   \
+  double_ext ch,cl,uh,ul;                           \
+  ch = (xh)/(yh);                                   \
+  Mul12_ext(&uh,&ul,ch,(yh));                       \
+  cl = (xh)-uh;                                     \
+  cl = cl - ul;                                     \
+  cl = cl + (xl);                                   \
+  cl = cl - ch*(yl);                                \
+  cl = cl / (yh);                                   \
+  Add12(prh,prl, ch, cl) ;                          \
+}
+
+
+#define Add22_ext(prh,prl,xh,xl,yh,yl)   \
+do {                                     \
+  double_ext _r,_s;                      \
+  _r = (xh)+(yh);                        \
+  _s = (xh)-_r;                          \
+  _s = _s + (yh);                        \
+  _s = _s + (yl);                        \
+  _s = _s + (xl);                        \
+  Add12_ext(prh,prl,_r,_s);              \
+} while(0)
+
+#endif /* ifndef __DOUBLE_EXTENDED_H*/
diff --git a/src/crlibm/exp-itanium.c b/src/crlibm/exp-itanium.c
new file mode 100644
index 0000000..97d6a09
--- /dev/null
+++ b/src/crlibm/exp-itanium.c
@@ -0,0 +1,723 @@
+/* file: exp_itanium.c
+
+
+   Author Florent de Dinechin, ENS-Lyon
+     Heavily inspired by code from Alexey V.Ershov, intel
+     and Christoph Lauter, Technische Universitaet Muenchen
+
+WARNING : This code is dirty and experimental, and remains here for
+history. A cleaner, portable version of an exponential using
+double-extended arithmetic will be available as exp-de.c
+
+   To test within crlibm: (tested with Intel icc compiler version 8.1)
+
+icc -mcpu=itanium  -Qoption,cpp,--extended_float_types \
+    -IPF_fp_speculationsafe -c exp-itanium.c;\
+    mv exp-itanium.o exp_fast.o; make
+
+
+icc -mcpu=itanium2  -Qoption,cpp,--extended_float_types \
+    -IPF_fp_speculationsafe -c exp-itanium.c;
+    mv exp-itanium.o exp_fast.o; make
+
+This file is completely self-contained so that we can change the crlibm infrastructure without bothering maintaining it.
+
+*/
+
+
+typedef          __int64  INT64;
+typedef   signed __int64 SINT64;
+typedef unsigned __int64 UINT64;
+
+/* FP register type */
+typedef __fpreg L_FLOAT_TYPE;
+
+/* Almost the same as the previous, except exponent field smaller, and morally in memory */
+typedef long double LC_FLOAT_TYPE;
+
+/* The double-double-ext type, using registers */
+typedef struct __X_FLOAT_TYPE_TAG {
+    L_FLOAT_TYPE hi,lo; /* order is critical! */
+} X_FLOAT_TYPE;
+
+/* The double-double-ext type, in memory */
+typedef struct __XC_FLOAT_TYPE_TAG {
+    LC_FLOAT_TYPE hi,lo; /* order is critical! */
+} XC_FLOAT_TYPE;
+
+
+
+/* Table 1-17: legal floating-point precision completers (.pc) */
+typedef enum {
+    _PC_S        = 1        /* single .s */
+   ,_PC_D        = 2        /* double .d */
+   ,_PC_NONE     = 3        /* dynamic   */
+} _Asm_pc;
+
+/* Table 1-22: legal getf/setf floating-point register access completers */
+typedef enum {
+    _FR_S        = 1        /* single form      .s   */
+   ,_FR_D        = 2        /* double form      .d   */
+   ,_FR_EXP      = 3        /* exponent form    .exp */
+   ,_FR_SIG      = 4        /* significand form .sig */
+} _Asm_fr_access;
+
+/* Table 1-24: legal floating-point FPSR status field completers (.sf) */
+typedef enum {
+    _SF0         = 0        /* FPSR status field 0 .s0 */
+   ,_SF1         = 1        /* FPSR status field 1 .s1 */
+   ,_SF2         = 2        /* FPSR status field 2 .s2 */
+   ,_SF3         = 3        /* FPSR status field 3 .s3 */
+} _Asm_sf;
+
+
+
+#define ULL(bits) 0x##bits##uLL
+
+#if (!defined(EM64T) && defined(__linux__) && defined(IA32))
+# define LDOUBLE_ALIGN 12   /* IA32 Linux: 12-byte alignment */
+#else
+# define LDOUBLE_ALIGN 16   /* EM64T, IA32 Win or IPF Win/Linux: 16-byte alignm\
+			       ent */
+#endif
+
+#if (LDOUBLE_ALIGN == 16)
+#define _XPD_ ,0x0000,0x0000,0x0000
+#else /*12*/
+#define _XPD_ ,0x0000
+#endif
+
+#define LDOUBLE_HEX(w4,w3,w2,w1,w0) 0x##w0,0x##w1,0x##w2,0x##w3,0x##w4 _XPD_ /*LITTLE_ENDIAN*/
+
+
+
+/* Load XC constant data and convert to X format */
+#define __X_CONVERT_XC2X( __x__, __xc__ ) \
+    (((__x__).hi = (__xc__).hi), ((__x__).lo = (__xc__).lo))
+
+/* res = a*a
+ *   res and a in X format
+ */
+#define __X_SQR_X( __resx__, __x_a__ ) \
+    {                                                                                               \
+        L_FLOAT_TYPE __xsqrx_r_hi__,__xsqrx_r_lo__,__xsqrx_t__,__xsqrx_two__;                       \
+        __xsqrx_r_hi__ = (__x_a__).hi * (__x_a__).hi;                                               \
+        __xsqrx_t__ = (__x_a__).hi * (__x_a__).lo;                                                  \
+        __xsqrx_r_lo__ = _Asm_fms( _PC_NONE, (__x_a__).hi, (__x_a__).hi, __xsqrx_r_hi__, _SF1 );    \
+        __xsqrx_two__ = _Asm_setf( _FR_EXP, 0xffff + 1 );                                           \
+        __xsqrx_r_lo__ = __xsqrx_two__ * __xsqrx_t__ + __xsqrx_r_lo__;                              \
+        (__resx__).hi = __xsqrx_r_hi__; (__resx__).lo = __xsqrx_r_lo__;                             \
+    }
+
+/* res = a*a
+ *   res in X format
+ *   a   in L format
+ */
+#define __X_SQR_L( __resx__, __l_a__ ) \
+    {                                                                                               \
+        L_FLOAT_TYPE __xsqrl_r_hi__,__xsqrl_r_lo__;                                                 \
+        __xsqrl_r_hi__ = (__l_a__) * (__l_a__);                                                     \
+        __xsqrl_r_lo__ = _Asm_fms( _PC_NONE, (__l_a__), (__l_a__), __xsqrl_r_hi__, _SF1 );          \
+        (__resx__).hi = __xsqrl_r_hi__; (__resx__).lo = __xsqrl_r_lo__;                             \
+    }
+
+/* res = a*b
+ *   res, a and b in X format
+ */
+#define __X_MUL_XX( __resx__, __x_a__, __x_b__ ) \
+    {                                                                                               \
+        L_FLOAT_TYPE __xmulxx_r_hi__,__xmulxx_r_lo__;                                               \
+        L_FLOAT_TYPE __xmulxx_t1__,__xmulxx_t2__,__xmulxx_t3__;                                     \
+        __xmulxx_r_hi__ = (__x_a__).hi * (__x_b__).hi;                                              \
+        __xmulxx_t1__ = (__x_a__).hi * (__x_b__).lo;                                                \
+        __xmulxx_t2__ = _Asm_fms( _PC_NONE, (__x_a__).hi, (__x_b__).hi, __xmulxx_r_hi__, _SF1 );    \
+        __xmulxx_t3__ = (__x_a__).lo * (__x_b__).hi + __xmulxx_t1__;                                \
+        __xmulxx_r_lo__ = (__xmulxx_t2__ + __xmulxx_t3__);                                          \
+        (__resx__).hi = __xmulxx_r_hi__; (__resx__).lo = __xmulxx_r_lo__;                           \
+    }
+
+
+/* res = a*b + c, assume |a*b| <= |c|
+ *   res, a, b and c in X format
+ */
+#define __X_FMA_GREATER_XXX( __resx__, __x_a__, __x_b__, __x_c__ ) \
+    {                                                                                               \
+        L_FLOAT_TYPE __xfmagxxx_r_hi__,__xfmagxxx_r_lo__;                                           \
+        L_FLOAT_TYPE __xfmagxxx_t1__,__xfmagxxx_t2__;                                               \
+        L_FLOAT_TYPE __xfmagxxx_t3__,__xfmagxxx_t4__;                                               \
+        __xfmagxxx_r_hi__ = (__x_a__).hi * (__x_b__).hi + (__x_c__).hi;                             \
+        __xfmagxxx_t1__ = (__x_a__).lo * (__x_b__).hi + (__x_c__).lo;                               \
+        __xfmagxxx_t2__ = (__xfmagxxx_r_hi__ - (__x_c__).hi);                                       \
+        __xfmagxxx_t3__ = (__x_a__).hi * (__x_b__).lo + __xfmagxxx_t1__;                            \
+        __xfmagxxx_t4__ = _Asm_fms( _PC_NONE, (__x_a__).hi, (__x_b__).hi, __xfmagxxx_t2__, _SF1 );  \
+        __xfmagxxx_r_lo__ = (__xfmagxxx_t3__ + __xfmagxxx_t4__);                                    \
+        (__resx__).hi = __xfmagxxx_r_hi__; (__resx__).lo = __xfmagxxx_r_lo__;                       \
+    }
+
+/* res = a*b + c, assume |a*b| <= |c|
+ *   res, b and c in X format
+ *   a in L format
+ */
+#define __X_FMA_GREATER_LXX( __resx__, __l_a__, __x_b__, __x_c__ ) \
+    {                                                                                               \
+        L_FLOAT_TYPE __xfmaglxx_r_hi__,__xfmaglxx_r_lo__;                                           \
+        L_FLOAT_TYPE __xfmaglxx_t2__;                                                               \
+        L_FLOAT_TYPE __xfmaglxx_t3__,__xfmaglxx_t4__;                                               \
+        __xfmaglxx_r_hi__ = (__l_a__) * (__x_b__).hi + (__x_c__).hi;                                \
+        __xfmaglxx_t2__ = (__xfmaglxx_r_hi__ - (__x_c__).hi);                                       \
+        __xfmaglxx_t3__ = (__l_a__) * (__x_b__).lo + (__x_c__).lo;                                  \
+        __xfmaglxx_t4__ = _Asm_fms( _PC_NONE, (__l_a__), (__x_b__).hi, __xfmaglxx_t2__, _SF1 );     \
+        __xfmaglxx_r_lo__ = (__xfmaglxx_t3__ + __xfmaglxx_t4__);                                    \
+        (__resx__).hi = __xfmaglxx_r_hi__; (__resx__).lo = __xfmaglxx_r_lo__;                       \
+    }
+
+/* res = a*b + c, assume |a*b| <= |c|
+ *   res, a and b in X format
+ *   c in L format
+ */
+#define __X_FMA_GREATER_XXL( __resx__, __x_a__, __x_b__, __l_c__ ) \
+    {                                                                                               \
+        L_FLOAT_TYPE __xfmagxxl_r_hi__,__xfmagxxl_r_lo__;                                           \
+        L_FLOAT_TYPE __xfmagxxl_t1__,__xfmagxxl_t2__;                                               \
+        L_FLOAT_TYPE __xfmagxxl_t3__,__xfmagxxl_t4__;                                               \
+        __xfmagxxl_r_hi__ = (__x_a__).hi * (__x_b__).hi + (__l_c__);                                \
+        __xfmagxxl_t1__ = (__x_a__).lo * (__x_b__).hi;                                              \
+        __xfmagxxl_t2__ = (__xfmagxxl_r_hi__ - (__l_c__));                                          \
+        __xfmagxxl_t3__ = (__x_a__).hi * (__x_b__).lo + __xfmagxxl_t1__;                            \
+        __xfmagxxl_t4__ = _Asm_fms( _PC_NONE, (__x_a__).hi, (__x_b__).hi, __xfmagxxl_t2__, _SF1 );  \
+        __xfmagxxl_r_lo__ = (__xfmagxxl_t3__ + __xfmagxxl_t4__);                                    \
+        (__resx__).hi = __xfmagxxl_r_hi__; (__resx__).lo = __xfmagxxl_r_lo__;                       \
+    }
+
+
+
+/* T1[i1] = 2^(i1/(K^1))  i1 = [-L/2..L/2]
+ * T2[i2] = 2^(i2/(K^2))  i2 = [-L/2..L/2]
+ */
+#define TX ((const XC_FLOAT_TYPE *)_TXL)
+__declspec(align(16)) static const unsigned short _TXL[] = {
+/* -64*/  LDOUBLE_HEX(3ffe,b504,f333,f9de,6484),LDOUBLE_HEX(3fbd,b2fb,1366,ea95,7d3e)   /* ~0.70710678118654752438189403651591646848828531801700 T1[  0] hi,lo */
+/* -64*/ ,LDOUBLE_HEX(3ffe,ff4e,cb59,511e,c8a5),LDOUBLE_HEX(3fbc,c06e,885f,bc63,75f1)   /* ~0.99729605608547012624747266085201147234329255297780 T2[  0] hi,lo */
+/* -63*/ ,LDOUBLE_HEX(3ffe,b600,93a8,5ed5,f76c),LDOUBLE_HEX(bfbd,9566,7ff0,b0cc,0214)   /* ~0.71094630108458277992049267890450892082299105823040 T1[  1] hi,lo */
+/* -63*/ ,LDOUBLE_HEX(3ffe,ff51,8f3a,34cb,1c70),LDOUBLE_HEX(3fbd,d414,fb77,db11,52bc)   /* ~0.99733824893045803280239303134635520109441131353378 T2[  1] hi,lo */
+/* -62*/ ,LDOUBLE_HEX(3ffe,b6fd,91e3,28d1,7791),LDOUBLE_HEX(3fb9,e2cb,e1bb,aa83,4b3f)   /* ~0.71480666919598500561603207636984791406575823202729 T1[  2] hi,lo */
+/* -62*/ ,LDOUBLE_HEX(3ffe,ff54,5322,c329,f86f),LDOUBLE_HEX(3fba,e9b1,4513,ba49,7f30)   /* ~0.99738044356050881746869260502386111966188764199614 T2[  2] hi,lo */
+/* -61*/ ,LDOUBLE_HEX(3ffe,b7fb,efca,8ca4,1e7c),LDOUBLE_HEX(3fbc,fc36,9e7c,4277,ff37)   /* ~0.71868799872449116278826097836684994035749696195125 T1[  3] hi,lo */
+/* -61*/ ,LDOUBLE_HEX(3ffe,ff57,1712,fc50,9e7f),LDOUBLE_HEX(3fbd,8700,fef5,d3b7,14da)   /* ~0.99742263997569800127026770630855878607690101489424 T2[  3] hi,lo */
+/* -60*/ ,LDOUBLE_HEX(3ffe,b8fb,af47,62fb,9ee9),LDOUBLE_HEX(3fbb,dc3c,bbc2,b35b,2d0d)   /* ~0.72259040348852331001267348953298608194018015637993 T1[  4] hi,lo */
+/* -60*/ ,LDOUBLE_HEX(3ffe,ff59,db0a,e054,50ba),LDOUBLE_HEX(3fbb,f679,bcc2,0658,8201)   /* ~0.99746483817610110853783128570526628209336195141077 T2[  4] hi,lo */
+/* -59*/ ,LDOUBLE_HEX(3ffe,b9fc,d245,2c0b,9deb),LDOUBLE_HEX(bfbb,d96c,65d5,3b9f,5478)   /* ~0.72651399792452628242879139608412231154943583533167 T1[  5] hi,lo */
+/* -59*/ ,LDOUBLE_HEX(3ffe,ff5c,9f0a,6f4a,5174),LDOUBLE_HEX(bfbd,b0bf,02f2,53a4,00e8)   /* ~0.99750703816179366674628259392676454808679409325122 T2[  5] hi,lo */
+/* -58*/ ,LDOUBLE_HEX(3ffe,baff,5ab2,133e,45fb),LDOUBLE_HEX(3fbd,e9aa,33a4,8b27,0718)   /* ~0.73045889709032349430091121678110255288629559800028 T1[  6] hi,lo */
+/* -58*/ ,LDOUBLE_HEX(3ffe,ff5f,6311,a947,e33b),LDOUBLE_HEX(bfbc,a528,cf59,14b2,d1a3)   /* ~0.99754923993285120651470718189379738305433420464396 T2[  6] hi,lo */
+/* -57*/ ,LDOUBLE_HEX(3ffe,bc03,4a7e,f2e9,fb0d),LDOUBLE_HEX(bfbc,a3fa,fef4,e9a8,9a84)   /* ~0.73442521666849096343950356602370277414593147113919 T1[  7] hi,lo */
+/* -57*/ ,LDOUBLE_HEX(3ffe,ff62,2720,8e62,48da),LDOUBLE_HEX(bfbd,d1c7,8694,72f5,3da0)   /* ~0.99759144348934926176900722660789710971585009247064 T2[  7] hi,lo */
+/* -56*/ ,LDOUBLE_HEX(3ffe,bd08,a39f,580c,36bf),LDOUBLE_HEX(bfbd,aefd,c093,25e0,a10c)   /* ~0.73841307296974965571198165625865783567860489711165 T1[  8] hi,lo */
+/* -56*/ ,LDOUBLE_HEX(3ffe,ff64,eb37,1eae,c555),LDOUBLE_HEX(bfbc,e4bf,fcf3,e4d6,86d6)   /* ~0.99763364883136336952506109665428368771245004609227 T2[  8] hi,lo */
+/* -55*/ ,LDOUBLE_HEX(3ffe,be0f,6809,8609,93e2),LDOUBLE_HEX(3fbd,9334,4593,7562,b2dd)   /* ~0.74242258293637625025680054635657256767444778233766 T1[  9] hi,lo */
+/* -55*/ ,LDOUBLE_HEX(3ffe,ff67,af55,5a42,9bec),LDOUBLE_HEX(3fbc,dd7f,3c8d,5596,1f78)   /* ~0.99767585595896907005135367807469037870760075747966 T2[  9] hi,lo */
+/* -54*/ ,LDOUBLE_HEX(3ffe,bf17,99b6,7a73,1083),LDOUBLE_HEX(bfbb,bf51,7aa1,a07a,3d7b)   /* ~0.74645386414563242460538591838137278955400688573718 T1[ 10] hi,lo */
+/* -54*/ ,LDOUBLE_HEX(3ffe,ff6a,737b,4133,101b),LDOUBLE_HEX(bfbd,a2df,4f03,c8fb,22c7)   /* ~0.99771806487224190686897637436736374638712732121348 T2[ 10] hi,lo */
+/* -53*/ ,LDOUBLE_HEX(3ffe,c021,3aa1,f0d0,8db0),LDOUBLE_HEX(3fbd,de67,649a,354e,a707)   /* ~0.75050703481321276010901355491000686015468090772628 T1[ 11] hi,lo */
+/* -53*/ ,LDOUBLE_HEX(3ffe,ff6d,37a8,d395,6596),LDOUBLE_HEX(bfbb,c802,1a75,cc6d,fa67)   /* ~0.99776027557125742653478667198996276965772267431020 T2[ 11] hi,lo */
+/* -52*/ ,LDOUBLE_HEX(3ffe,c12c,4cca,6670,9456),LDOUBLE_HEX(3fbd,f88a,fab3,4a01,0f6b)   /* ~0.75458221379671136985669427366119066391547676175832 T1[ 12] hi,lo */
+/* -52*/ ,LDOUBLE_HEX(3ffe,ff6f,fbde,117e,e04f),LDOUBLE_HEX(bfbd,de6d,fc11,1a38,5732)   /* ~0.99780248805609117896666879210521017284918343648314 T2[ 12] hi,lo */
+/* -51*/ ,LDOUBLE_HEX(3ffe,c238,d231,1e3d,6673),LDOUBLE_HEX(bfbd,d094,6839,bf6a,c8f1)   /* ~0.75867952059910734942697538296663140044984174892306 T1[ 13] hi,lo */
+/* -51*/ ,LDOUBLE_HEX(3ffe,ff72,c01a,fb04,c470),LDOUBLE_HEX(3fbd,a44f,1ba6,a6fe,09f6)   /* ~0.99784470232681871711827303883524109551217406988143 T2[ 13] hi,lo */
+/* -50*/ ,LDOUBLE_HEX(3ffe,c346,ccda,2497,6407),LDOUBLE_HEX(3fbc,83b2,1584,a2e0,e90a)   /* ~0.76279907537226915341865493558337618651421507820487 T1[ 14] hi,lo */
+/* -50*/ ,LDOUBLE_HEX(3ffe,ff75,845f,903c,5662),LDOUBLE_HEX(bfbc,df95,80fe,a0cf,dc67)   /* ~0.99788691838351559735848655963152964432083535939455 T2[ 14] hi,lo */
+/* -49*/ ,LDOUBLE_HEX(3ffe,c456,3ecc,5334,cb33),LDOUBLE_HEX(bfbd,cf43,20d2,b162,9ed8)   /* ~0.76694099892047800092224549284303236618143273517489 T1[ 15] hi,lo */
+/* -49*/ ,LDOUBLE_HEX(3ffe,ff78,48ab,d13a,dac5),LDOUBLE_HEX(bfbd,f1ee,64ae,cf61,1403)   /* ~0.99792913622625737903775247628068711946980329230427 T2[ 15] hi,lo */
+/* -48*/ ,LDOUBLE_HEX(3ffe,c567,2a11,5506,dadd),LDOUBLE_HEX(3fbc,f8ab,4325,9376,7cde)   /* ~0.77110541270397041179298150415100110421917634084820 T1[ 16] hi,lo */
+/* -48*/ ,LDOUBLE_HEX(3ffe,ff7b,0cff,be15,9675),LDOUBLE_HEX(3fbb,db1c,1100,661d,aecd)   /* ~0.99797135585511962475912042802583812317607225850224 T2[ 16] hi,lo */
+/* -47*/ ,LDOUBLE_HEX(3ffe,c679,90b5,aa24,5f79),LDOUBLE_HEX(3fbd,aa1c,d161,c55d,84aa)   /* ~0.77529243884249997954350233642095702180085936561226 T1[ 17] hi,lo */
+/* -47*/ ,LDOUBLE_HEX(3ffe,ff7d,d15b,56e1,ce8b),LDOUBLE_HEX(3fba,a4a7,c651,158b,a410)   /* ~0.99801357727017790043245668019089578137936769053339 T2[ 17] hi,lo */
+/* -46*/ ,LDOUBLE_HEX(3ffe,c78d,74c8,abb9,b15d),LDOUBLE_HEX(bfbc,fb17,471a,24ff,6207)   /* ~0.77950220011891848353015668782184377505473094061017 T1[ 18] hi,lo */
+/* -46*/ ,LDOUBLE_HEX(3ffe,ff80,95be,9bb4,c859),LDOUBLE_HEX(bfbc,b742,b767,0074,c32e)   /* ~0.99805580047150777505760368968346085694065550342202 T2[ 18] hi,lo */
+/* -45*/ ,LDOUBLE_HEX(3ffe,c8a2,d85c,8ffe,2c45),LDOUBLE_HEX(3fbc,c368,d3ed,6e1c,0385)   /* ~0.78373481998277644652211096354399444408045383170247 T1[ 19] hi,lo */
+/* -45*/ ,LDOUBLE_HEX(3ffe,ff83,5a29,8ca3,c96c),LDOUBLE_HEX(bfbb,a438,6792,f0f4,537c)   /* ~0.99809802545918482083280032224337219304288737475872 T2[ 19] hi,lo */
+/* -44*/ ,LDOUBLE_HEX(3ffe,c9b9,bd86,6e2f,27a3),LDOUBLE_HEX(bfbd,fe3c,0dab,f5dd,2d04)   /* ~0.78799042255394324325455321367250860475905938073992 T1[ 20] hi,lo */
+/* -44*/ ,LDOUBLE_HEX(3ffe,ff86,1e9c,29c4,178d),LDOUBLE_HEX(bfbc,db63,47ba,fee3,03cb)   /* ~0.99814025223328461320889196106698193489137338474392 T2[ 20] hi,lo */
+/* -43*/ ,LDOUBLE_HEX(3ffe,cad2,265e,4290,774e),LDOUBLE_HEX(bfbd,b7c9,6a5f,0390,8383)   /* ~0.79226913262624686507939325563754096037882845848798 T1[ 21] hi,lo */
+/* -43*/ ,LDOUBLE_HEX(3ffe,ff88,e316,732a,f8bf),LDOUBLE_HEX(bfbc,9a27,1ddb,a851,3860)   /* ~0.99818248079388273078091028955860508631303673610091 T2[ 21] hi,lo */
+/* -42*/ ,LDOUBLE_HEX(3ffe,cbec,14fe,f272,7c5d),LDOUBLE_HEX(bfba,b6f8,370b,a140,9231)   /* ~0.79657107567113344897104590391911926872126059606671 T1[ 22] hi,lo */
+/* -42*/ ,LDOUBLE_HEX(3ffe,ff8b,a798,68ed,b341),LDOUBLE_HEX(bfbd,f2fb,91eb,2cdf,6fb7)   /* ~0.99822471114105475539649350857906995315715903416275 T2[ 22] hi,lo */
+/* -41*/ ,LDOUBLE_HEX(3ffe,cd07,8b86,503d,cdd2),LDOUBLE_HEX(bfbd,ef64,73b9,8c84,14e6)   /* ~0.80089637784134667692226977608882521053601521998643 T1[ 23] hi,lo */
+/* -41*/ ,LDOUBLE_HEX(3ffe,ff8e,6c22,0b21,8d8b),LDOUBLE_HEX(3fbc,dbab,2022,5186,afc9)   /* ~0.99826694327487627199325601057289247819426236674189 T2[ 23] hi,lo */
+/* -40*/ ,LDOUBLE_HEX(3ffe,ce24,8c15,1f84,80e4),LDOUBLE_HEX(bfbb,ee53,e383,5069,c895)   /* ~0.80524516597462715409606881511450637844973243772983 T1[ 24] hi,lo */
+/* -40*/ ,LDOUBLE_HEX(3ffe,ff91,30b3,59db,ce53),LDOUBLE_HEX(3fbd,9ced,2076,73bc,c0c0)   /* ~0.99830917719542286886983892268965234961797250434756 T2[ 24] hi,lo */
+/* -39*/ ,LDOUBLE_HEX(3ffe,cf43,18cf,1919,18c1),LDOUBLE_HEX(3fbc,994f,1cc9,8dc0,21f2)   /* ~0.80961756759743187464176475409693978235736722126603 T1[ 25] hi,lo */
+/* -39*/ ,LDOUBLE_HEX(3ffe,ff93,f54c,5531,bc88),LDOUBLE_HEX(3fbc,badb,2327,d830,4c8e)   /* ~0.99835141290277013741485956366261689254315569996833 T2[ 25] hi,lo */
+/* -38*/ ,LDOUBLE_HEX(3ffe,d063,33da,ef2b,2595),LDOUBLE_HEX(bfbc,a4ae,8e6a,996c,abf8)   /* ~0.81401371092867388343282744611606460694019915536046 T1[ 26] hi,lo */
+/* -38*/ ,LDOUBLE_HEX(3ffe,ff96,b9ec,fd38,9f54),LDOUBLE_HEX(3fbc,deab,3cf6,1b93,876b)   /* ~0.99839365039699367221533166105729151240666396915912 T2[ 26] hi,lo */
+/* -37*/ ,LDOUBLE_HEX(3ffe,d184,df62,5169,9ac6),LDOUBLE_HEX(3fba,b8fb,b86d,56aa,3fd1)   /* ~0.81843372488348224388140378371403471646772231906652 T1[ 27] hi,lo */
+/* -37*/ ,LDOUBLE_HEX(3ffe,ff99,7e95,5205,be1d),LDOUBLE_HEX(bfbc,de71,2326,2868,54d2)   /* ~0.99843588967816907111087545989569491666770773008465 T2[ 27] hi,lo */
+/* -36*/ ,LDOUBLE_HEX(3ffe,d2a8,1d91,f12a,e45a),LDOUBLE_HEX(3fbb,9124,72be,1ef2,0143)   /* ~0.82287773907698242225553647566371751054248306900262 T1[ 28] hi,lo */
+/* -36*/ ,LDOUBLE_HEX(3ffe,ff9c,4345,53ae,6082),LDOUBLE_HEX(3fbc,fe9f,77a5,1aa2,3b01)   /* ~0.99847813074637193503108739678353344970673788338899 T2[ 28] hi,lo */
+/* -35*/ ,LDOUBLE_HEX(3ffe,d3cc,f099,859a,c379),LDOUBLE_HEX(3fbd,dfb2,b158,f1a9,8797)   /* ~0.82734588382809719876243362279844006934581557288765 T1[ 29] hi,lo */
+/* -35*/ ,LDOUBLE_HEX(3ffe,ff9f,07fd,0247,ce60),LDOUBLE_HEX(bfb8,da60,27f4,240a,2f75)   /* ~0.99852037360167786826659064303157720132730901241302 T2[ 29] hi,lo */
+/* -34*/ ,LDOUBLE_HEX(3ffe,d4f3,5aab,cfed,fa1f),LDOUBLE_HEX(3fbd,b243,bdff,4c4c,58b5)   /* ~0.83183829016336821750429372790414106475509470328688 T1[ 30] hi,lo */
+/* -34*/ ,LDOUBLE_HEX(3ffe,ffa1,ccbc,5de7,4fcc),LDOUBLE_HEX(3fbd,be96,9b04,c127,0421)   /* ~0.99856261824416247814377445291000867655384354293346 T2[ 30] hi,lo */
+/* -33*/ ,LDOUBLE_HEX(3ffe,d61b,5dfe,9f9b,ce07),LDOUBLE_HEX(bfbc,8d32,b9db,3407,1837)   /* ~0.83635508982079828681687957980805947499902686104178 T1[ 31] hi,lo */
+/* -33*/ ,LDOUBLE_HEX(3ffe,ffa4,9183,66a2,2d19),LDOUBLE_HEX(bfbc,d9f7,dc7c,8136,fec5)   /* ~0.99860486467390137535005481539407412583386758342385 T2[ 31] hi,lo */
+/* -32*/ ,LDOUBLE_HEX(3ffe,d744,fcca,d69d,6af4),LDOUBLE_HEX(3fbc,e69a,2ee6,40b4,ff78)   /* ~0.84089641525371454301891749327779734812793321907520 T1[ 32] hi,lo */
+/* -32*/ ,LDOUBLE_HEX(3ffe,ffa7,5652,1c8d,aed2),LDOUBLE_HEX(bfbd,c18b,c96e,08d6,74ee)   /* ~0.99864711289097017360861380241843221483577508479356 T2[ 32] hi,lo */
+/* -31*/ ,LDOUBLE_HEX(3ffe,d870,394c,6db3,2c84),LDOUBLE_HEX(3fbc,8559,bf8d,ed94,1cbc)   /* ~0.84546239963465259097986914671452041147858835756778 T1[ 33] hi,lo */
+/* -31*/ ,LDOUBLE_HEX(3ffe,ffaa,1b28,7fbf,1dbe),LDOUBLE_HEX(3fbd,8eb4,6838,bb56,a087)   /* ~0.99868936289544448989524000337425491125031840056180 T2[ 33] hi,lo */
+/* -30*/ ,LDOUBLE_HEX(3ffe,d99d,15c2,78af,d7b6),LDOUBLE_HEX(bfb7,bc61,09ae,0f6a,2a20)   /* ~0.85005317685926173475099293375123465921205934137105 T1[ 34] hi,lo */
+/* -30*/ ,LDOUBLE_HEX(3ffe,ffac,e006,904b,c2e1),LDOUBLE_HEX(3fbc,b14f,99ba,f83d,8dd4)   /* ~0.99873161468739994449253863373350270649098092690110 T2[ 34] hi,lo */
+/* -29*/ ,LDOUBLE_HEX(3ffe,dacb,946f,2ac9,cc72),LDOUBLE_HEX(bfbc,efdd,dd36,f187,1d1c)   /* ~0.85466888155023141356459587258953547461715061217546 T1[ 35] hi,lo */
+/* -29*/ ,LDOUBLE_HEX(3ffe,ffaf,a4ec,4e48,e778),LDOUBLE_HEX(bfbd,8671,6e2d,8219,1444)   /* ~0.99877386826691216077309110055182372889248654246330 T2[ 35] hi,lo */
+/* -28*/ ,LDOUBLE_HEX(3ffe,dbfb,b797,daf2,3755),LDOUBLE_HEX(3fbc,f610,356a,78a6,a991)   /* ~0.85930964906123895780164570479264796176721574738621 T1[ 36] hi,lo */
+/* -28*/ ,LDOUBLE_HEX(3ffe,ffb2,69d9,b9cb,d4fa),LDOUBLE_HEX(3fbd,d84d,2ee6,e8d4,d3b8)   /* ~0.99881612363405676525366511109282896541117224842309 T2[ 36] hi,lo */
+/* -27*/ ,LDOUBLE_HEX(3ffe,dd2d,8185,0832,4c20),LDOUBLE_HEX(3fbd,cb3c,6af5,b47f,2972)   /* ~0.86397561548091878110000596535655859042890369892120 T1[ 37] hi,lo */
+/* -27*/ ,LDOUBLE_HEX(3ffe,ffb5,2ece,d2e9,d51d),LDOUBLE_HEX(bfbd,994c,52bb,c51e,a42f)   /* ~0.99885838078890938786626521594946837012685136869549 T2[ 37] hi,lo */
+/* -26*/ ,LDOUBLE_HEX(3ffe,de60,f482,5e0e,9124),LDOUBLE_HEX(bfbc,8be1,7498,5ee6,5e9c)   /* ~0.86866691763685312450450626275966214961954392492771 T1[ 38] hi,lo */
+/* -26*/ ,LDOUBLE_HEX(3ffe,ffb7,f3cb,99b8,31cd),LDOUBLE_HEX(3fbb,8b13,c75c,9907,9d08)   /* ~0.99890063973154566147024183142555386893945978954434 T2[ 38] hi,lo */
+/* -25*/ ,LDOUBLE_HEX(3ffe,df96,12de,b8f0,4420),LDOUBLE_HEX(3fbd,8d70,2518,e344,9fa0)   /* ~0.87338369309958447002373294054677899111993610858917 T1[ 39] hi,lo */
+/* -25*/ ,LDOUBLE_HEX(3ffe,ffba,b8d0,0e4c,3535),LDOUBLE_HEX(3fba,bff0,5a1f,2fe7,8cc7)   /* ~0.99894290046204122234018221715423635487240971997380 T2[ 39] hi,lo */
+/* -24*/ ,LDOUBLE_HEX(3ffe,e0cc,deec,2a94,e111),LDOUBLE_HEX(3fb9,cb12,a091,ba66,7944)   /* ~0.87812608018664974155473648687042498295340919867157 T1[ 40] hi,lo */
+/* -24*/ ,LDOUBLE_HEX(3ffe,ffbd,7ddc,30bb,29b9),LDOUBLE_HEX(3fbc,c13b,06cc,24fb,adcf)   /* ~0.99898516298047170984064982435235435787035385146737 T2[ 40] hi,lo */
+/* -23*/ ,LDOUBLE_HEX(3ffe,e205,5aff,fe83,d369),LDOUBLE_HEX(bfbd,b207,df0e,7d75,ac99)   /* ~0.88289421796663641054054086354518915413791546598076 T1[ 41] hi,lo */
+/* -23*/ ,LDOUBLE_HEX(3ffe,ffc0,42f0,011a,59f9),LDOUBLE_HEX(3fbb,9baa,d16f,ffef,fe31)   /* ~0.99902742728691276658881462169325970990030327811837 T2[ 41] hi,lo */
+/* -22*/ ,LDOUBLE_HEX(3ffe,e33f,8972,be8a,5a51),LDOUBLE_HEX(3fba,9bfe,9079,5980,eecf)   /* ~0.88768824626326062627321503151200943193543935194611 T1[ 42] hi,lo */
+/* -22*/ ,LDOUBLE_HEX(3ffe,ffc3,080b,7f7f,10cf),LDOUBLE_HEX(3fbd,a67d,211d,b089,b842)   /* ~0.99906969338144003834603287805826710155088221654295 T2[ 42] hi,lo */
+/* -21*/ ,LDOUBLE_HEX(3ffe,e47b,6ca0,373d,a88d),LDOUBLE_HEX(3fbd,cbc4,8805,c442,ddb5)   /* ~0.89250830565946749005053553749355899071815656498074 T1[ 43] hi,lo */
+/* -21*/ ,LDOUBLE_HEX(3ffe,ffc5,cd2e,abfe,9952),LDOUBLE_HEX(bfbd,d27c,2e60,9c60,e59f)   /* ~0.99911196126412917418047748840947974713344592601060 T2[ 43] hi,lo */
+/* -20*/ ,LDOUBLE_HEX(3ffe,e5b9,06e7,7c83,48a8),LDOUBLE_HEX(3fbb,f2f4,7a52,76dd,8765)   /* ~0.89735453750155359320742065598608405707636848092079 T1[ 44] hi,lo */
+/* -20*/ ,LDOUBLE_HEX(3ffe,ffc8,9259,86ae,3ed1),LDOUBLE_HEX(bfbd,e1f3,4d80,330a,7c7d)   /* ~0.99915423093505582619608743066841327618021750822663 T2[ 44] hi,lo */
+/* -19*/ ,LDOUBLE_HEX(3ffe,e6f8,5aaa,ee1f,ce22),LDOUBLE_HEX(3fbd,f895,8fac,51be,5160)   /* ~0.90222708390331194012751875321853844980068970471620 T1[ 45] hi,lo */
+/* -19*/ ,LDOUBLE_HEX(3ffe,ffcb,578c,0fa3,4cd8),LDOUBLE_HEX(bfba,85a0,3df0,1bbe,480e)   /* ~0.99919650239429564980361830883737184194615110754966 T2[ 45] hi,lo */
+/* -18*/ ,LDOUBLE_HEX(3ffe,e839,6a50,3c4b,dc68),LDOUBLE_HEX(3fbd,f22f,21a1,58e1,8fbc)   /* ~0.90712608775019937809927506044971323717618361115455 T1[ 46] hi,lo */
+/* -18*/ ,LDOUBLE_HEX(3ffe,ffce,1cc6,46f3,0f2f),LDOUBLE_HEX(bfbd,d11c,79ec,fe71,2113)   /* ~0.99923877564192430366643224437517289970855927094817 T2[ 46] hi,lo */
+/* -17*/ ,LDOUBLE_HEX(3ffe,e97c,3840,6c4f,8c57),LDOUBLE_HEX(bfba,f6e3,3b0a,efed,259d)   /* ~0.91205169270352665550133028360413334212353220209479 T1[ 47] hi,lo */
+/* -17*/ ,LDOUBLE_HEX(3ffe,ffd0,e208,2cb2,d1d6),LDOUBLE_HEX(3fbd,822a,581b,5246,bdac)   /* ~0.99928105067801744948365744170004631996562238782644 T2[ 47] hi,lo */
+/* -16*/ ,LDOUBLE_HEX(3ffe,eac0,c6e7,dd24,392f),LDOUBLE_HEX(bfbc,bf4a,2932,3e46,ac15)   /* ~0.91700404320467123175366838672140090693574165925383 T1[ 48] hi,lo */
+/* -16*/ ,LDOUBLE_HEX(3ffe,ffd3,a751,c0f7,e10c),LDOUBLE_HEX(bfbc,b118,1d47,fb41,07e6)   /* ~0.99932332750265075236965894855956094033899717032909 T2[ 48] hi,lo */
+/* -15*/ ,LDOUBLE_HEX(3ffe,ec07,18b6,4c1c,bddc),LDOUBLE_HEX(3fbc,9f3a,0910,0bf0,97d9)   /* ~0.92198328447931296252514099531794045105925761163234 T1[ 49] hi,lo */
+/* -15*/ ,LDOUBLE_HEX(3ffe,ffd6,6ca3,03d7,8947),LDOUBLE_HEX(3fbc,eeaf,9a2f,a3c1,3789)   /* ~0.99936560611589988042035778703642279197083553299307 T2[ 49] hi,lo */
+/* -14*/ ,LDOUBLE_HEX(3ffe,ed4f,301e,d994,2b84),LDOUBLE_HEX(3fbd,c01a,5b6d,4c97,f624)   /* ~0.92698956254169278417588684337857785067171789705753 T1[ 50] hi,lo */
+/* -14*/ ,LDOUBLE_HEX(3ffe,ffd9,31fb,f567,173b),LDOUBLE_HEX(3fbd,e5f8,d3c8,1e5c,b0b2)   /* ~0.99940788651784050509270171391840165142639307305216 T2[ 50] hi,lo */
+/* -13*/ ,LDOUBLE_HEX(3ffe,ee99,0f98,0da3,025b),LDOUBLE_HEX(3fbd,95de,3c06,30a3,9321)   /* ~0.93202302419889452238894664293233915941527811810374 T1[ 51] hi,lo */
+/* -13*/ ,LDOUBLE_HEX(3ffe,ffdb,f75c,95bb,d7d7),LDOUBLE_HEX(bfbd,fbb3,2c62,3fb8,60df)   /* ~0.99945016870854830104203489482550537559291115030646 T2[ 51] hi,lo */
+/* -12*/ ,LDOUBLE_HEX(3ffe,efe4,b99b,dcda,f5cb),LDOUBLE_HEX(3fbd,8cac,39ed,291b,7226)   /* ~0.93708381705514995065010516728243317174928961321711 T1[ 52] hi,lo */
+/* -12*/ ,LDOUBLE_HEX(3ffe,ffde,bcc4,e4eb,1842),LDOUBLE_HEX(bfbd,fe9c,0372,21ba,c7cf)   /* ~0.99949245268809894595946757833715423657849896699190 T2[ 52] hi,lo */
+/* -11*/ ,LDOUBLE_HEX(3ffe,f132,30a7,ad09,4509),LDOUBLE_HEX(3fbc,ec3f,42f5,b4c8,cfcf)   /* ~0.94217208951616722483130353382740906909020850434899 T1[ 53] hi,lo */
+/* -11*/ ,LDOUBLE_HEX(3ffe,ffe1,8234,e30a,25e1),LDOUBLE_HEX(bfbd,d44f,a015,3fba,570a)   /* ~0.99953473845656812089713674773783225191436940804123 T2[ 53] hi,lo */
+/* -10*/ ,LDOUBLE_HEX(3ffe,f281,773c,59ff,b13a),LDOUBLE_HEX(bfbb,bb3f,ab19,b85c,2da7)   /* ~0.94728799079348282067506575865323270591034088283777 T1[ 54] hi,lo */
+/* -10*/ ,LDOUBLE_HEX(3ffe,ffe4,47ac,902e,4e53),LDOUBLE_HEX(bfb9,db28,c775,3bab,3e53)   /* ~0.99957702601403151005136568651998629775334848091006 T2[ 54] hi,lo */
+/*  -9*/ ,LDOUBLE_HEX(3ffe,f3d2,8fde,3a64,1a5b),LDOUBLE_HEX(bfbd,b74d,7cdc,8798,a758)   /* ~0.95243167090883710184474539306442864017299143597483 T1[ 55] hi,lo */
+/*  -9*/ ,LDOUBLE_HEX(3ffe,ffe7,0d2b,ec6c,df73),LDOUBLE_HEX(bfba,cdc3,3c89,4bd3,b790)   /* ~0.99961931536056480087108419563257655227062059566378 T2[ 55] hi,lo */
+/*  -8*/ ,LDOUBLE_HEX(3ffe,f525,7d15,2486,cc2c),LDOUBLE_HEX(3fbd,f73a,18f5,db30,1f87)   /* ~0.95760328069857364691012946433801289458642713725566 T1[ 56] hi,lo */
+/*  -8*/ ,LDOUBLE_HEX(3ffe,ffe9,d2b2,f7db,2756),LDOUBLE_HEX(bfbc,8838,b5d7,21d6,f1ce)   /* ~0.99966160649624368394940837623252605226298328489065 T2[ 56] hi,lo */
+/*  -7*/ ,LDOUBLE_HEX(3ffe,f67a,416c,733f,846e),LDOUBLE_HEX(bfbd,fced,046b,6310,b9e0)   /* ~0.96280297181806246450529868097234498236502986401319 T1[ 57] hi,lo */
+/*  -7*/ ,LDOUBLE_HEX(3ffe,ffec,9841,b28e,744c),LDOUBLE_HEX(3fbc,97cc,e653,acf3,2bde)   /* ~0.99970389942114385307785073830899591484921984374523 T2[ 57] hi,lo */
+/*  -6*/ ,LDOUBLE_HEX(3ffe,f7d0,df73,0ad1,3bb9),LDOUBLE_HEX(bfb7,b795,b494,f824,8a8b)   /* ~0.96803089674614722529933166783600029248191276565194 T1[ 58] hi,lo */
+/*  -6*/ ,LDOUBLE_HEX(3ffe,ffef,5dd8,1c9c,14e1),LDOUBLE_HEX(3fbd,94dc,70ee,035c,489a)   /* ~0.99974619413534100530053030930766055917047196999192 T2[ 58] hi,lo */
+/*  -5*/ ,LDOUBLE_HEX(3ffe,f929,59bb,5dd4,ba74),LDOUBLE_HEX(3fbc,d2df,86c7,21a9,8d5b)   /* ~0.97328720878961664316093849169675422672298736870288 T1[ 59] hi,lo */
+/*  -5*/ ,LDOUBLE_HEX(3ffe,fff2,2376,3619,57dc),LDOUBLE_HEX(bfbc,873d,93df,ba07,4a3e)   /* ~0.99978849063891084085996252550643248468986712396144 T2[ 59] hi,lo */
+/*  -4*/ ,LDOUBLE_HEX(3ffe,fa83,b2db,722a,033a),LDOUBLE_HEX(3fbd,f84b,7628,62ba,ff99)   /* ~0.97857206208770013448287189428143051372899208217859 T1[ 60] hi,lo */
+/*  -4*/ ,LDOUBLE_HEX(3ffe,fff4,e91b,ff1b,8c3e),LDOUBLE_HEX(bfbd,ef98,e3e2,81af,6b64)   /* ~0.99983078893192906314284912339118704949214588850736 T2[ 60] hi,lo */
+/*  -3*/ ,LDOUBLE_HEX(3ffe,fbdf,ed6c,e5f0,9c49),LDOUBLE_HEX(bfbd,c4b4,018d,426a,3a32)   /* ~0.98388561161658788907719355720793430464254925027489 T1[ 61] hi,lo */
+/*  -3*/ ,LDOUBLE_HEX(3ffe,fff7,aec9,77b8,0143),LDOUBLE_HEX(3fb9,87ed,a7ba,da2f,9976)   /* ~0.99987308901447137873428824828003769198403460904955 T2[ 61] hi,lo */
+/*  -2*/ ,LDOUBLE_HEX(3ffe,fd3e,0c0c,f486,c175),LDOUBLE_HEX(bfbd,f581,8b4d,9c3e,23fa)   /* ~0.98922801319397548415511892128115789546427549794316 T1[ 62] hi,lo */
+/*  -2*/ ,LDOUBLE_HEX(3ffe,fffa,747e,a004,0664),LDOUBLE_HEX(3fbc,8e3e,4bde,4901,6016)   /* ~0.99991539088661349752619467157188637429499067366123 T2[ 62] hi,lo */
+/*  -1*/ ,LDOUBLE_HEX(3ffe,fe9e,115c,7b8f,884c),LDOUBLE_HEX(bfbd,a45b,4cd4,30c5,a1ed)   /* ~0.99459942348363317566987962248248322794097475707530 T1[ 63] hi,lo */
+/*  -1*/ ,LDOUBLE_HEX(3ffe,fffd,3a3b,7814,eb54),LDOUBLE_HEX(bfbc,ca27,58a3,c057,ba57)   /* ~0.99995769454843113255466946487359791717608459293842 T2[ 63] hi,lo */
+/*   0*/ ,LDOUBLE_HEX(3fff,8000,0000,0000,0000),LDOUBLE_HEX(0000,0000,0000,0000,0000)   /*  1.0                                                  T1[ 64] hi,lo */
+/*   0*/ ,LDOUBLE_HEX(3fff,8000,0000,0000,0000),LDOUBLE_HEX(0000,0000,0000,0000,0000)   /*  1.0                                                  T2[ 64] hi,lo */
+/*   1*/ ,LDOUBLE_HEX(3fff,80b1,ed4f,d999,ab6c),LDOUBLE_HEX(3fbd,94cd,5c66,db9b,f480)   /* ~1.00542990111280282133562891111466797156026586890220 T1[ 65] hi,lo */
+/*   1*/ ,LDOUBLE_HEX(3fff,8001,62e6,1bed,4a49),LDOUBLE_HEX(bfbc,bd9e,8f2d,ce5c,6131)   /* ~1.00004230724139581934929027484670882586215157061815 T2[ 65] hi,lo */
+/*   2*/ ,LDOUBLE_HEX(3fff,8164,d1f3,bc03,0773),LDOUBLE_HEX(3fbe,f7ca,ca4f,7a29,bde9)   /* ~1.01088928605170045996793776188482638644927646964788 T1[ 66] hi,lo */
+/*   2*/ ,LDOUBLE_HEX(3fff,8002,c5d0,0fdc,fcb7),LDOUBLE_HEX(bfbe,9353,2b4e,7f6e,83c2)   /* ~1.00008461627269431323383058751730345647956710308790 T2[ 66] hi,lo */
+/*   3*/ ,LDOUBLE_HEX(3fff,8218,af43,73fc,25ec),LDOUBLE_HEX(bfbe,c706,5df2,5b81,9130)   /* ~1.01637831491095303798263826955405875196447595953941 T1[ 67] hi,lo */
+/*   3*/ ,LDOUBLE_HEX(3fff,8004,28bd,dbd9,bf99),LDOUBLE_HEX(3fbb,d289,3e85,affc,a646)   /* ~1.00012692709397120742909753632332581219088751822710 T2[ 67] hi,lo */
+/*   4*/ ,LDOUBLE_HEX(3fff,82cd,8698,ac2b,a1d7),LDOUBLE_HEX(3fbd,f8a9,1d6d,1948,2ffd)   /* ~1.02189714865411667820815216911611855721275787800550 T1[ 68] hi,lo */
+/*   4*/ ,LDOUBLE_HEX(3fff,8005,8baf,7fee,3b5d),LDOUBLE_HEX(3fbc,e38c,59c7,2a4e,5c9a)   /* ~1.00016923970530223107159445428138155875785741955041 T2[ 68] hi,lo */
+/*   5*/ ,LDOUBLE_HEX(3fff,8383,594e,efb6,ee37),LDOUBLE_HEX(bfbc,eff1,589e,1360,4be1)   /* ~1.02744594911876369655156365778836402569140773266553 T1[ 69] hi,lo */
+/*   5*/ ,LDOUBLE_HEX(3fff,8006,eea4,fc25,188e),LDOUBLE_HEX(bfbe,be51,bfd6,da9c,50ec)   /* ~1.00021155410676311644201097461603922056383453309535 T2[ 69] hi,lo */
+/*   6*/ ,LDOUBLE_HEX(3fff,843a,28c3,acde,4046),LDOUBLE_HEX(3fbc,d7c9,7650,9fe8,ac10)   /* ~1.03302487902122842248868461734190304923686198890209 T1[ 70] hi,lo */
+/*   6*/ ,LDOUBLE_HEX(3fff,8008,519e,5088,ffd3),LDOUBLE_HEX(bfbc,ddbf,fb2a,c38e,3196)   /* ~1.00025387029842959885680281351127973721304442733526 T2[ 70] hi,lo */
+/*   7*/ ,LDOUBLE_HEX(3fff,84f1,f656,379c,1a29),LDOUBLE_HEX(3fbb,f030,62c2,6b5b,a5d1)   /* ~1.03863410196137879060607894787793270552356261759996 T1[ 71] hi,lo */
+/*   7*/ ,LDOUBLE_HEX(3fff,8009,b49b,7d24,99f3),LDOUBLE_HEX(bfbe,8364,adc5,5d2d,55af)   /* ~1.00029618828037741710187263910469823713356163352727 T2[ 71] hi,lo */
+/*   8*/ ,LDOUBLE_HEX(3fff,85aa,c367,cc48,7b15),LDOUBLE_HEX(bfbd,e8da,91cf,7aac,f938)   /* ~1.04427378242741384034662083246658426105568651109933 T1[ 72] hi,lo */
+/*   8*/ ,LDOUBLE_HEX(3fff,800b,179c,8202,8fd1),LDOUBLE_HEX(bfbe,d743,563a,a3ce,1a20)   /* ~1.00033850805268231299888920249330226397432852536439 T2[ 72] hi,lo */
+/*   9*/ ,LDOUBLE_HEX(3fff,8664,915b,923f,ba04),LDOUBLE_HEX(bfbd,91f4,8ed8,4742,eaa7)   /* ~1.04994408580068726609749174549790495802881196141242 T1[ 73] hi,lo */
+/*   9*/ ,LDOUBLE_HEX(3fff,800c,7aa1,5f2d,8a6d),LDOUBLE_HEX(3fbe,b45d,df92,07f3,cad6)   /* ~1.00038082961542003151370755498206222000590059906244 T2[ 73] hi,lo */
+/*  10*/ ,LDOUBLE_HEX(3fff,871f,6196,9e8d,1010),LDOUBLE_HEX(3fbd,e85c,9f15,ed4a,a559)   /* ~1.05564517836055715878373906235765389283187687397003 T1[ 74] hi,lo */
+/*  10*/ ,LDOUBLE_HEX(3fff,800d,ddaa,14b0,32e8),LDOUBLE_HEX(bfbe,dbf5,ee63,a474,2c9a)   /* ~1.00042315296866632119004991707811313972342759370803 T2[ 74] hi,lo */
+/*  11*/ ,LDOUBLE_HEX(3fff,87db,357f,f698,d792),LDOUBLE_HEX(bfbe,df6e,2275,ebd9,aeb2)   /* ~1.06137722728926208099788086602899284116574563086032 T1[ 75] hi,lo */
+/*  11*/ ,LDOUBLE_HEX(3fff,800f,40b6,a295,327b),LDOUBLE_HEX(3fbe,9a11,8af4,78f3,787d)   /* ~1.00046547811249693317372372325380069923994597047567 T2[ 75] hi,lo */
+/*  12*/ ,LDOUBLE_HEX(3fff,8898,0e80,92da,8527),LDOUBLE_HEX(3fbe,bbf1,aed9,318c,eac6)   /* ~1.06714040067682361812972241521535465835768263787031 T1[ 76] hi,lo */
+/*  12*/ ,LDOUBLE_HEX(3fff,8010,a3c7,08e7,3282),LDOUBLE_HEX(3fbd,ae5b,58b5,4705,681e)   /* ~1.00050780504698762240524401168073609369457699358463 T2[ 76] hi,lo */
+/*  13*/ ,LDOUBLE_HEX(3fff,8955,ee03,618e,5fdd),LDOUBLE_HEX(bfbe,d452,cdb2,971d,08d9)   /* ~1.07293486752597555142999669053338607227487955242395 T1[ 77] hi,lo */
+/*  13*/ ,LDOUBLE_HEX(3fff,8012,06db,47b0,dc73),LDOUBLE_HEX(3fbe,bb24,d6a1,6ac0,de44)   /* ~1.00055013377221414664405146899284204664581920951604 T2[ 77] hi,lo */
+/*  14*/ ,LDOUBLE_HEX(3fff,8a14,d575,496e,fd9a),LDOUBLE_HEX(3fbb,80ca,1d92,c368,0c22)   /* ~1.07876079775711979373727100739444040300440974533557 T1[ 78] hi,lo */
+/*  14*/ ,LDOUBLE_HEX(3fff,8013,69f3,5efc,d9e4),LDOUBLE_HEX(bfbe,ba91,a929,afe6,0b3f)   /* ~1.00059246428825226711903373377765547047602012753486 T2[ 78] hi,lo */
+/*  15*/ ,LDOUBLE_HEX(3fff,8ad4,c645,2c72,8924),LDOUBLE_HEX(3fba,d573,dd56,13bf,92a3)   /* ~1.08461836221330923781328015031988343253033235669136 T1[ 79] hi,lo */
+/*  15*/ ,LDOUBLE_HEX(3fff,8014,cd0f,4ed5,d485),LDOUBLE_HEX(3fbe,95d6,5430,ec64,68fa)   /* ~1.00063479659517774787800409308502480598690453916788 T2[ 79] hi,lo */
+/*  16*/ ,LDOUBLE_HEX(3fff,8b95,c1e3,ea8b,d6e7),LDOUBLE_HEX(bfba,8373,af14,eb58,6dfd)   /* ~1.09050773266525765920875040704274283598351757973432 T1[ 80] hi,lo */
+/*  16*/ ,LDOUBLE_HEX(3fff,8016,302f,1746,7628),LDOUBLE_HEX(3fbd,da43,7f91,3447,4021)   /* ~1.00067713069306635665506322041551356960553675889968 T2[ 80] hi,lo */
+/*  17*/ ,LDOUBLE_HEX(3fff,8c57,c9c4,646f,4dde),LDOUBLE_HEX(bfba,8f46,5c3d,afa3,6840)   /* ~1.09642908181637682338803452264386351089342497289180 T1[ 81] hi,lo */
+/*  17*/ ,LDOUBLE_HEX(3fff,8017,9352,b859,68ba),LDOUBLE_HEX(bfbd,a49b,73de,ad19,46f2)   /* ~1.00071946658199386411165765498054724957910366356372 T2[ 81] hi,lo */
+/*  18*/ ,LDOUBLE_HEX(3fff,8d1a,df5b,7e5b,a9e6),LDOUBLE_HEX(bfbe,9670,96d2,e37c,a594)   /* ~1.10238258330784094358827107651421783884870819747447 T1[ 82] hi,lo */
+/*  18*/ ,LDOUBLE_HEX(3fff,8018,f67a,3219,5645),LDOUBLE_HEX(3fbd,b854,8436,4510,af0d)   /* ~1.00076180426203604405342023619951419277640525251626 T2[ 82] hi,lo */
+/*  19*/ ,LDOUBLE_HEX(3fff,8ddf,0420,22e6,9cd6),LDOUBLE_HEX(bfbe,e18d,4bbd,81ca,0653)   /* ~1.10836841172367863805718612990602878198842518031597 T1[ 83] hi,lo */
+/*  19*/ ,LDOUBLE_HEX(3fff,801a,59a5,8490,e8f3),LDOUBLE_HEX(bfbd,bfde,9abb,c89b,4566)   /* ~1.00080414373326867375543075544541693489009048789739 T2[ 83] hi,lo */
+/*  20*/ ,LDOUBLE_HEX(3fff,8ea4,398b,45cd,53c0),LDOUBLE_HEX(3fbd,b700,5132,1e0f,5317)   /* ~1.11438674259589253628943694707231770735234022140502 T1[ 84] hi,lo */
+/*  20*/ ,LDOUBLE_HEX(3fff,801b,bcd4,afca,cb09),LDOUBLE_HEX(bfbc,ee2b,3ca1,60ce,c87d)   /* ~1.00084648499576753342011486980211998343293089419603 T2[ 84] hi,lo */
+/*  21*/ ,LDOUBLE_HEX(3fff,8f6a,8117,e6c8,e5c4),LDOUBLE_HEX(3fbb,cffb,0890,e8f2,826a)   /* ~1.12043775240960668442349867923724104912253096699714 T1[ 85] hi,lo */
+/*  21*/ ,LDOUBLE_HEX(3fff,801d,2007,b3d1,a6eb),LDOUBLE_HEX(3fbc,e24f,a3f1,8819,c368)   /* ~1.00088882804960840661092497105855159134080167859792 T2[ 85] hi,lo */
+/*  22*/ ,LDOUBLE_HEX(3fff,9031,dc43,1466,b1dc),LDOUBLE_HEX(3fbe,eeb0,2950,929d,0fc5)   /* ~1.12652161860824189974425446614247903198702260851860 T1[ 86] hi,lo */
+/*  22*/ ,LDOUBLE_HEX(3fff,801e,833e,90b0,271b),LDOUBLE_HEX(bfbd,df0c,d686,c810,ce9e)   /* ~1.00093117289486708014391996846015331357193645089864 T2[ 86] hi,lo */
+/*  23*/ ,LDOUBLE_HEX(3fff,90fa,4c8b,eee4,b12b),LDOUBLE_HEX(bfbe,d02d,6d6b,424b,49e1)   /* ~1.13263851959871922803115701361420519788225647062063 T1[ 87] hi,lo */
+/*  23*/ ,LDOUBLE_HEX(3fff,801f,e679,4670,f637),LDOUBLE_HEX(bfbd,f4b1,1157,9a3c,c09c)   /* ~1.00097351953161934387092485421177912030543666332960 T2[ 87] hi,lo */
+/*  24*/ ,LDOUBLE_HEX(3fff,91c3,d373,ab11,c336),LDOUBLE_HEX(3fbb,fd6d,8e0a,e5ac,9d82)   /* ~1.13878863475669165369712210189589995934511534869670 T1[ 88] hi,lo */
+/*  24*/ ,LDOUBLE_HEX(3fff,8021,49b7,d51e,befb),LDOUBLE_HEX(3fbe,f7b7,5b79,1115,d652)   /* ~1.00101586795994099089637113797479628374276217073202 T2[ 88] hi,lo */
+/*  25*/ ,LDOUBLE_HEX(3fff,928e,727d,9531,f9ac),LDOUBLE_HEX(3fbc,aadf,7a7a,5204,6a72)   /* ~1.14497214443180421938536794890239889355143532156944 T1[ 89] hi,lo */
+/*  25*/ ,LDOUBLE_HEX(3fff,8022,acfa,3cc4,2c43),LDOUBLE_HEX(bfbb,9803,679c,fccf,bd52)   /* ~1.00105821817990781779413728136418626490922179073095 T2[ 89] hi,lo */
+/*  26*/ ,LDOUBLE_HEX(3fff,935a,2b2f,13e6,e92c),LDOUBLE_HEX(bfbd,b319,afc5,89b6,c463)   /* ~1.15118922995298270583672262112884254747768864035606 T1[ 90] hi,lo */
+/*  26*/ ,LDOUBLE_HEX(3fff,8024,1040,7d6b,e905),LDOUBLE_HEX(bfbd,d992,0edb,1ae2,6862)   /* ~1.00110057019159562395702739445724205324950162321329 T2[ 90] hi,lo */
+/*  27*/ ,LDOUBLE_HEX(3fff,9426,ff0f,ab1c,04b6),LDOUBLE_HEX(3fbe,f15c,f03c,a096,7fdb)   /* ~1.15744007363375102956197515435832201546872965991497 T1[ 91] hi,lo */
+/*  27*/ ,LDOUBLE_HEX(3fff,8025,738a,9720,a056),LDOUBLE_HEX(3fbd,8031,e4e2,c90f,b56a)   /* ~1.00114292399508021213887232203632038363139145076274 T2[ 91] hi,lo */
+/*  28*/ ,LDOUBLE_HEX(3fff,94f4,efa8,fef7,0961),LDOUBLE_HEX(3fbd,ba2b,eb44,9547,7951)   /* ~1.16372485877757751379386191858955612588033545762300 T1[ 92] hi,lo */
+/*  28*/ ,LDOUBLE_HEX(3fff,8026,d6d8,89ec,fd6a),LDOUBLE_HEX(bfbe,8df6,8809,7e58,ba93)   /* ~1.00118527959043738845452964358884173634578473865985 T2[ 92] hi,lo */
+/*  29*/ ,LDOUBLE_HEX(3fff,95c3,fe86,d6cc,7fef),LDOUBLE_HEX(bfbb,adcd,6381,aa3b,dde8)   /* ~1.17004376968325018808485954435738563006452750414609 T1[ 93] hi,lo */
+/*  29*/ ,LDOUBLE_HEX(3fff,8028,3a2a,55db,ab90),LDOUBLE_HEX(bfbc,bd1b,9f76,51ee,96be)   /* ~1.00122763697774296194620280431308856350369751453399 T2[ 93] hi,lo */
+/*  30*/ ,LDOUBLE_HEX(3fff,9694,2d37,2018,5a00),LDOUBLE_HEX(3fbe,91d5,36d0,7538,458a)   /* ~1.17639699165028127625376441756088752299547195434570 T1[ 94] hi,lo */
+/*  30*/ ,LDOUBLE_HEX(3fff,8029,9d7f,faf7,5637),LDOUBLE_HEX(bfbe,d236,fdc3,f478,d426)   /* ~1.00126999615707274512554220136095750603999476879835 T2[ 94] hi,lo */
+/*  31*/ ,LDOUBLE_HEX(3fff,9765,7d49,f17a,b08e),LDOUBLE_HEX(3fbe,a0f4,5d52,3833,af61)   /* ~1.18278471098434102989037375319725242661661468446254 T1[ 95] hi,lo */
+/*  31*/ ,LDOUBLE_HEX(3fff,802b,00d9,794a,a8e9),LDOUBLE_HEX(3fbe,856f,102a,5311,acd9)   /* ~1.00131235712850255343154409759520717670966405421495 T2[ 95] hi,lo */
+/*  32*/ ,LDOUBLE_HEX(3fff,9837,f051,8db8,a96f),LDOUBLE_HEX(3fbe,8d5a,4630,5c85,eded)   /* ~1.18920711500272106668756738612202639160386752337217 T1[ 96] hi,lo */
+/*  32*/ ,LDOUBLE_HEX(3fff,802c,6436,d0e0,4f51),LDOUBLE_HEX(bfb6,e62d,6b30,d098,6397)   /* ~1.00135471989210820588107192508076082049228716641664 T2[ 96] hi,lo */
+/*  33*/ ,LDOUBLE_HEX(3fff,990b,87e2,66c1,89aa),LDOUBLE_HEX(bfbd,c61c,79fe,e0f2,443a)   /* ~1.19566439203982737460481289293312556765158660709857 T1[ 97] hi,lo */
+/*  33*/ ,LDOUBLE_HEX(3fff,802d,c798,01c2,f534),LDOUBLE_HEX(3fbe,ee14,9ecb,14b8,e2d1)   /* ~1.00139708444796552430991476434485321078682318329811 T2[ 97] hi,lo */
+/*  34*/ ,LDOUBLE_HEX(3fff,99e0,4593,20b7,fa65),LDOUBLE_HEX(bfbc,de7b,c9a6,5a50,1a8c)   /* ~1.20215673145270314210817513833617908858286682516336 T1[ 98] hi,lo */
+/*  34*/ ,LDOUBLE_HEX(3fff,802f,2afd,0bfd,4678),LDOUBLE_HEX(bfbc,b751,8633,d8a0,aeca)   /* ~1.00143945079615033413172886511688375321682542562484 T2[ 98] hi,lo */
+/*  35*/ ,LDOUBLE_HEX(3fff,9ab6,2afc,94ff,864a),LDOUBLE_HEX(3fbd,c468,ec6e,75e7,1adb)   /* ~1.20868432362658157733399655331396616020356304943561 T1[ 99] hi,lo */
+/*  35*/ ,LDOUBLE_HEX(3fff,8030,8e65,ef99,ef1d),LDOUBLE_HEX(3fbd,b09f,c1fc,23b2,9fab)   /* ~1.00148181893673846357909612558856338182522449642419 T2[ 99] hi,lo */
+/*  36*/ ,LDOUBLE_HEX(3fff,9b8d,39b9,d54e,5539),LDOUBLE_HEX(bfbe,baaf,d0ba,b867,81c2)   /* ~1.21524735998046887815605271443430979161348659545183 T1[100] hi,lo */
+/*  36*/ ,LDOUBLE_HEX(3fff,8031,f1d2,aca3,9b44),LDOUBLE_HEX(bfbe,a4c4,911a,dfc4,d295)   /* ~1.00152418886980574446246561315376766287954524159431 T2[100] hi,lo */
+/*  37*/ ,LDOUBLE_HEX(3fff,9c65,7368,2ec3,2c2d),LDOUBLE_HEX(3fbe,9cb0,d9be,d0c8,53bd)   /* ~1.22184603297275751687071126960759670510014984756708 T1[101] hi,lo */
+/*  37*/ ,LDOUBLE_HEX(3fff,8033,5543,4324,f728),LDOUBLE_HEX(3fbe,e415,5eab,b7e1,f081)   /* ~1.00156656059542801141121204366868369106668978929519 T2[101] hi,lo */
+/*  38*/ ,LDOUBLE_HEX(3fff,9d3e,d9a7,2cff,b751),LDOUBLE_HEX(bfbd,86da,cc3e,bc59,93d4)   /* ~1.22848053610687000570828725232175315795757342129945 T1[102] hi,lo */
+/*  38*/ ,LDOUBLE_HEX(3fff,8034,b8b7,b328,af26),LDOUBLE_HEX(3fbc,ac57,aea7,6d92,1bde)   /* ~1.00160893411368110274099751944021363669889979064464 T2[102] hi,lo */
+/*  39*/ ,LDOUBLE_HEX(3fff,9e19,6e18,9d47,2420),LDOUBLE_HEX(3fb7,f914,5ac7,9bba,f035)   /* ~1.23515106393693330569250043993179133394733071327209 T1[103] hi,lo */
+/*  39*/ ,LDOUBLE_HEX(3fff,8036,1c2f,fcb9,6fb5),LDOUBLE_HEX(bfbd,cfaa,e2c6,1949,76e1)   /* ~1.00165130942464085958640979123757119850779417902231 T2[103] hi,lo */
+/*  40*/ ,LDOUBLE_HEX(3fff,9ef5,3260,91a1,11ae),LDOUBLE_HEX(bfbe,bedd,c1ec,288c,045d)   /* ~1.24185781207348404863409496723392066996893845498561 T1[104] hi,lo */
+/*  40*/ ,LDOUBLE_HEX(3fff,8037,7fac,1fe1,e56a),LDOUBLE_HEX(3fbe,c39a,17ff,af9f,8d06)   /* ~1.00169368652838312633464312728648337724735029041767 T2[104] hi,lo */
+/*  41*/ ,LDOUBLE_HEX(3fff,9fd2,2825,6400,dd06),LDOUBLE_HEX(bfba,8fe5,5be7,cd04,73e3)   /* ~1.24860097718920473662367054412669631346943788230419 T1[105] hi,lo */
+/*  41*/ ,LDOUBLE_HEX(3fff,8038,e32c,1cac,bcfa),LDOUBLE_HEX(3fbd,ed51,9851,d0d3,59b7)   /* ~1.00173606542498375084233874776629136249539442360401 T2[105] hi,lo */
+/*  42*/ ,LDOUBLE_HEX(3fff,a0b0,510f,b971,4fc2),LDOUBLE_HEX(3fbc,c96e,3cf6,d87e,cd4c)   /* ~1.25538075702469108956872700932905217996449209749698 T1[106] hi,lo */
+/*  42*/ ,LDOUBLE_HEX(3fff,803a,46af,f324,a335),LDOUBLE_HEX(3fbe,ac3c,8131,843a,6e57)   /* ~1.00177844611451858389348373856719831564987543970346 T2[106] hi,lo */
+/*  43*/ ,LDOUBLE_HEX(3fff,a18f,aeca,8544,b6e4),LDOUBLE_HEX(bfbe,fbbc,6bef,3313,7e1e)   /* ~1.26219735039425070806731743466855277802096679806709 T1[107] hi,lo */
+/*  43*/ ,LDOUBLE_HEX(3fff,803b,aa37,a354,450a),LDOUBLE_HEX(3fbe,9180,bea1,677e,0605)   /* ~1.00182082859706347963309192028447114353184588253498 T2[107] hi,lo */
+/*  44*/ ,LDOUBLE_HEX(3fff,a270,4303,0c49,6819),LDOUBLE_HEX(bfbe,c90b,f620,fe60,42b1)   /* ~1.26905095719173322259699238090391304467630106955766 T1[108] hi,lo */
+/*  44*/ ,LDOUBLE_HEX(3fff,803d,0dc3,2d46,4f85),LDOUBLE_HEX(3fbe,868a,dee3,72d5,ffa8)   /* ~1.00186321287269429535036341372133961158397141844034 T2[108] hi,lo */
+/*  45*/ ,LDOUBLE_HEX(3fff,a352,0f68,e802,bb93),LDOUBLE_HEX(bfbe,ed0b,a6dd,6268,20c0)   /* ~1.27594177839639210043139877504003720787295605987310 T1[109] hi,lo */
+/*  45*/ ,LDOUBLE_HEX(3fff,803e,7152,9105,6fd0),LDOUBLE_HEX(3fbb,f7f1,9404,a7bf,1165)   /* ~1.00190559894148689158710485713754678727127611637115 T2[109] hi,lo */
+/*  46*/ ,LDOUBLE_HEX(3fff,a435,15ae,09e6,809e),LDOUBLE_HEX(3fbb,d1db,4831,781e,1eec)   /* ~1.28287001607877828072111492385687370187952183187007 T1[110] hi,lo */
+/*  46*/ ,LDOUBLE_HEX(3fff,803f,d4e5,ce9c,5332),LDOUBLE_HEX(3fbc,8ac0,9487,d439,3b90)   /* ~1.00194798680351713202930918900079859668039716780185 T2[110] hi,lo */
+/*  47*/ ,LDOUBLE_HEX(3fff,a519,5786,be9e,f339),LDOUBLE_HEX(3fbe,d8bc,f46f,9586,461e)   /* ~1.28983587340666581218685121656974956749763805419206 T1[111] hi,lo */
+/*  47*/ ,LDOUBLE_HEX(3fff,8041,387c,e615,a710),LDOUBLE_HEX(3fbe,8e4c,645a,3a8a,6df3)   /* ~1.00199037645886088361557586523531426792033016681671 T2[111] hi,lo */
+/*  48*/ ,LDOUBLE_HEX(3fff,a5fe,d6a9,b151,38ea),LDOUBLE_HEX(3fbc,e5eb,fb10,b883,80d9)   /* ~1.29683955465100966592158215906493978764046914875507 T1[112] hi,lo */
+/*  48*/ ,LDOUBLE_HEX(3fff,8042,9c17,d77c,18ed),LDOUBLE_HEX(3fbe,93f9,0835,f753,878b)   /* ~1.00203276790759401653711085922182633112242911010980 T2[112] hi,lo */
+/*  49*/ ,LDOUBLE_HEX(3fff,a6e5,94cf,eee8,6b1e),LDOUBLE_HEX(bfbe,c910,e561,f33b,7b4e)   /* ~1.30388126519193589861710103061653853728785179555416 T1[113] hi,lo */
+/*  49*/ ,LDOUBLE_HEX(3fff,8043,ffb6,a2da,5669),LDOUBLE_HEX(3fbe,9bfa,bd93,3942,b72a)   /* ~1.00207516114979240412930644454903017503966111689805 T2[113] hi,lo */
+/*  50*/ ,LDOUBLE_HEX(3fff,a7cd,93b4,e965,356a),LDOUBLE_HEX(bfbe,c274,9655,f8c1,1aa2)   /* ~1.31096121152476434196416932298490110042621381580829 T1[114] hi,lo */
+/*  50*/ ,LDOUBLE_HEX(3fff,8045,6359,483b,0d42),LDOUBLE_HEX(3fbd,8ab1,e480,8fb1,67b1)   /* ~1.00211755618553192298016141226213449044735170900821 T2[114] hi,lo */
+/*  51*/ ,LDOUBLE_HEX(3fff,a8b6,d516,7b32,0e09),LDOUBLE_HEX(bfbe,d0ad,37b2,7dde,6f19)   /* ~1.31807960126606399473437464253677831038658041507005 T1[115] hi,lo */
+/*  51*/ ,LDOUBLE_HEX(3fff,8046,c6ff,c7a8,eb53),LDOUBLE_HEX(3fbd,cd04,05c3,2637,6be1)   /* ~1.00215995301488845282186085361431082674243953078985 T2[115] hi,lo */
+/*  52*/ ,LDOUBLE_HEX(3fff,a9a1,5ab4,ea7c,0ef8),LDOUBLE_HEX(3fbe,a83c,49d8,6a63,f4e6)   /* ~1.32523664315974129459391184227001758699771016836166 T1[116] hi,lo */
+/*  52*/ ,LDOUBLE_HEX(3fff,8048,2aaa,212e,9e96),LDOUBLE_HEX(bfbe,f210,9561,2774,6f44)   /* ~1.00220235163793787674761659456379447874496690928936 T2[116] hi,lo */
+/*  53*/ ,LDOUBLE_HEX(3fff,aa8d,2652,ec90,7629),LDOUBLE_HEX(3fbe,ec62,0243,4ca6,7264)   /* ~1.33243254708316144930158736459091528558928985148668 T1[117] hi,lo */
+/*  53*/ ,LDOUBLE_HEX(3fff,8049,8e58,54d6,d520),LDOUBLE_HEX(bfbd,fa6c,16d0,f9cb,b862)   /* ~1.00224475205475608077798632677968271309509873390197 T2[117] hi,lo */
+/*  54*/ ,LDOUBLE_HEX(3fff,ab7a,39b5,a93e,d337),LDOUBLE_HEX(3fbe,cb00,4764,eb3c,00f3)   /* ~1.33966752405330300531704351696404842186893802136182 T1[118] hi,lo */
+/*  54*/ ,LDOUBLE_HEX(3fff,804a,f20a,62ac,3d26),LDOUBLE_HEX(3fbd,8b1b,de3c,962c,ab75)   /* ~1.00228715426541895440297469388468698525684885680675 T2[118] hi,lo */
+/*  55*/ ,LDOUBLE_HEX(3fff,ac68,96a4,be3f,e929),LDOUBLE_HEX(3fbe,bc2b,7343,bcf2,ec93)   /* ~1.34694178623294583574832722350222979912359733134508 T1[119] hi,lo */
+/*  55*/ ,LDOUBLE_HEX(3fff,804c,55c0,4ab9,84fb),LDOUBLE_HEX(bfbe,ef50,9f43,e508,28a0)   /* ~1.00232955827000239036519285695803205271658953279256 T2[119] hi,lo */
+/*  56*/ ,LDOUBLE_HEX(3fff,ad58,3eea,42a1,4ac6),LDOUBLE_HEX(3fbe,9301,5191,eb34,5d89)   /* ~1.35425554693689272826688518858162524338695220649242 T1[120] hi,lo */
+/*  56*/ ,LDOUBLE_HEX(3fff,804d,b97a,0d09,5b0c),LDOUBLE_HEX(3fbe,d93e,3efa,3df9,fcd1)   /* ~1.00237196406858228422617762554125420138007029891014 T2[120] hi,lo */
+/*  57*/ ,LDOUBLE_HEX(3fff,ae49,3452,ca35,b80e),LDOUBLE_HEX(3fbd,9637,02d3,0d44,07b1)   /* ~1.36160902063822475556963131904097963342792354524135 T1[121] hi,lo */
+/*  57*/ ,LDOUBLE_HEX(3fff,804f,1d37,a9a6,6de9),LDOUBLE_HEX(bfbc,c1d5,6430,8a2f,e68c)   /* ~1.00241437166123453534217341287515523617912549525499 T2[121] hi,lo */
+/*  58*/ ,LDOUBLE_HEX(3fff,af3b,78ad,690a,4375),LDOUBLE_HEX(bfbd,8367,bf8c,d132,bf35)   /* ~1.36900242297459061194351420676085240302199963480234 T1[122] hi,lo */
+/*  58*/ ,LDOUBLE_HEX(3fff,8050,80f9,209b,6c3b),LDOUBLE_HEX(bfbe,a036,e851,2e22,bdf0)   /* ~1.00245678104803504577993006341429804706422146409749 T2[122] hi,lo */
+/*  59*/ ,LDOUBLE_HEX(3fff,b02f,0dcb,b6e0,4584),LDOUBLE_HEX(bfbe,90a6,d5b7,91c4,cb15)   /* ~1.37643597075453010024695399415861629677237942814826 T1[123] hi,lo */
+/*  59*/ ,LDOUBLE_HEX(3fff,8051,e4be,71f3,04ca),LDOUBLE_HEX(3fbc,cada,b8ef,31ad,ee75)   /* ~1.00249919222905972096722415631830926940892823040485 T2[123] hi,lo */
+/*  60*/ ,LDOUBLE_HEX(3fff,b123,f581,d2ac,2590),LDOUBLE_HEX(bfbe,f05f,902d,25bd,44e3)   /* ~1.38390988196383195492356055211757848155684769153594 T1[124] hi,lo */
+/*  60*/ ,LDOUBLE_HEX(3fff,8053,4887,9db7,e67d),LDOUBLE_HEX(3fbc,b8f5,8e77,78e8,f943)   /* ~1.00254160520438446969285900545187928400991950184106 T2[124] hi,lo */
+/*  61*/ ,LDOUBLE_HEX(3fff,b21a,31a6,6618,fe3b),LDOUBLE_HEX(3fbe,f871,4c4e,d9a4,e410)   /* ~1.39142437577192618709722576886278488927928265184164 T1[125] hi,lo */
+/*  61*/ ,LDOUBLE_HEX(3fff,8054,ac54,a3f4,c057),LDOUBLE_HEX(3fbd,ec30,98f2,c3d2,f4bb)   /* ~1.00258401997408520378140400763911088688473682850599 T2[125] hi,lo */
+/*  62*/ ,LDOUBLE_HEX(3fff,b311,c412,a911,2489),LDOUBLE_HEX(3fbd,fb3c,5371,e629,4670)   /* ~1.39897967253831114018292752776417842142109293490648 T1[126] hi,lo */
+/*  62*/ ,LDOUBLE_HEX(3fff,8056,1025,84b4,417a),LDOUBLE_HEX(bfbe,9388,2575,b35d,d384)   /* ~1.00262643653823783841845529440917061947402544319629 T2[126] hi,lo */
+/*  63*/ ,LDOUBLE_HEX(3fff,b40a,aea2,654b,9841),LDOUBLE_HEX(bfbc,ea37,6118,3363,e500)   /* ~1.40657599381901544249601904157387366467446554452180 T1[127] hi,lo */
+/*  63*/ ,LDOUBLE_HEX(3fff,8057,73fa,4001,1923),LDOUBLE_HEX(3fbe,b2a6,1fe1,eb6f,b480)   /* ~1.00266885489691829171695486300208699503855314105749 T2[127] hi,lo */
+/*  64*/ ,LDOUBLE_HEX(3fff,b504,f333,f9de,6484),LDOUBLE_HEX(3fbe,b2fb,1366,ea95,7d3e)   /* ~1.41421356237309504876378807303183293697657063603401 T1[128] hi,lo */
+/*  64*/ ,LDOUBLE_HEX(3fff,8058,d7d2,d5e5,f6b1),LDOUBLE_HEX(bfbe,d654,ec13,ee23,6abc)   /* ~1.00271127505020248547613209710860360246442724019289 T2[128] hi,lo */
+};
+#define L 7     /* # bits in table index (i1,i2) */
+#define K 128   /* table size = 2^L */
+#define L_EXPAND    (((K/2) << L) + (K/2))
+#define L_MASK      ((1 << L)-1)
+
+#define constants_80  ((const LC_FLOAT_TYPE *)_constants_80)
+# define _DE2IntCst   (constants_80[ 0])
+# define _K2byLog2    (constants_80[ 1])
+# define _Log2byK2Hi  (constants_80[ 2])
+# define _Log2byK2Med (constants_80[ 3])
+# define _p3_HI       (constants_80[ 4])
+
+# define _p5          (constants_80[ 5])
+# define _p4          (constants_80[ 6])
+# define _p3_LO       (constants_80[ 7])
+
+# define _Log2byK2Lo  (constants_80[ 8])
+# define _p6          (constants_80[ 9])
+
+__declspec(align(16)) static const unsigned short _constants_80[] = {
+     LDOUBLE_HEX(403e,c000,0000,0000,0000)  /*  0 DE2IntCst      = 1.5*2^63 */
+    ,LDOUBLE_HEX(400d,b8aa,3b29,5c17,f0bc)  /*  1 K2byLog2   = K^2/log(2) ~ 23637.11554992 */
+    ,LDOUBLE_HEX(bff0,b172,17f7,d1cf,79ac)  /*  2 Log2byK2Hi ~ -4.23063464697232244524347213247665588919943502332898e-05 */
+    ,LDOUBLE_HEX(3fae,d871,319f,f000,0000)  /*  3 Log2byK2Med ~  6.99362349047620977408942987412840832949912800870764e-25 */
+    ,LDOUBLE_HEX(3ffc,aaaa,aaaa,aaaa,aaab)  /*  4 p3_HI  ~  1.66666666666666666671184175718689601808364386670291e-01 */
+
+    ,LDOUBLE_HEX(3ff8,8888,8888,91d5,7943)  /*  5 p5     ~  8.33333333346550207291141649720844775117711833445355e-03 */
+    ,LDOUBLE_HEX(3ffa,aaaa,aaaa,aaaa,aaab)  /*  6 p4     ~  4.16666666666666666677960439296724004520910966675728e-02 */
+    ,LDOUBLE_HEX(bfbb,ab70,78a8,ae65,09cf)  /*  7 p3_LO  ~ -4.53796157421198095955516441874944572386592208568553e-21 */
+ 
+    ,LDOUBLE_HEX(3f84,d095,0bf0,cbcd,98d6)  /*  8 Log2byK2Lo ~  1.53242008494748302860112907643687641670519495734080e-37 */
+    ,LDOUBLE_HEX(3ff5,b60b,60b6,1286,f983)  /*  9 p6     ~  1.38888888890158889343717346078962981970050805102800e-03 */
+};
+
+//============================================================================================
+
+double exp_rn( double xd )
+{
+    UINT64 x_val,x_abs,sign_mask,range,x_exp;
+    SINT64 m,n,i1,i2,xsign,yesno;
+    X_FLOAT_TYPE xx, rx, r2x, tp0x, tp1x, tpxx, tt1x, tt2x, tptx, resx;
+    L_FLOAT_TYPE DE2IntCst,K2byLog2,Log2byK2Hi,Log2byK2Med,Log2byK2Lo;
+    X_FLOAT_TYPE p3;
+    L_FLOAT_TYPE p2,p4,p5,p6;
+    L_FLOAT_TYPE tmp,w,mr,tmp1,tmp5,tmp6,tmp7,res,ef,rx2,x4,inf_d,minnorm_d,maxnorm_d;
+    L_FLOAT_TYPE sc; // Don't know if it wouldn't be better as a double
+    double resd;
+    double volatile exception;
+
+    /* load constants */
+    DE2IntCst      = _DE2IntCst;
+    //DE2IntCst = _Asm_setf(_FR_D, 0x43e8000000000000); /* 1 cycle slower */
+    K2byLog2   = _K2byLog2;
+    Log2byK2Hi = _Log2byK2Hi;
+    Log2byK2Med = _Log2byK2Med;
+    p3.hi  = _p3_HI;
+    p2 = _Asm_setf(_FR_EXP, 0xfffe); /* 0.5 */
+    p5     = _p5;
+    p4     = _p4;
+    p3.lo  = _p3_LO;
+
+
+    /* get and classify input value; obtain range value */
+
+    /* 40862e42fefa39ef (+) overflow range
+     * 40874910d52d3051 (-) underflow range
+     * 000167522bd709be (^)
+     */
+
+    x_val = _Asm_getf( _FR_D, xd );
+    sign_mask = ((SINT64)x_val >> 63);
+    x_exp = _Asm_extr_u( x_val, 52, 11 );
+    x_abs = (x_val & ULL(7fffffffffffffff));
+    range = ULL(40862e42fefa39ef) ^ (sign_mask & ULL(000167522bd709be));
+
+    /* filter out special cases */
+
+    if (__builtin_expect( x_exp < 0x3eb, 0 )) { /* |x| < 2^(-20) */
+        if (__builtin_expect( x_exp < 0x3c8, 0 )) { /* |x| < 2^(-55) */
+            return _Asm_fma( _PC_D, xd, 1, 1, _SF0 );
+        }
+        /* 2^(-55) <= |x| < 2^(-20) */
+	//	printf("\nToto %1.30e\n", xd);
+         tmp = p5*xd + p4;
+        __X_SQR_L( r2x, xd );
+        tmp = p6*r2x.hi + tmp;
+        tp1x.hi = p2;
+        tp1x.lo = tmp*r2x.hi;
+        __X_FMA_GREATER_LXX( tp0x, xd, p3, tp1x );   /* tp0 = xd * p3   +  tp1 */
+        __X_FMA_GREATER_XXL( tpxx, r2x, tp0x, xd );  /* tpx = r2 * tp0  +  xd*/
+        /* res = (tpxx.lo + tpxx.hi) + 1; */
+        res = _Asm_fma( _PC_D, tpxx.hi, 1, 1, _SF1 );
+        tmp = (1 - res);
+        tmp = (tmp + tpxx.hi);
+        tmp = (tmp + tpxx.lo);
+        res = _Asm_fma( _PC_D, res, 1, tmp, _SF0 );
+        return res;
+    }
+
+    if (__builtin_expect( x_abs > range, 0 )) { /* nan, inf, large finite */
+        /* NaNs */
+        if (x_abs > ULL(7ff0000000000000)) {
+            if (x_abs <= ULL(7ff7ffffffffffff)) {
+                inf_d = _Asm_setf( _FR_D, ULL(7ff0000000000000) );
+                exception = _Asm_fma( _PC_D, inf_d, 0, 0, _SF0 );
+            }
+            return _Asm_fma( _PC_D, xd, 1, 0, _SF0 );
+        }
+        /* INFs */
+        if (x_abs == ULL(7ff0000000000000)) {
+            if (sign_mask)  /* -inf */
+                return 0;
+            else            /* +inf */
+                return xd;
+        }
+        /* large finite */
+        if (sign_mask) { /* underflow */
+            minnorm_d = _Asm_setf( _FR_D, ULL(0010000000000000) );
+            return _Asm_fma( _PC_D, minnorm_d, minnorm_d, 0, _SF0 );
+        } else {        /* overflow */
+            maxnorm_d = _Asm_setf( _FR_D, ULL(7fefffffffffffff) );
+            return _Asm_fma( _PC_D, maxnorm_d, maxnorm_d, 0, _SF0 );
+        }
+    }
+
+
+
+    /* main path: 2^(-55) <= |x| < range */
+
+    /* reduction: x = m*log(2)/(K^2) + r; m = n*K^2 + i1*K + i2; |r|=[0..log(2)/(2*K^2)] */
+
+    w = xd * K2byLog2 + DE2IntCst;   /* Double2Int on a doubledouble */
+    mr = (w - DE2IntCst);
+    m = _Asm_getf( _FR_SIG, w ) + L_EXPAND; /* add L/2 to i1,i2 (make it unsigned table offset) */
+ 
+    rx.hi = mr * Log2byK2Hi + xd;
+
+
+    i1 = (m >> L) & L_MASK;
+    i2 = m & L_MASK;
+
+    // was:   n = _Asm_extr( m, 2*L, 16 ); The compiler seems to get it
+    n = m >> 2*L;
+    sc = _Asm_setf( _FR_EXP, 0xffff + n ); /* build 2^n */
+    //sc = _Asm_setf( _FR_D, ULL(3ff0000000000000) + (n<<52) ); /* build 2^n */
+
+
+    /* First step */
+    /* Compute e^xred as 1+p(xred) 
+       Then compute T*e^xred as T+T*p(xred) */ 
+
+    /* table lookup and reconstruction: T = T1[i1]*T2[i2]*2^n */
+    /* We read both vlues but it isn't slower  */
+
+    __X_CONVERT_XC2X( tt1x, TX[i1*2+0] );   /* load T1[i1] */
+    __X_CONVERT_XC2X( tt2x, TX[i2*2+1] );   /* load T2[i2] */
+
+    tptx.hi = tt2x.hi * tt1x.hi ;
+
+      
+    /* degree 3 polynomial evaluation:  */
+    rx2=rx.hi*rx.hi;
+    tmp = p2 + p3.hi*rx.hi;  
+
+    // We're not adding a correcting term to rx.hi, we're multiplying the final exp by (1+f)
+    rx.hi = rx.hi + mr * Log2byK2Med;
+
+    //ef = 1.0 + mr * Log2byK2Med;
+    tmp = rx.hi +rx2*tmp; /* tmp = x+x^2/2 + ...*/
+
+    /* Final reconstruction and rounding test */
+    
+    res = tmp*tptx.hi + tptx.hi;
+    resd = res*sc;    /* do the scaling now, saves a few cycles */
+
+#if 0 /* to time the first step alone */
+    return resd;
+#endif
+
+#if 0 // test a la Ziv
+    /* This test is 3 cycles slower */
+    L_FLOAT_TYPE reshi,reslo,test,rn_constant;
+    reshi = _Asm_fma( _PC_D, tmp, tptx.hi, tptx.hi, _SF0 );      /*  tmp*tptx.hi + tptx.hi, round to double */
+    rn_constant = 1.005;
+    reslo = res - reshi;  
+    test=_Asm_fma( _PC_D, reslo, rn_constant, reshi, _SF0 );
+  
+    if(__builtin_expect( reshi==test, 1+1==2) ) {
+      return resd;   /* do the scaling now, saves a few cycles */
+    }
+#else // else test a la Ziv
+
+    i1 = _Asm_getf( _FR_SIG, res);
+    m =  i1 & (0xff<<3);
+    if(__builtin_expect((m!=(0x7f<<3) && m!=(0x80<<3)), 1+1==2)) {
+      return resd;
+    }      
+#endif // end test a la Ziv
+    else {
+      /***************************************************************************************************/
+      /**************************************** second step **********************************************/
+      /***************************************************************************************************/
+
+#if EVAL_PERF
+        crlibm_second_step_taken++;
+#endif
+
+    Log2byK2Lo = _Log2byK2Lo;
+    p6     = _p6;
+
+    // Cut from the first step
+    tmp1 = mr * Log2byK2Med;
+    tmp7 = mr * Log2byK2Hi + xd;
+
+    tmp6 = _Asm_famax( tmp7, tmp1, _SF1 );
+    tmp5 = _Asm_famin( tmp1, tmp7, _SF1 );
+    rx.lo = (tmp6 - rx.hi);
+    rx.lo = (tmp5 + rx.lo);
+    rx.lo = (mr * Log2byK2Lo + rx.lo);
+
+      
+      /* table lookup and reconstruction: T = T1[i1]*T2[i2]*2^n */
+      
+      __X_MUL_XX( tptx, tt1x, tt2x ); /* T = T1[i1]*T2[i2] */
+      
+      tptx.hi *= sc;  /* scale T' = T*2^n */
+      tptx.lo *= sc;
+      
+      /* polynomial evaluation: px = P(r)*r */
+      
+      tmp = p5*rx.hi + p4;
+      
+      __X_SQR_X( r2x, rx );
+      
+      tmp = p6*r2x.hi + tmp;
+      tp1x.hi = p2;
+      tp1x.lo = tmp*r2x.hi;
+      
+      __X_FMA_GREATER_XXX( tp0x, rx, p3, tp1x );
+      __X_FMA_GREATER_XXX( tpxx, r2x, tp0x, rx );
+      
+      /* final reconstruction: res = (P(r)*r + 1)*T*2^n */
+      
+      __X_FMA_GREATER_XXX( resx, tptx, tpxx, tptx );
+      
+      /* convert and return result */
+
+      return (double)( resx.hi + resx.lo );
+    }
+}
+
+
+
+
+
+/* Just to compile OK within crlibm */
+
+double exp_ru(double x) {
+  return exp_rn(x);
+}
+double exp_rd(double x) {
+  return exp_rn(x);
+}
+double exp_rz(double x) {
+  return exp_rn(x);
+}
diff --git a/src/crlibm/exp-td-standalone.c b/src/crlibm/exp-td-standalone.c
new file mode 100644
index 0000000..905b350
--- /dev/null
+++ b/src/crlibm/exp-td-standalone.c
@@ -0,0 +1,87 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "exp-td.h"
+
+#define AVOID_FMA 0
+
+
+extern void exp_td_accurate(double *polyTblh, double *polyTblm, double *polyTbll, 
+			    double rh, double rm, double rl, 
+			    double tbl1h, double tbl1m, double tbl1l,
+			    double tbl2h, double tbl2m, double tbl2l);
+
+
+/* Function exp13
+
+   Computes exp(x) with an accuracy of 113 bits as
+
+   2^exponent * (exph + expm + expl) \approx exp(x)
+
+   Unless the subnormal case for x, no special cases are 
+   handled.
+
+   The triple-double exph + expm + expl is non-overlapping.
+   The domain for exph + expm + expl is 1/2..2
+   The integer exponent is in the range -1024..1024. The 
+   value 2^(exponent) may therefore be non-representable
+   whereas 2^exponent * (exph + expm + expl) is.
+
+*/
+
+
+void exp13(int *exponent, double *exph, double *expm, double *expl, double x) { 
+  double rh, rm, rl, tbl1h, tbl1m, tbl1l;
+  double tbl2h, tbl2m, tbl2l;
+  double xMultLog2InvMult2L, shiftedXMult, kd;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double t1, t2;
+  db_number shiftedXMultdb, xdb;
+  int k, M, index1, index2, xIntHi;
+   
+  /* Argument reduction and filtering for special cases */
+
+  /* Compute k as a double and as an int */
+  xdb.d = x;
+  xMultLog2InvMult2L = x * log2InvMult2L;
+  shiftedXMult = xMultLog2InvMult2L + shiftConst;
+  kd = shiftedXMult - shiftConst;
+  shiftedXMultdb.d = shiftedXMult;
+  
+  /* Special cases tests */
+  xIntHi = xdb.i[HI];
+  /* Test if argument is a denormal or zero */
+  if ((xIntHi & 0x7ff00000) == 0) {
+    /* We are in the RN case, return 1.0 in all cases */
+    *exph = 1.0;
+    *expm = 0.0;
+    *expl = 0.0;
+    return;
+  }
+ 
+  k = shiftedXMultdb.i[LO];
+  M = k >> L;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> LHALF;
+
+  /* Table reads */
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+  tbl1l = twoPowerIndex1[index1].lo;
+  tbl2l = twoPowerIndex2[index2].lo;
+
+  /* Argument reduction */
+
+  Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+  t1 = x + msLog2Div2LMultKh;
+  Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+  Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+
+  /* Polynomial approximation and reconstruction: factorized code */
+  
+  exp_td_accurate(exph, expm, expl, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l);
+
+  *exponent = M;
+}
diff --git a/src/crlibm/exp-td.c b/src/crlibm/exp-td.c
new file mode 100644
index 0000000..61228df
--- /dev/null
+++ b/src/crlibm/exp-td.c
@@ -0,0 +1,1363 @@
+/* 
+ * This function computes exp, correctly rounded, 
+ * using experimental techniques based on triple double arithmetics
+
+ THIS IS EXPERIMENTAL SOFTWARE
+ 
+ *
+ * Author :  Christoph Lauter
+ * christoph.lauter at ens-lyon.fr
+ *
+
+ To have it replace the crlibm exp, do:
+
+ gcc -DHAVE_CONFIG_H -I.  -fPIC  -O2 -c exp-td.c;   mv exp-td.o exp_fast.o; make 
+ 
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "exp-td.h"
+#ifdef BUILD_INTERVAL_FUNCTIONS
+#include "interval.h"
+#endif
+
+#define AVOID_FMA 0
+#define EVAL_PERF 1
+
+
+
+
+
+
+
+void exp_td_accurate(double *polyTblh, double *polyTblm, double *polyTbll, 
+		     double rh, double rm, double rl, 
+		     double tbl1h, double tbl1m, double tbl1l,
+		     double tbl2h, double tbl2m, double tbl2l) {
+  double highPoly, highPolyMulth, highPolyMultm, highPolyMultl;
+  double rhSquareh, rhSquarel, rhSquareHalfh, rhSquareHalfl;
+  double rhCubeh, rhCubem, rhCubel;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5, t6;
+  double lowPolyh, lowPolym, lowPolyl;
+  double ph, pm, pl, phnorm, pmnorm, rmlMultPh, rmlMultPl;
+  double qh, ql, fullPolyh, fullPolym, fullPolyl;
+  double polyWithTbl1h, polyWithTbl1m, polyWithTbl1l;
+  double polyAddOneh,polyAddOnem,polyAddOnel;
+  double polyWithTablesh, polyWithTablesm, polyWithTablesl;
+
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(accPolyC7,rh,accPolyC6),rh,accPolyC5);
+#else
+  highPoly = accPolyC5 + rh * (accPolyC6 + rh * accPolyC7);
+#endif
+
+  Mul12(&t1h,&t1l,rh,highPoly);
+  Add22(&t2h,&t2l,accPolyC4h,accPolyC4l,t1h,t1l);
+  Mul22(&t3h,&t3l,rh,0,t2h,t2l);
+  Add22(&t4h,&t4l,accPolyC3h,accPolyC3l,t3h,t3l);
+
+  Mul12(&rhSquareh,&rhSquarel,rh,rh);
+  Mul23(&rhCubeh,&rhCubem,&rhCubel,rh,0,rhSquareh,rhSquarel);
+
+  rhSquareHalfh = 0.5 * rhSquareh;
+  rhSquareHalfl = 0.5 * rhSquarel;  
+
+  Renormalize3(&lowPolyh,&lowPolym,&lowPolyl,rh,rhSquareHalfh,rhSquareHalfl);
+
+  Mul233(&highPolyMulth,&highPolyMultm,&highPolyMultl,t4h,t4l,rhCubeh,rhCubem,rhCubel);
+
+  Add33(&ph,&pm,&pl,lowPolyh,lowPolym,lowPolyl,highPolyMulth,highPolyMultm,highPolyMultl);
+
+  Add12(phnorm,pmnorm,ph,pm);
+  Mul22(&rmlMultPh,&rmlMultPl,rm,rl,phnorm,pmnorm);
+  Add22(&qh,&ql,rm,rl,rmlMultPh,rmlMultPl);
+
+  Add233Cond(&fullPolyh,&fullPolym,&fullPolyl,qh,ql,ph,pm,pl);
+
+  Add12(polyAddOneh,t5,1,fullPolyh);
+  Add12Cond(polyAddOnem,t6,t5,fullPolym);
+  polyAddOnel = t6 + fullPolyl;
+  Mul33(&polyWithTbl1h,&polyWithTbl1m,&polyWithTbl1l,tbl1h,tbl1m,tbl1l,polyAddOneh,polyAddOnem,polyAddOnel);
+  Mul33(&polyWithTablesh,&polyWithTablesm,&polyWithTablesl,
+	tbl2h,tbl2m,tbl2l,
+	polyWithTbl1h,polyWithTbl1m,polyWithTbl1l);
+
+  Renormalize3(polyTblh,polyTblm,polyTbll,polyWithTablesh,polyWithTablesm,polyWithTablesl);
+
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+double exp_rn(double x){ 
+  double rh, rm, rl, tbl1h, tbl1m, tbl1l;
+  double tbl2h, tbl2m, tbl2l;
+  double xMultLog2InvMult2L, shiftedXMult, kd;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double t1, t2, t3, t4, polyTblh, polyTblm, polyTbll;
+  db_number shiftedXMultdb, twoPowerMdb, xdb, t4db, t4db2, polyTblhdb, resdb;
+  int k, M, index1, index2, xIntHi, mightBeDenorm;
+  double t5, t6, t7, t8, t9, t10, t11, t12, t13;
+  double rhSquare, rhSquareHalf, rhC3, rhFour, monomialCube;
+  double highPoly, highPolyWithSquare, monomialFour;
+  double tablesh, tablesl;
+  double s1, s2, s3, s4, s5;
+  double res;
+   
+  /* Argument reduction and filtering for special cases */
+
+  /* Compute k as a double and as an int */
+  xdb.d = x;
+  xMultLog2InvMult2L = x * log2InvMult2L;
+  shiftedXMult = xMultLog2InvMult2L + shiftConst;
+  kd = shiftedXMult - shiftConst;
+  shiftedXMultdb.d = shiftedXMult;
+  
+  /* Special cases tests */
+  xIntHi = xdb.i[HI];
+  mightBeDenorm = 0;
+  /* Test if argument is a denormal or zero */
+  if ((xIntHi & 0x7ff00000) == 0) {
+    /* We are in the RN case, return 1.0 in all cases */
+    return 1.0;
+  }
+ 
+  /* Test if argument is greater than approx. 709 in magnitude */
+  if ((xIntHi & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) {
+    /* If we are here, the result might be overflowed, underflowed, inf, or NaN */
+
+    /* Test if +/- Inf or NaN */
+    if ((xIntHi & 0x7fffffff) >= 0x7ff00000) {
+      /* Either NaN or Inf in this case since exponent is maximal */
+
+      /* Test if NaN: mantissa is not 0 */
+      if (((xIntHi & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* x = NaN, return NaN */
+	return x + x;
+      } else {
+	/* +/- Inf */
+
+	/* Test sign */
+	if ((xIntHi & 0x80000000)==0) 
+	  /* x = +Inf, return +Inf */
+	  return x;
+	else
+	  /* x = -Inf, return 0 */
+	  return 0;
+      } /* End which in NaN, Inf */
+    } /* End NaN or Inf ? */
+    
+    /* If we are here, we might be overflowed, denormalized or underflowed in the result 
+       but there is no special case (NaN, Inf) left */
+
+    /* Test if actually overflowed */
+    if (x > OVRFLWBOUND) {
+      /* We are actually overflowed in the result */
+      return LARGEST * LARGEST;
+    }
+
+    /* Test if surely underflowed */
+    if (x <= UNDERFLWBOUND) {
+      /* We are actually sure to be underflowed and not denormalized any more 
+	 So we return 0 and raise the inexact flag */
+      return SMALLEST * SMALLEST;
+    }
+       
+    /* Test if possibly denormalized */
+    if (x <= DENORMBOUND) {
+      /* We know now that we are not sure to be normalized in the result
+	 We just set an internal flag for a further test 
+      */
+      mightBeDenorm = 1;
+    }
+  } /* End might be a special case */
+
+  /* If we are here, we are sure to be neither +/- Inf nor NaN nor overflowed nor denormalized in the argument
+     but we might be denormalized in the result 
+
+     We continue the argument reduction for the quick phase and table reads for both phases
+  */
+
+#if 0
+  Mul12(&s1,&s2,msLog2Div2Lh,kd);
+  s3 = kd * msLog2Div2Lm;
+  s4 = s2 + s3; 
+  s5 = x + s1;
+  Add12Cond(rh,rm,s5,s4);
+#else 
+
+	/* Cody and Waite like, accurate to 2^-84 */
+	double Log2h= 0xb.17217f8p-16 ;
+	double Log2l= -0x2.e308654361c4cp-48 ;
+ Add12Cond(rh,rm, x-kd*Log2h, -kd*Log2l);
+
+#endif
+
+
+  k = shiftedXMultdb.i[LO];
+  M = k >> L;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> LHALF;
+
+  /* Table reads */
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+
+  /* Test now if it is sure to launch the quick phase because no denormalized result is possible */
+  if (mightBeDenorm == 1) {
+    /* The result might be denormalized, we launch the accurate phase in all cases */
+
+    /* Rest of argument reduction for accurate phase */
+
+    Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1 = x + msLog2Div2LMultKh;
+    Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+    Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+
+    /* Table reads for accurate phase */
+     tbl1l = twoPowerIndex1[index1].lo;
+     tbl2l = twoPowerIndex2[index2].lo;
+
+     /* Call accurate phase */
+     exp_td_accurate(&polyTblh, &polyTblm, &polyTbll, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l); 
+
+     /* Final rounding and multiplication with 2^M 
+
+        We first multiply the highest significant byte by 2^M in two steps
+	and adjust it then depending on the lower significant parts.
+
+	We cannot multiply directly by 2^M since M is less than -1022.
+	We first multiply by 2^(-1000) and then by 2^(M+1000).
+
+     */
+     
+     t3 = polyTblh * twoPowerM1000;
+
+     /* Form now twoPowerM with adjusted M */
+     twoPowerMdb.i[LO] = 0;
+     twoPowerMdb.i[HI] = (M + 2023) << 20;
+
+
+     /* Multiply with the rest of M, the result will be denormalized */
+     t4 = t3 * twoPowerMdb.d;
+
+     /* For x86, force the compiler to pass through memory for having the right rounding */
+
+     t4db.d = t4;   /* Do not #if-ify this line, we need the copy */
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+     t4db2.i[HI] = t4db.i[HI];
+     t4db2.i[LO] = t4db.i[LO];
+     t4 = t4db2.d;
+#endif
+
+     /* Remultiply by 2^(-M) for manipulating the rounding error and the lower significant parts */
+     M *= -1;
+     twoPowerMdb.i[LO] = 0;
+     twoPowerMdb.i[HI] = (M + 23) << 20;
+     t5 = t4 * twoPowerMdb.d;
+     t6 = t5 * twoPower1000;
+     t7 = polyTblh - t6;
+     
+     /* The rounding decision is made at 1/2 ulp of a denormal, i.e. at 2^(-1075)
+	We construct this number and by comparing with it we get to know 
+	whether we are in a difficult rounding case or not. If not we just return 
+	the known result. Otherwise we continue with further tests.
+     */
+
+     twoPowerMdb.i[LO] = 0;
+     twoPowerMdb.i[HI] = (M - 52) << 20;
+
+     if (ABS(t7) != twoPowerMdb.d) return t4;
+
+     /* If we are here, we are in a difficult rounding case */
+     
+     /* We have to adjust the result iff the sign of the error on 
+	rounding 2^M * polyTblh (which must be an ulp of a denormal) 
+	and polyTblm +arith polyTbll is the same which means that 
+	the error made was greater than an ulp of an denormal.
+     */
+
+     polyTblm = polyTblm + polyTbll;
+
+     if (t7 > 0.0) {
+       if (polyTblm > 0.0) {
+	 t4db.l++;
+	 return t4db.d;
+       } else return t4;
+     } else {
+       if (polyTblm < 0.0) {
+	 t4db.l--;
+	 return t4db.d;
+       } else return t4;
+     }
+  } /* End accurate phase launched as there might be a denormalized result */
+
+  /* No more underflow nor denormal is possible. There may be the case where
+     M is 1024 and the value 2^M is to be multiplied may be less than 1
+     So the final result will be normalized and representable by the multiplication must be 
+     made in 2 steps
+  */
+
+  /* Quick phase starts here */
+
+  rhSquare = rh * rh;
+  rhC3 = c3 * rh;
+
+  rhSquareHalf = 0.5 * rhSquare;
+  monomialCube = rhC3 * rhSquare;
+  rhFour = rhSquare * rhSquare;
+
+  monomialFour = c4 * rhFour;
+  
+  highPoly = monomialCube + monomialFour;
+
+  highPolyWithSquare = rhSquareHalf + highPoly;
+
+  Mul22(&tablesh,&tablesl,tbl1h,tbl1m,tbl2h,tbl2m);
+
+  t8 = rm + highPolyWithSquare;
+  t9 = rh + t8;
+
+  t10 = tablesh * t9;
+  
+  Add12(t11,t12,tablesh,t10);
+  t13 = t12 + tablesl;
+  Add12(polyTblh,polyTblm,t11,t13);
+  
+  /* Rounding test 
+     Since we know that the result of the final multiplication with 2^M 
+     will always be representable, we can do the rounding test on the 
+     factors and multiply only the final result.
+     We implement the multiplication in integer computations to overcome
+     the problem of the non-representability of 2^1024 if M = 1024
+  */
+
+  if(polyTblh == (polyTblh + (polyTblm * ROUNDCST))) {
+    polyTblhdb.d = polyTblh;
+    polyTblhdb.i[HI] += M << 20;
+    return polyTblhdb.d;
+  } else 
+    {
+      /* Rest of argument reduction for accurate phase */
+
+      Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+      t1 = x + msLog2Div2LMultKh;
+      Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+      Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+
+      /* Table reads for accurate phase */
+      tbl1l = twoPowerIndex1[index1].lo;
+      tbl2l = twoPowerIndex2[index2].lo;
+      
+      /* Call accurate phase */
+      exp_td_accurate(&polyTblh, &polyTblm, &polyTbll, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l); 
+
+      /* Since the final multiplication is exact, we can do the final rounding before multiplying
+	 We overcome this way also the cases where the final result is not underflowed whereas the
+	 lower parts of the intermediate final result are.
+      */
+      
+      RoundToNearest3(&res,polyTblh,polyTblm,polyTbll);
+
+      /* Final multiplication with 2^M 
+	 We implement the multiplication in integer computations to overcome
+	 the problem of the non-representability of 2^1024 if M = 1024
+      */
+
+      resdb.d = res;
+      resdb.i[HI] += M << 20;
+      return resdb.d;
+    } /* Accurate phase launched after rounding test*/
+}
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  UPWARDS			     *
+ *************************************************************
+ *************************************************************/
+double exp_ru(double x) { 
+  double rh, rm, rl, tbl1h, tbl1m, tbl1l;
+  double tbl2h, tbl2m, tbl2l;
+  double xMultLog2InvMult2L, shiftedXMult, kd;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double t1, t2, t3, t4, polyTblh, polyTblm, polyTbll;
+  db_number shiftedXMultdb, twoPowerMdb, xdb, t4db, t4db2, resdb;
+  int k, M, index1, index2, xIntHi, mightBeDenorm, roundable;
+  double t5, t6, t7, t8, t9, t10, t11, t12, t13;
+  double rhSquare, rhSquareHalf, rhC3, rhFour, monomialCube;
+  double highPoly, highPolyWithSquare, monomialFour;
+  double tablesh, tablesl;
+  double s1, s2, s3, s4, s5;
+  double res;
+ 
+  /* Argument reduction and filtering for special cases */
+
+  /* Compute k as a double and as an int */
+  xdb.d = x;
+  xMultLog2InvMult2L = x * log2InvMult2L;
+  shiftedXMult = xMultLog2InvMult2L + shiftConst;
+  kd = shiftedXMult - shiftConst;
+  shiftedXMultdb.d = shiftedXMult;
+  
+  /* Special cases tests */
+  xIntHi = xdb.i[HI];
+  mightBeDenorm = 0;
+  /* Test if argument is a denormal or zero */
+  if ((xIntHi & 0x7ff00000) == 0) {
+    /* If the argument is exactly zero, we just return 1.0
+       which is the mathematical image of the function
+    */
+    if (x == 0.0) return 1.0;
+
+    /* If the argument is a negative denormal, we 
+       must return 1.0 and raise the inexact flag.
+    */
+
+    if (x < 0.0) return 1.0 + SMALLEST;
+
+    /* Otherwise, we return 1.0 + 1ulp since 
+       exp(greatest denorm) < 1.0 + 1ulp
+       We must do the addition dynamically for
+       raising the inexact flag.
+    */
+
+    return 1.0 + twoM52;
+  }
+ 
+  /* Test if argument is greater than approx. 709 in magnitude */
+  if ((xIntHi & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) {
+    /* If we are here, the result might be overflowed, underflowed, inf, or NaN */
+
+    /* Test if +/- Inf or NaN */
+    if ((xIntHi & 0x7fffffff) >= 0x7ff00000) {
+      /* Either NaN or Inf in this case since exponent is maximal */
+
+      /* Test if NaN: mantissa is not 0 */
+      if (((xIntHi & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* x = NaN, return NaN */
+	return x + x;
+      } else {
+	/* +/- Inf */
+
+	/* Test sign */
+	if ((xIntHi & 0x80000000)==0) 
+	  /* x = +Inf, return +Inf */
+	  return x;
+	else
+	  /* x = -Inf, return 0 (even in RU!) */
+	  return 0;
+      } /* End which in NaN, Inf */
+    } /* End NaN or Inf ? */
+    
+    /* If we are here, we might be overflowed, denormalized or underflowed in the result 
+       but there is no special case (NaN, Inf) left */
+
+    /* Test if actually overflowed */
+    if (x > OVRFLWBOUND) {
+      /* We are actually overflowed in the result */
+      return LARGEST * LARGEST;
+    }
+
+    /* Test if surely underflowed */
+    if (x <= UNDERFLWBOUND) {
+      /* We are actually sure to be underflowed and not denormalized any more 
+	 (at least where computing makes sense); since we are in the round 
+	 upwards case, we return the smallest denormal possible.
+      */
+      return SMALLEST;
+    }
+       
+    /* Test if possibly denormalized */
+    if (x <= DENORMBOUND) {
+      /* We know now that we are not sure to be normalized in the result
+	 We just set an internal flag for a further test 
+      */
+      mightBeDenorm = 1;
+    }
+  } /* End might be a special case */
+
+  /* If we are here, we are sure to be neither +/- Inf nor NaN nor overflowed nor denormalized in the argument
+     but we might be denormalized in the result 
+
+     We continue the argument reduction for the quick phase and table reads for both phases
+  */
+
+#if 0
+  Mul12(&s1,&s2,msLog2Div2Lh,kd);
+  s3 = kd * msLog2Div2Lm;
+  s4 = s2 + s3; 
+  s5 = x + s1;
+  Add12Cond(rh,rm,s5,s4);
+#else 
+
+	/* Cody and Waite like, accurate to 2^-84 */
+	double Log2h= 0xb.17217f8p-16 ;
+	double Log2l= -0x2.e308654361c4cp-48 ;
+ Add12Cond(rh,rm, x-kd*Log2h, -kd*Log2l);
+
+#endif
+
+  k = shiftedXMultdb.i[LO];
+  M = k >> L;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> LHALF;
+
+  /* Table reads */
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+
+  /* Test now if it is sure to launch the quick phase because no denormalized result is possible */
+  if (mightBeDenorm == 1) {
+    /* The result might be denormalized, we launch the accurate phase in all cases */
+
+    /* Rest of argument reduction for accurate phase */
+
+    Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1 = x + msLog2Div2LMultKh;
+    Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+    Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+
+    /* Table reads for accurate phase */
+     tbl1l = twoPowerIndex1[index1].lo;
+     tbl2l = twoPowerIndex2[index2].lo;
+
+     /* Call accurate phase */
+     exp_td_accurate(&polyTblh, &polyTblm, &polyTbll, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l); 
+
+     /* Final rounding and multiplication with 2^M 
+
+        We first multiply the highest significant byte by 2^M in two steps
+	and adjust it then depending on the lower significant parts.
+
+	We cannot multiply directly by 2^M since M is less than -1022.
+	We first multiply by 2^(-1000) and then by 2^(M+1000).
+
+     */
+     
+     t3 = polyTblh * twoPowerM1000;
+
+     /* Form now twoPowerM with adjusted M */
+     twoPowerMdb.i[LO] = 0;
+     twoPowerMdb.i[HI] = (M + 2023) << 20;
+
+
+     /* Multiply with the rest of M, the result will be denormalized */
+     t4 = t3 * twoPowerMdb.d;
+
+     /* For x86, force the compiler to pass through memory for having the right rounding */
+
+     t4db.d = t4;   /* Do not #if-ify this line, we need the copy */
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+     t4db2.i[HI] = t4db.i[HI];
+     t4db2.i[LO] = t4db.i[LO];
+     t4 = t4db2.d;
+#endif
+
+
+     /* Remultiply by 2^(-M) for manipulating the rounding error and the lower significant parts */
+     M *= -1;
+     twoPowerMdb.i[LO] = 0;
+     twoPowerMdb.i[HI] = (M + 23) << 20;
+     t5 = t4 * twoPowerMdb.d;
+     t6 = t5 * twoPower1000;
+     t7 = polyTblh - t6;
+
+     /* The rounding can be decided using the sign of the arithmetical sum of the
+	round-to-nearest-error (i.e. t7) and the lower part(s) of the final result.
+	We add first the lower parts and add the result to the error in t7. We have to 
+	keep in mind that everything is scaled by 2^(-M).
+	t8 can never be exactly 0 since we filter out the cases where the image of the 
+	function is algebraic and the implementation is exacter than the TMD worst case.
+     */
+ 
+     polyTblm = polyTblm + polyTbll;
+     t8 = t7 + polyTblm;
+
+     /* Since we are rounding upwards, the round-to-nearest-rounding result in t4 is 
+	equal to the final result if the rounding error (i.e. the error plus the lower parts)
+	is negative, i.e. if the rounding-to-nearest was upwards.
+     */
+     
+     if (t8 < 0.0) return t4;
+
+     /* If we are here, we must adjust the final result by +1ulp 
+	Relying on the fact that the exponential is always positive, we can simplify this
+	adjustment 
+     */
+
+     t4db.l++;
+     return t4db.d;
+  } /* End accurate phase launched as there might be a denormalized result */
+
+  /* No more underflow nor denormal is possible. There may be the case where
+     M is 1024 and the value 2^M is to be multiplied may be less than 1
+     So the final result will be normalized and representable by the multiplication must be 
+     made in 2 steps
+  */
+
+  /* Quick phase starts here */
+
+  rhSquare = rh * rh;
+  rhC3 = c3 * rh;
+
+  rhSquareHalf = 0.5 * rhSquare;
+  monomialCube = rhC3 * rhSquare;
+  rhFour = rhSquare * rhSquare;
+
+  monomialFour = c4 * rhFour;
+  
+  highPoly = monomialCube + monomialFour;
+
+  highPolyWithSquare = rhSquareHalf + highPoly;
+
+  Mul22(&tablesh,&tablesl,tbl1h,tbl1m,tbl2h,tbl2m);
+
+  t8 = rm + highPolyWithSquare;
+  t9 = rh + t8;
+
+  t10 = tablesh * t9;
+  
+  Add12(t11,t12,tablesh,t10);
+  t13 = t12 + tablesl;
+  Add12(polyTblh,polyTblm,t11,t13);
+  
+  /* Rounding test 
+     Since we know that the result of the final multiplication with 2^M 
+     will always be representable, we can do the rounding test on the 
+     factors and multiply only the final result.
+     We implement the multiplication in integer computations to overcome
+     the problem of the non-representability of 2^1024 if M = 1024
+  */
+
+  TEST_AND_COPY_RU(roundable,res,polyTblh,polyTblm,RDROUNDCST);
+
+  if (roundable) {
+    resdb.d = res;
+    resdb.i[HI] += M << 20;
+    return resdb.d;
+  } else 
+    {
+      /* Rest of argument reduction for accurate phase */
+
+      Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+      t1 = x + msLog2Div2LMultKh;
+      Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+      Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+
+      /* Table reads for accurate phase */
+      tbl1l = twoPowerIndex1[index1].lo;
+      tbl2l = twoPowerIndex2[index2].lo;
+      
+      /* Call accurate phase */
+      exp_td_accurate(&polyTblh, &polyTblm, &polyTbll, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l); 
+
+      /* Since the final multiplication is exact, we can do the final rounding before multiplying
+	 We overcome this way also the cases where the final result is not underflowed whereas the
+	 lower parts of the intermediate final result are.
+      */
+      
+      RoundUpwards3(&res,polyTblh,polyTblm,polyTbll);
+
+      /* Final multiplication with 2^M 
+	 We implement the multiplication in integer computations to overcome
+	 the problem of the non-representability of 2^1024 if M = 1024
+      */
+
+      resdb.d = res;
+      resdb.i[HI] += M << 20;
+      return resdb.d;
+    } /* Accurate phase launched after rounding test*/
+} 
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  DOWNWARDS			     *
+ *************************************************************
+ *************************************************************/
+double exp_rd(double x) { 
+  double rh, rm, rl, tbl1h, tbl1m, tbl1l;
+  double tbl2h, tbl2m, tbl2l;
+  double xMultLog2InvMult2L, shiftedXMult, kd;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double t1, t2, t3, t4, polyTblh, polyTblm, polyTbll;
+  db_number shiftedXMultdb, twoPowerMdb, xdb, t4db, t4db2, resdb;
+  int k, M, index1, index2, xIntHi, mightBeDenorm, roundable;
+  double t5, t6, t7, t8, t9, t10, t11, t12, t13;
+  double rhSquare, rhSquareHalf, rhC3, rhFour, monomialCube;
+  double highPoly, highPolyWithSquare, monomialFour;
+  double tablesh, tablesl;
+  double s1, s2, s3, s4, s5;
+  double res;
+ 
+  /* Argument reduction and filtering for special cases */
+
+  /* Compute k as a double and as an int */
+  xdb.d = x;
+  xMultLog2InvMult2L = x * log2InvMult2L;
+  shiftedXMult = xMultLog2InvMult2L + shiftConst;
+  kd = shiftedXMult - shiftConst;
+  shiftedXMultdb.d = shiftedXMult;
+  
+  /* Special cases tests */
+  xIntHi = xdb.i[HI];
+  mightBeDenorm = 0;
+  /* Test if argument is a denormal or zero */
+  if ((xIntHi & 0x7ff00000) == 0) {
+    /* If the argument is exactly zero, we just return 1.0
+       which is the mathematical image of the function
+    */
+    if (x == 0.0) return 1.0;
+
+    /* If the argument is a positive denormal, we 
+       must return 1.0 and raise the inexact flag.
+    */
+    
+    if (x > 0.0) return 1.0 + SMALLEST;
+
+    /* Otherwise, we return 1.0 - 1ulp since 
+       exp(-greatest denorm) > 1.0 - 1ulp
+       We must do the addition dynamically for
+       raising the inexact flag.
+    */
+    
+    return 1.0 + mTwoM53;
+
+  }
+ 
+  /* Test if argument is greater than approx. 709 in magnitude */
+  if ((xIntHi & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) {
+    /* If we are here, the result might be overflowed, underflowed, inf, or NaN */
+
+    /* Test if +/- Inf or NaN */
+    if ((xIntHi & 0x7fffffff) >= 0x7ff00000) {
+      /* Either NaN or Inf in this case since exponent is maximal */
+
+      /* Test if NaN: mantissa is not 0 */
+      if (((xIntHi & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* x = NaN, return NaN */
+	return x + x;
+      } else {
+	/* +/- Inf */
+
+	/* Test sign */
+	if ((xIntHi & 0x80000000)==0) 
+	  /* x = +Inf, return +Inf */
+	  return x;
+	else
+	  /* x = -Inf, return 0 */
+	  return 0;
+      } /* End which in NaN, Inf */
+    } /* End NaN or Inf ? */
+    
+    /* If we are here, we might be overflowed, denormalized or underflowed in the result 
+       but there is no special case (NaN, Inf) left */
+
+    /* Test if actually overflowed */
+    if (x > OVRFLWBOUND) {
+      /* We would be overflowed but as we are rounding downwards
+	 the nearest number lesser than the exact result is the greatest 
+	 normal. In any case, we must raise the inexact flag.
+      */
+      return LARGEST * (1.0 + SMALLEST);
+    }
+
+    /* Test if surely underflowed */
+    if (x <= UNDERFLWBOUND) {
+      /* We are actually sure to be underflowed and not denormalized any more 
+	 (at least where computing makes sense); since we are in the round 
+	 upwards case, we return the smallest denormal possible.
+      */
+      return SMALLEST * SMALLEST;
+    }
+       
+    /* Test if possibly denormalized */
+    if (x <= DENORMBOUND) {
+      /* We know now that we are not sure to be normalized in the result
+	 We just set an internal flag for a further test 
+      */
+      mightBeDenorm = 1;
+    }
+  } /* End might be a special case */
+
+  /* If we are here, we are sure to be neither +/- Inf nor NaN nor overflowed nor denormalized in the argument
+     but we might be denormalized in the result 
+
+     We continue the argument reduction for the quick phase and table reads for both phases
+  */
+
+
+#if 0
+  Mul12(&s1,&s2,msLog2Div2Lh,kd);
+  s3 = kd * msLog2Div2Lm;
+  s4 = s2 + s3; 
+  s5 = x + s1;
+  Add12Cond(rh,rm,s5,s4);
+#else 
+
+	/* Cody and Waite like, accurate to 2^-84 */
+	double Log2h= 0xb.17217f8p-16 ;
+	double Log2l= -0x2.e308654361c4cp-48 ;
+ Add12Cond(rh,rm, x-kd*Log2h, -kd*Log2l);
+
+#endif
+
+  k = shiftedXMultdb.i[LO];
+  M = k >> L;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> LHALF;
+
+  /* Table reads */
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+
+  /* Test now if it is sure to launch the quick phase because no denormalized result is possible */
+  if (mightBeDenorm == 1) {
+    /* The result might be denormalized, we launch the accurate phase in all cases */
+
+    /* Rest of argument reduction for accurate phase */
+
+    Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1 = x + msLog2Div2LMultKh;
+    Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+    Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+
+    /* Table reads for accurate phase */
+     tbl1l = twoPowerIndex1[index1].lo;
+     tbl2l = twoPowerIndex2[index2].lo;
+
+     /* Call accurate phase */
+     exp_td_accurate(&polyTblh, &polyTblm, &polyTbll, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l); 
+
+     /* Final rounding and multiplication with 2^M 
+
+        We first multiply the highest significant byte by 2^M in two steps
+	and adjust it then depending on the lower significant parts.
+
+	We cannot multiply directly by 2^M since M is less than -1022.
+	We first multiply by 2^(-1000) and then by 2^(M+1000).
+
+     */
+     
+     t3 = polyTblh * twoPowerM1000;
+
+     /* Form now twoPowerM with adjusted M */
+     twoPowerMdb.i[LO] = 0;
+     twoPowerMdb.i[HI] = (M + 2023) << 20;
+
+
+     /* Multiply with the rest of M, the result will be denormalized */
+     t4 = t3 * twoPowerMdb.d;
+
+     /* For x86, force the compiler to pass through memory for having the right rounding */
+
+     t4db.d = t4;   /* Do not #if-ify this line, we need the copy */
+#if defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86) 
+     t4db2.i[HI] = t4db.i[HI];
+     t4db2.i[LO] = t4db.i[LO];
+     t4 = t4db2.d;
+#endif
+
+     /* Remultiply by 2^(-M) for manipulating the rounding error and the lower significant parts */
+     M *= -1;
+     twoPowerMdb.i[LO] = 0;
+     twoPowerMdb.i[HI] = (M + 23) << 20;
+     t5 = t4 * twoPowerMdb.d;
+     t6 = t5 * twoPower1000;
+     t7 = polyTblh - t6;
+
+     /* The rounding can be decided using the sign of the arithmetical sum of the
+	round-to-nearest-error (i.e. t7) and the lower part(s) of the final result.
+	We add first the lower parts and add the result to the error in t7. We have to 
+	keep in mind that everything is scaled by 2^(-M).
+	t8 can never be exactly 0 since we filter out the cases where the image of the 
+	function is algebraic and the implementation is exacter than the TMD worst case.
+     */
+ 
+     polyTblm = polyTblm + polyTbll;
+     t8 = t7 + polyTblm;
+
+     /* Since we are rounding downwards, the round-to-nearest-rounding result in t4 is 
+	equal to the final result if the rounding error (i.e. the error plus the lower parts)
+	is positive, i.e. if the rounding-to-nearest was downwards.
+     */
+     
+     if (t8 > 0.0) return t4;
+
+     /* If we are here, we must adjust the final result by +1ulp 
+	Relying on the fact that the exponential is always positive, we can simplify this
+	adjustment 
+     */
+
+     t4db.l--;
+     return t4db.d;
+  } /* End accurate phase launched as there might be a denormalized result */
+
+  /* No more underflow nor denormal is possible. There may be the case where
+     M is 1024 and the value 2^M is to be multiplied may be less than 1
+     So the final result will be normalized and representable by the multiplication must be 
+     made in 2 steps
+  */
+
+  /* Quick phase starts here */
+
+  rhSquare = rh * rh;
+  rhC3 = c3 * rh;
+
+  rhSquareHalf = 0.5 * rhSquare;
+  monomialCube = rhC3 * rhSquare;
+  rhFour = rhSquare * rhSquare;
+
+  monomialFour = c4 * rhFour;
+  
+  highPoly = monomialCube + monomialFour;
+
+  highPolyWithSquare = rhSquareHalf + highPoly;
+
+  Mul22(&tablesh,&tablesl,tbl1h,tbl1m,tbl2h,tbl2m);
+
+  t8 = rm + highPolyWithSquare;
+  t9 = rh + t8;
+
+  t10 = tablesh * t9;
+  
+  Add12(t11,t12,tablesh,t10);
+  t13 = t12 + tablesl;
+  Add12(polyTblh,polyTblm,t11,t13);
+  
+  /* Rounding test 
+     Since we know that the result of the final multiplication with 2^M 
+     will always be representable, we can do the rounding test on the 
+     factors and multiply only the final result.
+     We implement the multiplication in integer computations to overcome
+     the problem of the non-representability of 2^1024 if M = 1024
+  */
+
+  TEST_AND_COPY_RD(roundable,res,polyTblh,polyTblm,RDROUNDCST);
+
+  if (roundable) {
+    resdb.d = res;
+    resdb.i[HI] += M << 20;
+    return resdb.d;
+  } else {      
+      /* Rest of argument reduction for accurate phase */
+
+      Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+      t1 = x + msLog2Div2LMultKh;
+      Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+      Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+
+      /* Table reads for accurate phase */
+      tbl1l = twoPowerIndex1[index1].lo;
+      tbl2l = twoPowerIndex2[index2].lo;
+      
+      /* Call accurate phase */
+      exp_td_accurate(&polyTblh, &polyTblm, &polyTbll, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l); 
+
+      /* Since the final multiplication is exact, we can do the final rounding before multiplying
+	 We overcome this way also the cases where the final result is not underflowed whereas the
+	 lower parts of the intermediate final result are.
+      */
+      
+      RoundDownwards3(&res,polyTblh,polyTblm,polyTbll);
+
+      /* Final multiplication with 2^M 
+	 We implement the multiplication in integer computations to overcome
+	 the problem of the non-representability of 2^1024 if M = 1024
+      */
+
+      resdb.d = res;
+      resdb.i[HI] += M << 20;
+      return resdb.d;
+    } /* Accurate phase launched after rounding test*/
+} 
+ 
+
+#ifdef BUILD_INTERVAL_FUNCTIONS
+interval j_exp(interval x)
+{
+  interval res;
+  double x_inf, x_sup;
+  double rh_sup, rm_sup, rl_sup, tbl1h_sup, tbl1m_sup, tbl1l_sup;
+  double tbl2h_sup, tbl2m_sup, tbl2l_sup;
+  double xMultLog2InvMult2L_sup, shiftedXMult_sup, kd_sup;
+  double msLog2Div2LMultKh_sup, msLog2Div2LMultKm_sup, msLog2Div2LMultKl_sup;
+  double t1_sup, t2_sup, polyTblh_sup, polyTblm_sup, polyTbll_sup;
+  db_number shiftedXMultdb_sup, xdb_sup, resdb_sup;
+  int k_sup, M_sup, index1_sup, index2_sup, xIntHi_sup, mightBeDenorm_sup, roundable;
+  double t8_sup, t9_sup, t10_sup, t11_sup, t12_sup, t13_sup;
+  double rhSquare_sup, rhSquareHalf_sup, rhC3_sup, rhFour_sup, monomialCube_sup;
+  double highPoly_sup, highPolyWithSquare_sup, monomialFour_sup;
+  double tablesh_sup, tablesl_sup;
+  double s1_sup, s2_sup, s3_sup, s4_sup, s5_sup;
+  double res_sup;
+
+  double rh_inf, rm_inf, rl_inf, tbl1h_inf, tbl1m_inf, tbl1l_inf;
+  double tbl2h_inf, tbl2m_inf, tbl2l_inf;
+  double xMultLog2InvMult2L_inf, shiftedXMult_inf, kd_inf;
+  double msLog2Div2LMultKh_inf, msLog2Div2LMultKm_inf, msLog2Div2LMultKl_inf;
+  double t1_inf, t2_inf, polyTblh_inf, polyTblm_inf, polyTbll_inf;
+  db_number shiftedXMultdb_inf, xdb_inf, resdb_inf;
+  int k_inf, M_inf, index1_inf, index2_inf, xIntHi_inf, mightBeDenorm_inf;
+  double t8_inf, t9_inf, t10_inf, t11_inf, t12_inf, t13_inf;
+  double rhSquare_inf, rhSquareHalf_inf, rhC3_inf, rhFour_inf, monomialCube_inf;
+  double highPoly_inf, highPolyWithSquare_inf, monomialFour_inf;
+  double tablesh_inf, tablesl_inf;
+  double s1_inf, s2_inf, s3_inf, s4_inf, s5_inf;
+  double res_inf;
+
+  double res_simple_inf, res_simple_sup;
+  int infDone=0; int supDone=0;
+
+  x_inf=LOW(x);
+  x_sup=UP(x);
+
+  /* Argument reduction and filtering for special cases */
+
+  /* Compute k as a double and as an int */
+  xdb_sup.d = x_sup;
+  xdb_inf.d = x_inf;
+  xMultLog2InvMult2L_sup = x_sup * log2InvMult2L;
+  xMultLog2InvMult2L_inf = x_inf * log2InvMult2L;
+  shiftedXMult_sup = xMultLog2InvMult2L_sup + shiftConst;
+  shiftedXMult_inf = xMultLog2InvMult2L_inf + shiftConst;
+  kd_sup = shiftedXMult_sup - shiftConst;
+  kd_inf = shiftedXMult_inf - shiftConst;
+  shiftedXMultdb_sup.d = shiftedXMult_sup;
+  shiftedXMultdb_inf.d = shiftedXMult_inf;
+
+
+  /* Special cases tests */
+  xIntHi_sup = xdb_sup.i[HI];
+  mightBeDenorm_sup = 0;
+
+  /* Special cases tests */
+  xIntHi_inf = xdb_inf.i[HI];
+  mightBeDenorm_inf = 0;
+
+  if ( __builtin_expect(
+       ((xIntHi_sup & 0x7ff00000) == 0)
+    || (((xIntHi_sup & 0x7ff00000) == 0)  && (x_sup == 0.0)) 
+    || (((xIntHi_sup & 0x7ff00000) == 0)  && (x_sup < 0.0))
+    || (((xIntHi_sup & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && ((xIntHi_sup & 0x7fffffff) >= 0x7ff00000))
+    || (((xIntHi_sup & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && ((xIntHi_sup & 0x7fffffff) >= 0x7ff00000) && (((xIntHi_sup & 0x000fffff) | xdb_sup.i[LO]) != 0))
+    || (((xIntHi_sup & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && ((xIntHi_sup & 0x7fffffff) >= 0x7ff00000) && ((xIntHi_sup & 0x80000000)==0))
+    || (((xIntHi_sup & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && (x_sup > OVRFLWBOUND))
+    || (((xIntHi_sup & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && (x_sup <= UNDERFLWBOUND))
+    || (((xIntHi_sup & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && (x_sup <= DENORMBOUND))
+    || ((xIntHi_inf & 0x7ff00000) == 0)
+    || (((xIntHi_inf & 0x7ff00000) == 0) && (x_inf == 0.0))
+    || (((xIntHi_inf & 0x7ff00000) == 0) && (x_inf > 0.0))
+    || (((xIntHi_inf & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && ((xIntHi_inf & 0x7fffffff) >= 0x7ff00000))
+    || (((xIntHi_inf & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && ((xIntHi_inf & 0x7fffffff) >= 0x7ff00000) && (((xIntHi_inf & 0x000fffff) | xdb_inf.i[LO]) != 0))
+    || (((xIntHi_inf & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && ((xIntHi_inf & 0x7fffffff) >= 0x7ff00000) && ((xIntHi_inf & 0x80000000)==0))
+    || (((xIntHi_inf & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && (x_inf > OVRFLWBOUND))
+    || (((xIntHi_inf & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && (x_inf <= UNDERFLWBOUND))
+    || (((xIntHi_inf & 0x7fffffff) >= OVRUDRFLWSMPLBOUND) && (x_inf <= DENORMBOUND))
+     ,FALSE))
+  {
+    ASSIGN_LOW(res,exp_rd(LOW(x)));
+    ASSIGN_UP(res,exp_ru(UP(x)));
+    return res;
+  }
+
+  /* Test if argument is a denormal or zero */
+  /* If we are here, we are sure to be neither +/- Inf nor NaN nor overflowed nor denormalized in the argument
+     but we might be denormalized in the result 
+
+     We continue the argument reduction for the quick phase and table reads for both phases
+  */
+
+  Mul12(&s1_sup,&s2_sup,msLog2Div2Lh,kd_sup);
+  Mul12(&s1_inf,&s2_inf,msLog2Div2Lh,kd_inf);
+  s3_sup = kd_sup * msLog2Div2Lm;
+  s3_inf = kd_inf * msLog2Div2Lm;
+  s4_sup = s2_sup + s3_sup; 
+  s4_inf = s2_inf + s3_inf; 
+  s5_sup = x_sup + s1_sup;
+  s5_inf = x_inf + s1_inf;
+  Add12Cond(rh_sup,rm_sup,s5_sup,s4_sup);
+  Add12Cond(rh_inf,rm_inf,s5_inf,s4_inf);
+  k_sup = shiftedXMultdb_sup.i[LO];
+  k_inf = shiftedXMultdb_inf.i[LO];
+  M_sup = k_sup >> L;
+  M_inf = k_inf >> L;
+  index1_sup = k_sup & INDEXMASK1;
+  index1_inf = k_inf & INDEXMASK1;
+  index2_sup = (k_sup & INDEXMASK2) >> LHALF;
+  index2_inf = (k_inf & INDEXMASK2) >> LHALF;
+
+  /* Table reads */
+  tbl1h_sup = twoPowerIndex1[index1_sup].hi;
+  tbl1h_inf = twoPowerIndex1[index1_inf].hi;
+  tbl1m_sup = twoPowerIndex1[index1_sup].mi;
+  tbl1m_inf = twoPowerIndex1[index1_inf].mi;
+  tbl2h_sup = twoPowerIndex2[index2_sup].hi;
+  tbl2h_inf = twoPowerIndex2[index2_inf].hi;
+  tbl2m_sup = twoPowerIndex2[index2_sup].mi;
+  tbl2m_inf = twoPowerIndex2[index2_inf].mi;
+
+
+
+
+  /* No more underflow nor denormal is possible. There may be the case where
+     M is 1024 and the value 2^M is to be multiplied may be less than 1
+     So the final result will be normalized and representable by the multiplication must be 
+     made in 2 steps
+  */
+
+  /* Quick phase starts here */
+
+  rhSquare_sup = rh_sup * rh_sup;
+  rhSquare_inf = rh_inf * rh_inf;
+  rhC3_sup = c3 * rh_sup;
+  rhC3_inf = c3 * rh_inf;
+  rhSquareHalf_sup = 0.5 * rhSquare_sup;
+  rhSquareHalf_inf = 0.5 * rhSquare_inf;
+  monomialCube_sup = rhC3_sup * rhSquare_sup;
+  monomialCube_inf = rhC3_inf * rhSquare_inf;
+  rhFour_sup = rhSquare_sup * rhSquare_sup;
+  rhFour_inf = rhSquare_inf * rhSquare_inf;
+  monomialFour_sup = c4 * rhFour_sup;
+  monomialFour_inf = c4 * rhFour_inf;
+  highPoly_sup = monomialCube_sup + monomialFour_sup;
+  highPoly_inf = monomialCube_inf + monomialFour_inf;
+  highPolyWithSquare_sup = rhSquareHalf_sup + highPoly_sup;
+  highPolyWithSquare_inf = rhSquareHalf_inf + highPoly_inf;
+  Mul22(&tablesh_sup,&tablesl_sup,tbl1h_sup,tbl1m_sup,tbl2h_sup,tbl2m_sup);
+  Mul22(&tablesh_inf,&tablesl_inf,tbl1h_inf,tbl1m_inf,tbl2h_inf,tbl2m_inf);
+  t8_sup = rm_sup + highPolyWithSquare_sup;
+  t8_inf = rm_inf + highPolyWithSquare_inf;
+  t9_sup = rh_sup + t8_sup;
+  t9_inf = rh_inf + t8_inf;
+  t10_sup = tablesh_sup * t9_sup;
+  t10_inf = tablesh_inf * t9_inf;
+  Add12(t11_sup,t12_sup,tablesh_sup,t10_sup);
+  Add12(t11_inf,t12_inf,tablesh_inf,t10_inf);
+  t13_sup = t12_sup + tablesl_sup;
+  t13_inf = t12_inf + tablesl_inf;
+  Add12(polyTblh_sup,polyTblm_sup,t11_sup,t13_sup);
+  Add12(polyTblh_inf,polyTblm_inf,t11_inf,t13_inf);
+  
+  /* Rounding test 
+     Since we know that the result of the final multiplication with 2^M 
+     will always be representable, we can do the rounding test on the 
+     factors and multiply only the final result.
+     We implement the multiplication in integer computations to overcome
+     the problem of the non-representability of 2^1024 if M = 1024
+  */
+
+  if (infDone==1) res_inf=res_simple_inf;
+  if (supDone==1) res_sup=res_simple_sup;
+
+//  TEST_AND_COPY_RDRU_EXP(roundable,infDone,supDone,res_inf,polyTblh_inf,polyTblm_inf,res_sup,polyTblh_sup,polyTblm_sup,RDROUNDCST);
+  db_number yh_inf, yl_inf, u53_inf, yh_sup, yl_sup, u53_sup;
+  int yh_inf_neg, yl_inf_neg, yh_sup_neg, yl_sup_neg;
+  int rd_ok, ru_ok;
+  double save_res_inf=res_inf;
+  double save_res_sup=res_sup;
+  yh_inf.d = polyTblh_inf;    yl_inf.d = polyTblm_inf;
+  yh_inf_neg = (yh_inf.i[HI] & 0x80000000);
+  yl_inf_neg = (yl_inf.i[HI] & 0x80000000);
+  yh_inf.l = yh_inf.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/
+  yl_inf.l = yl_inf.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/
+  u53_inf.l     = (yh_inf.l & ULL(7ff0000000000000)) +  ULL(0010000000000000);
+  yh_sup.d = polyTblh_sup;    yl_sup.d = polyTblm_sup;
+  yh_sup_neg = (yh_sup.i[HI] & 0x80000000);
+  yl_sup_neg = (yl_sup.i[HI] & 0x80000000);
+  yh_sup.l = yh_sup.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/
+  yl_sup.l = yl_sup.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/
+  u53_sup.l     = (yh_sup.l & ULL(7ff0000000000000)) +  ULL(0010000000000000);
+  roundable = 0;
+  rd_ok=(yl_inf.d > RDROUNDCST * u53_inf.d);
+  ru_ok=(yl_sup.d > RDROUNDCST * u53_sup.d);
+     if(yl_inf_neg) {  /* The case yl==0 is filtered by the above test*/
+      /* return next down */
+       yh_inf.d = polyTblh_inf;
+      if(yh_inf_neg) yh_inf.l++;  else yh_inf.l--; /* Beware: fails for zero */
+      res_inf = yh_inf.d;
+    }
+    else {
+      res_inf = polyTblh_inf;
+    }
+    if(!yl_sup_neg) {  /* The case yl==0 is filtered by the above test*/
+      /* return next up */
+      yh_sup.d = polyTblh_sup;
+      if(yh_sup_neg) yh_sup.l--;  else yh_sup.l++; /* Beware: fails for zero */
+      res_sup = yh_sup.d;
+    }
+    else {
+      res_sup = polyTblh_sup;
+    }
+  if(infDone) res_inf=save_res_inf;
+  if(supDone) res_sup=save_res_sup;
+  if(rd_ok && ru_ok){
+    roundable=3;
+  }
+  else if (rd_ok){
+    roundable=1;
+  }
+  else if (ru_ok){
+     roundable=2;
+  }
+  resdb_inf.d = res_inf;
+  resdb_sup.d = res_sup;
+
+  if (roundable==3)
+  {
+    if (infDone==0){
+      resdb_inf.i[HI] += M_inf << 20;
+    }
+    ASSIGN_LOW(res,resdb_inf.d);
+    if (supDone==0){
+      resdb_sup.i[HI] += M_sup << 20;
+    }
+    ASSIGN_UP(res,resdb_sup.d);
+    return res;
+  }
+  if(roundable==1)
+  {
+    if(infDone==0){
+      resdb_inf.i[HI] += M_inf << 20;
+    }
+    ASSIGN_LOW(res,resdb_inf.d);
+    if(supDone==0){
+    /* Rest of argument reduction for accurate phase */
+    Mul133(&msLog2Div2LMultKh_sup,&msLog2Div2LMultKm_sup,&msLog2Div2LMultKl_sup,kd_sup,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1_sup = x_sup + msLog2Div2LMultKh_sup;
+    Add12Cond(rh_sup,t2_sup,t1_sup,msLog2Div2LMultKm_sup);
+    Add12Cond(rm_sup,rl_sup,t2_sup,msLog2Div2LMultKl_sup);
+    /* Table reads for accurate phase */
+    tbl1l_sup = twoPowerIndex1[index1_sup].lo;
+    tbl2l_sup = twoPowerIndex2[index2_sup].lo;
+    /* Call accurate phase */
+    exp_td_accurate(&polyTblh_sup, &polyTblm_sup, &polyTbll_sup, rh_sup, rm_sup, rl_sup, tbl1h_sup, tbl1m_sup, tbl1l_sup, tbl2h_sup, tbl2m_sup, tbl2l_sup); 
+    /* Since the final multiplication is exact, we can do the final rounding before multiplying
+       We overcome this way also the cases where the final result is not underflowed whereas the
+       lower parts of the intermediate final result are.
+    */
+    RoundUpwards3(&res_sup,polyTblh_sup,polyTblm_sup,polyTbll_sup);
+    /* Final multiplication with 2^M 
+       We implement the multiplication in integer computations to overcome
+       the problem of the non-representability of 2^1024 if M = 1024
+    */
+    resdb_sup.d = res_sup;
+    resdb_sup.i[HI] += M_sup << 20;
+    }
+    ASSIGN_UP(res,resdb_sup.d);
+    return res;
+  } /* Accurate phase launched after rounding test*/
+    
+  if (roundable==2) {
+    if (infDone==0){
+    /* Rest of argument reduction for accurate phase */
+    Mul133(&msLog2Div2LMultKh_inf,&msLog2Div2LMultKm_inf,&msLog2Div2LMultKl_inf,kd_inf,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1_inf = x_inf + msLog2Div2LMultKh_inf;
+    Add12Cond(rh_inf,t2_inf,t1_inf,msLog2Div2LMultKm_inf);
+    Add12Cond(rm_inf,rl_inf,t2_inf,msLog2Div2LMultKl_inf);
+    /* Table reads for accurate phase */
+    tbl1l_inf = twoPowerIndex1[index1_inf].lo;
+    tbl2l_inf = twoPowerIndex2[index2_inf].lo;
+    /* Call accurate phase */
+    exp_td_accurate(&polyTblh_inf, &polyTblm_inf, &polyTbll_inf, rh_inf, rm_inf, rl_inf, tbl1h_inf, tbl1m_inf, tbl1l_inf, tbl2h_inf, tbl2m_inf, tbl2l_inf); 
+    /* Since the final multiplication is exact, we can do the final rounding before multiplying
+       We overcome this way also the cases where the final result is not underflowed whereas the
+       lower parts of the intermediate final result are.
+    */
+
+    RoundDownwards3(&res_inf,polyTblh_inf,polyTblm_inf,polyTbll_inf);
+    /* Final multiplication with 2^M 
+       We implement the multiplication in integer computations to overcome
+       the problem of the non-representability of 2^1024 if M = 1024
+    */
+
+    resdb_inf.d = res_inf;
+    resdb_inf.i[HI] += M_inf << 20;
+    }
+    ASSIGN_LOW(res,resdb_inf.d);
+    if(supDone==0){
+      resdb_sup.i[HI] += M_sup << 20;
+    }
+    ASSIGN_UP(res,resdb_sup.d);    
+    return res;
+  } /* Accurate phase launched after rounding test*/
+  if(roundable==0)
+  {
+    if(supDone==0){
+    /* Rest of argument reduction for accurate phase */
+    Mul133(&msLog2Div2LMultKh_sup,&msLog2Div2LMultKm_sup,&msLog2Div2LMultKl_sup,kd_sup,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1_sup = x_sup + msLog2Div2LMultKh_sup;
+    Add12Cond(rh_sup,t2_sup,t1_sup,msLog2Div2LMultKm_sup);
+    Add12Cond(rm_sup,rl_sup,t2_sup,msLog2Div2LMultKl_sup);
+    /* Table reads for accurate phase */
+    tbl1l_sup = twoPowerIndex1[index1_sup].lo;
+    tbl2l_sup = twoPowerIndex2[index2_sup].lo;
+    /* Call accurate phase */
+    exp_td_accurate(&polyTblh_sup, &polyTblm_sup, &polyTbll_sup, rh_sup, rm_sup, rl_sup, tbl1h_sup, tbl1m_sup, tbl1l_sup, tbl2h_sup, tbl2m_sup, tbl2l_sup); 
+    /* Since the final multiplication is exact, we can do the final rounding before multiplying
+       We overcome this way also the cases where the final result is not underflowed whereas the
+       lower parts of the intermediate final result are.
+    */
+    RoundUpwards3(&res_sup,polyTblh_sup,polyTblm_sup,polyTbll_sup);
+    /* Final multiplication with 2^M 
+       We implement the multiplication in integer computations to overcome
+       the problem of the non-representability of 2^1024 if M = 1024
+    */
+    resdb_sup.d = res_sup;
+    resdb_sup.i[HI] += M_sup << 20;
+    }
+    ASSIGN_UP(res,resdb_sup.d);
+    if (infDone==0){
+    /* Rest of argument reduction for accurate phase */
+    Mul133(&msLog2Div2LMultKh_inf,&msLog2Div2LMultKm_inf,&msLog2Div2LMultKl_inf,kd_inf,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1_inf = x_inf + msLog2Div2LMultKh_inf;
+    Add12Cond(rh_inf,t2_inf,t1_inf,msLog2Div2LMultKm_inf);
+    Add12Cond(rm_inf,rl_inf,t2_inf,msLog2Div2LMultKl_inf);
+    /* Table reads for accurate phase */
+    tbl1l_inf = twoPowerIndex1[index1_inf].lo;
+    tbl2l_inf = twoPowerIndex2[index2_inf].lo;
+    /* Call accurate phase */
+    exp_td_accurate(&polyTblh_inf, &polyTblm_inf, &polyTbll_inf, rh_inf, rm_inf, rl_inf, tbl1h_inf, tbl1m_inf, tbl1l_inf, tbl2h_inf, tbl2m_inf, tbl2l_inf); 
+    /* Since the final multiplication is exact, we can do the final rounding before multiplying
+       We overcome this way also the cases where the final result is not underflowed whereas the
+       lower parts of the intermediate final result are.
+    */
+
+    RoundDownwards3(&res_inf,polyTblh_inf,polyTblm_inf,polyTbll_inf);
+    /* Final multiplication with 2^M 
+       We implement the multiplication in integer computations to overcome
+       the problem of the non-representability of 2^1024 if M = 1024
+    */
+
+    resdb_inf.d = res_inf;
+    resdb_inf.i[HI] += M_inf << 20;
+    }
+    ASSIGN_LOW(res,resdb_inf.d);
+    return res;
+  } /* Accurate phase launched after rounding test*/
+
+  return res;
+}
+#endif
+
diff --git a/src/crlibm/exp-td.h b/src/crlibm/exp-td.h
new file mode 100644
index 0000000..5fc5cc7
--- /dev/null
+++ b/src/crlibm/exp-td.h
@@ -0,0 +1,685 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/*File generated by maple/exp-td.mpl*/
+#define L 12
+#define LHALF 6
+#define log2InvMult2L 5.90927888748119403317105025053024291992187500000000e+03
+#define msLog2Div2Lh -1.69225385878892892145206050535932718048570677638054e-04
+#define msLog2Div2Lm -5.66173538536694228129338642508144915789549786200850e-21
+#define msLog2Div2Ll -1.39348350547270802387134479195513221596886344528448e-37
+#define shiftConst 6.75539944105574400000000000000000000000000000000000e+15
+#define INDEXMASK1 0x0000003f
+#define INDEXMASK2 0x00000fc0
+#define OVRUDRFLWSMPLBOUND 0x4086232b
+#define OVRFLWBOUND 7.09782712893383973096206318587064743041992187500000e+02
+#define LARGEST 1.79769313486231570814527423731704356798070567525845e+308
+#define SMALLEST 4.94065645841246544176568792868221372365059802614325e-324
+#define DENORMBOUND -7.08396418532264078748994506895542144775390625000000e+02
+#define UNDERFLWBOUND -7.45133219101941222106688655912876129150390625000000e+02
+#define twoPowerM1000 9.33263618503218878990089544723817169617091446371708e-302
+#define twoPower1000 1.07150860718626732094842504906000181056140481170553e+301
+#define ROUNDCST 1.00097751710654947574476244840271277078237100388308e+00
+#define RDROUNDCST 5.42101086242752217003726400434970855712890625000000e-20
+#define twoM52 2.22044604925031308084726333618164062500000000000000e-16
+#define mTwoM53 -1.11022302462515654042363166809082031250000000000000e-16
+
+
+#define c3 1.66666666696497128841158996692684013396501541137695e-01
+#define c4 4.16666666766101478902584176466916687786579132080078e-02
+#define accPolyC3h 1.66666666666666657414808128123695496469736099243164e-01
+#define accPolyC3l 9.25185853854303382711778796549658869198239876296876e-18
+#define accPolyC4h 4.16666666666666643537020320309238741174340248107910e-02
+#define accPolyC4l 2.31256737763466047834406500740034679807274635559840e-18
+#define accPolyC5 8.33333333333333321768510160154619370587170124053955e-03
+#define accPolyC6 1.38888888911084160647513296993338371976278722286224e-03
+#define accPolyC7 1.98412698447204637443655461659375305316643789410591e-04
+
+
+typedef struct tPi_t_tag {double hi; double mi; double lo;} tPi_t;  
+static const tPi_t twoPowerIndex1[64] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1hi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1mi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1lo[0] */ 
+  } , 
+  { 
+    1.00016923970530213772178740327944979071617126464844e+00, /* twoPowerIndex1hi[1] */ 
+    9.33618533547846199388179470637929281332443150415515e-17, /* twoPowerIndex1mi[1] */ 
+    3.77297954885090084710073756456287936644477196404411e-33, /* twoPowerIndex1lo[1] */ 
+  } , 
+  { 
+    1.00033850805268231809463941317517310380935668945312e+00, /* twoPowerIndex1hi[2] */ 
+    -5.14133393131895706530678267769194263660821897510018e-18, /* twoPowerIndex1mi[2] */ 
+    3.65532984508913994275805274025238001612209382982528e-34, /* twoPowerIndex1lo[2] */ 
+  } , 
+  { 
+    1.00050780504698755279946453811135143041610717773438e+00, /* twoPowerIndex1hi[3] */ 
+    6.96242402202057255168575283120383384543281723609229e-17, /* twoPowerIndex1mi[3] */ 
+    5.20646484360987194687938744912769762301408608274186e-34, /* twoPowerIndex1lo[3] */ 
+  } , 
+  { 
+    1.00067713069306640782940576173132285475730895996094e+00, /* twoPowerIndex1hi[4] */ 
+    -5.11512329768566763581175858027414623025077801052578e-17, /* twoPowerIndex1mi[4] */ 
+    6.98198098827029289611306311409722598417652045670746e-34, /* twoPowerIndex1lo[4] */ 
+  } , 
+  { 
+    1.00084648499576744917760606767842546105384826660156e+00, /* twoPowerIndex1hi[5] */ 
+    8.42299002458648658027371639395540881533737558365359e-17, /* twoPowerIndex1mi[5] */ 
+    2.36970468083963275494383447607242933566525306383712e-33, /* twoPowerIndex1lo[5] */ 
+  } , 
+  { 
+    1.00101586795994101919404783984646201133728027343750e+00, /* twoPowerIndex1hi[6] */ 
+    -2.82452207477616780689379931990767172214919031737312e-17, /* twoPowerIndex1mi[6] */ 
+    -1.95728551891328398835983018867545661396300096090192e-33, /* twoPowerIndex1lo[6] */ 
+  } , 
+  { 
+    1.00118527959043746022871346212923526763916015625000e+00, /* twoPowerIndex1hi[7] */ 
+    -7.18042456559213166577815896739695813826899291527385e-17, /* twoPowerIndex1mi[7] */ 
+    -4.76259460142737667571053552520587169925041399888400e-33, /* twoPowerIndex1lo[7] */ 
+  } , 
+  { 
+    1.00135471989210822485460994357708841562271118164062e+00, /* twoPowerIndex1hi[8] */ 
+    -1.89737284167929933536294189134998232481318340155287e-17, /* twoPowerIndex1mi[8] */ 
+    -1.14644761608474571162584330231223616391499645510675e-34, /* twoPowerIndex1lo[8] */ 
+  } , 
+  { 
+    1.00152418886980565382316399336559697985649108886719e+00, /* twoPowerIndex1hi[9] */ 
+    9.06044106726912172835402556659442028244667434824268e-17, /* twoPowerIndex1mi[9] */ 
+    -9.28795936877474030548429956901821606468166518236870e-34, /* twoPowerIndex1lo[9] */ 
+  } , 
+  { 
+    1.00169368652838319810882694582687690854072570800781e+00, /* twoPowerIndex1hi[10] */ 
+    -7.17327634990031997530849131951948428542423257707819e-17, /* twoPowerIndex1mi[10] */ 
+    6.07647560689104755979568262152596670382288431776872e-33, /* twoPowerIndex1lo[10] */ 
+  } , 
+  { 
+    1.00186321287269430868605013529304414987564086914062e+00, /* twoPowerIndex1hi[11] */ 
+    -1.33071962467226606689858482393149015112554043251841e-17, /* twoPowerIndex1mi[11] */ 
+    -3.85443386097781554341108465500150047004226523597749e-34, /* twoPowerIndex1lo[11] */ 
+  } , 
+  { 
+    1.00203276790759399084151937131537124514579772949219e+00, /* twoPowerIndex1hi[12] */ 
+    2.57269259432211179649018725316354562817431777421067e-17, /* twoPowerIndex1mi[12] */ 
+    6.79751255613789265201334995370535043187556454092516e-34, /* twoPowerIndex1lo[12] */ 
+  } , 
+  { 
+    1.00220235163793791599573523853905498981475830078125e+00, /* twoPowerIndex1hi[13] */ 
+    -3.92993778548451720552933864302152846562830407163222e-17, /* twoPowerIndex1mi[13] */ 
+    2.22740945016647607963332576015739728975193247400334e-33, /* twoPowerIndex1lo[13] */ 
+  } , 
+  { 
+    1.00237196406858219965840817167190834879875183105469e+00, /* twoPowerIndex1hi[14] */ 
+    8.46137724799471749932697856411684097253648908880386e-17, /* twoPowerIndex1mi[14] */ 
+    -1.15795350476069740873680647805085951983720786847012e-33, /* twoPowerIndex1lo[14] */ 
+  } , 
+  { 
+    1.00254160520438451165148308064090088009834289550781e+00, /* twoPowerIndex1hi[15] */ 
+    -4.19488324163994025318330321149973224973566383682287e-17, /* twoPowerIndex1mi[15] */ 
+    -1.10867727371575753136248480661711257993643946476249e-33, /* twoPowerIndex1lo[15] */ 
+  } , 
+  { 
+    1.00271127505020252179690487537300214171409606933594e+00, /* twoPowerIndex1hi[16] */ 
+    -3.63661592869226394431650732319448247819940912156384e-17, /* twoPowerIndex1mi[16] */ 
+    -6.58076018413558386665763067745208065096307047224855e-34, /* twoPowerIndex1lo[16] */ 
+  } , 
+  { 
+    1.00288097361089523218424801598303020000457763671875e+00, /* twoPowerIndex1hi[17] */ 
+    -2.61094406324393831074545742903203024867557691172893e-17, /* twoPowerIndex1mi[17] */ 
+    1.20560913995705683042979390390212408639703633013464e-33, /* twoPowerIndex1lo[17] */ 
+  } , 
+  { 
+    1.00305070089132231103690173767972737550735473632812e+00, /* twoPowerIndex1hi[18] */ 
+    1.75307847798233211014008193947934807324617806015147e-17, /* twoPowerIndex1mi[18] */ 
+    1.13393213893456062969952574781413432615748154285102e-33, /* twoPowerIndex1lo[18] */ 
+  } , 
+  { 
+    1.00322045689634431475667497579706832766532897949219e+00, /* twoPowerIndex1hi[19] */ 
+    5.75392352562826744411122442879351687879645730521252e-17, /* twoPowerIndex1mi[19] */ 
+    -2.67723202763627633853056570968049475423332897231238e-33, /* twoPowerIndex1lo[19] */ 
+  } , 
+  { 
+    1.00339024163082268792379636579426005482673645019531e+00, /* twoPowerIndex1hi[20] */ 
+    -8.68492200511795617368964392061338881522209699276521e-18, /* twoPowerIndex1mi[20] */ 
+    -3.48402050975972235345434529928044249018150775634918e-34, /* twoPowerIndex1lo[20] */ 
+  } , 
+  { 
+    1.00356005509961931920770439319312572479248046875000e+00, /* twoPowerIndex1hi[21] */ 
+    9.49003543098177759384527648244793376993805358019830e-17, /* twoPowerIndex1mi[21] */ 
+    -2.72838479693459377473949067074824993718971708464416e-34, /* twoPowerIndex1lo[21] */ 
+  } , 
+  { 
+    1.00372989730759765159007201873464509844779968261719e+00, /* twoPowerIndex1hi[22] */ 
+    -8.71038060581842237129503222771273097866222639659196e-17, /* twoPowerIndex1mi[22] */ 
+    1.08618280977421918449964280592134822915254002216492e-33, /* twoPowerIndex1lo[22] */ 
+  } , 
+  { 
+    1.00389976825962090600796727812848985195159912109375e+00, /* twoPowerIndex1hi[23] */ 
+    3.49589169585715450145113080496294928974704413200507e-17, /* twoPowerIndex1mi[23] */ 
+    -2.94144759791575889018758341844218078845293410867033e-33, /* twoPowerIndex1lo[23] */ 
+  } , 
+  { 
+    1.00406966796055407975529760733479633927345275878906e+00, /* twoPowerIndex1hi[24] */ 
+    9.75378754984024099793268477195846557070899843396028e-17, /* twoPowerIndex1mi[24] */ 
+    5.64300142720863839874652371486135387544215443970822e-33, /* twoPowerIndex1lo[24] */ 
+  } , 
+  { 
+    1.00423959641526283625978521740762516856193542480469e+00, /* twoPowerIndex1hi[25] */ 
+    -1.05762211962928569325595987354393790031696252155330e-16, /* twoPowerIndex1mi[25] */ 
+    5.83707943855262433756426258532402998630656838432942e-33, /* twoPowerIndex1lo[25] */ 
+  } , 
+  { 
+    1.00440955362861283894915231940103694796562194824219e+00, /* twoPowerIndex1hi[26] */ 
+    4.20918873812712592966120368574870018412444102186114e-17, /* twoPowerIndex1mi[26] */ 
+    2.17971061415864797757688538084764343153482363480001e-33, /* twoPowerIndex1lo[26] */ 
+  } , 
+  { 
+    1.00457953960547174965256544965086504817008972167969e+00, /* twoPowerIndex1hi[27] */ 
+    -1.67001668575547876279593068362269006396955075031486e-17, /* twoPowerIndex1mi[27] */ 
+    8.56552273127180632250100064178508499726804497630949e-34, /* twoPowerIndex1lo[27] */ 
+  } , 
+  { 
+    1.00474955435070723019919114449294283986091613769531e+00, /* twoPowerIndex1hi[28] */ 
+    -1.62314635541245143576050143734168865049382925451905e-17, /* twoPowerIndex1mi[28] */ 
+    9.28530603331304279248127378347521992965436217888846e-35, /* twoPowerIndex1lo[28] */ 
+  } , 
+  { 
+    1.00491959786918805264122056541964411735534667968750e+00, /* twoPowerIndex1hi[29] */ 
+    2.30285392780281171183781407072193459566423534757738e-17, /* twoPowerIndex1mi[29] */ 
+    -4.94345170697772961451844215454960159293576885861471e-34, /* twoPowerIndex1lo[29] */ 
+  } , 
+  { 
+    1.00508967016578387720926457404857501387596130371094e+00, /* twoPowerIndex1hi[30] */ 
+    1.64180469767730323539044065876968510741128671646342e-17, /* twoPowerIndex1mi[30] */ 
+    -1.40120338097898451052996285664279342840562084008057e-34, /* twoPowerIndex1lo[30] */ 
+  } , 
+  { 
+    1.00525977124536503026774880709126591682434082031250e+00, /* twoPowerIndex1hi[31] */ 
+    3.72669843182841367415839881731427710949489409371967e-17, /* twoPowerIndex1mi[31] */ 
+    -6.47401139805376556406832921347318553328966160972009e-34, /* twoPowerIndex1lo[31] */ 
+  } , 
+  { 
+    1.00542990111280272635951860138447955250740051269531e+00, /* twoPowerIndex1hi[32] */ 
+    9.49918653545503175702165599813853704096085691656846e-17, /* twoPowerIndex1mi[32] */ 
+    2.69197614795285565383714012654266434015814803945559e-33, /* twoPowerIndex1lo[32] */ 
+  } , 
+  { 
+    1.00560005977296929025044391892151907086372375488281e+00, /* twoPowerIndex1hi[33] */ 
+    -8.68093131444458156819420437418787120833640771986467e-17, /* twoPowerIndex1mi[33] */ 
+    1.70120132411898592857823454488038166970266621441155e-33, /* twoPowerIndex1lo[33] */ 
+  } , 
+  { 
+    1.00577024723073704670639472169568762183189392089844e+00, /* twoPowerIndex1hi[34] */ 
+    4.00054749103011688253297776917861866454998331259826e-17, /* twoPowerIndex1mi[34] */ 
+    1.31925963209617013098908877209722537258440391267352e-33, /* twoPowerIndex1lo[34] */ 
+  } , 
+  { 
+    1.00594046349098009685008037195075303316116333007812e+00, /* twoPowerIndex1hi[35] */ 
+    7.19049911150997399545071999536183023264065701084941e-17, /* twoPowerIndex1mi[35] */ 
+    5.87388840736458866162752231275781178461761843642826e-33, /* twoPowerIndex1lo[35] */ 
+  } , 
+  { 
+    1.00611070855857298589342008199309930205345153808594e+00, /* twoPowerIndex1hi[36] */ 
+    -1.39080686710657830063564897325456873924612265621065e-17, /* twoPowerIndex1mi[36] */ 
+    -1.04608842475341479042763417006066485614641577765254e-33, /* twoPowerIndex1lo[36] */ 
+  } , 
+  { 
+    1.00628098243839092518214783922303467988967895507812e+00, /* twoPowerIndex1hi[37] */ 
+    -8.14020864257304964668281784838729787981918541118695e-17, /* twoPowerIndex1mi[37] */ 
+    9.81687621053626949463979101287162593669867055078380e-34, /* twoPowerIndex1lo[37] */ 
+  } , 
+  { 
+    1.00645128513531001424041733116609975695610046386719e+00, /* twoPowerIndex1hi[38] */ 
+    -5.76215104374953424938341851527793234314721266620465e-17, /* twoPowerIndex1mi[38] */ 
+    -2.57074696660737495074482007072094547944536206743811e-33, /* twoPowerIndex1lo[38] */ 
+  } , 
+  { 
+    1.00662161665420724077080194547306746244430541992188e+00, /* twoPowerIndex1hi[39] */ 
+    6.74527847731045679518854873240614524466814727371618e-17, /* twoPowerIndex1mi[39] */ 
+    3.78807035520293397050945635744099720111701312971531e-33, /* twoPowerIndex1lo[39] */ 
+  } , 
+  { 
+    1.00679197699996070269889969495125114917755126953125e+00, /* twoPowerIndex1hi[40] */ 
+    1.89985572403462958330039110072328316553950667129559e-17, /* twoPowerIndex1mi[40] */ 
+    -9.63431595756658515104002497950853752466876076619761e-34, /* twoPowerIndex1lo[40] */ 
+  } , 
+  { 
+    1.00696236617744894203951844247058033943176269531250e+00, /* twoPowerIndex1hi[41] */ 
+    -9.63743003231640715845365699595418727819327585110316e-17, /* twoPowerIndex1mi[41] */ 
+    5.37739172125896523173793245498965828230574349410153e-34, /* twoPowerIndex1lo[41] */ 
+  } , 
+  { 
+    1.00713278419155116694128082599490880966186523437500e+00, /* twoPowerIndex1hi[42] */ 
+    -1.25286544624539788678561179100718466970708089928402e-17, /* twoPowerIndex1mi[42] */ 
+    6.73461401738595970431440883296934068477066941591536e-34, /* twoPowerIndex1lo[42] */ 
+  } , 
+  { 
+    1.00730323104714791782043903367593884468078613281250e+00, /* twoPowerIndex1hi[43] */ 
+    3.02057888784369419361601396858156577301726732087163e-17, /* twoPowerIndex1mi[43] */ 
+    2.28748779695564659338938424768062274005093770790899e-33, /* twoPowerIndex1lo[43] */ 
+  } , 
+  { 
+    1.00747370674912040122706002875929698348045349121094e+00, /* twoPowerIndex1hi[44] */ 
+    -4.86939425860856490657306074829518805252629724182687e-17, /* twoPowerIndex1mi[44] */ 
+    -2.15005825118530979132585793750524459885823808259600e-33, /* twoPowerIndex1lo[44] */ 
+  } , 
+  { 
+    1.00764421130235026780042062455322593450546264648438e+00, /* twoPowerIndex1hi[45] */ 
+    5.22402993768745316546273304631524097955173932918745e-17, /* twoPowerIndex1mi[45] */ 
+    1.56859855755260687389551771821040360984576895950448e-33, /* twoPowerIndex1lo[45] */ 
+  } , 
+  { 
+    1.00781474471172072249203210958512499928474426269531e+00, /* twoPowerIndex1hi[46] */ 
+    -9.36154355147845590745647945463041972879607082944076e-17, /* twoPowerIndex1mi[46] */ 
+    2.73525232969860711971224663796949142049450209755900e-33, /* twoPowerIndex1lo[46] */ 
+  } , 
+  { 
+    1.00798530698211497025340577238239347934722900390625e+00, /* twoPowerIndex1hi[47] */ 
+    -8.65251323306194956904999437269495581443314540350323e-17, /* twoPowerIndex1mi[47] */ 
+    3.95202635576858744637745517221782298786195221857564e-33, /* twoPowerIndex1lo[47] */ 
+  } , 
+  { 
+    1.00815589811841754830368245166027918457984924316406e+00, /* twoPowerIndex1hi[48] */ 
+    -3.25205875608430806088583499076669170064325943797327e-17, /* twoPowerIndex1mi[48] */ 
+    2.46355206137317856028163445564386882918089954604456e-33, /* twoPowerIndex1lo[48] */ 
+  } , 
+  { 
+    1.00832651812551388204042268625926226377487182617188e+00, /* twoPowerIndex1hi[49] */ 
+    -9.91723226806091428304981281566311898208154515630026e-17, /* twoPowerIndex1mi[49] */ 
+    -5.54888559019883709197982155449053331751526019176611e-33, /* twoPowerIndex1lo[49] */ 
+  } , 
+  { 
+    1.00849716700828984095039686508243903517723083496094e+00, /* twoPowerIndex1hi[50] */ 
+    -7.13604740416252276802131825807759910735798752142063e-17, /* twoPowerIndex1mi[50] */ 
+    4.98539917129953776836361552714923793985513981224277e-33, /* twoPowerIndex1lo[50] */ 
+  } , 
+  { 
+    1.00866784477163240474340000218944624066352844238281e+00, /* twoPowerIndex1hi[51] */ 
+    -1.72686837122432199045769102324975071816159176955755e-17, /* twoPowerIndex1mi[51] */ 
+    1.49699250027049460850618457278328039699137666243513e-33, /* twoPowerIndex1lo[51] */ 
+  } , 
+  { 
+    1.00883855142042944130764681176515296101570129394531e+00, /* twoPowerIndex1hi[52] */ 
+    -6.61995469367394011396161169543794432105455894234207e-17, /* twoPowerIndex1mi[52] */ 
+    -1.37180394060118324236386341775148249159351409372011e-33, /* twoPowerIndex1lo[52] */ 
+  } , 
+  { 
+    1.00900928695956926262056185805704444646835327148438e+00, /* twoPowerIndex1hi[53] */ 
+    3.56545690151302037529536411250390721695546928174132e-17, /* twoPowerIndex1mi[53] */ 
+    -3.04973969952342772070810129193852120178103073824881e-33, /* twoPowerIndex1lo[53] */ 
+  } , 
+  { 
+    1.00918005139394151292719925550045445561408996582031e+00, /* twoPowerIndex1hi[54] */ 
+    3.71731001370881785990046067286312459291233468170260e-17, /* twoPowerIndex1mi[54] */ 
+    2.33846700487585833881864340821781209486455210644683e-33, /* twoPowerIndex1lo[54] */ 
+  } , 
+  { 
+    1.00935084472843628056182296859333291649818420410156e+00, /* twoPowerIndex1hi[55] */ 
+    7.06257240682552768409771521622687712943771198652841e-17, /* twoPowerIndex1mi[55] */ 
+    -2.69254581845265407066861039619808678678301305791490e-33, /* twoPowerIndex1lo[55] */ 
+  } , 
+  { 
+    1.00952166696794476408172158699017018079757690429688e+00, /* twoPowerIndex1hi[56] */ 
+    -1.43214123034288192889278157016818203958577074101904e-17, /* twoPowerIndex1mi[56] */ 
+    1.18343254028162625925516501493235924385911429505127e-33, /* twoPowerIndex1lo[56] */ 
+  } , 
+  { 
+    1.00969251811735860613339355040807276964187622070312e+00, /* twoPowerIndex1hi[57] */ 
+    1.56681880131341096294393603553275561732689802958880e-17, /* twoPowerIndex1mi[57] */ 
+    -7.81531085085694011629938080711347719818453468652371e-34, /* twoPowerIndex1lo[57] */ 
+  } , 
+  { 
+    1.00986339818157078163096684875199571251869201660156e+00, /* twoPowerIndex1hi[58] */ 
+    -1.10436957803936884179513517801130489140214758906396e-16, /* twoPowerIndex1mi[58] */ 
+    2.26009746193166539328485913376118607218426838997178e-33, /* twoPowerIndex1lo[58] */ 
+  } , 
+  { 
+    1.01003430716547448753317439695820212364196777343750e+00, /* twoPowerIndex1hi[59] */ 
+    -5.76731742716039801926309676866051407637690838590278e-17, /* twoPowerIndex1mi[59] */ 
+    -2.78217177127226696492717790709599913537289113429847e-33, /* twoPowerIndex1lo[59] */ 
+  } , 
+  { 
+    1.01020524507396425306637866015080362558364868164062e+00, /* twoPowerIndex1hi[60] */ 
+    4.83548497844038273903057565303994337100835235326315e-18, /* twoPowerIndex1mi[60] */ 
+    2.61454310671247390892899439237254056446677108734060e-34, /* twoPowerIndex1lo[60] */ 
+  } , 
+  { 
+    1.01037621191193527359075687854783609509468078613281e+00, /* twoPowerIndex1hi[61] */ 
+    7.01512128971544209746870624992521939688820868468409e-17, /* twoPowerIndex1mi[61] */ 
+    -5.58161827166019262256128049263563333632096890407031e-33, /* twoPowerIndex1lo[61] */ 
+  } , 
+  { 
+    1.01054720768428363264490599249256774783134460449219e+00, /* twoPowerIndex1hi[62] */ 
+    7.16180287361957384315239192590148379997244337618299e-17, /* twoPowerIndex1mi[62] */ 
+    -2.02563561553844543425647289447795720504633264470840e-34, /* twoPowerIndex1lo[62] */ 
+  } , 
+  { 
+    1.01071823239590607990123771742219105362892150878906e+00, /* twoPowerIndex1hi[63] */ 
+    1.05046591340840499506734116899577087874840087102554e-16, /* twoPowerIndex1mi[63] */ 
+    2.18415845005431430458109722226729544983351542501345e-33, /* twoPowerIndex1lo[63] */ 
+  } }; 
+ 
+static const tPi_t twoPowerIndex2[64] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2hi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2mi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2lo[0] */ 
+  } , 
+  { 
+    1.01088928605170047525518839393043890595436096191406e+00, /* twoPowerIndex2hi[1] */ 
+    -1.52347786033685771762884896542837070154735103108242e-17, /* twoPowerIndex2mi[1] */ 
+    -1.20527773363982029579667170059568717373235495431222e-33, /* twoPowerIndex2lo[1] */ 
+  } , 
+  { 
+    1.02189714865411662714222984504885971546173095703125e+00, /* twoPowerIndex2hi[2] */ 
+    5.10922502897344389358977529484899213711118891193073e-17, /* twoPowerIndex2mi[2] */ 
+    7.88422656496927442160138555121324022911581088833303e-34, /* twoPowerIndex2lo[2] */ 
+  } , 
+  { 
+    1.03302487902122841489926940994337201118469238281250e+00, /* twoPowerIndex2hi[3] */ 
+    7.60083887402708848935418174694583720224989620170520e-18, /* twoPowerIndex2mi[3] */ 
+    4.17547660336499599627565312970423748685953776150432e-34, /* twoPowerIndex2lo[3] */ 
+  } , 
+  { 
+    1.04427378242741375480306942336028441786766052246094e+00, /* twoPowerIndex2hi[4] */ 
+    8.55188970553796489217080231819249267647451456689049e-17, /* twoPowerIndex2mi[4] */ 
+    -4.33079108057472301914865017639792677602990877842667e-33, /* twoPowerIndex2lo[4] */ 
+  } , 
+  { 
+    1.05564517836055715704901558638084679841995239257812e+00, /* twoPowerIndex2hi[5] */ 
+    1.75932573877209198413667791203269037000656546957040e-18, /* twoPowerIndex2mi[5] */ 
+    -1.30396724977978376996223394717384715710429730879060e-34, /* twoPowerIndex2lo[5] */ 
+  } , 
+  { 
+    1.06714040067682369716806078940862789750099182128906e+00, /* twoPowerIndex2hi[6] */ 
+    -7.89985396684158212226333428391940791349522867645719e-17, /* twoPowerIndex2mi[6] */ 
+    2.48773924323047906697979838020484860096229450391065e-33, /* twoPowerIndex2lo[6] */ 
+  } , 
+  { 
+    1.07876079775711986030728439800441265106201171875000e+00, /* twoPowerIndex2hi[7] */ 
+    -6.65666043605659260344452997720816205593857378631714e-17, /* twoPowerIndex2mi[7] */ 
+    -3.65812580131923690564246115619834327696213789275798e-33, /* twoPowerIndex2lo[7] */ 
+  } , 
+  { 
+    1.09050773266525768967483145388541743159294128417969e+00, /* twoPowerIndex2hi[8] */ 
+    -3.04678207981247114696551170541257032193091359539676e-17, /* twoPowerIndex2mi[8] */ 
+    2.01705487848848619150139275849815038703452970938356e-33, /* twoPowerIndex2lo[8] */ 
+  } , 
+  { 
+    1.10238258330784089089604549371870234608650207519531e+00, /* twoPowerIndex2hi[9] */ 
+    5.26603687157069438656191942579725322612448063343618e-17, /* twoPowerIndex2mi[9] */ 
+    6.45805397536721410708490440561131106837447579889036e-34, /* twoPowerIndex2lo[9] */ 
+  } , 
+  { 
+    1.11438674259589243220602838846389204263687133789062e+00, /* twoPowerIndex2hi[10] */ 
+    1.04102784568455709549461912557590544266030834754874e-16, /* twoPowerIndex2mi[10] */ 
+    1.47570167344000313963428137759389241586071635800536e-33, /* twoPowerIndex2lo[10] */ 
+  } , 
+  { 
+    1.12652161860824184813623105583246797323226928710938e+00, /* twoPowerIndex2hi[11] */ 
+    5.16585675879545673703180814711785602957687143067887e-17, /* twoPowerIndex2mi[11] */ 
+    -5.65916686170716220063974592097473710424342945964456e-34, /* twoPowerIndex2lo[11] */ 
+  } , 
+  { 
+    1.13878863475669156457570352358743548393249511718750e+00, /* twoPowerIndex2hi[12] */ 
+    8.91281267602540777782023808215740339330966556723006e-17, /* twoPowerIndex2mi[12] */ 
+    -2.00741463283249448727846279877956608996968961458494e-33, /* twoPowerIndex2lo[12] */ 
+  } , 
+  { 
+    1.15118922995298267331065744656370952725410461425781e+00, /* twoPowerIndex2hi[13] */ 
+    3.25071021886382721197741051783883831627922464835734e-17, /* twoPowerIndex2mi[13] */ 
+    8.89091931637927159755660842958283684863470887791663e-34, /* twoPowerIndex2lo[13] */ 
+  } , 
+  { 
+    1.16372485877757747552152522985124960541725158691406e+00, /* twoPowerIndex2hi[14] */ 
+    3.82920483692409349872159816102110059722238312159091e-17, /* twoPowerIndex2mi[14] */ 
+    7.19709831987676327409679245188515478735702972651365e-34, /* twoPowerIndex2lo[14] */ 
+  } , 
+  { 
+    1.17639699165028122074261318630306050181388854980469e+00, /* twoPowerIndex2hi[15] */ 
+    5.55420325421807896276684328889766000203735373777665e-17, /* twoPowerIndex2mi[15] */ 
+    -1.48842929343368511961710849782815827921712348302943e-33, /* twoPowerIndex2lo[15] */ 
+  } , 
+  { 
+    1.18920711500272102689734765590401366353034973144531e+00, /* twoPowerIndex2hi[16] */ 
+    3.98201523146564611098029654755651628169309930562261e-17, /* twoPowerIndex2mi[16] */ 
+    1.14195965688545340101163692105448367710482873511510e-33, /* twoPowerIndex2lo[16] */ 
+  } , 
+  { 
+    1.20215673145270307564658196497475728392601013183594e+00, /* twoPowerIndex2hi[17] */ 
+    6.64498149925230124489270286991048474954122885069094e-17, /* twoPowerIndex2mi[17] */ 
+    -3.85685255336907654452995968372311171004938395576078e-33, /* twoPowerIndex2lo[17] */ 
+  } , 
+  { 
+    1.21524735998046895524282717815367504954338073730469e+00, /* twoPowerIndex2hi[18] */ 
+    -7.71263069268148813091257203929615917892526180720328e-17, /* twoPowerIndex2mi[18] */ 
+    4.71720614288499816545262331753743129502653902881319e-33, /* twoPowerIndex2lo[18] */ 
+  } , 
+  { 
+    1.22848053610687002468182527081808075308799743652344e+00, /* twoPowerIndex2hi[19] */ 
+    -1.89878163130252995311948719658078062677878185721429e-17, /* twoPowerIndex2mi[19] */ 
+    6.18469453652103848424687212656185051850860290411013e-34, /* twoPowerIndex2lo[19] */ 
+  } , 
+  { 
+    1.24185781207348400201340155035723000764846801757812e+00, /* twoPowerIndex2hi[20] */ 
+    4.65802759183693679122616767654141683800114091774588e-17, /* twoPowerIndex2mi[20] */ 
+    -2.31439910378785985764079190411324307370918857557275e-33, /* twoPowerIndex2lo[20] */ 
+  } , 
+  { 
+    1.25538075702469109629078047873917967081069946289062e+00, /* twoPowerIndex2hi[21] */ 
+    -6.71138982129687841852821870522008036246320680675952e-18, /* twoPowerIndex2mi[21] */ 
+    -5.76846264325028352862497671463784812858487529613818e-35, /* twoPowerIndex2lo[21] */ 
+  } , 
+  { 
+    1.26905095719173321988648694969015195965766906738281e+00, /* twoPowerIndex2hi[22] */ 
+    2.66793213134218609522998616502989391061315227839969e-18, /* twoPowerIndex2mi[22] */ 
+    -5.01723570938719050333027020376949013774930719140568e-35, /* twoPowerIndex2lo[22] */ 
+  } , 
+  { 
+    1.28287001607877826359072059858590364456176757812500e+00, /* twoPowerIndex2hi[23] */ 
+    1.71359491824356096814175768900864730928374054987756e-17, /* twoPowerIndex2mi[23] */ 
+    7.25131491282819461838977871983760669047046080773478e-34, /* twoPowerIndex2lo[23] */ 
+  } , 
+  { 
+    1.29683955465100964055125132290413603186607360839844e+00, /* twoPowerIndex2hi[24] */ 
+    2.53825027948883149592910250791940344234383392801619e-17, /* twoPowerIndex2mi[24] */ 
+    1.68678246461832500334243039646153124282288438904092e-34, /* twoPowerIndex2lo[24] */ 
+  } , 
+  { 
+    1.31096121152476441373835314152529463171958923339844e+00, /* twoPowerIndex2hi[25] */ 
+    -7.18153613551945385697245613605196258733040544776187e-17, /* twoPowerIndex2mi[25] */ 
+    -2.12629266743969557140434977160228094057588798528197e-34, /* twoPowerIndex2lo[25] */ 
+  } , 
+  { 
+    1.32523664315974132321684919588733464479446411132812e+00, /* twoPowerIndex2hi[26] */ 
+    -2.85873121003886137327027220806882812126373511580572e-17, /* twoPowerIndex2mi[26] */ 
+    7.62021406397260431456821182703024347950927217409368e-34, /* twoPowerIndex2lo[26] */ 
+  } , 
+  { 
+    1.33966752405330291608720472140703350305557250976562e+00, /* twoPowerIndex2hi[27] */ 
+    8.92728259483173198426255486589831591472085466011828e-17, /* twoPowerIndex2mi[27] */ 
+    -7.69657983531899254540849298389093495155758992415150e-34, /* twoPowerIndex2lo[27] */ 
+  } , 
+  { 
+    1.35425554693689265128853094211081042885780334472656e+00, /* twoPowerIndex2hi[28] */ 
+    7.70094837980298946162338224151128414915778826123523e-17, /* twoPowerIndex2mi[28] */ 
+    -2.24074836437395028882100810844688282941385619430371e-33, /* twoPowerIndex2lo[28] */ 
+  } , 
+  { 
+    1.36900242297459051599162194179370999336242675781250e+00, /* twoPowerIndex2hi[29] */ 
+    9.59379791911884877255545693637832999511204427845953e-17, /* twoPowerIndex2mi[29] */ 
+    -4.88674958784947176959607858061848292445663702071206e-33, /* twoPowerIndex2lo[29] */ 
+  } , 
+  { 
+    1.38390988196383202257777611521305516362190246582031e+00, /* twoPowerIndex2hi[30] */ 
+    -6.77051165879478628715737183479431151106043475381389e-17, /* twoPowerIndex2mi[30] */ 
+    5.25954134785524271676320971772030766300829615286373e-34, /* twoPowerIndex2lo[30] */ 
+  } , 
+  { 
+    1.39897967253831123635166022722842171788215637207031e+00, /* twoPowerIndex2hi[31] */ 
+    -9.61421320905132307233280072508933760749140842467170e-17, /* twoPowerIndex2mi[31] */ 
+    3.97465190077505680357285219692652769985214754647576e-33, /* twoPowerIndex2lo[31] */ 
+  } , 
+  { 
+    1.41421356237309514547462185873882845044136047363281e+00, /* twoPowerIndex2hi[32] */ 
+    -9.66729331345291345105469972976694765012981670542977e-17, /* twoPowerIndex2mi[32] */ 
+    4.13867530869941356271900493210877889450985709540127e-33, /* twoPowerIndex2lo[32] */ 
+  } , 
+  { 
+    1.42961333839197002326670826732879504561424255371094e+00, /* twoPowerIndex2hi[33] */ 
+    -1.20316424890536551791763281075597751007148682598677e-17, /* twoPowerIndex2mi[33] */ 
+    3.96492532243389364766543780399018506300743370884771e-35, /* twoPowerIndex2lo[33] */ 
+  } , 
+  { 
+    1.44518080697704665027458759141154587268829345703125e+00, /* twoPowerIndex2hi[34] */ 
+    -3.02375813499398731939978948265280760393682335269040e-17, /* twoPowerIndex2mi[34] */ 
+    -1.77301195820250091791088617662298487007284882395542e-33, /* twoPowerIndex2lo[34] */ 
+  } , 
+  { 
+    1.46091779418064704465507475106278434395790100097656e+00, /* twoPowerIndex2hi[35] */ 
+    -5.60037718607521580013156831807759453639536208267684e-17, /* twoPowerIndex2mi[35] */ 
+    -4.80948804890004400970317146361816382779746350931714e-33, /* twoPowerIndex2lo[35] */ 
+  } , 
+  { 
+    1.47682614593949934622685304930200800299644470214844e+00, /* twoPowerIndex2hi[36] */ 
+    -3.48399455689279579579151031868718147769491495422105e-17, /* twoPowerIndex2mi[36] */ 
+    -1.21157704523090580028169713170353136148082368354920e-34, /* twoPowerIndex2lo[36] */ 
+  } , 
+  { 
+    1.49290772829126483500772337720263749361038208007812e+00, /* twoPowerIndex2hi[37] */ 
+    1.41929201542840357707378184476885202767753055101956e-17, /* twoPowerIndex2mi[37] */ 
+    2.77326329344780505247628358108799734324783290873618e-34, /* twoPowerIndex2lo[37] */ 
+  } , 
+  { 
+    1.50916442759342284141155232646269723773002624511719e+00, /* twoPowerIndex2hi[38] */ 
+    -1.01645532775429503910501990740249618370059871055172e-16, /* twoPowerIndex2mi[38] */ 
+    2.04191706967403438352422808603561166583202022922508e-34, /* twoPowerIndex2lo[38] */ 
+  } , 
+  { 
+    1.52559815074453841710067081294255331158638000488281e+00, /* twoPowerIndex2hi[39] */ 
+    -1.10249417123425609363148008789604625195179292613569e-16, /* twoPowerIndex2mi[39] */ 
+    -2.99382882637137806007903782085057425945683820190483e-33, /* twoPowerIndex2lo[39] */ 
+  } , 
+  { 
+    1.54221082540794074411394376511452719569206237792969e+00, /* twoPowerIndex2hi[40] */ 
+    7.94983480969762085616103882937991564856794389991833e-17, /* twoPowerIndex2mi[40] */ 
+    -9.15995637410036729585390444224530830478731117122757e-34, /* twoPowerIndex2lo[40] */ 
+  } , 
+  { 
+    1.55900440023783692922165755589958280324935913085938e+00, /* twoPowerIndex2hi[41] */ 
+    3.78120705335752750188190562589679090842557793649900e-17, /* twoPowerIndex2mi[41] */ 
+    5.94230221045385633407443935898656310894518533675204e-35, /* twoPowerIndex2lo[41] */ 
+  } , 
+  { 
+    1.57598084510788649659218663146020844578742980957031e+00, /* twoPowerIndex2hi[42] */ 
+    -1.01369164712783039807957177429288269249745537889645e-17, /* twoPowerIndex2mi[42] */ 
+    5.43913851556220712785038586461119929989856637311730e-34, /* twoPowerIndex2lo[42] */ 
+  } , 
+  { 
+    1.59314215134226699888131406623870134353637695312500e+00, /* twoPowerIndex2hi[43] */ 
+    -1.00944065423119637216151952902063201612012779755882e-16, /* twoPowerIndex2mi[43] */ 
+    4.60848399034962572477662350836868643017178368092553e-33, /* twoPowerIndex2lo[43] */ 
+  } , 
+  { 
+    1.61049033194925428347232809755951166152954101562500e+00, /* twoPowerIndex2hi[44] */ 
+    2.47071925697978878522451183466139791436957933053447e-17, /* twoPowerIndex2mi[44] */ 
+    1.06968477888935897586507304780358756526593706030066e-33, /* twoPowerIndex2lo[44] */ 
+  } , 
+  { 
+    1.62802742185734783397776936908485367894172668457031e+00, /* twoPowerIndex2hi[45] */ 
+    -6.71295508470708408629558620522800193343463268850872e-17, /* twoPowerIndex2mi[45] */ 
+    1.86124288813399584090278118171650158752835667500490e-33, /* twoPowerIndex2lo[45] */ 
+  } , 
+  { 
+    1.64575547815396494577555586147354915738105773925781e+00, /* twoPowerIndex2hi[46] */ 
+    -1.01256799136747726037875241569662212149731136230039e-16, /* twoPowerIndex2mi[46] */ 
+    -6.73838498803664271467304077725442401461793880458369e-34, /* twoPowerIndex2lo[46] */ 
+  } , 
+  { 
+    1.66367658032673637613640948984539136290550231933594e+00, /* twoPowerIndex2hi[47] */ 
+    5.89099269671309967045155789620226639428173542900082e-17, /* twoPowerIndex2mi[47] */ 
+    2.37785299276765025315795732233641105960161859663372e-33, /* twoPowerIndex2lo[47] */ 
+  } , 
+  { 
+    1.68179283050742900407215074665145948529243469238281e+00, /* twoPowerIndex2hi[48] */ 
+    8.19901002058149652012724391042374107310082144797238e-17, /* twoPowerIndex2mi[48] */ 
+    5.10351519472809316392686812760480457926425713861784e-33, /* twoPowerIndex2lo[48] */ 
+  } , 
+  { 
+    1.70010635371852347752508194389520213007926940917969e+00, /* twoPowerIndex2hi[49] */ 
+    -8.02371937039770024588528464451482959960563128920877e-18, /* twoPowerIndex2mi[49] */ 
+    4.50894675051846528463958043437010583905518288996850e-34, /* twoPowerIndex2lo[49] */ 
+  } , 
+  { 
+    1.71861929812247793414314855908742174506187438964844e+00, /* twoPowerIndex2hi[50] */ 
+    -1.85138041826311098821086356969536380719870481925638e-17, /* twoPowerIndex2mi[50] */ 
+    6.41562962530571009881963439719259893730039269925891e-34, /* twoPowerIndex2lo[50] */ 
+  } , 
+  { 
+    1.73733383527370621735030908894259482622146606445312e+00, /* twoPowerIndex2hi[51] */ 
+    3.16438929929295694659064288262436215220581330791541e-17, /* twoPowerIndex2mi[51] */ 
+    2.46812086524635182684409036079744664142196277491485e-33, /* twoPowerIndex2lo[51] */ 
+  } , 
+  { 
+    1.75625216037329945351075366488657891750335693359375e+00, /* twoPowerIndex2hi[52] */ 
+    2.96014069544887330703087179323550026749650613893620e-17, /* twoPowerIndex2mi[52] */ 
+    1.23348227448930022362949427574612725745479960698002e-33, /* twoPowerIndex2lo[52] */ 
+  } , 
+  { 
+    1.77537649252652118825324123463360592722892761230469e+00, /* twoPowerIndex2hi[53] */ 
+    6.42973179655657203395602172161574258202382771355994e-17, /* twoPowerIndex2mi[53] */ 
+    -3.05903038196122316059732104267589318807211463677414e-33, /* twoPowerIndex2lo[53] */ 
+  } , 
+  { 
+    1.79470907500310716820024481421569362282752990722656e+00, /* twoPowerIndex2hi[54] */ 
+    1.82274584279120867697625715862678123206602563412216e-17, /* twoPowerIndex2mi[54] */ 
+    1.42176433874694971095041068746172287320972847635154e-33, /* twoPowerIndex2lo[54] */ 
+  } , 
+  { 
+    1.81425217550039885594514998956583440303802490234375e+00, /* twoPowerIndex2hi[55] */ 
+    -9.96953153892034881983229632097342495877571562964276e-17, /* twoPowerIndex2mi[55] */ 
+    -5.86224914377491774994695195482808191103744720514440e-33, /* twoPowerIndex2lo[55] */ 
+  } , 
+  { 
+    1.83400808640934243065601094713201746344566345214844e+00, /* twoPowerIndex2hi[56] */ 
+    3.28310722424562720351405816760294702167288526703081e-17, /* twoPowerIndex2mi[56] */ 
+    -6.42508934795304248095271046696049734574532048424330e-34, /* twoPowerIndex2lo[56] */ 
+  } , 
+  { 
+    1.85397912508338547077357816306175664067268371582031e+00, /* twoPowerIndex2hi[57] */ 
+    9.76188749072759353840331670682321086158335176176729e-17, /* twoPowerIndex2mi[57] */ 
+    4.61481577205566482307976345637533484680898060020057e-33, /* twoPowerIndex2lo[57] */ 
+  } , 
+  { 
+    1.87416763411029996255763307999586686491966247558594e+00, /* twoPowerIndex2hi[58] */ 
+    -6.12276341300414256163658402373731493255704994623650e-17, /* twoPowerIndex2mi[58] */ 
+    5.28588559402507397372575432425046614667899080733482e-33, /* twoPowerIndex2lo[58] */ 
+  } , 
+  { 
+    1.89457598158696560730618330126162618398666381835938e+00, /* twoPowerIndex2hi[59] */ 
+    3.40340353521652967060147928999507962708632290832738e-17, /* twoPowerIndex2mi[59] */ 
+    1.72475099549343225430579028439403217279441019556785e-33, /* twoPowerIndex2lo[59] */ 
+  } , 
+  { 
+    1.91520656139714740007207183225546032190322875976562e+00, /* twoPowerIndex2hi[60] */ 
+    -1.06199460561959626376283195555328606320260702029334e-16, /* twoPowerIndex2mi[60] */ 
+    -3.05776975679132548538006102719337626149343902119718e-33, /* twoPowerIndex2lo[60] */ 
+  } , 
+  { 
+    1.93606179349229434727419629780342802405357360839844e+00, /* twoPowerIndex2hi[61] */ 
+    1.03323859606763257447769151803649788699571393339738e-16, /* twoPowerIndex2mi[61] */ 
+    6.05301367682062275405664830597304146844867569493449e-33, /* twoPowerIndex2lo[61] */ 
+  } , 
+  { 
+    1.95714412417540017941064434126019477844238281250000e+00, /* twoPowerIndex2hi[62] */ 
+    8.96076779103666776760155050762912042076490756639488e-17, /* twoPowerIndex2mi[62] */ 
+    -9.63267661361827588458686334472185443533033181828620e-34, /* twoPowerIndex2lo[62] */ 
+  } , 
+  { 
+    1.97845602638795092786949680885300040245056152343750e+00, /* twoPowerIndex2hi[63] */ 
+    4.03887531092781665749784154795462589642365074083484e-17, /* twoPowerIndex2mi[63] */ 
+    3.58120371667786223934924900740488031476290303118010e-34, /* twoPowerIndex2lo[63] */ 
+  } }; 
+ 
+
+
diff --git a/src/crlibm/exp_build_coeffs/exp_fast_table.c b/src/crlibm/exp_build_coeffs/exp_fast_table.c
new file mode 100644
index 0000000..e88a9b0
--- /dev/null
+++ b/src/crlibm/exp_build_coeffs/exp_fast_table.c
@@ -0,0 +1,125 @@
+#include <stdio.h>
+
+#include <gmp.h>
+#include <mpfr.h>
+
+
+/*
+ * This program builds the tables used in the first step of the exponential
+ * Auteur : David Defour in a hurry             Date : 15/06/2003  
+ *
+ * build command:
+  gcc -I/usr/local/include/ -L/usr/local/lib/  exp_firststep_table.c -o exp_firststep_table -lgmp  -lmpfr 
+ */
+
+
+/* don't forget to check that */
+#define LITTLE_ENDIAN
+
+#ifdef LITTLE_ENDIAN
+#define HI(x) *(1+(int*)&x)
+#define LO(x) *(int*)&x
+#else
+#define HI(x) *(int*)&x
+#define LO(x) *(1+(int*)&x)
+#endif
+
+
+/* This is the number of bits considered to address the table. It can
+   be changed by the command-line second argument, but should stay to
+   8 for the exp as distributed */
+
+int PREC=8;
+
+
+
+#define CC_MPFR(d1, d2, a, res, rest, f, A, B){ \
+    mpfr_exp(res, a, GMP_RNDN); \
+    d1 = mpfr_get_d(res, GMP_RNDN);\
+    mpfr_set_d(rest, d1, GMP_RNDN);\
+    mpfr_sub(res, res, rest, GMP_RNDN);\
+    d2 = mpfr_get_d(res, GMP_RNDN); \
+    fprintf(f,"\t {{{0x%.8x, 0x%.8x}}, {{0x%.8x, 0x%.8x}}}", A(d1), B(d1), A(d2), B(d2));}
+
+
+void compute(FILE *f){
+  mpfr_t a, b, step, res, rest;
+  double d, d1, d2;
+  int i, end;
+
+  /* Memory allocation */
+  mpfr_init2(a,   300);
+  mpfr_init2(b,   300);
+  mpfr_init2(res, 300);
+  mpfr_init2(rest,300);
+  mpfr_init2(step,300);
+
+
+  /* Set step to 2^-PREC */
+  mpfr_set_ui(step, 1, GMP_RNDN);
+  mpfr_div_2ui(step, step, PREC, GMP_RNDN);
+
+  /* Compute bound of the interval [a, b] */
+  mpfr_set_ui(res, 2, GMP_RNDN);
+  mpfr_log(a, res, GMP_RNDN); 
+  mpfr_div_2ui(a, a, 1, GMP_RNDN);
+
+  mpfr_mul_2ui(a, a, PREC, GMP_RNDN);
+  mpfr_round(a, a);
+  d = mpfr_get_d(a, GMP_RNDN);
+  mpfr_div_2ui(a, a, PREC, GMP_RNDN);
+
+  mpfr_neg(a, a, GMP_RNDN);
+  mpfr_set(b, a, GMP_RNDN);
+  
+  end = (2 * d) + 1; /* +1 because this range is centered in 0 and '0' need to be taken into account */
+
+  fprintf(f,"static const scs_db_number tab_exp[%d][2] = { \n",end);
+  fprintf(f,"#ifdef WORDS_BIGENDIAN\n");
+
+  for(i=0; i<(end-1) ; i++){
+    CC_MPFR(d1, d2, a, res, rest, f, HI, LO);
+    fprintf(f,", \n");
+    mpfr_add(a, a, step, GMP_RNDN);
+  }
+  CC_MPFR(d1, d2, a, res, rest, f, HI, LO);
+
+  fprintf(f,"\n#else \n");
+  mpfr_set(a, b, GMP_RNDN);
+  for(i=0; i<(end-1) ; i++){
+    CC_MPFR(d1, d2, a, res, rest, f, LO, HI);
+    fprintf(f,", \n");
+    mpfr_add(a, a, step, GMP_RNDN);
+  }
+  CC_MPFR(d1, d2, a, res, rest, f, LO, HI);
+
+  fprintf(f,"\n#endif \n}; \n\n");
+
+
+  mpfr_clear(a);  
+  mpfr_clear(b);
+  mpfr_clear(res); 
+  mpfr_clear(rest); 
+  mpfr_clear(step);
+} 
+
+
+
+int main (int argc, char *argv[]) 
+{ 
+  FILE *f;
+
+  if (argc == 3) 
+    PREC = atoi(argv[2]);
+  
+  f = fopen (argv[1], "w");
+  if (f== NULL){
+    fprintf(stderr," Cannot open file %s  \n", argv[1]);    exit(1);
+  }
+
+  compute(f);
+
+  fclose(f);
+  return 0;
+}
+
diff --git a/src/crlibm/expm1-standalone.c b/src/crlibm/expm1-standalone.c
new file mode 100644
index 0000000..42981da
--- /dev/null
+++ b/src/crlibm/expm1-standalone.c
@@ -0,0 +1,119 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "expm1.h"
+
+#define AVOID_FMA 0
+
+
+extern void expm1_direct_td(double *expm1h, double *expm1m, double *expm1l, 
+	         	    double x, double xSqHalfh, double xSqHalfl, double xSqh, double xSql, int expoX);
+
+extern void expm1_common_td(double *expm1h, double *expm1m, double *expm1l, 
+			    double rh, double rm, double rl, 
+			    double tbl1h, double tbl1m, double tbl1l, 
+			    double tbl2h, double tbl2m, double tbl2l, 
+			    int M);
+
+
+/* Function expm1_13
+
+   Computes exp(x)-1 with an accuracy of 120 bits (128 for |x| <= 2^(-5)) as
+
+   (expm1h + expm1m + expm1l) \approx exp(x) - 1
+
+   There is no special case handling. 
+
+   |x| is supposed to be greater than 2^(-53)
+
+   x is supposed to be in the range -37...709
+
+   The triple-double exph + expm + expl is non-overlapping.
+
+*/
+
+void expm1_13(double *expm1h, double *expm1m, double *expm1l, double x) {
+  db_number xdb, shiftedXMultdb;
+  int xIntHi, expoX, k, M, index1, index2;
+  double xSqh, xSql, xSqHalfh, xSqHalfl;
+  double t1, t2;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double xMultLog2InvMult2L, shiftedXMult, kd, rh, rm, rl;
+  double tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l;
+
+  
+  xdb.d = x; 
+  xIntHi = xdb.i[HI] & 0x7fffffff;
+
+  /* Test if we have |x| <= 1/4-1/2ulp(1/4) for knowing if we use exp(x) or approximate directly */
+
+  if (xIntHi < DIRECTINTERVALBOUND) {
+    /* We approximate expm1 directly after a range reduction as follows
+
+       expm1(x) = (expm1(x/2) + 2) * expm1(x/2)
+
+       We perform the range reduction in such a way that finally |x| < 1/32 
+    */
+
+    /* Extract the exponent of |x| and add 5 (2^5 = 32) */
+    expoX = ((xIntHi & 0x7ff00000) >> 20) - (1023 - 5);
+    
+    /* If this particularily biased exponent expoX is negative, we are already less than 1/32 */
+    if (expoX >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb.i[HI] += (-expoX-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi = xdb.i[HI] & 0x7fffffff;
+      x = xdb.d;
+    }
+    
+    /* Here, we have always |x| < 1/32 */
+
+
+    /* Double precision evaluation steps and one double-double step */
+
+    Mul12(&xSqh,&xSql,x,x);
+    xSqHalfh = 0.5 * xSqh;
+    xSqHalfl = 0.5 * xSql;
+
+    expm1_direct_td(expm1h, expm1m, expm1l, x, xSqHalfh, xSqHalfl, xSqh, xSql, expoX);
+       
+  } else {
+
+    /* If we are here, we can use expm1(x) = exp(x) - 1 */
+    
+    /* Range reduction - exact part: compute k as double and as int */
+    
+    xMultLog2InvMult2L = x * log2InvMult2L;
+    shiftedXMult = xMultLog2InvMult2L + shiftConst;
+    kd = shiftedXMult - shiftConst;
+    shiftedXMultdb.d = shiftedXMult;
+    k = shiftedXMultdb.i[LO];
+    M = k >> 12;
+    index1 = k & INDEXMASK1;
+    index2 = (k & INDEXMASK2) >> 6;
+    
+    
+    Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1 = x + msLog2Div2LMultKh;
+    Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+    Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+    
+    tbl1h = twoPowerIndex1[index1].hi;
+    tbl1m = twoPowerIndex1[index1].mi;
+    tbl2h = twoPowerIndex2[index2].hi;
+    tbl2m = twoPowerIndex2[index2].mi;
+    tbl1l = twoPowerIndex1[index1].lo;
+    tbl2l = twoPowerIndex2[index2].lo;
+    
+    expm1_common_td(expm1h, expm1m, expm1l, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l, M); 
+    
+  }
+}
diff --git a/src/crlibm/expm1.c b/src/crlibm/expm1.c
new file mode 100644
index 0000000..83c63f5
--- /dev/null
+++ b/src/crlibm/expm1.c
@@ -0,0 +1,2515 @@
+/*
+ * Correctly rounded expm1 = e^x - 1
+ *
+ * Author : Christoph Lauter (ENS Lyon)
+ * One bug fix by Florent de Dinechin
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "expm1.h"
+#ifdef BUILD_INTERVAL_FUNCTIONS
+#include "interval.h"
+#endif
+
+
+
+#define DEBUG 0
+
+
+void expm1_direct_td(double *expm1h, double *expm1m, double *expm1l, 
+		     double x, double xSqHalfh, double xSqHalfl, double xSqh, double xSql, int expoX) {
+  double highPoly, tt1h, t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l;
+  double tt6h, tt6m, tt6l, t7h, t7m, t7l, lowPolyh, lowPolym, lowPolyl;
+  double fullHighPolyh, fullHighPolym, fullHighPolyl, polyh, polym, polyl;
+  double xCubeh, xCubem, xCubel, tt7h, tt7m, tt7l, t8h, t8m, t8l;
+  double expm1hover, expm1mover, expm1lover;
+  double r1h, r1m, r1l, r2h, r2m, r2l, r3h, r3m, r3l;
+  double rr1h, rr1m, rr1l, rr2h, rr2m, rr2l, rr3h, rr3m, rr3l;
+  double fullHighPolyhover, fullHighPolymover, fullHighPolylover;
+
+  /* Double precision evaluation steps */
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    highPoly = FMA(FMA(FMA(FMA(accuDirectpolyC15h ,x,accuDirectpolyC14h),x,accuDirectpolyC13h),x,
+                               accuDirectpolyC12h),x,accuDirectpolyC11h);
+#else
+    highPoly = accuDirectpolyC11h + x * (accuDirectpolyC12h + x * (accuDirectpolyC13h + x * (
+	       accuDirectpolyC14h + x *  accuDirectpolyC15h)));
+#endif
+
+    tt1h = x * highPoly;
+
+    /* Triple-double steps for x + x^2/2 and x^3*/
+
+    Add123(&lowPolyh,&lowPolym,&lowPolyl,x,xSqHalfh,xSqHalfl);                     /* infty - 52/53 */
+    Mul123(&xCubeh,&xCubem,&xCubel,x,xSqh,xSql);                                   /* 154 - 47/53 */
+
+
+    /* Double-double evaluation steps */
+
+    Add12(t1h,t1l,accuDirectpolyC10h,tt1h);
+    
+    MulAdd212(&t2h,&t2l,accuDirectpolyC9h,accuDirectpolyC9m,x,t1h,t1l);
+    MulAdd212(&t3h,&t3l,accuDirectpolyC8h,accuDirectpolyC8m,x,t2h,t2l);
+    MulAdd212(&t4h,&t4l,accuDirectpolyC7h,accuDirectpolyC7m,x,t3h,t3l);
+    MulAdd212(&t5h,&t5l,accuDirectpolyC6h,accuDirectpolyC6m,x,t4h,t4l);
+    MulAdd212(&t6h,&t6l,accuDirectpolyC5h,accuDirectpolyC5m,x,t5h,t5l);
+
+    /* Triple-double evaluation steps */
+
+    Mul123(&tt6h,&tt6m,&tt6l,x,t6h,t6l);                                          /* 154 - 47/53 */
+    Add233(&t7h,&t7m,&t7l,accuDirectpolyC4h,accuDirectpolyC4m,tt6h,tt6m,tt6l);    /* 150 - 43/53 */
+   
+    Mul133(&tt7h,&tt7m,&tt7l,x,t7h,t7m,t7l);                                      /* 143 - 38/53 */
+    Add33(&t8h,&t8m,&t8l,accuDirectpolyC3h,accuDirectpolyC3m,accuDirectpolyC3l,tt7h,tt7m,tt7l); /* 135 - 33/53 */
+
+    Mul33(&fullHighPolyhover,&fullHighPolymover,&fullHighPolylover,xCubeh,xCubem,xCubel,t8h,t8m,t8l); /* 130 - 29/53 */
+
+    Renormalize3(&fullHighPolyh,&fullHighPolym,&fullHighPolyl,
+		 fullHighPolyhover,fullHighPolymover,fullHighPolylover);                     /* infty - 52/53 */
+
+    Add33(&polyh,&polym,&polyl,lowPolyh,lowPolym,lowPolyl,fullHighPolyh,fullHighPolym,fullHighPolyl);
+                                                                                             /* 149 - 47/53 */
+
+    /* Reconstruction steps */
+
+    /* If we have not performed any range reduction, we have no reconstruction to do */
+    if (expoX >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+                                                                             
+      Add133(&r1h,&r1m,&r1l,2,polyh,polym,polyl);                             
+      Mul33(&rr1h,&rr1m,&rr1l,r1h,r1m,r1l,polyh,polym,polyl);
+      if (expoX >= 1) {
+
+	/* Second reconstruction step */
+	Add133(&r2h,&r2m,&r2l,2,rr1h,rr1m,rr1l);
+	Mul33(&rr2h,&rr2m,&rr2l,r2h,r2m,r2l,rr1h,rr1m,rr1l);
+
+	if (expoX >= 2) {
+
+	  /* Third reconstruction step */
+	  Add133(&r3h,&r3m,&r3l,2,rr2h,rr2m,rr2l);
+	  Mul33(&rr3h,&rr3m,&rr3l,r3h,r3m,r3l,rr2h,rr2m,rr2l);
+
+	  /* expoX may be maximally 2 */
+
+	  expm1hover = rr3h;
+	  expm1mover = rr3m;
+	  expm1lover = rr3l;
+
+	} else {
+	  expm1hover = rr2h;
+	  expm1mover = rr2m;
+	  expm1lover = rr2l;
+	}
+
+      } else {
+	expm1hover = rr1h;
+	expm1mover = rr1m;
+	expm1lover = rr1l;
+      }
+
+    } else {
+      expm1hover = polyh;
+      expm1mover = polym;
+      expm1lover = polyl;
+    }
+
+    /* Renormalize before returning */
+
+    Renormalize3(expm1h,expm1m,expm1l,expm1hover,expm1mover,expm1lover);
+}
+
+void expm1_common_td(double *expm1h, double *expm1m, double *expm1l, 
+		     double rh, double rm, double rl, 
+		     double tbl1h, double tbl1m, double tbl1l, 
+		     double tbl2h, double tbl2m, double tbl2l, 
+		     int M) {
+  double highPoly, highPolyMulth, highPolyMultm, highPolyMultl;
+  double rhSquareh, rhSquarel, rhSquareHalfh, rhSquareHalfl;
+  double rhCubeh, rhCubem, rhCubel;
+  double t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5, t6;
+  double lowPolyh, lowPolym, lowPolyl;
+  double ph, pm, pl, phnorm, pmnorm, rmlMultPh, rmlMultPl;
+  double qh, ql, fullPolyh, fullPolym, fullPolyl;
+  double polyWithTbl1h, polyWithTbl1m, polyWithTbl1l;
+  double polyAddOneh,polyAddOnem,polyAddOnel;
+  double polyWithTablesh, polyWithTablesm, polyWithTablesl;
+  double exph, expm, expl, expm1hover, expm1mover, expm1lover;
+  db_number polyWithTableshdb, polyWithTablesmdb, polyWithTablesldb;
+
+  /* Polynomial approximation - double precision steps */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(accuCommonpolyC7h,rh,accuCommonpolyC6h),rh,accuCommonpolyC5h);
+#else
+  highPoly = accuCommonpolyC5h + rh * (accuCommonpolyC6h + rh * accuCommonpolyC7h);
+#endif
+
+  /* Polynomial approximation - double-double precision steps */
+
+  Mul12(&t1h,&t1l,rh,highPoly);
+  Add22(&t2h,&t2l,accuCommonpolyC4h,accuCommonpolyC4m,t1h,t1l);
+  Mul122(&t3h,&t3l,rh,t2h,t2l);
+  Add22(&t4h,&t4l,accuCommonpolyC3h,accuCommonpolyC3m,t3h,t3l);
+
+  Mul12(&rhSquareh,&rhSquarel,rh,rh);
+  Mul123(&rhCubeh,&rhCubem,&rhCubel,rh,rhSquareh,rhSquarel);
+
+  rhSquareHalfh = 0.5 * rhSquareh;
+  rhSquareHalfl = 0.5 * rhSquarel;  
+
+  /* Polynomial approximation - triple-double precision steps */
+
+  Renormalize3(&lowPolyh,&lowPolym,&lowPolyl,rh,rhSquareHalfh,rhSquareHalfl);
+
+  Mul233(&highPolyMulth,&highPolyMultm,&highPolyMultl,t4h,t4l,rhCubeh,rhCubem,rhCubel);
+
+  Add33(&ph,&pm,&pl,lowPolyh,lowPolym,lowPolyl,highPolyMulth,highPolyMultm,highPolyMultl);
+
+  /* Reconstruction */
+
+  Add12(phnorm,pmnorm,ph,pm);
+  Mul22(&rmlMultPh,&rmlMultPl,rm,rl,phnorm,pmnorm);
+  Add22(&qh,&ql,rm,rl,rmlMultPh,rmlMultPl);
+
+  Add233Cond(&fullPolyh,&fullPolym,&fullPolyl,qh,ql,ph,pm,pl);
+  Add12(polyAddOneh,t5,1,fullPolyh);
+  Add12Cond(polyAddOnem,t6,t5,fullPolym);
+  polyAddOnel = t6 + fullPolyl;
+  Mul33(&polyWithTbl1h,&polyWithTbl1m,&polyWithTbl1l,tbl1h,tbl1m,tbl1l,polyAddOneh,polyAddOnem,polyAddOnel);
+  Mul33(&polyWithTablesh,&polyWithTablesm,&polyWithTablesl,
+	tbl2h,tbl2m,tbl2l,
+	polyWithTbl1h,polyWithTbl1m,polyWithTbl1l);
+
+  /* Multiplication by 2^(M) 
+
+     We perform it in integer to overcome the non-representability of 2^(1024) 
+     This case is possible for M = 1024 and polyWithTablesh < 1
+
+     The overlap in the triple-double polyWithTables[hml] stays unchanged.
+
+  */
+
+  polyWithTableshdb.d = polyWithTablesh;
+  polyWithTablesmdb.d = polyWithTablesm;
+  polyWithTablesldb.d = polyWithTablesl;
+
+  /* TODO FIXME probably at least the first of these tests is useless,
+     but I leave this to Christoph to check it. Let us be
+     conservative. Florent  */
+  if(polyWithTableshdb.d!=0)
+    polyWithTableshdb.i[HI] += M << 20;
+  if(polyWithTablesmdb.d!=0)
+    polyWithTablesmdb.i[HI] += M << 20;
+  if(polyWithTablesldb.d!=0)
+    polyWithTablesldb.i[HI] += M << 20;
+
+  exph = polyWithTableshdb.d;
+  expm = polyWithTablesmdb.d;
+  expl = polyWithTablesldb.d;
+
+  /* Subtraction of -1 
+     
+     We use a conditional Add133 
+  */
+
+  Add133Cond(&expm1hover,&expm1mover,&expm1lover,-1,exph,expm,expl);
+
+  /* Renormalization */    
+
+  Renormalize3(expm1h,expm1m,expm1l,expm1hover,expm1mover,expm1lover);
+
+}
+
+
+double expm1_rn(double x) {
+  db_number xdb, shiftedXMultdb, polyTblhdb, polyTblmdb;
+  int xIntHi, expoX, k, M, index1, index2;
+  double highPoly, tt1h, t1h, t1l, xSqh, xSql, xSqHalfh, xSqHalfl, xCubeh, xCubel, t2h, t2l, templ, tt3h, tt3l;
+  double polyh, polyl, expm1h, expm1m, expm1l;
+  double r1h, r1l, r1t, rr1h, rr1l;
+  double r2h, r2l, r2t, rr2h, rr2l;
+  double r3h, r3l, r3t, rr3h, rr3l;
+  double xMultLog2InvMult2L, shiftedXMult, kd, s1, s2, s3, s4, s5, rh, rm, rl;
+  double rhSquare, rhC3, rhSquareHalf, monomialCube, rhFour, monomialFour;
+  double tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l;
+  double highPolyWithSquare, tablesh, tablesl, t8, t9, t10, t11, t12, t13;
+  double exph, expm, t1, t2, t3;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double middlePoly, doublePoly;
+
+
+  xdb.d = x; 
+
+  /* Strip off the sign of x for the following tests */
+
+  xIntHi = xdb.i[HI] & 0x7fffffff;
+
+  /* Test if we are so small that we can return (a corrected) x as correct rounding */
+  if (xIntHi < RETURNXBOUND) {
+    return x;
+  }
+
+
+  /* Filter out special cases like overflow, -1 in result, infinities and NaNs 
+     The filters are not sharp, we have positive arguments that flow through
+  */
+  if (xIntHi >= SIMPLEOVERFLOWBOUND) {
+    /* Test if we are +/-inf or NaN */
+    if (xIntHi >= 0x7ff00000) {
+      /* Test if NaN */
+      if (((xIntHi & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* NaN */
+	return x+x;  /* return NaN */
+      }
+      /* Test if +inf or -inf */
+      if (xdb.i[HI] > 0) {
+	/* +inf */
+	return x+x;  /* return +inf */
+      }
+      
+      /* If we are here, we are -inf */
+      return -1.0;
+    }
+
+    /* If we are here, we are overflowed or a common case that flows through */
+
+    /* Test if we are actually overflowed */
+    if (x > OVERFLOWBOUND) {
+      return LARGEST * LARGEST;  /* return +inf and set flag */
+    }
+  }
+  
+  /* Test if we know already that we are -1.0 (+ correction depending on rounding mode) in result */
+  if (x < MINUSONEBOUND) {
+    return -1.0;
+  }
+
+  /* Test if we have |x| <= 1/4-1/2ulp(1/4) for knowing if we use exp(x) or approximate directly */
+
+  if (xIntHi < DIRECTINTERVALBOUND) {
+    /* We approximate expm1 directly after a range reduction as follows
+
+       expm1(x) = (expm1(x/2) + 2) * expm1(x/2)
+
+       We perform the range reduction in such a way that finally |x| < 1/32 
+    */
+
+    /* Extract the exponent of |x| and add 5 (2^5 = 32) */
+    expoX = ((xIntHi & 0x7ff00000) >> 20) - (1023 - 5);
+    
+    /* If this particularily biased exponent expoX is negative, we are already less than 1/32 */
+    if (expoX >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb.i[HI] += (-expoX-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi = xdb.i[HI] & 0x7fffffff;
+      x = xdb.d;
+    }
+    
+    /* Here, we have always |x| < 1/32 */
+
+
+    /* Double precision evaluation steps and one double-double step */
+
+    Mul12(&xSqh,&xSql,x,x);
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    middlePoly = FMA(quickDirectpolyC5h,x,quickDirectpolyC4h);
+#else
+    middlePoly = quickDirectpolyC4h + x * quickDirectpolyC5h;
+#endif
+
+    doublePoly = middlePoly;
+
+    /* Special path: for small |x| we can truncate the polynomial */
+
+    if (xIntHi > SPECIALINTERVALBOUND) {
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(quickDirectpolyC9h ,x,quickDirectpolyC8h),x,
+                             quickDirectpolyC7h),x,quickDirectpolyC6h);
+#else
+      highPoly = quickDirectpolyC6h + x * (quickDirectpolyC7h + x * (
+	         quickDirectpolyC8h + x *  quickDirectpolyC9h));
+#endif
+
+      highPolyWithSquare = xSqh * highPoly;
+
+      doublePoly = middlePoly + highPolyWithSquare;
+
+    }
+    
+    /* Double-double evaluation steps */
+    tt1h = x * doublePoly;
+
+    xSqHalfh = 0.5 * xSqh;
+    xSqHalfl = 0.5 * xSql;
+    Add12(t2h,templ,x,xSqHalfh);
+    t2l = templ + xSqHalfl;
+    
+    Add12(t1h,t1l,quickDirectpolyC3h,tt1h);
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt3h,&tt3l,xCubeh,xCubel,t1h,t1l);
+
+    Add22(&polyh,&polyl,t2h,t2l,tt3h,tt3l);
+
+    /* Reconstruction */
+
+    /* If we have not performed any range reduction, we have no reconstruction to do */
+    if (expoX >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+      Add12(r1h,r1t,2,polyh);
+      r1l = r1t + polyl;
+      Mul22(&rr1h,&rr1l,r1h,r1l,polyh,polyl);
+
+      if (expoX >= 1) {
+
+	/* Second reconstruction step */
+	Add12(r2h,r2t,2,rr1h);
+	r2l = r2t + rr1l;
+	Mul22(&rr2h,&rr2l,r2h,r2l,rr1h,rr1l);
+
+	if (expoX >= 2) {
+
+	  /* Third reconstruction step */
+	  Add12(r3h,r3t,2,rr2h);
+	  r3l = r3t + rr2l;
+	  Mul22(&rr3h,&rr3l,r3h,r3l,rr2h,rr2l);
+	  
+	  /* expoX may be maximally 2 */
+
+	  expm1h = rr3h;
+	  expm1m = rr3l;
+
+	} else {
+	  expm1h = rr2h;
+	  expm1m = rr2l;
+	}
+
+      } else {
+	expm1h = rr1h;
+	expm1m = rr1l;
+      }
+
+    } else {
+      expm1h = polyh;
+      expm1m = polyl;
+    }
+
+    /* Rounding test */
+    if(expm1h == (expm1h + (expm1m * ROUNDCSTDIRECTRN)))
+     return expm1h;
+   else 
+     {
+
+#if DEBUG 
+       printf("Launch accurate phase (direct interval)\n");
+#endif
+
+       expm1_direct_td(&expm1h, &expm1m, &expm1l, x, xSqHalfh, xSqHalfl, xSqh, xSql, expoX);
+      
+       ReturnRoundToNearest3(expm1h, expm1m, expm1l);
+
+     } /* Accurate phase launched */
+
+    /* We cannot be here, since we return in all cases before */
+  }
+
+  /* If we are here, we can use expm1(x) = exp(x) - 1 */
+
+  /* Range reduction - exact part: compute k as double and as int */
+
+  xMultLog2InvMult2L = x * log2InvMult2L;
+  shiftedXMult = xMultLog2InvMult2L + shiftConst;
+  kd = shiftedXMult - shiftConst;
+  shiftedXMultdb.d = shiftedXMult;
+  k = shiftedXMultdb.i[LO];
+  M = k >> 12;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> 6;
+
+  /* Range reduction - part affected by error - must be redone in accurate phase */
+  Mul12(&s1,&s2,msLog2Div2Lh,kd);
+  s3 = kd * msLog2Div2Lm;
+  s4 = s2 + s3; 
+  s5 = x + s1;
+  Add12Cond(rh,rm,s5,s4);
+
+  /* Table reads - read only two double-doubles by now */
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+
+  /* Quick phase starts here */
+
+  rhSquare = rh * rh;
+  rhC3 = quickCommonpolyC3h * rh;
+
+  rhSquareHalf = 0.5 * rhSquare;
+  monomialCube = rhC3 * rhSquare;
+  rhFour = rhSquare * rhSquare;
+
+  monomialFour = quickCommonpolyC4h * rhFour;
+  
+  highPoly = monomialCube + monomialFour;
+
+  highPolyWithSquare = rhSquareHalf + highPoly;
+  
+  /* Reconstruction: integration of table values */
+  
+  Mul22(&tablesh,&tablesl,tbl1h,tbl1m,tbl2h,tbl2m);
+
+  t8 = rm + highPolyWithSquare;
+  t9 = rh + t8;
+
+  t10 = tablesh * t9;
+  
+  Add12(t11,t12,tablesh,t10);
+  t13 = t12 + tablesl;
+  Add12(polyTblhdb.d,polyTblmdb.d,t11,t13);
+  
+  /* Reconstruction: multiplication by 2^M */
+
+  /* Implement the multiplication by addition to overcome the
+     problem of the non-representability of 2^1024 (M = 1024)
+     This case is possible if polyTblhdb.d < 1
+  */
+  
+  polyTblhdb.i[HI] += M << 20;
+  if(polyTblmdb.d!=0.0) /* predicted true, but it happens for x=-4.1588039009762204, thanks Morten */
+	  polyTblmdb.i[HI] += M << 20;
+
+  exph = polyTblhdb.d;
+  expm = polyTblmdb.d;
+
+  /* Subtraction of 1 
+
+     Testing if the operation is necessary is more expensive than 
+     performing it in any case.
+
+     We may cancellate at most 2 bits in the subtraction for 
+     arguments 1/4 <= x <= ln(2) (0.25 <= x <= 0.69) 
+     We must therefore use conditional Add12s
+
+     Since we perform a subtraction, we may not have addition overflow towards +inf
+
+  */
+
+  Add12Cond(t1,t2,-1,exph);
+  t3 = t2 + expm;
+  Add12Cond(expm1h,expm1m,t1,t3);
+
+
+  /* Rounding test */
+  if(expm1h == (expm1h + (expm1m * ROUNDCSTCOMMONRN))) {
+    return expm1h;
+  } else {
+    /* Rest of argument reduction for accurate phase */
+    
+    Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1 = x + msLog2Div2LMultKh;
+    Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+    Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+    
+    /* Table reads for accurate phase */
+    tbl1l = twoPowerIndex1[index1].lo;
+    tbl2l = twoPowerIndex2[index2].lo;
+
+#if DEBUG 
+       printf("Launch accurate phase (common interval)\n");
+#endif
+    
+    /* Call accurate phase */
+    expm1_common_td(&expm1h, &expm1m, &expm1l, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l, M); 
+    
+    /* Final rounding */
+
+    ReturnRoundToNearest3(expm1h, expm1m, expm1l);
+  } /* Accurate phase launched */
+  
+  /* We cannot be here since we return before in any case */
+}
+
+double expm1_rd(double x) {
+  db_number xdb, shiftedXMultdb, polyTblhdb, polyTblmdb;
+  int xIntHi, expoX, k, M, index1, index2;
+  double highPoly, tt1h, t1h, t1l, xSqh, xSql, xSqHalfh, xSqHalfl, xCubeh, xCubel, t2h, t2l, templ, tt3h, tt3l;
+  double polyh, polyl, expm1h, expm1m, expm1l;
+  double r1h, r1l, r1t, rr1h, rr1l;
+  double r2h, r2l, r2t, rr2h, rr2l;
+  double r3h, r3l, r3t, rr3h, rr3l;
+  double xMultLog2InvMult2L, shiftedXMult, kd, s1, s2, s3, s4, s5, rh, rm, rl;
+  double rhSquare, rhC3, rhSquareHalf, monomialCube, rhFour, monomialFour;
+  double tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l;
+  double highPolyWithSquare, tablesh, tablesl, t8, t9, t10, t11, t12, t13;
+  double exph, expm, t1, t2, t3;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double middlePoly, doublePoly;
+
+  xdb.d = x; 
+
+  /* Strip off the sign of x for the following tests */
+
+  xIntHi = xdb.i[HI] & 0x7fffffff;
+
+  /* Test if we are so small that we can return (a corrected) x as correct rounding */
+  if (xIntHi < RETURNXBOUND) {
+    /* The only algebraic result is 0 for x = +/- 0; in this case, we can return x = +/- 0
+       The truncation rest x^2/2 + x^3/6 + ... is always positive 
+       but less than 1 ulp in this case, so we round down by returning x
+    */
+    return x;
+  }
+
+
+  /* Filter out special cases like overflow, -1 in result, infinities and NaNs 
+     The filters are not sharp, we have positive arguments that flow through
+  */
+  if (xIntHi >= SIMPLEOVERFLOWBOUND) {
+    /* Test if we are +/-inf or NaN */
+    if (xIntHi >= 0x7ff00000) {
+      /* Test if NaN */
+      if (((xIntHi & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* NaN */
+	return x+x;  /* return NaN */
+      }
+      /* Test if +inf or -inf */
+      if (xdb.i[HI] > 0) {
+	/* +inf */
+	return x+x;  /* return +inf */
+      }
+      
+      /* If we are here, we are -inf */
+      return -1.0;
+    }
+
+    /* If we are here, we are overflowed or a common case that flows through */
+
+    /* Test if we are actually overflowed */
+    if (x > OVERFLOWBOUND) {
+      /* We would be overflowed but as we are rounding downwards
+	 the nearest number lesser than the exact result is the greatest 
+	 normal. In any case, we must raise the inexact flag.
+      */
+      return LARGEST * (1.0 + SMALLEST);
+    }
+  }
+  
+  /* Test if we know already that we are -1.0 (+ correction depending on rounding mode) in result */
+  if (x < MINUSONEBOUND) {
+    /* We round down, so we are -1.0 */
+    return -1.0;
+  }
+
+  /* Test if we have |x| <= 1/4-1/2ulp(1/4) for knowing if we use exp(x) or approximate directly */
+
+  if (xIntHi < DIRECTINTERVALBOUND) {
+    /* We approximate expm1 directly after a range reduction as follows
+
+       expm1(x) = (expm1(x/2) + 2) * expm1(x/2)
+
+       We perform the range reduction in such a way that finally |x| < 1/32 
+    */
+
+    /* Extract the exponent of |x| and add 5 (2^5 = 32) */
+    expoX = ((xIntHi & 0x7ff00000) >> 20) - (1023 - 5);
+    
+    /* If this particularily biased exponent expoX is negative, we are already less than 1/32 */
+    if (expoX >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb.i[HI] += (-expoX-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi = xdb.i[HI] & 0x7fffffff;
+      x = xdb.d;
+    }
+    
+    /* Here, we have always |x| < 1/32 */
+
+
+    /* Double precision evaluation steps and one double-double step */
+
+    Mul12(&xSqh,&xSql,x,x);
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    middlePoly = FMA(quickDirectpolyC5h,x,quickDirectpolyC4h);
+#else
+    middlePoly = quickDirectpolyC4h + x * quickDirectpolyC5h;
+#endif
+
+    doublePoly = middlePoly;
+
+    /* Special path: for small |x| we can truncate the polynomial */
+
+    if (xIntHi > SPECIALINTERVALBOUND) {
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(quickDirectpolyC9h ,x,quickDirectpolyC8h),x,
+                             quickDirectpolyC7h),x,quickDirectpolyC6h);
+#else
+      highPoly = quickDirectpolyC6h + x * (quickDirectpolyC7h + x * (
+	         quickDirectpolyC8h + x *  quickDirectpolyC9h));
+#endif
+
+      highPolyWithSquare = xSqh * highPoly;
+
+      doublePoly = middlePoly + highPolyWithSquare;
+
+    }
+    
+    /* Double-double evaluation steps */
+    tt1h = x * doublePoly;
+
+    xSqHalfh = 0.5 * xSqh;
+    xSqHalfl = 0.5 * xSql;
+    Add12(t2h,templ,x,xSqHalfh);
+    t2l = templ + xSqHalfl;
+    
+    Add12(t1h,t1l,quickDirectpolyC3h,tt1h);
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt3h,&tt3l,xCubeh,xCubel,t1h,t1l);
+
+    Add22(&polyh,&polyl,t2h,t2l,tt3h,tt3l);
+
+    /* Reconstruction */
+
+    /* If we have not performed any range reduction, we have no reconstruction to do */
+    if (expoX >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+      Add12(r1h,r1t,2,polyh);
+      r1l = r1t + polyl;
+      Mul22(&rr1h,&rr1l,r1h,r1l,polyh,polyl);
+
+      if (expoX >= 1) {
+
+	/* Second reconstruction step */
+	Add12(r2h,r2t,2,rr1h);
+	r2l = r2t + rr1l;
+	Mul22(&rr2h,&rr2l,r2h,r2l,rr1h,rr1l);
+
+	if (expoX >= 2) {
+
+	  /* Third reconstruction step */
+	  Add12(r3h,r3t,2,rr2h);
+	  r3l = r3t + rr2l;
+	  Mul22(&rr3h,&rr3l,r3h,r3l,rr2h,rr2l);
+	  
+	  /* expoX may be maximally 2 */
+
+	  expm1h = rr3h;
+	  expm1m = rr3l;
+
+	} else {
+	  expm1h = rr2h;
+	  expm1m = rr2l;
+	}
+
+      } else {
+	expm1h = rr1h;
+	expm1m = rr1l;
+      }
+
+    } else {
+      expm1h = polyh;
+      expm1m = polyl;
+    }
+
+    /* Rounding test */
+    TEST_AND_RETURN_RD(expm1h, expm1m, ROUNDCSTDIRECTRD);
+    {
+      expm1_direct_td(&expm1h, &expm1m, &expm1l, x, xSqHalfh, xSqHalfl, xSqh, xSql, expoX);
+      
+      ReturnRoundDownwards3(expm1h, expm1m, expm1l);
+      
+    } /* Accurate phase launched */
+
+    /* We cannot be here, since we return in all cases before */
+  }
+
+  /* If we are here, we can use expm1(x) = exp(x) - 1 */
+
+  /* Range reduction - exact part: compute k as double and as int */
+
+  xMultLog2InvMult2L = x * log2InvMult2L;
+  shiftedXMult = xMultLog2InvMult2L + shiftConst;
+  kd = shiftedXMult - shiftConst;
+  shiftedXMultdb.d = shiftedXMult;
+  k = shiftedXMultdb.i[LO];
+  M = k >> 12;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> 6;
+
+  /* Range reduction - part affected by error - must be redone in accurate phase */
+  Mul12(&s1,&s2,msLog2Div2Lh,kd);
+  s3 = kd * msLog2Div2Lm;
+  s4 = s2 + s3; 
+  s5 = x + s1;
+  Add12Cond(rh,rm,s5,s4);
+
+  /* Table reads - read only two double-doubles by now */
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+
+  /* Quick phase starts here */
+
+  rhSquare = rh * rh;
+  rhC3 = quickCommonpolyC3h * rh;
+
+  rhSquareHalf = 0.5 * rhSquare;
+  monomialCube = rhC3 * rhSquare;
+  rhFour = rhSquare * rhSquare;
+
+  monomialFour = quickCommonpolyC4h * rhFour;
+  
+  highPoly = monomialCube + monomialFour;
+
+  highPolyWithSquare = rhSquareHalf + highPoly;
+  
+  /* Reconstruction: integration of table values */
+  
+  Mul22(&tablesh,&tablesl,tbl1h,tbl1m,tbl2h,tbl2m);
+
+  t8 = rm + highPolyWithSquare;
+  t9 = rh + t8;
+
+  t10 = tablesh * t9;
+  
+  Add12(t11,t12,tablesh,t10);
+  t13 = t12 + tablesl;
+  Add12(polyTblhdb.d,polyTblmdb.d,t11,t13);
+  
+  /* Reconstruction: multiplication by 2^M */
+
+  /* Implement the multiplication by addition to overcome the
+     problem of the non-representability of 2^1024 (M = 1024)
+     This case is possible if polyTblhdb.d < 1
+  */
+  
+  polyTblhdb.i[HI] += M << 20;
+  if(polyTblmdb.d!=0.0) /* predicted true, but it happens for x=-4.1588039009762204, thanks Morten */
+	  polyTblmdb.i[HI] += M << 20;
+
+  exph = polyTblhdb.d;
+  expm = polyTblmdb.d;
+
+  /* Subtraction of 1 
+
+     Testing if the operation is necessary is more expensive than 
+     performing it in any case.
+
+     We may cancellate at most 2 bits in the subtraction for 
+     arguments 1/4 <= x <= ln(2) (0.25 <= x <= 0.69) 
+     We must therefore use conditional Add12s
+
+     Since we perform a subtraction, we may not have addition overflow towards +inf
+
+  */
+
+  Add12Cond(t1,t2,-1,exph);
+  t3 = t2 + expm;
+  Add12Cond(expm1h,expm1m,t1,t3);
+
+
+  /* Rounding test */
+  TEST_AND_RETURN_RD(expm1h, expm1m, ROUNDCSTCOMMONRD);
+  {
+    /* Rest of argument reduction for accurate phase */
+    
+    Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1 = x + msLog2Div2LMultKh;
+    Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+    Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+    
+    /* Table reads for accurate phase */
+    tbl1l = twoPowerIndex1[index1].lo;
+    tbl2l = twoPowerIndex2[index2].lo;
+    
+    /* Call accurate phase */
+    expm1_common_td(&expm1h, &expm1m, &expm1l, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l, M); 
+    
+    /* Final rounding */
+
+    ReturnRoundDownwards3(expm1h, expm1m, expm1l);
+  } /* Accurate phase launched */
+  
+  /* We cannot be here since we return before in any case */
+}
+
+double expm1_ru(double x) {
+  db_number xdb, shiftedXMultdb, polyTblhdb, polyTblmdb;
+  int xIntHi, expoX, k, M, index1, index2;
+  double highPoly, tt1h, t1h, t1l, xSqh, xSql, xSqHalfh, xSqHalfl, xCubeh, xCubel, t2h, t2l, templ, tt3h, tt3l;
+  double polyh, polyl, expm1h, expm1m, expm1l;
+  double r1h, r1l, r1t, rr1h, rr1l;
+  double r2h, r2l, r2t, rr2h, rr2l;
+  double r3h, r3l, r3t, rr3h, rr3l;
+  double xMultLog2InvMult2L, shiftedXMult, kd, s1, s2, s3, s4, s5, rh, rm, rl;
+  double rhSquare, rhC3, rhSquareHalf, monomialCube, rhFour, monomialFour;
+  double tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l;
+  double highPolyWithSquare, tablesh, tablesl, t8, t9, t10, t11, t12, t13;
+  double exph, expm, t1, t2, t3;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double middlePoly, doublePoly;
+
+  xdb.d = x; 
+
+  /* Strip off the sign of x for the following tests */
+
+  xIntHi = xdb.i[HI] & 0x7fffffff;
+
+  /* Test if we are so small that we can return (a corrected) x as correct rounding */
+  if (xIntHi < RETURNXBOUND) {
+    /* The only algebraic result is 0 for x = +/-0; in this case, we return x = +/-0
+       The truncation rest x^2/2 + x^3/6 + ... is always positive 
+       but less than 1 ulp in this case, so we round by adding 1 ulp 
+    */
+    
+    if (x == 0.0) return x;
+
+    if (xdb.i[HI] & 0x80000000) {
+      /* x is negative 
+	 We add 1 ulp by subtracting 1 in long
+      */
+      xdb.l--;
+    } else {
+      /* x is positive 
+	 We add 1 ulp by adding 1 in long
+      */
+      xdb.l++;
+    }
+    return xdb.d;
+  }
+
+
+  /* Filter out special cases like overflow, -1 in result, infinities and NaNs 
+     The filters are not sharp, we have positive arguments that flow through
+  */
+  if (xIntHi >= SIMPLEOVERFLOWBOUND) {
+    /* Test if we are +/-inf or NaN */
+    if (xIntHi >= 0x7ff00000) {
+      /* Test if NaN */
+      if (((xIntHi & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* NaN */
+	return x+x;  /* return NaN */
+      }
+      /* Test if +inf or -inf */
+      if (xdb.i[HI] > 0) {
+	/* +inf */
+	return x+x;  /* return +inf */
+      }
+      
+      /* If we are here, we are -inf */
+      return -1.0;
+    }
+
+    /* If we are here, we are overflowed or a common case that flows through */
+
+    /* Test if we are actually overflowed */
+    if (x > OVERFLOWBOUND) {
+      return LARGEST * LARGEST;  /* return +inf and set flag */
+    }
+  }
+  
+  /* Test if we know already that we are -1.0 (+ correction depending on rounding mode) in result */
+  if (x < MINUSONEBOUND) {
+    /* Round up so we are -1.0 + 1ulp */
+    return MINUSONEPLUSONEULP;
+  }
+
+  /* Test if we have |x| <= 1/4-1/2ulp(1/4) for knowing if we use exp(x) or approximate directly */
+
+  if (xIntHi < DIRECTINTERVALBOUND) {
+    /* We approximate expm1 directly after a range reduction as follows
+
+       expm1(x) = (expm1(x/2) + 2) * expm1(x/2)
+
+       We perform the range reduction in such a way that finally |x| < 1/32 
+    */
+
+    /* Extract the exponent of |x| and add 5 (2^5 = 32) */
+    expoX = ((xIntHi & 0x7ff00000) >> 20) - (1023 - 5);
+    
+    /* If this particularily biased exponent expoX is negative, we are already less than 1/32 */
+    if (expoX >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb.i[HI] += (-expoX-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi = xdb.i[HI] & 0x7fffffff;
+      x = xdb.d;
+    }
+    
+    /* Here, we have always |x| < 1/32 */
+
+
+    /* Double precision evaluation steps and one double-double step */
+
+    Mul12(&xSqh,&xSql,x,x);
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    middlePoly = FMA(quickDirectpolyC5h,x,quickDirectpolyC4h);
+#else
+    middlePoly = quickDirectpolyC4h + x * quickDirectpolyC5h;
+#endif
+
+    doublePoly = middlePoly;
+
+    /* Special path: for small |x| we can truncate the polynomial */
+
+    if (xIntHi > SPECIALINTERVALBOUND) {
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(quickDirectpolyC9h ,x,quickDirectpolyC8h),x,
+                             quickDirectpolyC7h),x,quickDirectpolyC6h);
+#else
+      highPoly = quickDirectpolyC6h + x * (quickDirectpolyC7h + x * (
+	         quickDirectpolyC8h + x *  quickDirectpolyC9h));
+#endif
+
+      highPolyWithSquare = xSqh * highPoly;
+
+      doublePoly = middlePoly + highPolyWithSquare;
+
+    }
+    
+    /* Double-double evaluation steps */
+    tt1h = x * doublePoly;
+
+    xSqHalfh = 0.5 * xSqh;
+    xSqHalfl = 0.5 * xSql;
+    Add12(t2h,templ,x,xSqHalfh);
+    t2l = templ + xSqHalfl;
+    
+    Add12(t1h,t1l,quickDirectpolyC3h,tt1h);
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt3h,&tt3l,xCubeh,xCubel,t1h,t1l);
+
+    Add22(&polyh,&polyl,t2h,t2l,tt3h,tt3l);
+
+    /* Reconstruction */
+
+    /* If we have not performed any range reduction, we have no reconstruction to do */
+    if (expoX >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+      Add12(r1h,r1t,2,polyh);
+      r1l = r1t + polyl;
+      Mul22(&rr1h,&rr1l,r1h,r1l,polyh,polyl);
+
+      if (expoX >= 1) {
+
+	/* Second reconstruction step */
+	Add12(r2h,r2t,2,rr1h);
+	r2l = r2t + rr1l;
+	Mul22(&rr2h,&rr2l,r2h,r2l,rr1h,rr1l);
+
+	if (expoX >= 2) {
+
+	  /* Third reconstruction step */
+	  Add12(r3h,r3t,2,rr2h);
+	  r3l = r3t + rr2l;
+	  Mul22(&rr3h,&rr3l,r3h,r3l,rr2h,rr2l);
+	  
+	  /* expoX may be maximally 2 */
+
+	  expm1h = rr3h;
+	  expm1m = rr3l;
+
+	} else {
+	  expm1h = rr2h;
+	  expm1m = rr2l;
+	}
+
+      } else {
+	expm1h = rr1h;
+	expm1m = rr1l;
+      }
+
+    } else {
+      expm1h = polyh;
+      expm1m = polyl;
+    }
+
+    /* Rounding test */
+    TEST_AND_RETURN_RU(expm1h, expm1m, ROUNDCSTDIRECTRD);
+    {
+      expm1_direct_td(&expm1h, &expm1m, &expm1l, x, xSqHalfh, xSqHalfl, xSqh, xSql, expoX);
+      
+      ReturnRoundUpwards3(expm1h, expm1m, expm1l);
+
+    } /* Accurate phase launched */
+
+    /* We cannot be here, since we return in all cases before */
+  }
+
+  /* If we are here, we can use expm1(x) = exp(x) - 1 */
+
+  /* Range reduction - exact part: compute k as double and as int */
+
+  xMultLog2InvMult2L = x * log2InvMult2L;
+  shiftedXMult = xMultLog2InvMult2L + shiftConst;
+  kd = shiftedXMult - shiftConst;
+  shiftedXMultdb.d = shiftedXMult;
+  k = shiftedXMultdb.i[LO];
+  M = k >> 12;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> 6;
+
+  /* Range reduction - part affected by error - must be redone in accurate phase */
+  Mul12(&s1,&s2,msLog2Div2Lh,kd);
+  s3 = kd * msLog2Div2Lm;
+  s4 = s2 + s3; 
+  s5 = x + s1;
+  Add12Cond(rh,rm,s5,s4);
+
+  /* Table reads - read only two double-doubles by now */
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+
+  /* Quick phase starts here */
+
+  rhSquare = rh * rh;
+  rhC3 = quickCommonpolyC3h * rh;
+
+  rhSquareHalf = 0.5 * rhSquare;
+  monomialCube = rhC3 * rhSquare;
+  rhFour = rhSquare * rhSquare;
+
+  monomialFour = quickCommonpolyC4h * rhFour;
+  
+  highPoly = monomialCube + monomialFour;
+
+  highPolyWithSquare = rhSquareHalf + highPoly;
+  
+  /* Reconstruction: integration of table values */
+  
+  Mul22(&tablesh,&tablesl,tbl1h,tbl1m,tbl2h,tbl2m);
+
+  t8 = rm + highPolyWithSquare;
+  t9 = rh + t8;
+
+  t10 = tablesh * t9;
+  
+  Add12(t11,t12,tablesh,t10);
+  t13 = t12 + tablesl;
+  Add12(polyTblhdb.d,polyTblmdb.d,t11,t13);
+  
+  /* Reconstruction: multiplication by 2^M */
+
+  /* Implement the multiplication by addition to overcome the
+     problem of the non-representability of 2^1024 (M = 1024)
+     This case is possible if polyTblhdb.d < 1
+  */
+  
+  polyTblhdb.i[HI] += M << 20;
+  if(polyTblmdb.d!=0.0) /* predicted true, but it happens for x=-4.1588039009762204, thanks Morten */
+	  polyTblmdb.i[HI] += M << 20;
+
+  exph = polyTblhdb.d;
+  expm = polyTblmdb.d;
+
+  /* Subtraction of 1 
+
+     Testing if the operation is necessary is more expensive than 
+     performing it in any case.
+
+     We may cancellate at most 2 bits in the subtraction for 
+     arguments 1/4 <= x <= ln(2) (0.25 <= x <= 0.69) 
+     We must therefore use conditional Add12s
+
+     Since we perform a subtraction, we may not have addition overflow towards +inf
+
+  */
+
+  Add12Cond(t1,t2,-1,exph);
+  t3 = t2 + expm;
+  Add12Cond(expm1h,expm1m,t1,t3);
+
+
+  /* Rounding test */
+  TEST_AND_RETURN_RU(expm1h, expm1m, ROUNDCSTCOMMONRD);
+  {
+    /* Rest of argument reduction for accurate phase */
+    
+    Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1 = x + msLog2Div2LMultKh;
+    Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+    Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+    
+    /* Table reads for accurate phase */
+    tbl1l = twoPowerIndex1[index1].lo;
+    tbl2l = twoPowerIndex2[index2].lo;
+    
+    /* Call accurate phase */
+    expm1_common_td(&expm1h, &expm1m, &expm1l, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l, M); 
+    
+    /* Final rounding */
+
+    ReturnRoundUpwards3(expm1h, expm1m, expm1l);
+  } /* Accurate phase launched */
+  
+  /* We cannot be here since we return before in any case */
+}
+ 
+double expm1_rz(double x) {
+  db_number xdb, shiftedXMultdb, polyTblhdb, polyTblmdb;
+  int xIntHi, expoX, k, M, index1, index2;
+  double highPoly, tt1h, t1h, t1l, xSqh, xSql, xSqHalfh, xSqHalfl, xCubeh, xCubel, t2h, t2l, templ, tt3h, tt3l;
+  double polyh, polyl, expm1h, expm1m, expm1l;
+  double r1h, r1l, r1t, rr1h, rr1l;
+  double r2h, r2l, r2t, rr2h, rr2l;
+  double r3h, r3l, r3t, rr3h, rr3l;
+  double xMultLog2InvMult2L, shiftedXMult, kd, s1, s2, s3, s4, s5, rh, rm, rl;
+  double rhSquare, rhC3, rhSquareHalf, monomialCube, rhFour, monomialFour;
+  double tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l;
+  double highPolyWithSquare, tablesh, tablesl, t8, t9, t10, t11, t12, t13;
+  double exph, expm, t1, t2, t3;
+  double msLog2Div2LMultKh, msLog2Div2LMultKm, msLog2Div2LMultKl;
+  double middlePoly, doublePoly;
+
+  xdb.d = x; 
+
+  /* Strip off the sign of x for the following tests */
+
+  xIntHi = xdb.i[HI] & 0x7fffffff;
+
+  /* Test if we are so small that we can return (a corrected) x as correct rounding */
+  if (xIntHi < RETURNXBOUND) {
+    /* The only algebraic result is 0 for x = +/- 0; in this case, we can return x = +/- 0
+       expm1 is positive for positive x, negative for negative x
+       The truncation rest x^2/2 + x^3/6 + ... is always positive 
+       but less than 1 ulp in this case, so we round as follows:
+       
+       - x is positive => expm1 is positive => round downwards => truncate by returning x
+       - x is negative => expm1 is negative => round upwards => add 1 ulp
+    */
+
+    if (x == 0.0) return x;
+
+    if (xdb.i[HI] & 0x80000000) {
+      /* x is negative 
+	 We add 1 ulp by subtracting 1 in long
+      */
+      xdb.l--;
+      return xdb.d;
+    } else {
+      /* x is positive 
+	 We do nothing (see above)
+      */
+      return x;
+    }
+  }
+
+
+  /* Filter out special cases like overflow, -1 in result, infinities and NaNs 
+     The filters are not sharp, we have positive arguments that flow through
+  */
+  if (xIntHi >= SIMPLEOVERFLOWBOUND) {
+    /* Test if we are +/-inf or NaN */
+    if (xIntHi >= 0x7ff00000) {
+      /* Test if NaN */
+      if (((xIntHi & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* NaN */
+	return x+x;  /* return NaN */
+      }
+      /* Test if +inf or -inf */
+      if (xdb.i[HI] > 0) {
+	/* +inf */
+	return x+x;  /* return +inf */
+      }
+      
+      /* If we are here, we are -inf */
+      return -1.0;
+    }
+
+    /* If we are here, we are overflowed or a common case that flows through */
+
+    /* Test if we are actually overflowed */
+    if (x > OVERFLOWBOUND) {
+      /* We would be overflowed but as we are rounding towards zero, i.e. downwards,
+	 the nearest number lesser than the exact result is the greatest 
+	 normal. In any case, we must raise the inexact flag.
+      */
+      return LARGEST * (1.0 + SMALLEST);
+    }
+  }
+  
+  /* Test if we know already that we are -1.0 (+ correction depending on rounding mode) in result */
+  if (x < MINUSONEBOUND) {
+    /* We round towards zero, i.e. upwards, so we return -1.0+1ulp */
+    return MINUSONEPLUSONEULP;
+  }
+
+  /* Test if we have |x| <= 1/4-1/2ulp(1/4) for knowing if we use exp(x) or approximate directly */
+
+  if (xIntHi < DIRECTINTERVALBOUND) {
+
+    /* We approximate expm1 directly after a range reduction as follows
+
+       expm1(x) = (expm1(x/2) + 2) * expm1(x/2)
+
+       We perform the range reduction in such a way that finally |x| < 1/32 
+    */
+
+    /* Extract the exponent of |x| and add 5 (2^5 = 32) */
+    expoX = ((xIntHi & 0x7ff00000) >> 20) - (1023 - 5);
+    
+    /* If this particularily biased exponent expoX is negative, we are already less than 1/32 */
+    if (expoX >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb.i[HI] += (-expoX-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi = xdb.i[HI] & 0x7fffffff;
+      x = xdb.d;
+    }
+    /* Here, we have always |x| < 1/32 */
+
+
+    /* Double precision evaluation steps and one double-double step */
+
+    Mul12(&xSqh,&xSql,x,x);
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    middlePoly = FMA(quickDirectpolyC5h,x,quickDirectpolyC4h);
+#else
+    middlePoly = quickDirectpolyC4h + x * quickDirectpolyC5h;
+#endif
+
+    doublePoly = middlePoly;
+
+    /* Special path: for small |x| we can truncate the polynomial */
+
+    if (xIntHi > SPECIALINTERVALBOUND) {
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly = FMA(FMA(FMA(quickDirectpolyC9h ,x,quickDirectpolyC8h),x,
+                             quickDirectpolyC7h),x,quickDirectpolyC6h);
+#else
+      highPoly = quickDirectpolyC6h + x * (quickDirectpolyC7h + x * (
+	         quickDirectpolyC8h + x *  quickDirectpolyC9h));
+#endif
+
+      highPolyWithSquare = xSqh * highPoly;
+
+      doublePoly = middlePoly + highPolyWithSquare;
+
+    }
+    
+    /* Double-double evaluation steps */
+    tt1h = x * doublePoly;
+
+    xSqHalfh = 0.5 * xSqh;
+    xSqHalfl = 0.5 * xSql;
+    Add12(t2h,templ,x,xSqHalfh);
+    t2l = templ + xSqHalfl;
+    
+    Add12(t1h,t1l,quickDirectpolyC3h,tt1h);
+    Mul122(&xCubeh,&xCubel,x,xSqh,xSql);
+    Mul22(&tt3h,&tt3l,xCubeh,xCubel,t1h,t1l);
+
+    Add22(&polyh,&polyl,t2h,t2l,tt3h,tt3l);
+
+    /* Reconstruction */
+
+    /* If we have not performed any range reduction, we have no reconstruction to do */
+    if (expoX >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+      Add12(r1h,r1t,2,polyh);
+      r1l = r1t + polyl;
+      Mul22(&rr1h,&rr1l,r1h,r1l,polyh,polyl);
+
+      if (expoX >= 1) {
+
+	/* Second reconstruction step */
+	Add12(r2h,r2t,2,rr1h);
+	r2l = r2t + rr1l;
+	Mul22(&rr2h,&rr2l,r2h,r2l,rr1h,rr1l);
+
+	if (expoX >= 2) {
+
+	  /* Third reconstruction step */
+	  Add12(r3h,r3t,2,rr2h);
+	  r3l = r3t + rr2l;
+	  Mul22(&rr3h,&rr3l,r3h,r3l,rr2h,rr2l);
+	  
+	  /* expoX may be maximally 2 */
+
+	  expm1h = rr3h;
+	  expm1m = rr3l;
+
+	} else {
+	  expm1h = rr2h;
+	  expm1m = rr2l;
+	}
+
+      } else {
+	expm1h = rr1h;
+	expm1m = rr1l;
+      }
+
+    } else {
+      expm1h = polyh;
+      expm1m = polyl;
+    }
+
+    /* Rounding test */
+    TEST_AND_RETURN_RZ(expm1h, expm1m, ROUNDCSTDIRECTRD);
+    {
+      expm1_direct_td(&expm1h, &expm1m, &expm1l, x, xSqHalfh, xSqHalfl, xSqh, xSql, expoX);
+      
+      ReturnRoundTowardsZero3(expm1h, expm1m, expm1l);
+
+    } /* Accurate phase launched */
+
+    /* We cannot be here, since we return in all cases before */
+  }
+
+  /* If we are here, we can use expm1(x) = exp(x) - 1 */
+
+  /* Range reduction - exact part: compute k as double and as int */
+
+  xMultLog2InvMult2L = x * log2InvMult2L;
+  shiftedXMult = xMultLog2InvMult2L + shiftConst;
+  kd = shiftedXMult - shiftConst;
+  shiftedXMultdb.d = shiftedXMult;
+  k = shiftedXMultdb.i[LO];
+  M = k >> 12;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> 6;
+
+  /* Range reduction - part affected by error - must be redone in accurate phase */
+  Mul12(&s1,&s2,msLog2Div2Lh,kd);
+  s3 = kd * msLog2Div2Lm;
+  s4 = s2 + s3; 
+  s5 = x + s1;
+  Add12Cond(rh,rm,s5,s4);
+
+  /* Table reads - read only two double-doubles by now */
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+
+  /* Quick phase starts here */
+
+  rhSquare = rh * rh;
+  rhC3 = quickCommonpolyC3h * rh;
+
+  rhSquareHalf = 0.5 * rhSquare;
+  monomialCube = rhC3 * rhSquare;
+  rhFour = rhSquare * rhSquare;
+
+  monomialFour = quickCommonpolyC4h * rhFour;
+  
+  highPoly = monomialCube + monomialFour;
+
+  highPolyWithSquare = rhSquareHalf + highPoly;
+  
+  /* Reconstruction: integration of table values */
+  
+  Mul22(&tablesh,&tablesl,tbl1h,tbl1m,tbl2h,tbl2m);
+
+  t8 = rm + highPolyWithSquare;
+  t9 = rh + t8;
+
+  t10 = tablesh * t9;
+  
+  Add12(t11,t12,tablesh,t10);
+  t13 = t12 + tablesl;
+  Add12(polyTblhdb.d,polyTblmdb.d,t11,t13);
+  
+  /* Reconstruction: multiplication by 2^M */
+
+  /* Implement the multiplication by addition to overcome the
+     problem of the non-representability of 2^1024 (M = 1024)
+     This case is possible if polyTblhdb.d < 1
+  */
+  
+  polyTblhdb.i[HI] += M << 20; 
+  if(polyTblmdb.d!=0.0) /* predicted true, but it happens for x=-4.1588039009762204, thanks Morten */
+	  polyTblmdb.i[HI] += M << 20;
+
+  exph = polyTblhdb.d;
+  expm = polyTblmdb.d;
+
+  /* Subtraction of 1 
+
+     Testing if the operation is necessary is more expensive than 
+     performing it in any case.
+
+     We may cancellate at most 2 bits in the subtraction for 
+     arguments 1/4 <= x <= ln(2) (0.25 <= x <= 0.69) 
+     We must therefore use conditional Add12s
+
+     Since we perform a subtraction, we may not have addition overflow towards +inf
+
+  */
+
+  Add12Cond(t1,t2,-1,exph);
+  t3 = t2 + expm;
+  Add12Cond(expm1h,expm1m,t1,t3);
+
+
+  /* Rounding test */
+  TEST_AND_RETURN_RZ(expm1h, expm1m, ROUNDCSTCOMMONRD);
+  {
+
+    /* Rest of argument reduction for accurate phase */
+    
+    Mul133(&msLog2Div2LMultKh,&msLog2Div2LMultKm,&msLog2Div2LMultKl,kd,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+    t1 = x + msLog2Div2LMultKh;
+    Add12Cond(rh,t2,t1,msLog2Div2LMultKm);
+    Add12Cond(rm,rl,t2,msLog2Div2LMultKl);
+    
+    /* Table reads for accurate phase */
+    tbl1l = twoPowerIndex1[index1].lo;
+    tbl2l = twoPowerIndex2[index2].lo;
+    
+    /* Call accurate phase */
+    expm1_common_td(&expm1h, &expm1m, &expm1l, rh, rm, rl, tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l, M); 
+    
+    /* Final rounding */
+
+    ReturnRoundTowardsZero3(expm1h, expm1m, expm1l);
+  } /* Accurate phase launched */
+  
+  /* We cannot be here since we return before in any case */
+}
+
+#ifdef BUILD_INTERVAL_FUNCTIONS
+interval j_expm1(interval x)
+{
+  interval res;
+  db_number xdb_inf, shiftedXMultdb_inf, polyTblhdb_inf, polyTblmdb_inf;
+  int xIntHi_inf, expoX_inf, k_inf, M_inf, index1_inf, index2_inf;
+  double x_inf, x_sup;
+  double res_inf,res_sup;
+  double restemp_inf, restemp_sup;
+  double highPoly_inf, tt1h_inf, t1h_inf, t1l_inf, xSqh_inf, xSql_inf, xSqHalfh_inf, xSqHalfl_inf, xCubeh_inf, xCubel_inf, t2h_inf, t2l_inf, templ_inf, tt3h_inf, tt3l_inf;
+  double polyh_inf, polyl_inf, expm1h_inf, expm1m_inf, expm1l_inf;
+  double r1h_inf, r1l_inf, r1t_inf, rr1h_inf, rr1l_inf;
+  double r2h_inf, r2l_inf, r2t_inf, rr2h_inf, rr2l_inf;
+  double r3h_inf, r3l_inf, r3t_inf, rr3h_inf, rr3l_inf;
+  double xMultLog2InvMult2L_inf, shiftedXMult_inf, kd_inf, s1_inf, s2_inf, s3_inf, s4_inf, s5_inf, rh_inf, rm_inf, rl_inf;
+  double rhSquare_inf, rhC3_inf, rhSquareHalf_inf, monomialCube_inf, rhFour_inf, monomialFour_inf;
+  double tbl1h_inf, tbl1m_inf, tbl1l_inf, tbl2h_inf, tbl2m_inf, tbl2l_inf;
+  double highPolyWithSquare_inf, tablesh_inf, tablesl_inf, t8_inf, t9_inf, t10_inf, t11_inf, t12_inf, t13_inf;
+  double exph_inf, expm_inf, t1_inf, t2_inf, t3_inf;
+  double msLog2Div2LMultKh_inf, msLog2Div2LMultKm_inf, msLog2Div2LMultKl_inf;
+  double middlePoly_inf, doublePoly_inf;
+  int roundable;
+  int infDone, supDone;
+  infDone=0; supDone=0;
+
+  db_number xdb_sup, shiftedXMultdb_sup, polyTblhdb_sup, polyTblmdb_sup;
+  int xIntHi_sup, expoX_sup, k_sup, M_sup, index1_sup, index2_sup;
+  double highPoly_sup, tt1h_sup, t1h_sup, t1l_sup, xSqh_sup, xSql_sup, xSqHalfh_sup, xSqHalfl_sup, xCubeh_sup, xCubel_sup, t2h_sup, t2l_sup, templ_sup, tt3h_sup, tt3l_sup;
+  double polyh_sup, polyl_sup, expm1h_sup, expm1m_sup, expm1l_sup;
+  double r1h_sup, r1l_sup, r1t_sup, rr1h_sup, rr1l_sup;
+  double r2h_sup, r2l_sup, r2t_sup, rr2h_sup, rr2l_sup;
+  double r3h_sup, r3l_sup, r3t_sup, rr3h_sup, rr3l_sup;
+  double xMultLog2InvMult2L_sup, shiftedXMult_sup, kd_sup, s1_sup, s2_sup, s3_sup, s4_sup, s5_sup, rh_sup, rm_sup, rl_sup;
+  double rhSquare_sup, rhC3_sup, rhSquareHalf_sup, monomialCube_sup, rhFour_sup, monomialFour_sup;
+  double tbl1h_sup, tbl1m_sup, tbl1l_sup, tbl2h_sup, tbl2m_sup, tbl2l_sup;
+  double highPolyWithSquare_sup, tablesh_sup, tablesl_sup, t8_sup, t9_sup, t10_sup, t11_sup, t12_sup, t13_sup;
+  double exph_sup, expm_sup, t1_sup, t2_sup, t3_sup;
+  double msLog2Div2LMultKh_sup, msLog2Div2LMultKm_sup, msLog2Div2LMultKl_sup;
+  double middlePoly_sup, doublePoly_sup;
+
+  x_inf=LOW(x);
+  x_sup=UP(x);
+
+  xdb_inf.d = x_inf; 
+  xdb_sup.d = x_sup; 
+
+
+  /* Strip off the sign of x for the following tests */
+
+  xIntHi_inf = xdb_inf.i[HI] & 0x7fffffff;
+  xIntHi_sup = xdb_sup.i[HI] & 0x7fffffff;
+
+  /* Test if we are so small that we can return (a corrected) x as correct rounding */
+
+  if ( __builtin_expect(
+      (xIntHi_inf < RETURNXBOUND) ||
+      ((xIntHi_inf >= SIMPLEOVERFLOWBOUND) && (xIntHi_inf >= 0x7ff00000)) ||
+      ((xIntHi_inf >= SIMPLEOVERFLOWBOUND) && (xIntHi_inf >= 0x7ff00000) && (((xIntHi_inf & 0x000fffff) | xdb_inf.i[LO]) != 0)) ||
+      ((xIntHi_inf >= SIMPLEOVERFLOWBOUND) && (xIntHi_inf >= 0x7ff00000) && (xdb_inf.i[HI] > 0)) ||
+      ((xIntHi_inf >= SIMPLEOVERFLOWBOUND) && (x_inf > OVERFLOWBOUND)) ||
+      (x_inf < MINUSONEBOUND) ||
+      (xIntHi_sup < RETURNXBOUND) ||
+      ((xIntHi_sup < RETURNXBOUND) && (x_sup == 0.0)) ||
+      ((xIntHi_sup >= SIMPLEOVERFLOWBOUND) && (xIntHi_sup >= 0x7ff00000)) ||
+      ((xIntHi_sup >= SIMPLEOVERFLOWBOUND) && (xIntHi_sup >= 0x7ff00000) && (((xIntHi_sup & 0x000fffff) | xdb_sup.i[LO]) != 0)) ||
+      ((xIntHi_sup >= SIMPLEOVERFLOWBOUND) && (xIntHi_sup >= 0x7ff00000) && (xdb_sup.i[HI] > 0)) ||
+      ((xIntHi_sup >= SIMPLEOVERFLOWBOUND) && (x_sup > OVERFLOWBOUND)) ||
+      (x_sup < MINUSONEBOUND)
+     ,FALSE))
+  {
+    ASSIGN_LOW(res,expm1_rd(LOW(x)));
+    ASSIGN_UP(res,expm1_ru(UP(x)));
+    return res;
+  }
+
+  if (__builtin_expect((xIntHi_inf < DIRECTINTERVALBOUND) && (xIntHi_sup < DIRECTINTERVALBOUND),TRUE)) {
+    /* We approximate expm1 directly after a range reduction as follows
+
+       expm1(x) = (expm1(x/2) + 2) * expm1(x/2)
+
+       We perform the range reduction in such a way that finally |x| < 1/32 
+    */
+
+    /* Extract the exponent of |x| and add 5 (2^5 = 32) */
+    expoX_inf = ((xIntHi_inf & 0x7ff00000) >> 20) - (1023 - 5);
+    expoX_sup = ((xIntHi_sup & 0x7ff00000) >> 20) - (1023 - 5);
+    
+    /* If this particularily biased exponent expoX is negative, we are already less than 1/32 */
+    if (expoX_inf >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb_inf.i[HI] += (-expoX_inf-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi_inf = xdb_inf.i[HI] & 0x7fffffff;
+      x_inf = xdb_inf.d;
+    }
+
+    if (expoX_sup >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb_sup.i[HI] += (-expoX_sup-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi_sup = xdb_sup.i[HI] & 0x7fffffff;
+      x_sup = xdb_sup.d;
+    }
+
+    /* Here, we have always |x| < 1/32 */
+
+
+    /* Double precision evaluation steps and one double-double step */
+
+    Mul12(&xSqh_inf,&xSql_inf,x_inf,x_inf);
+    Mul12(&xSqh_sup,&xSql_sup,x_sup,x_sup);
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    middlePoly_inf = FMA(quickDirectpolyC5h,x_inf,quickDirectpolyC4h);
+    middlePoly_sup = FMA(quickDirectpolyC5h,x_sup,quickDirectpolyC4h);
+#else
+    middlePoly_inf = quickDirectpolyC4h + x_inf * quickDirectpolyC5h;
+    middlePoly_sup = quickDirectpolyC4h + x_sup * quickDirectpolyC5h;
+#endif
+
+    doublePoly_inf = middlePoly_inf;
+    doublePoly_sup = middlePoly_sup;
+
+    /* Special path: for small |x| we can truncate the polynomial */
+
+    if (xIntHi_inf > SPECIALINTERVALBOUND) {
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly_inf = FMA(FMA(FMA(quickDirectpolyC9h ,x_inf,quickDirectpolyC8h),x_inf,
+                             quickDirectpolyC7h),x_inf,quickDirectpolyC6h);
+#else
+      highPoly_inf = quickDirectpolyC6h + x_inf * (quickDirectpolyC7h + x_inf * (
+	         quickDirectpolyC8h + x_inf *  quickDirectpolyC9h));
+#endif
+
+      highPolyWithSquare_inf = xSqh_inf * highPoly_inf;
+
+      doublePoly_inf = middlePoly_inf + highPolyWithSquare_inf;
+
+    }
+    if (xIntHi_sup > SPECIALINTERVALBOUND) {
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly_sup = FMA(FMA(FMA(quickDirectpolyC9h ,x_sup,quickDirectpolyC8h),x_sup,
+                             quickDirectpolyC7h),x_sup,quickDirectpolyC6h);
+#else
+      highPoly_sup = quickDirectpolyC6h + x_sup * (quickDirectpolyC7h + x_sup * (
+	         quickDirectpolyC8h + x_sup *  quickDirectpolyC9h));
+#endif
+
+      highPolyWithSquare_sup = xSqh_sup * highPoly_sup;
+
+      doublePoly_sup = middlePoly_sup + highPolyWithSquare_sup;
+
+    }
+    
+    /* Double-double evaluation steps */
+    tt1h_inf = x_inf * doublePoly_inf;
+    tt1h_sup = x_sup * doublePoly_sup;
+
+    xSqHalfh_inf = 0.5 * xSqh_inf;
+    xSqHalfh_sup = 0.5 * xSqh_sup;
+    xSqHalfl_inf = 0.5 * xSql_inf;
+    xSqHalfl_sup = 0.5 * xSql_sup;
+    Add12(t2h_inf,templ_inf,x_inf,xSqHalfh_inf);
+    Add12(t2h_sup,templ_sup,x_sup,xSqHalfh_sup);
+    t2l_inf = templ_inf + xSqHalfl_inf;
+    t2l_sup = templ_sup + xSqHalfl_sup;
+    
+    Add12(t1h_inf,t1l_inf,quickDirectpolyC3h,tt1h_inf);
+    Add12(t1h_sup,t1l_sup,quickDirectpolyC3h,tt1h_sup);
+    Mul122(&xCubeh_inf,&xCubel_inf,x_inf,xSqh_inf,xSql_inf);
+    Mul122(&xCubeh_sup,&xCubel_sup,x_sup,xSqh_sup,xSql_sup);
+    Mul22(&tt3h_inf,&tt3l_inf,xCubeh_inf,xCubel_inf,t1h_inf,t1l_inf);
+    Mul22(&tt3h_sup,&tt3l_sup,xCubeh_sup,xCubel_sup,t1h_sup,t1l_sup);
+
+    Add22(&polyh_inf,&polyl_inf,t2h_inf,t2l_inf,tt3h_inf,tt3l_inf);
+    Add22(&polyh_sup,&polyl_sup,t2h_sup,t2l_sup,tt3h_sup,tt3l_sup);
+
+    /* Reconstruction */
+
+    /* If we have not performed any range reduction, we have no reconstruction to do */
+    if (expoX_inf >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+      Add12(r1h_inf,r1t_inf,2,polyh_inf);
+      r1l_inf = r1t_inf + polyl_inf;
+      Mul22(&rr1h_inf,&rr1l_inf,r1h_inf,r1l_inf,polyh_inf,polyl_inf);
+
+      if (expoX_inf >= 1) {
+
+	/* Second reconstruction step */
+	Add12(r2h_inf,r2t_inf,2,rr1h_inf);
+	r2l_inf = r2t_inf + rr1l_inf;
+	Mul22(&rr2h_inf,&rr2l_inf,r2h_inf,r2l_inf,rr1h_inf,rr1l_inf);
+
+	if (expoX_inf >= 2) {
+
+	  /* Third reconstruction step */
+	  Add12(r3h_inf,r3t_inf,2,rr2h_inf);
+	  r3l_inf = r3t_inf + rr2l_inf;
+	  Mul22(&rr3h_inf,&rr3l_inf,r3h_inf,r3l_inf,rr2h_inf,rr2l_inf);
+	  
+	  /* expoX may be maximally 2 */
+
+	  expm1h_inf = rr3h_inf;
+	  expm1m_inf = rr3l_inf;
+
+	} else {
+	  expm1h_inf = rr2h_inf;
+	  expm1m_inf = rr2l_inf;
+	}
+
+      } else {
+	expm1h_inf = rr1h_inf;
+	expm1m_inf = rr1l_inf;
+      }
+
+    } else {
+      expm1h_inf = polyh_inf;
+      expm1m_inf = polyl_inf;
+    }
+    if (expoX_sup >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+      Add12(r1h_sup,r1t_sup,2,polyh_sup);
+      r1l_sup = r1t_sup + polyl_sup;
+      Mul22(&rr1h_sup,&rr1l_sup,r1h_sup,r1l_sup,polyh_sup,polyl_sup);
+
+      if (expoX_sup >= 1) {
+
+	/* Second reconstruction step */
+	Add12(r2h_sup,r2t_sup,2,rr1h_sup);
+	r2l_sup = r2t_sup + rr1l_sup;
+	Mul22(&rr2h_sup,&rr2l_sup,r2h_sup,r2l_sup,rr1h_sup,rr1l_sup);
+
+	if (expoX_sup >= 2) {
+
+	  /* Third reconstruction step */
+	  Add12(r3h_sup,r3t_sup,2,rr2h_sup);
+	  r3l_sup = r3t_sup + rr2l_sup;
+	  Mul22(&rr3h_sup,&rr3l_sup,r3h_sup,r3l_sup,rr2h_sup,rr2l_sup);
+	  
+	  /* expoX may be maximally 2 */
+
+	  expm1h_sup = rr3h_sup;
+	  expm1m_sup = rr3l_sup;
+
+	} else {
+	  expm1h_sup = rr2h_sup;
+	  expm1m_sup = rr2l_sup;
+	}
+
+      } else {
+	expm1h_sup = rr1h_sup;
+	expm1m_sup = rr1l_sup;
+      }
+
+    } else {
+      expm1h_sup = polyh_sup;
+      expm1m_sup = polyl_sup;
+    }
+
+
+    /* Rounding test */
+    TEST_AND_COPY_RDRU_EXPM1(roundable,restemp_inf,expm1h_inf, expm1m_inf, restemp_sup,expm1h_sup, expm1m_sup, ROUNDCSTDIRECTRD);
+    if((roundable==2) || (roundable==0))
+    {
+      expm1_direct_td(&expm1h_inf, &expm1m_inf, &expm1l_inf, x_inf, xSqHalfh_inf, xSqHalfl_inf, xSqh_inf, xSql_inf, expoX_inf);
+      
+      RoundDownwards3(&restemp_inf,expm1h_inf, expm1m_inf, expm1l_inf);
+      
+    } /* Accurate phase launched */
+    if((roundable==1) || (roundable==0))
+    {
+      expm1_direct_td(&expm1h_sup, &expm1m_sup, &expm1l_sup, x_sup, xSqHalfh_sup, xSqHalfl_sup, xSqh_sup, xSql_sup, expoX_sup);
+      
+      RoundUpwards3(&restemp_sup,expm1h_sup, expm1m_sup, expm1l_sup);
+
+    } /* Accurate phase launched */
+    ASSIGN_LOW(res,restemp_inf);
+    ASSIGN_UP(res,restemp_sup);
+    return res;
+  }
+
+
+  /* Test if we have |x| <= 1/4-1/2ulp(1/4) for knowing if we use exp(x) or approximate directly */
+
+  if (xIntHi_inf < DIRECTINTERVALBOUND) {
+    /* We approximate expm1 directly after a range reduction as follows
+
+       expm1(x) = (expm1(x/2) + 2) * expm1(x/2)
+
+       We perform the range reduction in such a way that finally |x| < 1/32 
+    */
+
+    /* Extract the exponent of |x| and add 5 (2^5 = 32) */
+    expoX_inf = ((xIntHi_inf & 0x7ff00000) >> 20) - (1023 - 5);
+    
+    /* If this particularily biased exponent expoX is negative, we are already less than 1/32 */
+    if (expoX_inf >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb_inf.i[HI] += (-expoX_inf-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi_inf = xdb_inf.i[HI] & 0x7fffffff;
+      x_inf = xdb_inf.d;
+    }
+    
+    /* Here, we have always |x| < 1/32 */
+
+
+    /* Double precision evaluation steps and one double-double step */
+
+    Mul12(&xSqh_inf,&xSql_inf,x_inf,x_inf);
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    middlePoly_inf = FMA(quickDirectpolyC5h,x_inf,quickDirectpolyC4h);
+#else
+    middlePoly_inf = quickDirectpolyC4h + x_inf * quickDirectpolyC5h;
+#endif
+
+    doublePoly_inf = middlePoly_inf;
+
+    /* Special path: for small |x| we can truncate the polynomial */
+
+    if (xIntHi_inf > SPECIALINTERVALBOUND) {
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly_inf = FMA(FMA(FMA(quickDirectpolyC9h ,x_inf,quickDirectpolyC8h),x_inf,
+                             quickDirectpolyC7h),x_inf,quickDirectpolyC6h);
+#else
+      highPoly_inf = quickDirectpolyC6h + x_inf * (quickDirectpolyC7h + x_inf * (
+	         quickDirectpolyC8h + x_inf *  quickDirectpolyC9h));
+#endif
+
+      highPolyWithSquare_inf = xSqh_inf * highPoly_inf;
+
+      doublePoly_inf = middlePoly_inf + highPolyWithSquare_inf;
+
+    }
+    
+    /* Double-double evaluation steps */
+    tt1h_inf = x_inf * doublePoly_inf;
+
+    xSqHalfh_inf = 0.5 * xSqh_inf;
+    xSqHalfl_inf = 0.5 * xSql_inf;
+    Add12(t2h_inf,templ_inf,x_inf,xSqHalfh_inf);
+    t2l_inf = templ_inf + xSqHalfl_inf;
+    
+    Add12(t1h_inf,t1l_inf,quickDirectpolyC3h,tt1h_inf);
+    Mul122(&xCubeh_inf,&xCubel_inf,x_inf,xSqh_inf,xSql_inf);
+    Mul22(&tt3h_inf,&tt3l_inf,xCubeh_inf,xCubel_inf,t1h_inf,t1l_inf);
+
+    Add22(&polyh_inf,&polyl_inf,t2h_inf,t2l_inf,tt3h_inf,tt3l_inf);
+
+    /* Reconstruction */
+
+    /* If we have not performed any range reduction, we have no reconstruction to do */
+    if (expoX_inf >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+      Add12(r1h_inf,r1t_inf,2,polyh_inf);
+      r1l_inf = r1t_inf + polyl_inf;
+      Mul22(&rr1h_inf,&rr1l_inf,r1h_inf,r1l_inf,polyh_inf,polyl_inf);
+
+      if (expoX_inf >= 1) {
+
+	/* Second reconstruction step */
+	Add12(r2h_inf,r2t_inf,2,rr1h_inf);
+	r2l_inf = r2t_inf + rr1l_inf;
+	Mul22(&rr2h_inf,&rr2l_inf,r2h_inf,r2l_inf,rr1h_inf,rr1l_inf);
+
+	if (expoX_inf >= 2) {
+
+	  /* Third reconstruction step */
+	  Add12(r3h_inf,r3t_inf,2,rr2h_inf);
+	  r3l_inf = r3t_inf + rr2l_inf;
+	  Mul22(&rr3h_inf,&rr3l_inf,r3h_inf,r3l_inf,rr2h_inf,rr2l_inf);
+	  
+	  /* expoX may be maximally 2 */
+
+	  expm1h_inf = rr3h_inf;
+	  expm1m_inf = rr3l_inf;
+
+	} else {
+	  expm1h_inf = rr2h_inf;
+	  expm1m_inf = rr2l_inf;
+	}
+
+      } else {
+	expm1h_inf = rr1h_inf;
+	expm1m_inf = rr1l_inf;
+      }
+
+    } else {
+      expm1h_inf = polyh_inf;
+      expm1m_inf = polyl_inf;
+    }
+
+    /* Rounding test */
+    infDone=1;
+    TEST_AND_COPY_RD(roundable,restemp_inf,expm1h_inf, expm1m_inf, ROUNDCSTDIRECTRD);
+    if(roundable==0)
+    {
+      expm1_direct_td(&expm1h_inf, &expm1m_inf, &expm1l_inf, x_inf, xSqHalfh_inf, xSqHalfl_inf, xSqh_inf, xSql_inf, expoX_inf);
+      
+      RoundDownwards3(&restemp_inf,expm1h_inf, expm1m_inf, expm1l_inf);
+      
+    } /* Accurate phase launched */
+
+  }
+
+  /* Test if we have |x| <= 1/4-1/2ulp(1/4) for knowing if we use exp(x) or approximate directly */
+
+  if (xIntHi_sup < DIRECTINTERVALBOUND) {
+    /* We approximate expm1 directly after a range reduction as follows
+
+       expm1(x) = (expm1(x/2) + 2) * expm1(x/2)
+
+       We perform the range reduction in such a way that finally |x| < 1/32 
+    */
+
+    /* Extract the exponent of |x| and add 5 (2^5 = 32) */
+    expoX_sup = ((xIntHi_sup & 0x7ff00000) >> 20) - (1023 - 5);
+    
+    /* If this particularily biased exponent expoX is negative, we are already less than 1/32 */
+    if (expoX_sup >= 0) {
+      /* If we are here, we must perform range reduction */
+
+
+      /* We multiply x by 2^(-expoX-1) by bit manipulation 
+	 x cannot be denormalized so there is no danger
+      */
+      xdb_sup.i[HI] += (-expoX_sup-1) << 20;
+
+      /* We reassign the new x and maintain xIntHi */
+
+      xIntHi_sup = xdb_sup.i[HI] & 0x7fffffff;
+      x_sup = xdb_sup.d;
+    }
+    
+    /* Here, we have always |x| < 1/32 */
+
+
+    /* Double precision evaluation steps and one double-double step */
+
+    Mul12(&xSqh_sup,&xSql_sup,x_sup,x_sup);
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+    middlePoly_sup = FMA(quickDirectpolyC5h,x_sup,quickDirectpolyC4h);
+#else
+    middlePoly_sup = quickDirectpolyC4h + x_sup * quickDirectpolyC5h;
+#endif
+
+    doublePoly_sup = middlePoly_sup;
+
+    /* Special path: for small |x| we can truncate the polynomial */
+
+    if (xIntHi_sup > SPECIALINTERVALBOUND) {
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+      highPoly_sup = FMA(FMA(FMA(quickDirectpolyC9h ,x_sup,quickDirectpolyC8h),x_sup,
+                             quickDirectpolyC7h),x_sup,quickDirectpolyC6h);
+#else
+      highPoly_sup = quickDirectpolyC6h + x_sup * (quickDirectpolyC7h + x_sup * (
+	         quickDirectpolyC8h + x_sup *  quickDirectpolyC9h));
+#endif
+
+      highPolyWithSquare_sup = xSqh_sup * highPoly_sup;
+
+      doublePoly_sup = middlePoly_sup + highPolyWithSquare_sup;
+
+    }
+    
+    /* Double-double evaluation steps */
+    tt1h_sup = x_sup * doublePoly_sup;
+
+    xSqHalfh_sup = 0.5 * xSqh_sup;
+    xSqHalfl_sup = 0.5 * xSql_sup;
+    Add12(t2h_sup,templ_sup,x_sup,xSqHalfh_sup);
+    t2l_sup = templ_sup + xSqHalfl_sup;
+    
+    Add12(t1h_sup,t1l_sup,quickDirectpolyC3h,tt1h_sup);
+    Mul122(&xCubeh_sup,&xCubel_sup,x_sup,xSqh_sup,xSql_sup);
+    Mul22(&tt3h_sup,&tt3l_sup,xCubeh_sup,xCubel_sup,t1h_sup,t1l_sup);
+
+    Add22(&polyh_sup,&polyl_sup,t2h_sup,t2l_sup,tt3h_sup,tt3l_sup);
+
+    /* Reconstruction */
+
+    /* If we have not performed any range reduction, we have no reconstruction to do */
+    if (expoX_sup >= 0) {
+      /* If we are here, we must perform reconstruction */
+
+      /* First reconstruction step */
+      Add12(r1h_sup,r1t_sup,2,polyh_sup);
+      r1l_sup = r1t_sup + polyl_sup;
+      Mul22(&rr1h_sup,&rr1l_sup,r1h_sup,r1l_sup,polyh_sup,polyl_sup);
+
+      if (expoX_sup >= 1) {
+
+	/* Second reconstruction step */
+	Add12(r2h_sup,r2t_sup,2,rr1h_sup);
+	r2l_sup = r2t_sup + rr1l_sup;
+	Mul22(&rr2h_sup,&rr2l_sup,r2h_sup,r2l_sup,rr1h_sup,rr1l_sup);
+
+	if (expoX_sup >= 2) {
+
+	  /* Third reconstruction step */
+	  Add12(r3h_sup,r3t_sup,2,rr2h_sup);
+	  r3l_sup = r3t_sup + rr2l_sup;
+	  Mul22(&rr3h_sup,&rr3l_sup,r3h_sup,r3l_sup,rr2h_sup,rr2l_sup);
+	  
+	  /* expoX may be maximally 2 */
+
+	  expm1h_sup = rr3h_sup;
+	  expm1m_sup = rr3l_sup;
+
+	} else {
+	  expm1h_sup = rr2h_sup;
+	  expm1m_sup = rr2l_sup;
+	}
+
+      } else {
+	expm1h_sup = rr1h_sup;
+	expm1m_sup = rr1l_sup;
+      }
+
+    } else {
+      expm1h_sup = polyh_sup;
+      expm1m_sup = polyl_sup;
+    }
+
+    /* Rounding test */
+    supDone=1;
+    TEST_AND_COPY_RU(roundable,restemp_sup,expm1h_sup, expm1m_sup, ROUNDCSTDIRECTRD);
+    if(roundable==0)
+    {
+      expm1_direct_td(&expm1h_sup, &expm1m_sup, &expm1l_sup, x_sup, xSqHalfh_sup, xSqHalfl_sup, xSqh_sup, xSql_sup, expoX_sup);
+      
+      RoundUpwards3(&restemp_sup,expm1h_sup, expm1m_sup, expm1l_sup);
+
+    } /* Accurate phase launched */
+
+  }
+  if((infDone==0) && (supDone==0))
+  {
+    /* If we are here, we can use expm1(x) = exp(x) - 1 */
+
+    /* Range reduction - exact part: compute k as double and as int */
+
+    xMultLog2InvMult2L_inf = x_inf * log2InvMult2L;
+    xMultLog2InvMult2L_sup = x_sup * log2InvMult2L;
+    shiftedXMult_inf = xMultLog2InvMult2L_inf + shiftConst;
+    shiftedXMult_sup = xMultLog2InvMult2L_sup + shiftConst;
+    kd_inf = shiftedXMult_inf - shiftConst;
+    kd_sup = shiftedXMult_sup - shiftConst;
+    shiftedXMultdb_inf.d = shiftedXMult_inf;
+    shiftedXMultdb_sup.d = shiftedXMult_sup;
+    k_inf = shiftedXMultdb_inf.i[LO];
+    k_sup = shiftedXMultdb_sup.i[LO];
+    M_inf = k_inf >> 12;
+    M_sup = k_sup >> 12;
+    index1_inf = k_inf & INDEXMASK1;
+    index1_sup = k_sup & INDEXMASK1;
+    index2_inf = (k_inf & INDEXMASK2) >> 6;
+    index2_sup = (k_sup & INDEXMASK2) >> 6;
+
+
+    /* Range reduction - part affected by error - must be redone in accurate phase */
+    Mul12(&s1_inf,&s2_inf,msLog2Div2Lh,kd_inf);
+    Mul12(&s1_sup,&s2_sup,msLog2Div2Lh,kd_sup);
+    s3_inf = kd_inf * msLog2Div2Lm;
+    s3_sup = kd_sup * msLog2Div2Lm;
+    s4_inf = s2_inf + s3_inf; 
+    s4_sup = s2_sup + s3_sup; 
+    s5_inf = x_inf + s1_inf;
+    s5_sup = x_sup + s1_sup;
+    Add12Cond(rh_inf,rm_inf,s5_inf,s4_inf);
+    Add12Cond(rh_sup,rm_sup,s5_sup,s4_sup);
+
+
+    /* Table reads - read only two double-doubles by now */
+    tbl1h_inf = twoPowerIndex1[index1_inf].hi;
+    tbl1h_sup = twoPowerIndex1[index1_sup].hi;
+    tbl1m_inf = twoPowerIndex1[index1_inf].mi;
+    tbl1m_sup = twoPowerIndex1[index1_sup].mi;
+    tbl2h_inf = twoPowerIndex2[index2_inf].hi;
+    tbl2h_sup = twoPowerIndex2[index2_sup].hi;
+    tbl2m_inf = twoPowerIndex2[index2_inf].mi;
+    tbl2m_sup = twoPowerIndex2[index2_sup].mi;
+
+    /* Quick phase starts here */
+
+    rhSquare_inf = rh_inf * rh_inf;
+    rhSquare_sup = rh_sup * rh_sup;
+    rhC3_inf = quickCommonpolyC3h * rh_inf;
+    rhC3_sup = quickCommonpolyC3h * rh_sup;
+
+    rhSquareHalf_inf = 0.5 * rhSquare_inf;
+    rhSquareHalf_sup = 0.5 * rhSquare_sup;
+
+    monomialCube_inf = rhC3_inf * rhSquare_inf;
+    monomialCube_sup = rhC3_sup * rhSquare_sup;
+    rhFour_inf = rhSquare_inf * rhSquare_inf;
+    rhFour_sup = rhSquare_sup * rhSquare_sup;
+
+    monomialFour_inf = quickCommonpolyC4h * rhFour_inf;
+    monomialFour_sup = quickCommonpolyC4h * rhFour_sup;
+    highPoly_inf = monomialCube_inf + monomialFour_inf;
+    highPoly_sup = monomialCube_sup + monomialFour_sup;
+    highPolyWithSquare_inf = rhSquareHalf_inf + highPoly_inf;
+    highPolyWithSquare_sup = rhSquareHalf_sup + highPoly_sup;
+
+    /* Reconstruction: integration of table values */
+  
+    Mul22(&tablesh_inf,&tablesl_inf,tbl1h_inf,tbl1m_inf,tbl2h_inf,tbl2m_inf);
+    Mul22(&tablesh_sup,&tablesl_sup,tbl1h_sup,tbl1m_sup,tbl2h_sup,tbl2m_sup);
+
+    t8_inf = rm_inf + highPolyWithSquare_inf;
+    t8_sup = rm_sup + highPolyWithSquare_sup;
+    t9_inf = rh_inf + t8_inf;
+    t9_sup = rh_sup + t8_sup;
+
+    t10_inf = tablesh_inf * t9_inf;
+    t10_sup = tablesh_sup * t9_sup;
+
+    Add12(t11_inf,t12_inf,tablesh_inf,t10_inf);
+    Add12(t11_sup,t12_sup,tablesh_sup,t10_sup);
+    t13_inf = t12_inf + tablesl_inf;
+    t13_sup = t12_sup + tablesl_sup;
+    Add12(polyTblhdb_inf.d,polyTblmdb_inf.d,t11_inf,t13_inf);
+    Add12(polyTblhdb_sup.d,polyTblmdb_sup.d,t11_sup,t13_sup);
+
+    /* Reconstruction: multiplication by 2^M */
+
+    /* Implement the multiplication by addition to overcome the
+       problem of the non-representability of 2^1024 (M = 1024)
+       This case is possible if polyTblhdb.d < 1
+    */
+  
+    polyTblhdb_inf.i[HI] += M_inf << 20;
+    polyTblhdb_sup.i[HI] += M_sup << 20;
+	 if(polyTblmdb_inf.d!=0.0) /* predicted true, but it happens for x=-4.1588039009762204, thanks Morten */
+		 polyTblmdb_inf.i[HI] += M_inf << 20;
+	 if(polyTblmdb_sup.d!=0.0) /* predicted true, but it happens for x=-4.1588039009762204, thanks Morten */
+		 polyTblmdb_sup.i[HI] += M_sup << 20;
+
+    exph_inf = polyTblhdb_inf.d;
+    exph_sup = polyTblhdb_sup.d;
+    expm_inf = polyTblmdb_inf.d;
+    expm_sup = polyTblmdb_sup.d;
+
+    /* Subtraction of 1 
+
+       Testing if the operation is necessary is more expensive than 
+       performing it in any case.
+
+       We may cancellate at most 2 bits in the subtraction for 
+       arguments 1/4 <= x <= ln(2) (0.25 <= x <= 0.69) 
+       We must therefore use conditional Add12s
+
+       Since we perform a subtraction, we may not have addition overflow towards +inf
+
+    */
+
+    Add12Cond(t1_inf,t2_inf,-1,exph_inf);
+    Add12Cond(t1_sup,t2_sup,-1,exph_sup);
+    t3_inf = t2_inf + expm_inf;
+    t3_sup = t2_sup + expm_sup;
+    Add12Cond(expm1h_inf,expm1m_inf,t1_inf,t3_inf);
+    Add12Cond(expm1h_sup,expm1m_sup,t1_sup,t3_sup);
+
+
+    /* Rounding test */
+    TEST_AND_COPY_RDRU_EXPM1(roundable,res_inf,expm1h_inf, expm1m_inf, res_sup,expm1h_sup, expm1m_sup, ROUNDCSTCOMMONRD);
+    if((roundable==2) || (roundable==0))
+    {
+      /* Rest of argument reduction for accurate phase */
+    
+      Mul133(&msLog2Div2LMultKh_inf,&msLog2Div2LMultKm_inf,&msLog2Div2LMultKl_inf,kd_inf,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+      t1_inf = x_inf + msLog2Div2LMultKh_inf;
+      Add12Cond(rh_inf,t2_inf,t1_inf,msLog2Div2LMultKm_inf);
+      Add12Cond(rm_inf,rl_inf,t2_inf,msLog2Div2LMultKl_inf);
+    
+      /* Table reads for accurate phase */
+      tbl1l_inf = twoPowerIndex1[index1_inf].lo;
+      tbl2l_inf = twoPowerIndex2[index2_inf].lo;
+    
+      /* Call accurate phase */
+      expm1_common_td(&expm1h_inf, &expm1m_inf, &expm1l_inf, rh_inf, rm_inf, rl_inf, tbl1h_inf, tbl1m_inf, tbl1l_inf, tbl2h_inf, tbl2m_inf, tbl2l_inf, M_inf); 
+    
+      /* Final rounding */
+
+      RoundDownwards3(&res_inf,expm1h_inf, expm1m_inf, expm1l_inf);
+    } /* Accurate phase launched */
+    if((roundable==1) || (roundable==0))
+    {
+      /* Rest of argument reduction for accurate phase */
+      Mul133(&msLog2Div2LMultKh_sup,&msLog2Div2LMultKm_sup,&msLog2Div2LMultKl_sup,kd_sup,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+      t1_sup = x_sup + msLog2Div2LMultKh_sup;
+      Add12Cond(rh_sup,t2_sup,t1_sup,msLog2Div2LMultKm_sup);
+      Add12Cond(rm_sup,rl_sup,t2_sup,msLog2Div2LMultKl_sup);
+    
+      /* Table reads for accurate phase */
+      tbl1l_sup = twoPowerIndex1[index1_sup].lo;
+      tbl2l_sup = twoPowerIndex2[index2_sup].lo;
+    
+      /* Call accurate phase */
+      expm1_common_td(&expm1h_sup, &expm1m_sup, &expm1l_sup, rh_sup, rm_sup, rl_sup, tbl1h_sup, tbl1m_sup, tbl1l_sup, tbl2h_sup, tbl2m_sup, tbl2l_sup, M_sup); 
+    
+      /* Final rounding */
+
+      RoundUpwards3(&res_sup,expm1h_sup, expm1m_sup, expm1l_sup);
+    } /* Accurate phase launched */
+
+    ASSIGN_LOW(res,res_inf);
+    ASSIGN_UP(res,res_sup);
+    return res;
+  }
+  if((supDone==1))
+  {
+    /* If we are here, we can use expm1(x) = exp(x) - 1 */
+
+    /* Range reduction - exact part: compute k as double and as int */
+
+    xMultLog2InvMult2L_inf = x_inf * log2InvMult2L;
+    shiftedXMult_inf = xMultLog2InvMult2L_inf + shiftConst;
+    kd_inf = shiftedXMult_inf - shiftConst;
+    shiftedXMultdb_inf.d = shiftedXMult_inf;
+    k_inf = shiftedXMultdb_inf.i[LO];
+    M_inf = k_inf >> 12;
+    index1_inf = k_inf & INDEXMASK1;
+    index2_inf = (k_inf & INDEXMASK2) >> 6;
+
+
+    /* Range reduction - part affected by error - must be redone in accurate phase */
+    Mul12(&s1_inf,&s2_inf,msLog2Div2Lh,kd_inf);
+    s3_inf = kd_inf * msLog2Div2Lm;
+    s4_inf = s2_inf + s3_inf; 
+    s5_inf = x_inf + s1_inf;
+    Add12Cond(rh_inf,rm_inf,s5_inf,s4_inf);
+
+
+    /* Table reads - read only two double-doubles by now */
+    tbl1h_inf = twoPowerIndex1[index1_inf].hi;
+    tbl1m_inf = twoPowerIndex1[index1_inf].mi;
+    tbl2h_inf = twoPowerIndex2[index2_inf].hi;
+    tbl2m_inf = twoPowerIndex2[index2_inf].mi;
+
+    /* Quick phase starts here */
+
+    rhSquare_inf = rh_inf * rh_inf;
+    rhC3_inf = quickCommonpolyC3h * rh_inf;
+
+    rhSquareHalf_inf = 0.5 * rhSquare_inf;
+
+    monomialCube_inf = rhC3_inf * rhSquare_inf;
+    rhFour_inf = rhSquare_inf * rhSquare_inf;
+
+    monomialFour_inf = quickCommonpolyC4h * rhFour_inf;
+    highPoly_inf = monomialCube_inf + monomialFour_inf;
+    highPolyWithSquare_inf = rhSquareHalf_inf + highPoly_inf;
+
+    /* Reconstruction: integration of table values */
+  
+    Mul22(&tablesh_inf,&tablesl_inf,tbl1h_inf,tbl1m_inf,tbl2h_inf,tbl2m_inf);
+
+    t8_inf = rm_inf + highPolyWithSquare_inf;
+    t9_inf = rh_inf + t8_inf;
+
+    t10_inf = tablesh_inf * t9_inf;
+
+    Add12(t11_inf,t12_inf,tablesh_inf,t10_inf);
+    t13_inf = t12_inf + tablesl_inf;
+    Add12(polyTblhdb_inf.d,polyTblmdb_inf.d,t11_inf,t13_inf);
+
+    /* Reconstruction: multiplication by 2^M */
+
+    /* Implement the multiplication by addition to overcome the
+       problem of the non-representability of 2^1024 (M = 1024)
+       This case is possible if polyTblhdb.d < 1
+    */
+  
+    polyTblhdb_inf.i[HI] += M_inf << 20;
+	 if(polyTblmdb_inf.d!=0.0) /* predicted true, but it happens for x=-4.1588039009762204, thanks Morten */
+		 polyTblmdb_inf.i[HI] += M_inf << 20;
+
+    exph_inf = polyTblhdb_inf.d;
+    expm_inf = polyTblmdb_inf.d;
+
+    /* Subtraction of 1 
+
+       Testing if the operation is necessary is more expensive than 
+       performing it in any case.
+
+       We may cancellate at most 2 bits in the subtraction for 
+       arguments 1/4 <= x <= ln(2) (0.25 <= x <= 0.69) 
+       We must therefore use conditional Add12s
+
+       Since we perform a subtraction, we may not have addition overflow towards +inf
+
+    */
+
+    Add12Cond(t1_inf,t2_inf,-1,exph_inf);
+    t3_inf = t2_inf + expm_inf;
+    Add12Cond(expm1h_inf,expm1m_inf,t1_inf,t3_inf);
+
+
+    /* Rounding test */
+    TEST_AND_COPY_RD(roundable,res_inf,expm1h_inf, expm1m_inf, ROUNDCSTCOMMONRD);
+    if(roundable==0)
+    {
+      /* Rest of argument reduction for accurate phase */
+    
+      Mul133(&msLog2Div2LMultKh_inf,&msLog2Div2LMultKm_inf,&msLog2Div2LMultKl_inf,kd_inf,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+      t1_inf = x_inf + msLog2Div2LMultKh_inf;
+      Add12Cond(rh_inf,t2_inf,t1_inf,msLog2Div2LMultKm_inf);
+      Add12Cond(rm_inf,rl_inf,t2_inf,msLog2Div2LMultKl_inf);
+    
+      /* Table reads for accurate phase */
+      tbl1l_inf = twoPowerIndex1[index1_inf].lo;
+      tbl2l_inf = twoPowerIndex2[index2_inf].lo;
+    
+      /* Call accurate phase */
+      expm1_common_td(&expm1h_inf, &expm1m_inf, &expm1l_inf, rh_inf, rm_inf, rl_inf, tbl1h_inf, tbl1m_inf, tbl1l_inf, tbl2h_inf, tbl2m_inf, tbl2l_inf, M_inf); 
+    
+      /* Final rounding */
+
+      RoundDownwards3(&res_inf,expm1h_inf, expm1m_inf, expm1l_inf);
+    } /* Accurate phase launched */
+
+  }
+  if(infDone==1)
+  {
+    /* If we are here, we can use expm1(x) = exp(x) - 1 */
+
+    /* Range reduction - exact part: compute k as double and as int */
+
+    xMultLog2InvMult2L_sup = x_sup * log2InvMult2L;
+    shiftedXMult_sup = xMultLog2InvMult2L_sup + shiftConst;
+    kd_sup = shiftedXMult_sup - shiftConst;
+    shiftedXMultdb_sup.d = shiftedXMult_sup;
+    k_sup = shiftedXMultdb_sup.i[LO];
+    M_sup = k_sup >> 12;
+    index1_sup = k_sup & INDEXMASK1;
+    index2_sup = (k_sup & INDEXMASK2) >> 6;
+
+
+    /* Range reduction - part affected by error - must be redone in accurate phase */
+    Mul12(&s1_sup,&s2_sup,msLog2Div2Lh,kd_sup);
+    s3_sup = kd_sup * msLog2Div2Lm;
+    s4_sup = s2_sup + s3_sup; 
+    s5_sup = x_sup + s1_sup;
+    Add12Cond(rh_sup,rm_sup,s5_sup,s4_sup);
+
+
+    /* Table reads - read only two double-doubles by now */
+    tbl1h_sup = twoPowerIndex1[index1_sup].hi;
+    tbl1m_sup = twoPowerIndex1[index1_sup].mi;
+    tbl2h_sup = twoPowerIndex2[index2_sup].hi;
+    tbl2m_sup = twoPowerIndex2[index2_sup].mi;
+
+    /* Quick phase starts here */
+
+    rhSquare_sup = rh_sup * rh_sup;
+    rhC3_sup = quickCommonpolyC3h * rh_sup;
+
+    rhSquareHalf_sup = 0.5 * rhSquare_sup;
+
+    monomialCube_sup = rhC3_sup * rhSquare_sup;
+    rhFour_sup = rhSquare_sup * rhSquare_sup;
+
+    monomialFour_sup = quickCommonpolyC4h * rhFour_sup;
+    highPoly_sup = monomialCube_sup + monomialFour_sup;
+    highPolyWithSquare_sup = rhSquareHalf_sup + highPoly_sup;
+
+    /* Reconstruction: integration of table values */
+  
+    Mul22(&tablesh_sup,&tablesl_sup,tbl1h_sup,tbl1m_sup,tbl2h_sup,tbl2m_sup);
+
+    t8_sup = rm_sup + highPolyWithSquare_sup;
+    t9_sup = rh_sup + t8_sup;
+
+    t10_sup = tablesh_sup * t9_sup;
+
+    Add12(t11_sup,t12_sup,tablesh_sup,t10_sup);
+    t13_sup = t12_sup + tablesl_sup;
+    Add12(polyTblhdb_sup.d,polyTblmdb_sup.d,t11_sup,t13_sup);
+
+    /* Reconstruction: multiplication by 2^M */
+
+    /* Implement the multiplication by addition to overcome the
+       problem of the non-representability of 2^1024 (M = 1024)
+       This case is possible if polyTblhdb.d < 1
+    */
+  
+    polyTblhdb_sup.i[HI] += M_sup << 20;
+	 if(polyTblmdb_sup.d!=0.0) /* predicted true, but it happens for x=-4.1588039009762204, thanks Morten */
+		 polyTblmdb_sup.i[HI] += M_sup << 20;
+
+    exph_sup = polyTblhdb_sup.d;
+    expm_sup = polyTblmdb_sup.d;
+
+    /* Subtraction of 1 
+
+       Testing if the operation is necessary is more expensive than 
+       performing it in any case.
+
+       We may cancellate at most 2 bits in the subtraction for 
+       arguments 1/4 <= x <= ln(2) (0.25 <= x <= 0.69) 
+       We must therefore use conditional Add12s
+
+       Since we perform a subtraction, we may not have addition overflow towards +inf
+
+    */
+
+    Add12Cond(t1_sup,t2_sup,-1,exph_sup);
+    t3_sup = t2_sup + expm_sup;
+    Add12Cond(expm1h_sup,expm1m_sup,t1_sup,t3_sup);
+
+    /* Rounding test */
+    TEST_AND_COPY_RU(roundable,res_sup,expm1h_sup, expm1m_sup, ROUNDCSTCOMMONRD);
+    if(roundable==0)
+    {
+      /* Rest of argument reduction for accurate phase */
+      Mul133(&msLog2Div2LMultKh_sup,&msLog2Div2LMultKm_sup,&msLog2Div2LMultKl_sup,kd_sup,msLog2Div2Lh,msLog2Div2Lm,msLog2Div2Ll);
+      t1_sup = x_sup + msLog2Div2LMultKh_sup;
+      Add12Cond(rh_sup,t2_sup,t1_sup,msLog2Div2LMultKm_sup);
+      Add12Cond(rm_sup,rl_sup,t2_sup,msLog2Div2LMultKl_sup);
+    
+      /* Table reads for accurate phase */
+      tbl1l_sup = twoPowerIndex1[index1_sup].lo;
+      tbl2l_sup = twoPowerIndex2[index2_sup].lo;
+    
+      /* Call accurate phase */
+      expm1_common_td(&expm1h_sup, &expm1m_sup, &expm1l_sup, rh_sup, rm_sup, rl_sup, tbl1h_sup, tbl1m_sup, tbl1l_sup, tbl2h_sup, tbl2m_sup, tbl2l_sup, M_sup); 
+    
+      /* Final rounding */
+
+      RoundUpwards3(&res_sup,expm1h_sup, expm1m_sup, expm1l_sup);
+    } /* Accurate phase launched */
+  }
+
+  if (infDone==1) res_inf=restemp_inf;
+  if (supDone==1) res_sup=restemp_sup;
+  ASSIGN_LOW(res,res_inf);
+  ASSIGN_UP(res,res_sup);
+  return res;
+}
+#endif
diff --git a/src/crlibm/expm1.h b/src/crlibm/expm1.h
new file mode 100644
index 0000000..4257aa6
--- /dev/null
+++ b/src/crlibm/expm1.h
@@ -0,0 +1,715 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/* File generated by maple/expm1.mpl */
+#define log2InvMult2L 5.90927888748119403317105025053024291992187500000000e+03
+#define msLog2Div2Lh -1.69225385878892892145206050535932718048570677638054e-04
+#define msLog2Div2Lm -5.66173538536694228129338642508144915789549786200850e-21
+#define msLog2Div2Ll -1.39348350547270802387134479195513221596886344528448e-37
+#define shiftConst 6.75539944105574400000000000000000000000000000000000e+15
+#define INDEXMASK1 0x0000003f
+#define INDEXMASK2 0x00000fc0
+#define RETURNXBOUND 0x3c900000
+#define OVERFLOWBOUND 7.09782712893383973096206318587064743041992187500000e+02
+#define LARGEST 1.79769313486231570814527423731704356798070567525845e+308
+#define SMALLEST 4.94065645841246544176568792868221372365059802614325e-324
+#define MINUSONEBOUND -3.74299477502370478987359092570841312408447265625000e+01
+#define SIMPLEOVERFLOWBOUND 0x40862e42
+#define DIRECTINTERVALBOUND 0x3fd00000
+#define SPECIALINTERVALBOUND 0x3f300000
+#define ROUNDCSTDIRECTRN 1.00392156862745109185069459291432461909707184007331e+00
+#define ROUNDCSTDIRECTRD 2.16840434497100886801490560173988342285156250000000e-19
+#define ROUNDCSTCOMMONRN 1.00392156862745109185069459291432461909707184007331e+00
+#define ROUNDCSTCOMMONRD 2.16840434497100886801490560173988342285156250000000e-19
+#define MINUSONEPLUSONEULP -9.99999999999999888977697537484345957636833190917969e-01
+
+
+#define quickDirectpolyC3h 1.66666666666666657414808128123695496469736099243164e-01
+#define quickDirectpolyC4h 4.16666666666666921092776476598373847082257270812988e-02
+#define quickDirectpolyC5h 8.33333333340913022524443221072942833416163921356201e-03
+#define quickDirectpolyC6h 1.38888888866754321368968128069809608859941363334656e-03
+#define quickDirectpolyC7h 1.98412543160940484055984600608724122139392420649528e-04
+#define quickDirectpolyC8h 2.48020519562457199031109411624385074901510961353779e-05
+#define quickDirectpolyC9h 2.84660857362219107811367527216539485834800871089101e-06
+
+#define accuDirectpolyC3h 1.66666666666666657414808128123695496469736099243164e-01
+#define accuDirectpolyC3m 9.25185853854297065661561206416060845590588197735272e-18
+#define accuDirectpolyC3l 5.13581650457284662711479178584444638962917803311780e-34
+#define accuDirectpolyC4h 4.16666666666666643537020320309238741174340248107910e-02
+#define accuDirectpolyC4m 2.31296463463574227896791413859298150278088197735272e-18
+#define accuDirectpolyC5h 8.33333333333333321768510160154619370587170124053955e-03
+#define accuDirectpolyC5m 1.15648231731787113948395706929649075139044098867636e-19
+#define accuDirectpolyC6h 1.38888888888888894189432843262466121814213693141937e-03
+#define accuDirectpolyC6m -5.30054395357292524960423423338339636695154423835845e-20
+#define accuDirectpolyC7h 1.98412698412698412526317115478491359681356698274612e-04
+#define accuDirectpolyC7m 1.72095583354814495137206233661964154177299630853468e-22
+#define accuDirectpolyC8h 2.48015873015873015657896394348114199601695872843266e-05
+#define accuDirectpolyC8m 2.14651941309384838916703253244235321323283349969089e-23
+#define accuDirectpolyC9h 2.75573192239858925109505932704578867742384318262339e-06
+#define accuDirectpolyC9m -1.85841997665354272936683956225603122653869677259213e-22
+#define accuDirectpolyC10h 2.75573192239859041576536180170875489636728161713108e-07
+#define accuDirectpolyC11h 2.50521083854417268413110797455750633488946732541081e-08
+#define accuDirectpolyC12h 2.08767569858109971289062132052388037761758710075810e-09
+#define accuDirectpolyC13h 1.60590438355780403477083534013894559194790545575415e-10
+#define accuDirectpolyC14h 1.14709032708663011999233928519882120839606942652722e-11
+#define accuDirectpolyC15h 7.64725827750169879636792489069881340263759583741887e-13
+
+#define quickCommonpolyC3h 1.66666666696497350885763921723992098122835159301758e-01
+#define quickCommonpolyC4h 4.16666666766102242180913606262038229033350944519043e-02
+
+#define accuCommonpolyC3h 1.66666666666666657414808128123695496469736099243164e-01
+#define accuCommonpolyC3m 9.25185853866467248091737476239823936927135463652392e-18
+#define accuCommonpolyC4h 4.16666666666666643537020320309238741174340248107910e-02
+#define accuCommonpolyC4m 2.31256737150511109641969514308685693497248293481702e-18
+#define accuCommonpolyC5h 8.33333333333333321768510160154619370587170124053955e-03
+#define accuCommonpolyC6h 1.38888888911084334119860894674047813168726861476898e-03
+#define accuCommonpolyC7h 1.98412713635391310413452758965036082372535020112991e-04
+
+
+typedef struct tPi_t_tag {double hi; double mi; double lo;} tPi_t;  
+static const tPi_t twoPowerIndex1[64] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1hi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1mi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1lo[0] */ 
+  } , 
+  { 
+    1.00016923970530213772178740327944979071617126464844e+00, /* twoPowerIndex1hi[1] */ 
+    9.33618533547846199388179470637929281332443150415515e-17, /* twoPowerIndex1mi[1] */ 
+    3.77297954885090084710073756456287936644477196404411e-33, /* twoPowerIndex1lo[1] */ 
+  } , 
+  { 
+    1.00033850805268231809463941317517310380935668945312e+00, /* twoPowerIndex1hi[2] */ 
+    -5.14133393131895706530678267769194263660821897510018e-18, /* twoPowerIndex1mi[2] */ 
+    3.65532984508913994275805274025238001612209382982528e-34, /* twoPowerIndex1lo[2] */ 
+  } , 
+  { 
+    1.00050780504698755279946453811135143041610717773438e+00, /* twoPowerIndex1hi[3] */ 
+    6.96242402202057255168575283120383384543281723609229e-17, /* twoPowerIndex1mi[3] */ 
+    5.20646484360987194687938744912769762301408608274186e-34, /* twoPowerIndex1lo[3] */ 
+  } , 
+  { 
+    1.00067713069306640782940576173132285475730895996094e+00, /* twoPowerIndex1hi[4] */ 
+    -5.11512329768566763581175858027414623025077801052578e-17, /* twoPowerIndex1mi[4] */ 
+    6.98198098827029289611306311409722598417652045670746e-34, /* twoPowerIndex1lo[4] */ 
+  } , 
+  { 
+    1.00084648499576744917760606767842546105384826660156e+00, /* twoPowerIndex1hi[5] */ 
+    8.42299002458648658027371639395540881533737558365359e-17, /* twoPowerIndex1mi[5] */ 
+    2.36970468083963275494383447607242933566525306383712e-33, /* twoPowerIndex1lo[5] */ 
+  } , 
+  { 
+    1.00101586795994101919404783984646201133728027343750e+00, /* twoPowerIndex1hi[6] */ 
+    -2.82452207477616780689379931990767172214919031737312e-17, /* twoPowerIndex1mi[6] */ 
+    -1.95728551891328398835983018867545661396300096090192e-33, /* twoPowerIndex1lo[6] */ 
+  } , 
+  { 
+    1.00118527959043746022871346212923526763916015625000e+00, /* twoPowerIndex1hi[7] */ 
+    -7.18042456559213166577815896739695813826899291527385e-17, /* twoPowerIndex1mi[7] */ 
+    -4.76259460142737667571053552520587169925041399888400e-33, /* twoPowerIndex1lo[7] */ 
+  } , 
+  { 
+    1.00135471989210822485460994357708841562271118164062e+00, /* twoPowerIndex1hi[8] */ 
+    -1.89737284167929933536294189134998232481318340155287e-17, /* twoPowerIndex1mi[8] */ 
+    -1.14644761608474571162584330231223616391499645510675e-34, /* twoPowerIndex1lo[8] */ 
+  } , 
+  { 
+    1.00152418886980565382316399336559697985649108886719e+00, /* twoPowerIndex1hi[9] */ 
+    9.06044106726912172835402556659442028244667434824268e-17, /* twoPowerIndex1mi[9] */ 
+    -9.28795936877474030548429956901821606468166518236870e-34, /* twoPowerIndex1lo[9] */ 
+  } , 
+  { 
+    1.00169368652838319810882694582687690854072570800781e+00, /* twoPowerIndex1hi[10] */ 
+    -7.17327634990031997530849131951948428542423257707819e-17, /* twoPowerIndex1mi[10] */ 
+    6.07647560689104755979568262152596670382288431776872e-33, /* twoPowerIndex1lo[10] */ 
+  } , 
+  { 
+    1.00186321287269430868605013529304414987564086914062e+00, /* twoPowerIndex1hi[11] */ 
+    -1.33071962467226606689858482393149015112554043251841e-17, /* twoPowerIndex1mi[11] */ 
+    -3.85443386097781554341108465500150047004226523597749e-34, /* twoPowerIndex1lo[11] */ 
+  } , 
+  { 
+    1.00203276790759399084151937131537124514579772949219e+00, /* twoPowerIndex1hi[12] */ 
+    2.57269259432211179649018725316354562817431777421067e-17, /* twoPowerIndex1mi[12] */ 
+    6.79751255613789265201334995370535043187556454092516e-34, /* twoPowerIndex1lo[12] */ 
+  } , 
+  { 
+    1.00220235163793791599573523853905498981475830078125e+00, /* twoPowerIndex1hi[13] */ 
+    -3.92993778548451720552933864302152846562830407163222e-17, /* twoPowerIndex1mi[13] */ 
+    2.22740945016647607963332576015739728975193247400334e-33, /* twoPowerIndex1lo[13] */ 
+  } , 
+  { 
+    1.00237196406858219965840817167190834879875183105469e+00, /* twoPowerIndex1hi[14] */ 
+    8.46137724799471749932697856411684097253648908880386e-17, /* twoPowerIndex1mi[14] */ 
+    -1.15795350476069740873680647805085951983720786847012e-33, /* twoPowerIndex1lo[14] */ 
+  } , 
+  { 
+    1.00254160520438451165148308064090088009834289550781e+00, /* twoPowerIndex1hi[15] */ 
+    -4.19488324163994025318330321149973224973566383682287e-17, /* twoPowerIndex1mi[15] */ 
+    -1.10867727371575753136248480661711257993643946476249e-33, /* twoPowerIndex1lo[15] */ 
+  } , 
+  { 
+    1.00271127505020252179690487537300214171409606933594e+00, /* twoPowerIndex1hi[16] */ 
+    -3.63661592869226394431650732319448247819940912156384e-17, /* twoPowerIndex1mi[16] */ 
+    -6.58076018413558386665763067745208065096307047224855e-34, /* twoPowerIndex1lo[16] */ 
+  } , 
+  { 
+    1.00288097361089523218424801598303020000457763671875e+00, /* twoPowerIndex1hi[17] */ 
+    -2.61094406324393831074545742903203024867557691172893e-17, /* twoPowerIndex1mi[17] */ 
+    1.20560913995705683042979390390212408639703633013464e-33, /* twoPowerIndex1lo[17] */ 
+  } , 
+  { 
+    1.00305070089132231103690173767972737550735473632812e+00, /* twoPowerIndex1hi[18] */ 
+    1.75307847798233211014008193947934807324617806015147e-17, /* twoPowerIndex1mi[18] */ 
+    1.13393213893456062969952574781413432615748154285102e-33, /* twoPowerIndex1lo[18] */ 
+  } , 
+  { 
+    1.00322045689634431475667497579706832766532897949219e+00, /* twoPowerIndex1hi[19] */ 
+    5.75392352562826744411122442879351687879645730521252e-17, /* twoPowerIndex1mi[19] */ 
+    -2.67723202763627633853056570968049475423332897231238e-33, /* twoPowerIndex1lo[19] */ 
+  } , 
+  { 
+    1.00339024163082268792379636579426005482673645019531e+00, /* twoPowerIndex1hi[20] */ 
+    -8.68492200511795617368964392061338881522209699276521e-18, /* twoPowerIndex1mi[20] */ 
+    -3.48402050975972235345434529928044249018150775634918e-34, /* twoPowerIndex1lo[20] */ 
+  } , 
+  { 
+    1.00356005509961931920770439319312572479248046875000e+00, /* twoPowerIndex1hi[21] */ 
+    9.49003543098177759384527648244793376993805358019830e-17, /* twoPowerIndex1mi[21] */ 
+    -2.72838479693459377473949067074824993718971708464416e-34, /* twoPowerIndex1lo[21] */ 
+  } , 
+  { 
+    1.00372989730759765159007201873464509844779968261719e+00, /* twoPowerIndex1hi[22] */ 
+    -8.71038060581842237129503222771273097866222639659196e-17, /* twoPowerIndex1mi[22] */ 
+    1.08618280977421918449964280592134822915254002216492e-33, /* twoPowerIndex1lo[22] */ 
+  } , 
+  { 
+    1.00389976825962090600796727812848985195159912109375e+00, /* twoPowerIndex1hi[23] */ 
+    3.49589169585715450145113080496294928974704413200507e-17, /* twoPowerIndex1mi[23] */ 
+    -2.94144759791575889018758341844218078845293410867033e-33, /* twoPowerIndex1lo[23] */ 
+  } , 
+  { 
+    1.00406966796055407975529760733479633927345275878906e+00, /* twoPowerIndex1hi[24] */ 
+    9.75378754984024099793268477195846557070899843396028e-17, /* twoPowerIndex1mi[24] */ 
+    5.64300142720863839874652371486135387544215443970822e-33, /* twoPowerIndex1lo[24] */ 
+  } , 
+  { 
+    1.00423959641526283625978521740762516856193542480469e+00, /* twoPowerIndex1hi[25] */ 
+    -1.05762211962928569325595987354393790031696252155330e-16, /* twoPowerIndex1mi[25] */ 
+    5.83707943855262433756426258532402998630656838432942e-33, /* twoPowerIndex1lo[25] */ 
+  } , 
+  { 
+    1.00440955362861283894915231940103694796562194824219e+00, /* twoPowerIndex1hi[26] */ 
+    4.20918873812712592966120368574870018412444102186114e-17, /* twoPowerIndex1mi[26] */ 
+    2.17971061415864797757688538084764343153482363480001e-33, /* twoPowerIndex1lo[26] */ 
+  } , 
+  { 
+    1.00457953960547174965256544965086504817008972167969e+00, /* twoPowerIndex1hi[27] */ 
+    -1.67001668575547876279593068362269006396955075031486e-17, /* twoPowerIndex1mi[27] */ 
+    8.56552273127180632250100064178508499726804497630949e-34, /* twoPowerIndex1lo[27] */ 
+  } , 
+  { 
+    1.00474955435070723019919114449294283986091613769531e+00, /* twoPowerIndex1hi[28] */ 
+    -1.62314635541245143576050143734168865049382925451905e-17, /* twoPowerIndex1mi[28] */ 
+    9.28530603331304279248127378347521992965436217888846e-35, /* twoPowerIndex1lo[28] */ 
+  } , 
+  { 
+    1.00491959786918805264122056541964411735534667968750e+00, /* twoPowerIndex1hi[29] */ 
+    2.30285392780281171183781407072193459566423534757738e-17, /* twoPowerIndex1mi[29] */ 
+    -4.94345170697772961451844215454960159293576885861471e-34, /* twoPowerIndex1lo[29] */ 
+  } , 
+  { 
+    1.00508967016578387720926457404857501387596130371094e+00, /* twoPowerIndex1hi[30] */ 
+    1.64180469767730323539044065876968510741128671646342e-17, /* twoPowerIndex1mi[30] */ 
+    -1.40120338097898451052996285664279342840562084008057e-34, /* twoPowerIndex1lo[30] */ 
+  } , 
+  { 
+    1.00525977124536503026774880709126591682434082031250e+00, /* twoPowerIndex1hi[31] */ 
+    3.72669843182841367415839881731427710949489409371967e-17, /* twoPowerIndex1mi[31] */ 
+    -6.47401139805376556406832921347318553328966160972009e-34, /* twoPowerIndex1lo[31] */ 
+  } , 
+  { 
+    1.00542990111280272635951860138447955250740051269531e+00, /* twoPowerIndex1hi[32] */ 
+    9.49918653545503175702165599813853704096085691656846e-17, /* twoPowerIndex1mi[32] */ 
+    2.69197614795285565383714012654266434015814803945559e-33, /* twoPowerIndex1lo[32] */ 
+  } , 
+  { 
+    1.00560005977296929025044391892151907086372375488281e+00, /* twoPowerIndex1hi[33] */ 
+    -8.68093131444458156819420437418787120833640771986467e-17, /* twoPowerIndex1mi[33] */ 
+    1.70120132411898592857823454488038166970266621441155e-33, /* twoPowerIndex1lo[33] */ 
+  } , 
+  { 
+    1.00577024723073704670639472169568762183189392089844e+00, /* twoPowerIndex1hi[34] */ 
+    4.00054749103011688253297776917861866454998331259826e-17, /* twoPowerIndex1mi[34] */ 
+    1.31925963209617013098908877209722537258440391267352e-33, /* twoPowerIndex1lo[34] */ 
+  } , 
+  { 
+    1.00594046349098009685008037195075303316116333007812e+00, /* twoPowerIndex1hi[35] */ 
+    7.19049911150997399545071999536183023264065701084941e-17, /* twoPowerIndex1mi[35] */ 
+    5.87388840736458866162752231275781178461761843642826e-33, /* twoPowerIndex1lo[35] */ 
+  } , 
+  { 
+    1.00611070855857298589342008199309930205345153808594e+00, /* twoPowerIndex1hi[36] */ 
+    -1.39080686710657830063564897325456873924612265621065e-17, /* twoPowerIndex1mi[36] */ 
+    -1.04608842475341479042763417006066485614641577765254e-33, /* twoPowerIndex1lo[36] */ 
+  } , 
+  { 
+    1.00628098243839092518214783922303467988967895507812e+00, /* twoPowerIndex1hi[37] */ 
+    -8.14020864257304964668281784838729787981918541118695e-17, /* twoPowerIndex1mi[37] */ 
+    9.81687621053626949463979101287162593669867055078380e-34, /* twoPowerIndex1lo[37] */ 
+  } , 
+  { 
+    1.00645128513531001424041733116609975695610046386719e+00, /* twoPowerIndex1hi[38] */ 
+    -5.76215104374953424938341851527793234314721266620465e-17, /* twoPowerIndex1mi[38] */ 
+    -2.57074696660737495074482007072094547944536206743811e-33, /* twoPowerIndex1lo[38] */ 
+  } , 
+  { 
+    1.00662161665420724077080194547306746244430541992188e+00, /* twoPowerIndex1hi[39] */ 
+    6.74527847731045679518854873240614524466814727371618e-17, /* twoPowerIndex1mi[39] */ 
+    3.78807035520293397050945635744099720111701312971531e-33, /* twoPowerIndex1lo[39] */ 
+  } , 
+  { 
+    1.00679197699996070269889969495125114917755126953125e+00, /* twoPowerIndex1hi[40] */ 
+    1.89985572403462958330039110072328316553950667129559e-17, /* twoPowerIndex1mi[40] */ 
+    -9.63431595756658515104002497950853752466876076619761e-34, /* twoPowerIndex1lo[40] */ 
+  } , 
+  { 
+    1.00696236617744894203951844247058033943176269531250e+00, /* twoPowerIndex1hi[41] */ 
+    -9.63743003231640715845365699595418727819327585110316e-17, /* twoPowerIndex1mi[41] */ 
+    5.37739172125896523173793245498965828230574349410153e-34, /* twoPowerIndex1lo[41] */ 
+  } , 
+  { 
+    1.00713278419155116694128082599490880966186523437500e+00, /* twoPowerIndex1hi[42] */ 
+    -1.25286544624539788678561179100718466970708089928402e-17, /* twoPowerIndex1mi[42] */ 
+    6.73461401738595970431440883296934068477066941591536e-34, /* twoPowerIndex1lo[42] */ 
+  } , 
+  { 
+    1.00730323104714791782043903367593884468078613281250e+00, /* twoPowerIndex1hi[43] */ 
+    3.02057888784369419361601396858156577301726732087163e-17, /* twoPowerIndex1mi[43] */ 
+    2.28748779695564659338938424768062274005093770790899e-33, /* twoPowerIndex1lo[43] */ 
+  } , 
+  { 
+    1.00747370674912040122706002875929698348045349121094e+00, /* twoPowerIndex1hi[44] */ 
+    -4.86939425860856490657306074829518805252629724182687e-17, /* twoPowerIndex1mi[44] */ 
+    -2.15005825118530979132585793750524459885823808259600e-33, /* twoPowerIndex1lo[44] */ 
+  } , 
+  { 
+    1.00764421130235026780042062455322593450546264648438e+00, /* twoPowerIndex1hi[45] */ 
+    5.22402993768745316546273304631524097955173932918745e-17, /* twoPowerIndex1mi[45] */ 
+    1.56859855755260687389551771821040360984576895950448e-33, /* twoPowerIndex1lo[45] */ 
+  } , 
+  { 
+    1.00781474471172072249203210958512499928474426269531e+00, /* twoPowerIndex1hi[46] */ 
+    -9.36154355147845590745647945463041972879607082944076e-17, /* twoPowerIndex1mi[46] */ 
+    2.73525232969860711971224663796949142049450209755900e-33, /* twoPowerIndex1lo[46] */ 
+  } , 
+  { 
+    1.00798530698211497025340577238239347934722900390625e+00, /* twoPowerIndex1hi[47] */ 
+    -8.65251323306194956904999437269495581443314540350323e-17, /* twoPowerIndex1mi[47] */ 
+    3.95202635576858744637745517221782298786195221857564e-33, /* twoPowerIndex1lo[47] */ 
+  } , 
+  { 
+    1.00815589811841754830368245166027918457984924316406e+00, /* twoPowerIndex1hi[48] */ 
+    -3.25205875608430806088583499076669170064325943797327e-17, /* twoPowerIndex1mi[48] */ 
+    2.46355206137317856028163445564386882918089954604456e-33, /* twoPowerIndex1lo[48] */ 
+  } , 
+  { 
+    1.00832651812551388204042268625926226377487182617188e+00, /* twoPowerIndex1hi[49] */ 
+    -9.91723226806091428304981281566311898208154515630026e-17, /* twoPowerIndex1mi[49] */ 
+    -5.54888559019883709197982155449053331751526019176611e-33, /* twoPowerIndex1lo[49] */ 
+  } , 
+  { 
+    1.00849716700828984095039686508243903517723083496094e+00, /* twoPowerIndex1hi[50] */ 
+    -7.13604740416252276802131825807759910735798752142063e-17, /* twoPowerIndex1mi[50] */ 
+    4.98539917129953776836361552714923793985513981224277e-33, /* twoPowerIndex1lo[50] */ 
+  } , 
+  { 
+    1.00866784477163240474340000218944624066352844238281e+00, /* twoPowerIndex1hi[51] */ 
+    -1.72686837122432199045769102324975071816159176955755e-17, /* twoPowerIndex1mi[51] */ 
+    1.49699250027049460850618457278328039699137666243513e-33, /* twoPowerIndex1lo[51] */ 
+  } , 
+  { 
+    1.00883855142042944130764681176515296101570129394531e+00, /* twoPowerIndex1hi[52] */ 
+    -6.61995469367394011396161169543794432105455894234207e-17, /* twoPowerIndex1mi[52] */ 
+    -1.37180394060118324236386341775148249159351409372011e-33, /* twoPowerIndex1lo[52] */ 
+  } , 
+  { 
+    1.00900928695956926262056185805704444646835327148438e+00, /* twoPowerIndex1hi[53] */ 
+    3.56545690151302037529536411250390721695546928174132e-17, /* twoPowerIndex1mi[53] */ 
+    -3.04973969952342772070810129193852120178103073824881e-33, /* twoPowerIndex1lo[53] */ 
+  } , 
+  { 
+    1.00918005139394151292719925550045445561408996582031e+00, /* twoPowerIndex1hi[54] */ 
+    3.71731001370881785990046067286312459291233468170260e-17, /* twoPowerIndex1mi[54] */ 
+    2.33846700487585833881864340821781209486455210644683e-33, /* twoPowerIndex1lo[54] */ 
+  } , 
+  { 
+    1.00935084472843628056182296859333291649818420410156e+00, /* twoPowerIndex1hi[55] */ 
+    7.06257240682552768409771521622687712943771198652841e-17, /* twoPowerIndex1mi[55] */ 
+    -2.69254581845265407066861039619808678678301305791490e-33, /* twoPowerIndex1lo[55] */ 
+  } , 
+  { 
+    1.00952166696794476408172158699017018079757690429688e+00, /* twoPowerIndex1hi[56] */ 
+    -1.43214123034288192889278157016818203958577074101904e-17, /* twoPowerIndex1mi[56] */ 
+    1.18343254028162625925516501493235924385911429505127e-33, /* twoPowerIndex1lo[56] */ 
+  } , 
+  { 
+    1.00969251811735860613339355040807276964187622070312e+00, /* twoPowerIndex1hi[57] */ 
+    1.56681880131341096294393603553275561732689802958880e-17, /* twoPowerIndex1mi[57] */ 
+    -7.81531085085694011629938080711347719818453468652371e-34, /* twoPowerIndex1lo[57] */ 
+  } , 
+  { 
+    1.00986339818157078163096684875199571251869201660156e+00, /* twoPowerIndex1hi[58] */ 
+    -1.10436957803936884179513517801130489140214758906396e-16, /* twoPowerIndex1mi[58] */ 
+    2.26009746193166539328485913376118607218426838997178e-33, /* twoPowerIndex1lo[58] */ 
+  } , 
+  { 
+    1.01003430716547448753317439695820212364196777343750e+00, /* twoPowerIndex1hi[59] */ 
+    -5.76731742716039801926309676866051407637690838590278e-17, /* twoPowerIndex1mi[59] */ 
+    -2.78217177127226696492717790709599913537289113429847e-33, /* twoPowerIndex1lo[59] */ 
+  } , 
+  { 
+    1.01020524507396425306637866015080362558364868164062e+00, /* twoPowerIndex1hi[60] */ 
+    4.83548497844038273903057565303994337100835235326315e-18, /* twoPowerIndex1mi[60] */ 
+    2.61454310671247390892899439237254056446677108734060e-34, /* twoPowerIndex1lo[60] */ 
+  } , 
+  { 
+    1.01037621191193527359075687854783609509468078613281e+00, /* twoPowerIndex1hi[61] */ 
+    7.01512128971544209746870624992521939688820868468409e-17, /* twoPowerIndex1mi[61] */ 
+    -5.58161827166019262256128049263563333632096890407031e-33, /* twoPowerIndex1lo[61] */ 
+  } , 
+  { 
+    1.01054720768428363264490599249256774783134460449219e+00, /* twoPowerIndex1hi[62] */ 
+    7.16180287361957384315239192590148379997244337618299e-17, /* twoPowerIndex1mi[62] */ 
+    -2.02563561553844543425647289447795720504633264470840e-34, /* twoPowerIndex1lo[62] */ 
+  } , 
+  { 
+    1.01071823239590607990123771742219105362892150878906e+00, /* twoPowerIndex1hi[63] */ 
+    1.05046591340840499506734116899577087874840087102554e-16, /* twoPowerIndex1mi[63] */ 
+    2.18415845005431430458109722226729544983351542501345e-33, /* twoPowerIndex1lo[63] */ 
+  } }; 
+ 
+static const tPi_t twoPowerIndex2[64] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2hi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2mi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2lo[0] */ 
+  } , 
+  { 
+    1.01088928605170047525518839393043890595436096191406e+00, /* twoPowerIndex2hi[1] */ 
+    -1.52347786033685771762884896542837070154735103108242e-17, /* twoPowerIndex2mi[1] */ 
+    -1.20527773363982029579667170059568717373235495431222e-33, /* twoPowerIndex2lo[1] */ 
+  } , 
+  { 
+    1.02189714865411662714222984504885971546173095703125e+00, /* twoPowerIndex2hi[2] */ 
+    5.10922502897344389358977529484899213711118891193073e-17, /* twoPowerIndex2mi[2] */ 
+    7.88422656496927442160138555121324022911581088833303e-34, /* twoPowerIndex2lo[2] */ 
+  } , 
+  { 
+    1.03302487902122841489926940994337201118469238281250e+00, /* twoPowerIndex2hi[3] */ 
+    7.60083887402708848935418174694583720224989620170520e-18, /* twoPowerIndex2mi[3] */ 
+    4.17547660336499599627565312970423748685953776150432e-34, /* twoPowerIndex2lo[3] */ 
+  } , 
+  { 
+    1.04427378242741375480306942336028441786766052246094e+00, /* twoPowerIndex2hi[4] */ 
+    8.55188970553796489217080231819249267647451456689049e-17, /* twoPowerIndex2mi[4] */ 
+    -4.33079108057472301914865017639792677602990877842667e-33, /* twoPowerIndex2lo[4] */ 
+  } , 
+  { 
+    1.05564517836055715704901558638084679841995239257812e+00, /* twoPowerIndex2hi[5] */ 
+    1.75932573877209198413667791203269037000656546957040e-18, /* twoPowerIndex2mi[5] */ 
+    -1.30396724977978376996223394717384715710429730879060e-34, /* twoPowerIndex2lo[5] */ 
+  } , 
+  { 
+    1.06714040067682369716806078940862789750099182128906e+00, /* twoPowerIndex2hi[6] */ 
+    -7.89985396684158212226333428391940791349522867645719e-17, /* twoPowerIndex2mi[6] */ 
+    2.48773924323047906697979838020484860096229450391065e-33, /* twoPowerIndex2lo[6] */ 
+  } , 
+  { 
+    1.07876079775711986030728439800441265106201171875000e+00, /* twoPowerIndex2hi[7] */ 
+    -6.65666043605659260344452997720816205593857378631714e-17, /* twoPowerIndex2mi[7] */ 
+    -3.65812580131923690564246115619834327696213789275798e-33, /* twoPowerIndex2lo[7] */ 
+  } , 
+  { 
+    1.09050773266525768967483145388541743159294128417969e+00, /* twoPowerIndex2hi[8] */ 
+    -3.04678207981247114696551170541257032193091359539676e-17, /* twoPowerIndex2mi[8] */ 
+    2.01705487848848619150139275849815038703452970938356e-33, /* twoPowerIndex2lo[8] */ 
+  } , 
+  { 
+    1.10238258330784089089604549371870234608650207519531e+00, /* twoPowerIndex2hi[9] */ 
+    5.26603687157069438656191942579725322612448063343618e-17, /* twoPowerIndex2mi[9] */ 
+    6.45805397536721410708490440561131106837447579889036e-34, /* twoPowerIndex2lo[9] */ 
+  } , 
+  { 
+    1.11438674259589243220602838846389204263687133789062e+00, /* twoPowerIndex2hi[10] */ 
+    1.04102784568455709549461912557590544266030834754874e-16, /* twoPowerIndex2mi[10] */ 
+    1.47570167344000313963428137759389241586071635800536e-33, /* twoPowerIndex2lo[10] */ 
+  } , 
+  { 
+    1.12652161860824184813623105583246797323226928710938e+00, /* twoPowerIndex2hi[11] */ 
+    5.16585675879545673703180814711785602957687143067887e-17, /* twoPowerIndex2mi[11] */ 
+    -5.65916686170716220063974592097473710424342945964456e-34, /* twoPowerIndex2lo[11] */ 
+  } , 
+  { 
+    1.13878863475669156457570352358743548393249511718750e+00, /* twoPowerIndex2hi[12] */ 
+    8.91281267602540777782023808215740339330966556723006e-17, /* twoPowerIndex2mi[12] */ 
+    -2.00741463283249448727846279877956608996968961458494e-33, /* twoPowerIndex2lo[12] */ 
+  } , 
+  { 
+    1.15118922995298267331065744656370952725410461425781e+00, /* twoPowerIndex2hi[13] */ 
+    3.25071021886382721197741051783883831627922464835734e-17, /* twoPowerIndex2mi[13] */ 
+    8.89091931637927159755660842958283684863470887791663e-34, /* twoPowerIndex2lo[13] */ 
+  } , 
+  { 
+    1.16372485877757747552152522985124960541725158691406e+00, /* twoPowerIndex2hi[14] */ 
+    3.82920483692409349872159816102110059722238312159091e-17, /* twoPowerIndex2mi[14] */ 
+    7.19709831987676327409679245188515478735702972651365e-34, /* twoPowerIndex2lo[14] */ 
+  } , 
+  { 
+    1.17639699165028122074261318630306050181388854980469e+00, /* twoPowerIndex2hi[15] */ 
+    5.55420325421807896276684328889766000203735373777665e-17, /* twoPowerIndex2mi[15] */ 
+    -1.48842929343368511961710849782815827921712348302943e-33, /* twoPowerIndex2lo[15] */ 
+  } , 
+  { 
+    1.18920711500272102689734765590401366353034973144531e+00, /* twoPowerIndex2hi[16] */ 
+    3.98201523146564611098029654755651628169309930562261e-17, /* twoPowerIndex2mi[16] */ 
+    1.14195965688545340101163692105448367710482873511510e-33, /* twoPowerIndex2lo[16] */ 
+  } , 
+  { 
+    1.20215673145270307564658196497475728392601013183594e+00, /* twoPowerIndex2hi[17] */ 
+    6.64498149925230124489270286991048474954122885069094e-17, /* twoPowerIndex2mi[17] */ 
+    -3.85685255336907654452995968372311171004938395576078e-33, /* twoPowerIndex2lo[17] */ 
+  } , 
+  { 
+    1.21524735998046895524282717815367504954338073730469e+00, /* twoPowerIndex2hi[18] */ 
+    -7.71263069268148813091257203929615917892526180720328e-17, /* twoPowerIndex2mi[18] */ 
+    4.71720614288499816545262331753743129502653902881319e-33, /* twoPowerIndex2lo[18] */ 
+  } , 
+  { 
+    1.22848053610687002468182527081808075308799743652344e+00, /* twoPowerIndex2hi[19] */ 
+    -1.89878163130252995311948719658078062677878185721429e-17, /* twoPowerIndex2mi[19] */ 
+    6.18469453652103848424687212656185051850860290411013e-34, /* twoPowerIndex2lo[19] */ 
+  } , 
+  { 
+    1.24185781207348400201340155035723000764846801757812e+00, /* twoPowerIndex2hi[20] */ 
+    4.65802759183693679122616767654141683800114091774588e-17, /* twoPowerIndex2mi[20] */ 
+    -2.31439910378785985764079190411324307370918857557275e-33, /* twoPowerIndex2lo[20] */ 
+  } , 
+  { 
+    1.25538075702469109629078047873917967081069946289062e+00, /* twoPowerIndex2hi[21] */ 
+    -6.71138982129687841852821870522008036246320680675952e-18, /* twoPowerIndex2mi[21] */ 
+    -5.76846264325028352862497671463784812858487529613818e-35, /* twoPowerIndex2lo[21] */ 
+  } , 
+  { 
+    1.26905095719173321988648694969015195965766906738281e+00, /* twoPowerIndex2hi[22] */ 
+    2.66793213134218609522998616502989391061315227839969e-18, /* twoPowerIndex2mi[22] */ 
+    -5.01723570938719050333027020376949013774930719140568e-35, /* twoPowerIndex2lo[22] */ 
+  } , 
+  { 
+    1.28287001607877826359072059858590364456176757812500e+00, /* twoPowerIndex2hi[23] */ 
+    1.71359491824356096814175768900864730928374054987756e-17, /* twoPowerIndex2mi[23] */ 
+    7.25131491282819461838977871983760669047046080773478e-34, /* twoPowerIndex2lo[23] */ 
+  } , 
+  { 
+    1.29683955465100964055125132290413603186607360839844e+00, /* twoPowerIndex2hi[24] */ 
+    2.53825027948883149592910250791940344234383392801619e-17, /* twoPowerIndex2mi[24] */ 
+    1.68678246461832500334243039646153124282288438904092e-34, /* twoPowerIndex2lo[24] */ 
+  } , 
+  { 
+    1.31096121152476441373835314152529463171958923339844e+00, /* twoPowerIndex2hi[25] */ 
+    -7.18153613551945385697245613605196258733040544776187e-17, /* twoPowerIndex2mi[25] */ 
+    -2.12629266743969557140434977160228094057588798528197e-34, /* twoPowerIndex2lo[25] */ 
+  } , 
+  { 
+    1.32523664315974132321684919588733464479446411132812e+00, /* twoPowerIndex2hi[26] */ 
+    -2.85873121003886137327027220806882812126373511580572e-17, /* twoPowerIndex2mi[26] */ 
+    7.62021406397260431456821182703024347950927217409368e-34, /* twoPowerIndex2lo[26] */ 
+  } , 
+  { 
+    1.33966752405330291608720472140703350305557250976562e+00, /* twoPowerIndex2hi[27] */ 
+    8.92728259483173198426255486589831591472085466011828e-17, /* twoPowerIndex2mi[27] */ 
+    -7.69657983531899254540849298389093495155758992415150e-34, /* twoPowerIndex2lo[27] */ 
+  } , 
+  { 
+    1.35425554693689265128853094211081042885780334472656e+00, /* twoPowerIndex2hi[28] */ 
+    7.70094837980298946162338224151128414915778826123523e-17, /* twoPowerIndex2mi[28] */ 
+    -2.24074836437395028882100810844688282941385619430371e-33, /* twoPowerIndex2lo[28] */ 
+  } , 
+  { 
+    1.36900242297459051599162194179370999336242675781250e+00, /* twoPowerIndex2hi[29] */ 
+    9.59379791911884877255545693637832999511204427845953e-17, /* twoPowerIndex2mi[29] */ 
+    -4.88674958784947176959607858061848292445663702071206e-33, /* twoPowerIndex2lo[29] */ 
+  } , 
+  { 
+    1.38390988196383202257777611521305516362190246582031e+00, /* twoPowerIndex2hi[30] */ 
+    -6.77051165879478628715737183479431151106043475381389e-17, /* twoPowerIndex2mi[30] */ 
+    5.25954134785524271676320971772030766300829615286373e-34, /* twoPowerIndex2lo[30] */ 
+  } , 
+  { 
+    1.39897967253831123635166022722842171788215637207031e+00, /* twoPowerIndex2hi[31] */ 
+    -9.61421320905132307233280072508933760749140842467170e-17, /* twoPowerIndex2mi[31] */ 
+    3.97465190077505680357285219692652769985214754647576e-33, /* twoPowerIndex2lo[31] */ 
+  } , 
+  { 
+    1.41421356237309514547462185873882845044136047363281e+00, /* twoPowerIndex2hi[32] */ 
+    -9.66729331345291345105469972976694765012981670542977e-17, /* twoPowerIndex2mi[32] */ 
+    4.13867530869941356271900493210877889450985709540127e-33, /* twoPowerIndex2lo[32] */ 
+  } , 
+  { 
+    1.42961333839197002326670826732879504561424255371094e+00, /* twoPowerIndex2hi[33] */ 
+    -1.20316424890536551791763281075597751007148682598677e-17, /* twoPowerIndex2mi[33] */ 
+    3.96492532243389364766543780399018506300743370884771e-35, /* twoPowerIndex2lo[33] */ 
+  } , 
+  { 
+    1.44518080697704665027458759141154587268829345703125e+00, /* twoPowerIndex2hi[34] */ 
+    -3.02375813499398731939978948265280760393682335269040e-17, /* twoPowerIndex2mi[34] */ 
+    -1.77301195820250091791088617662298487007284882395542e-33, /* twoPowerIndex2lo[34] */ 
+  } , 
+  { 
+    1.46091779418064704465507475106278434395790100097656e+00, /* twoPowerIndex2hi[35] */ 
+    -5.60037718607521580013156831807759453639536208267684e-17, /* twoPowerIndex2mi[35] */ 
+    -4.80948804890004400970317146361816382779746350931714e-33, /* twoPowerIndex2lo[35] */ 
+  } , 
+  { 
+    1.47682614593949934622685304930200800299644470214844e+00, /* twoPowerIndex2hi[36] */ 
+    -3.48399455689279579579151031868718147769491495422105e-17, /* twoPowerIndex2mi[36] */ 
+    -1.21157704523090580028169713170353136148082368354920e-34, /* twoPowerIndex2lo[36] */ 
+  } , 
+  { 
+    1.49290772829126483500772337720263749361038208007812e+00, /* twoPowerIndex2hi[37] */ 
+    1.41929201542840357707378184476885202767753055101956e-17, /* twoPowerIndex2mi[37] */ 
+    2.77326329344780505247628358108799734324783290873618e-34, /* twoPowerIndex2lo[37] */ 
+  } , 
+  { 
+    1.50916442759342284141155232646269723773002624511719e+00, /* twoPowerIndex2hi[38] */ 
+    -1.01645532775429503910501990740249618370059871055172e-16, /* twoPowerIndex2mi[38] */ 
+    2.04191706967403438352422808603561166583202022922508e-34, /* twoPowerIndex2lo[38] */ 
+  } , 
+  { 
+    1.52559815074453841710067081294255331158638000488281e+00, /* twoPowerIndex2hi[39] */ 
+    -1.10249417123425609363148008789604625195179292613569e-16, /* twoPowerIndex2mi[39] */ 
+    -2.99382882637137806007903782085057425945683820190483e-33, /* twoPowerIndex2lo[39] */ 
+  } , 
+  { 
+    1.54221082540794074411394376511452719569206237792969e+00, /* twoPowerIndex2hi[40] */ 
+    7.94983480969762085616103882937991564856794389991833e-17, /* twoPowerIndex2mi[40] */ 
+    -9.15995637410036729585390444224530830478731117122757e-34, /* twoPowerIndex2lo[40] */ 
+  } , 
+  { 
+    1.55900440023783692922165755589958280324935913085938e+00, /* twoPowerIndex2hi[41] */ 
+    3.78120705335752750188190562589679090842557793649900e-17, /* twoPowerIndex2mi[41] */ 
+    5.94230221045385633407443935898656310894518533675204e-35, /* twoPowerIndex2lo[41] */ 
+  } , 
+  { 
+    1.57598084510788649659218663146020844578742980957031e+00, /* twoPowerIndex2hi[42] */ 
+    -1.01369164712783039807957177429288269249745537889645e-17, /* twoPowerIndex2mi[42] */ 
+    5.43913851556220712785038586461119929989856637311730e-34, /* twoPowerIndex2lo[42] */ 
+  } , 
+  { 
+    1.59314215134226699888131406623870134353637695312500e+00, /* twoPowerIndex2hi[43] */ 
+    -1.00944065423119637216151952902063201612012779755882e-16, /* twoPowerIndex2mi[43] */ 
+    4.60848399034962572477662350836868643017178368092553e-33, /* twoPowerIndex2lo[43] */ 
+  } , 
+  { 
+    1.61049033194925428347232809755951166152954101562500e+00, /* twoPowerIndex2hi[44] */ 
+    2.47071925697978878522451183466139791436957933053447e-17, /* twoPowerIndex2mi[44] */ 
+    1.06968477888935897586507304780358756526593706030066e-33, /* twoPowerIndex2lo[44] */ 
+  } , 
+  { 
+    1.62802742185734783397776936908485367894172668457031e+00, /* twoPowerIndex2hi[45] */ 
+    -6.71295508470708408629558620522800193343463268850872e-17, /* twoPowerIndex2mi[45] */ 
+    1.86124288813399584090278118171650158752835667500490e-33, /* twoPowerIndex2lo[45] */ 
+  } , 
+  { 
+    1.64575547815396494577555586147354915738105773925781e+00, /* twoPowerIndex2hi[46] */ 
+    -1.01256799136747726037875241569662212149731136230039e-16, /* twoPowerIndex2mi[46] */ 
+    -6.73838498803664271467304077725442401461793880458369e-34, /* twoPowerIndex2lo[46] */ 
+  } , 
+  { 
+    1.66367658032673637613640948984539136290550231933594e+00, /* twoPowerIndex2hi[47] */ 
+    5.89099269671309967045155789620226639428173542900082e-17, /* twoPowerIndex2mi[47] */ 
+    2.37785299276765025315795732233641105960161859663372e-33, /* twoPowerIndex2lo[47] */ 
+  } , 
+  { 
+    1.68179283050742900407215074665145948529243469238281e+00, /* twoPowerIndex2hi[48] */ 
+    8.19901002058149652012724391042374107310082144797238e-17, /* twoPowerIndex2mi[48] */ 
+    5.10351519472809316392686812760480457926425713861784e-33, /* twoPowerIndex2lo[48] */ 
+  } , 
+  { 
+    1.70010635371852347752508194389520213007926940917969e+00, /* twoPowerIndex2hi[49] */ 
+    -8.02371937039770024588528464451482959960563128920877e-18, /* twoPowerIndex2mi[49] */ 
+    4.50894675051846528463958043437010583905518288996850e-34, /* twoPowerIndex2lo[49] */ 
+  } , 
+  { 
+    1.71861929812247793414314855908742174506187438964844e+00, /* twoPowerIndex2hi[50] */ 
+    -1.85138041826311098821086356969536380719870481925638e-17, /* twoPowerIndex2mi[50] */ 
+    6.41562962530571009881963439719259893730039269925891e-34, /* twoPowerIndex2lo[50] */ 
+  } , 
+  { 
+    1.73733383527370621735030908894259482622146606445312e+00, /* twoPowerIndex2hi[51] */ 
+    3.16438929929295694659064288262436215220581330791541e-17, /* twoPowerIndex2mi[51] */ 
+    2.46812086524635182684409036079744664142196277491485e-33, /* twoPowerIndex2lo[51] */ 
+  } , 
+  { 
+    1.75625216037329945351075366488657891750335693359375e+00, /* twoPowerIndex2hi[52] */ 
+    2.96014069544887330703087179323550026749650613893620e-17, /* twoPowerIndex2mi[52] */ 
+    1.23348227448930022362949427574612725745479960698002e-33, /* twoPowerIndex2lo[52] */ 
+  } , 
+  { 
+    1.77537649252652118825324123463360592722892761230469e+00, /* twoPowerIndex2hi[53] */ 
+    6.42973179655657203395602172161574258202382771355994e-17, /* twoPowerIndex2mi[53] */ 
+    -3.05903038196122316059732104267589318807211463677414e-33, /* twoPowerIndex2lo[53] */ 
+  } , 
+  { 
+    1.79470907500310716820024481421569362282752990722656e+00, /* twoPowerIndex2hi[54] */ 
+    1.82274584279120867697625715862678123206602563412216e-17, /* twoPowerIndex2mi[54] */ 
+    1.42176433874694971095041068746172287320972847635154e-33, /* twoPowerIndex2lo[54] */ 
+  } , 
+  { 
+    1.81425217550039885594514998956583440303802490234375e+00, /* twoPowerIndex2hi[55] */ 
+    -9.96953153892034881983229632097342495877571562964276e-17, /* twoPowerIndex2mi[55] */ 
+    -5.86224914377491774994695195482808191103744720514440e-33, /* twoPowerIndex2lo[55] */ 
+  } , 
+  { 
+    1.83400808640934243065601094713201746344566345214844e+00, /* twoPowerIndex2hi[56] */ 
+    3.28310722424562720351405816760294702167288526703081e-17, /* twoPowerIndex2mi[56] */ 
+    -6.42508934795304248095271046696049734574532048424330e-34, /* twoPowerIndex2lo[56] */ 
+  } , 
+  { 
+    1.85397912508338547077357816306175664067268371582031e+00, /* twoPowerIndex2hi[57] */ 
+    9.76188749072759353840331670682321086158335176176729e-17, /* twoPowerIndex2mi[57] */ 
+    4.61481577205566482307976345637533484680898060020057e-33, /* twoPowerIndex2lo[57] */ 
+  } , 
+  { 
+    1.87416763411029996255763307999586686491966247558594e+00, /* twoPowerIndex2hi[58] */ 
+    -6.12276341300414256163658402373731493255704994623650e-17, /* twoPowerIndex2mi[58] */ 
+    5.28588559402507397372575432425046614667899080733482e-33, /* twoPowerIndex2lo[58] */ 
+  } , 
+  { 
+    1.89457598158696560730618330126162618398666381835938e+00, /* twoPowerIndex2hi[59] */ 
+    3.40340353521652967060147928999507962708632290832738e-17, /* twoPowerIndex2mi[59] */ 
+    1.72475099549343225430579028439403217279441019556785e-33, /* twoPowerIndex2lo[59] */ 
+  } , 
+  { 
+    1.91520656139714740007207183225546032190322875976562e+00, /* twoPowerIndex2hi[60] */ 
+    -1.06199460561959626376283195555328606320260702029334e-16, /* twoPowerIndex2mi[60] */ 
+    -3.05776975679132548538006102719337626149343902119718e-33, /* twoPowerIndex2lo[60] */ 
+  } , 
+  { 
+    1.93606179349229434727419629780342802405357360839844e+00, /* twoPowerIndex2hi[61] */ 
+    1.03323859606763257447769151803649788699571393339738e-16, /* twoPowerIndex2mi[61] */ 
+    6.05301367682062275405664830597304146844867569493449e-33, /* twoPowerIndex2lo[61] */ 
+  } , 
+  { 
+    1.95714412417540017941064434126019477844238281250000e+00, /* twoPowerIndex2hi[62] */ 
+    8.96076779103666776760155050762912042076490756639488e-17, /* twoPowerIndex2mi[62] */ 
+    -9.63267661361827588458686334472185443533033181828620e-34, /* twoPowerIndex2lo[62] */ 
+  } , 
+  { 
+    1.97845602638795092786949680885300040245056152343750e+00, /* twoPowerIndex2hi[63] */ 
+    4.03887531092781665749784154795462589642365074083484e-17, /* twoPowerIndex2mi[63] */ 
+    3.58120371667786223934924900740488031476290303118010e-34, /* twoPowerIndex2lo[63] */ 
+  } }; 
+ 
+
+
diff --git a/src/crlibm/gappa/asin/asinAccuR0.gappa b/src/crlibm/gappa/asin/asinAccuR0.gappa
new file mode 100644
index 0000000..bf1e5e0
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR0.gappa
@@ -0,0 +1,502 @@
+# The polynomial to implement is: x * (1b0 + ((x^(1b1)) * (108172851219475575594385340192083b-109 + ((x^(1b1)) * (3042361440547750563592087693241b-105 + ((x^(1b1)) * (115899483449438116708269989305805b-111 + ((x^(1b1)) * (78876037347534273870913665352907b-111 + ((x^(1b1)) * (14520361420796082234834302007973b-109 + ((x^(1b1)) * (90100704200837228890721343577993b-112 + ((x^(1b1)) * (8050184333924753b-59 + ((x^(1b1)) * (3329579917524393b-58 + ((x^(1b1)) * (703398096605685b-56 + ((x^(1b1)) * [...]
+# The polynomial implemented is: x * (1b0 + ((x^(1b1)) * (108172851219475575594385340192083b-109 + ((x^(1b1)) * (3042361440547750563592087693241b-105 + ((x^(1b1)) * (115899483449438116708269989305805b-111 + ((x^(1b1)) * (78876037347534273870913665352907b-111 + ((x^(1b1)) * (14520361420796082234834302007973b-109 + ((x^(1b1)) * (90100704200837228890721343577993b-112 + ((x^(1b1)) * (8050184333924753b-59 + ((x^(1b1)) * (3329579917524393b-58 + ((x^(1b1)) * (703398096605685b-56 + ((x^(1b1)) *  [...]
+# The domain is [1b-54;9007199254740983b-55]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 56 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_1h = double(1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00);
+
+p_coeff_3h = double(1.66666666666666657414808128123695496469736099243164062500000000000000000000000000e-01);
+p_coeff_3m = double(9.25185853854296757512770104458324356634117384146900539554358999794203555211424828e-18);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_5h = double(7.49999999999999972244424384371086489409208297729492187500000000000000000000000000e-02);
+p_coeff_5m = double(2.77555756157123848551244900139306363413139848179272961559149734966922551393508911e-18);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_7h = double(4.46428571428571438484134148438897682353854179382324218750000000000000000000000000e-02);
+p_coeff_7m = double(-9.91270564650888671257031422999640405542600950171395167431764861021292745135724545e-19);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_9h = double(3.03819444444444440589503386718206456862390041351318359375000000000000000000000000e-02);
+p_coeff_9m = double(3.85497067132392282371332994114988395042540962791093560324551248186253360472619534e-19);
+p_coeff_9hm = p_coeff_9h + p_coeff_9m;
+
+p_coeff_11h = double(2.23721590909090918553037141691675060428678989410400390625000000000000000000000000e-02);
+p_coeff_11m = double(-9.46970190235819944882493359250540536388374860744029243297958942093828227370977402e-19);
+p_coeff_11hm = p_coeff_11h + p_coeff_11m;
+
+p_coeff_13h = double(1.73527644230769238775646812200648128055036067962646484375000000000000000000000000e-02);
+p_coeff_13m = double(-6.73286913315360860061003796178520710524664576113391175476996508564297982957214117e-19);
+p_coeff_13hm = p_coeff_13h + p_coeff_13m;
+
+p_coeff_15h = double(1.39648437499999850813781065994589880574494600296020507812500000000000000000000000e-02);
+
+p_coeff_17h = double(1.15518008961409714141499449624461703933775424957275390625000000000000000000000000e-02);
+
+p_coeff_19h = double(9.76160952911427071132521859908592887222766876220703125000000000000000000000000000e-03);
+
+p_coeff_21h = double(8.39033581342360154642356917520373826846480369567871093750000000000000000000000000e-03);
+
+p_coeff_23h = double(7.31252573485535913022648202286291052587330341339111328125000000000000000000000000e-03);
+
+p_coeff_25h = double(6.44721419032266533644115469314783695153892040252685546875000000000000000000000000e-03);
+
+p_coeff_27h = double(5.73995473599474108350459999883241835050284862518310546875000000000000000000000000e-03);
+
+p_coeff_29h = double(5.15465255859299739671364193327462999150156974792480468750000000000000000000000000e-03);
+
+p_coeff_31h = double(4.64401037031901206542094939777598483487963676452636718750000000000000000000000000e-03);
+
+p_coeff_33h = double(4.37957744519422778606276835944299818947911262512207031250000000000000000000000000e-03);
+
+p_coeff_35h = double(3.08318270558301894476715965254243201343342661857604980468750000000000000000000000e-03);
+
+p_coeff_37h = double(6.23791382502981474333925149267088272608816623687744140625000000000000000000000000e-03);
+
+p_x_0_pow2hm = xh * xh;
+p_x_0_pow2h = double(p_x_0_pow2hm);
+p_x_0_pow2m = p_x_0_pow2hm - p_x_0_pow2h;
+
+p_t_1_0h = p_coeff_37h;
+
+p_t_2_0h = double(p_t_1_0h * p_x_0_pow2h);
+p_t_3_0h = double(p_coeff_35h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * p_x_0_pow2h);
+p_t_5_0h = double(p_coeff_33h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * p_x_0_pow2h);
+p_t_7_0hm = p_coeff_31h + p_t_6_0h;
+p_t_7_0h = double(p_t_7_0hm);
+p_t_7_0m = p_t_7_0hm - p_t_7_0h;
+
+p_t_8_0hm = mul_rel<102>(p_t_7_0hm,p_x_0_pow2hm);
+p_t_8_0h = double(p_t_8_0hm);
+p_t_8_0m = p_t_8_0hm - p_t_8_0h;
+
+p_t_9_0hm = add_rel<102>(p_coeff_29h,p_t_8_0hm);
+p_t_9_0h = double(p_t_9_0hm);
+p_t_9_0m = p_t_9_0hm - p_t_9_0h;
+
+p_t_10_0hm = mul_rel<102>(p_t_9_0hm,p_x_0_pow2hm);
+p_t_10_0h = double(p_t_10_0hm);
+p_t_10_0m = p_t_10_0hm - p_t_10_0h;
+
+p_t_11_0hm = add_rel<102>(p_coeff_27h,p_t_10_0hm);
+p_t_11_0h = double(p_t_11_0hm);
+p_t_11_0m = p_t_11_0hm - p_t_11_0h;
+
+p_t_12_0hm = mul_rel<102>(p_t_11_0hm,p_x_0_pow2hm);
+p_t_12_0h = double(p_t_12_0hm);
+p_t_12_0m = p_t_12_0hm - p_t_12_0h;
+
+p_t_13_0hm = add_rel<102>(p_coeff_25h,p_t_12_0hm);
+p_t_13_0h = double(p_t_13_0hm);
+p_t_13_0m = p_t_13_0hm - p_t_13_0h;
+
+p_t_14_0hm = mul_rel<102>(p_t_13_0hm,p_x_0_pow2hm);
+p_t_14_0h = double(p_t_14_0hm);
+p_t_14_0m = p_t_14_0hm - p_t_14_0h;
+
+p_t_15_0hm = add_rel<102>(p_coeff_23h,p_t_14_0hm);
+p_t_15_0h = double(p_t_15_0hm);
+p_t_15_0m = p_t_15_0hm - p_t_15_0h;
+
+p_t_16_0hm = mul_rel<102>(p_t_15_0hm,p_x_0_pow2hm);
+p_t_16_0h = double(p_t_16_0hm);
+p_t_16_0m = p_t_16_0hm - p_t_16_0h;
+
+p_t_17_0hm = add_rel<102>(p_coeff_21h,p_t_16_0hm);
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(p_t_17_0hm,p_x_0_pow2hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_19h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(p_t_19_0hm,p_x_0_pow2hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_17h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(p_t_21_0hm,p_x_0_pow2hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_15h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = fma_rel<100>(p_t_23_0hm,p_x_0_pow2hm,p_coeff_13hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = fma_rel<100>(p_t_24_0hm,p_x_0_pow2hm,p_coeff_11hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = fma_rel<100>(p_t_25_0hm,p_x_0_pow2hm,p_coeff_9hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = mul_rel<102>(p_t_26_0hm,p_x_0_pow2hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hml = add_rel<140>(p_coeff_7hm,p_t_27_0hm);
+p_t_28_0ml = p_t_28_0hml - p_t_28_0h;
+p_t_28_0m = double(p_t_28_0ml);
+p_t_28_0l = p_t_28_0ml - p_t_28_0m;
+p_t_28_0hm = p_t_28_0h + p_t_28_0m;
+overlap_p_t_28_0 = p_t_28_0m / p_t_28_0h;
+
+p_t_29_0hml = mul_rel<142>(p_x_0_pow2hm,p_t_28_0hml);
+p_t_29_0ml = p_t_29_0hml - p_t_29_0h;
+p_t_29_0m = double(p_t_29_0ml);
+p_t_29_0l = p_t_29_0ml - p_t_29_0m;
+p_t_29_0hm = p_t_29_0h + p_t_29_0m;
+overlap_p_t_29_0 = p_t_29_0m / p_t_29_0h;
+
+p_t_30_0hml = add_rel<144>(p_coeff_5hm,p_t_29_0hml);
+p_t_30_0ml = p_t_30_0hml - p_t_30_0h;
+p_t_30_0m = double(p_t_30_0ml);
+p_t_30_0l = p_t_30_0ml - p_t_30_0m;
+p_t_30_0hm = p_t_30_0h + p_t_30_0m;
+overlap_p_t_30_0 = p_t_30_0m / p_t_30_0h;
+
+p_t_31_0hml = mul_rel<133>(p_x_0_pow2hm,p_t_30_0hml);
+p_t_31_0ml = p_t_31_0hml - p_t_31_0h;
+p_t_31_0m = double(p_t_31_0ml);
+p_t_31_0l = p_t_31_0ml - p_t_31_0m;
+p_t_31_0hm = p_t_31_0h + p_t_31_0m;
+overlap_p_t_31_0 = p_t_31_0m / p_t_31_0h;
+
+p_t_32_0hml = add_rel<135>(p_coeff_3hm,p_t_31_0hml);
+p_t_32_0ml = p_t_32_0hml - p_t_32_0h;
+p_t_32_0m = double(p_t_32_0ml);
+p_t_32_0l = p_t_32_0ml - p_t_32_0m;
+p_t_32_0hm = p_t_32_0h + p_t_32_0m;
+overlap_p_t_32_0 = p_t_32_0m / p_t_32_0h;
+
+p_t_33_0hml = mul_rel<124>(p_x_0_pow2hm,p_t_32_0hml);
+p_t_33_0ml = p_t_33_0hml - p_t_33_0h;
+p_t_33_0m = double(p_t_33_0ml);
+p_t_33_0l = p_t_33_0ml - p_t_33_0m;
+p_t_33_0hm = p_t_33_0h + p_t_33_0m;
+overlap_p_t_33_0 = p_t_33_0m / p_t_33_0h;
+
+p_t_34_0hml = add_rel<127>(p_coeff_1h,p_t_33_0hml);
+p_t_34_0ml = p_t_34_0hml - p_t_34_0h;
+p_t_34_0m = double(p_t_34_0ml);
+p_t_34_0l = p_t_34_0ml - p_t_34_0m;
+p_t_34_0hm = p_t_34_0h + p_t_34_0m;
+overlap_p_t_34_0 = p_t_34_0m / p_t_34_0h;
+
+p_t_35_0hml = mul_rel<121>(xh,p_t_34_0hml);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_reshml = p_t_35_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_1 = p_coeff_1h;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_9 = p_coeff_9hm;
+Mp_coeff_11 = p_coeff_11hm;
+Mp_coeff_13 = p_coeff_13hm;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_23 = p_coeff_23h;
+Mp_coeff_25 = p_coeff_25h;
+Mp_coeff_27 = p_coeff_27h;
+Mp_coeff_29 = p_coeff_29h;
+Mp_coeff_31 = p_coeff_31h;
+Mp_coeff_33 = p_coeff_33h;
+Mp_coeff_35 = p_coeff_35h;
+Mp_coeff_37 = p_coeff_37h;
+Mp_x_0_pow2 = Mx * Mx;
+Mp_t_1_0 = Mp_coeff_37;
+Mp_t_2_0 = Mp_t_1_0 * Mp_x_0_pow2;
+Mp_t_3_0 = Mp_coeff_35 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mp_x_0_pow2;
+Mp_t_5_0 = Mp_coeff_33 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mp_x_0_pow2;
+Mp_t_7_0 = Mp_coeff_31 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mp_x_0_pow2;
+Mp_t_9_0 = Mp_coeff_29 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mp_x_0_pow2;
+Mp_t_11_0 = Mp_coeff_27 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mp_x_0_pow2;
+Mp_t_13_0 = Mp_coeff_25 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mp_x_0_pow2;
+Mp_t_15_0 = Mp_coeff_23 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mp_x_0_pow2;
+Mp_t_17_0 = Mp_coeff_21 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mp_x_0_pow2;
+Mp_t_19_0 = Mp_coeff_19 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mp_x_0_pow2;
+Mp_t_21_0 = Mp_coeff_17 + Mp_t_20_0;
+Mp_t_22_0 = Mp_t_21_0 * Mp_x_0_pow2;
+Mp_t_23_0 = Mp_coeff_15 + Mp_t_22_0;
+Mp_t_24_0 = (Mp_t_23_0 * Mp_x_0_pow2) + Mp_coeff_13;
+Mp_t_25_0 = (Mp_t_24_0 * Mp_x_0_pow2) + Mp_coeff_11;
+Mp_t_26_0 = (Mp_t_25_0 * Mp_x_0_pow2) + Mp_coeff_9;
+Mp_t_27_0 = Mp_t_26_0 * Mp_x_0_pow2;
+Mp_t_28_0 = Mp_coeff_7 + Mp_t_27_0;
+Mp_t_29_0 = Mp_x_0_pow2 * Mp_t_28_0;
+Mp_t_30_0 = Mp_coeff_5 + Mp_t_29_0;
+Mp_t_31_0 = Mp_x_0_pow2 * Mp_t_30_0;
+Mp_t_32_0 = Mp_coeff_3 + Mp_t_31_0;
+Mp_t_33_0 = Mp_x_0_pow2 * Mp_t_32_0;
+Mp_t_34_0 = Mp_coeff_1 + Mp_t_33_0;
+Mp_t_35_0 = Mx * Mp_t_34_0;
+Mp_res = Mp_t_35_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [1b-54,9007199254740983b-55]
+/\ |overlap_p_t_28_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_28_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_29_0| in [1b-400,1b-41]    # Verify the lower bound
+/\ |p_t_29_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_30_0| in [1b-400,1b-36]    # Verify the lower bound
+/\ |p_t_30_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_31_0| in [1b-400,1b-32]    # Verify the lower bound
+/\ |p_t_31_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_32_0| in [1b-400,1b-27]    # Verify the lower bound
+/\ |p_t_32_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_33_0| in [1b-400,1b-23]    # Verify the lower bound
+/\ |p_t_33_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_34_0| in [1b-400,1b-21]    # Verify the lower bound
+/\ |p_t_34_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_35_0| in [1b-400,1b-16]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [-9007199254740983b-55,-1b-54]
+/\ |overlap_p_t_28_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_28_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_29_0| in [1b-400,1b-41]    # Verify the lower bound
+/\ |p_t_29_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_30_0| in [1b-400,1b-36]    # Verify the lower bound
+/\ |p_t_30_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_31_0| in [1b-400,1b-32]    # Verify the lower bound
+/\ |p_t_31_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_32_0| in [1b-400,1b-27]    # Verify the lower bound
+/\ |p_t_32_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_33_0| in [1b-400,1b-23]    # Verify the lower bound
+/\ |p_t_33_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_34_0| in [1b-400,1b-21]    # Verify the lower bound
+/\ |p_t_34_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_35_0| in [1b-400,1b-16]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_x_0_pow2h ~ p_x_0_pow2hm;
+p_t_7_0h ~ p_t_7_0hm;
+p_t_8_0h ~ p_t_8_0hm;
+p_t_9_0h ~ p_t_9_0hm;
+p_t_10_0h ~ p_t_10_0hm;
+p_t_11_0h ~ p_t_11_0hm;
+p_t_12_0h ~ p_t_12_0hm;
+p_t_13_0h ~ p_t_13_0hm;
+p_t_14_0h ~ p_t_14_0hm;
+p_t_15_0h ~ p_t_15_0hm;
+p_t_16_0h ~ p_t_16_0hm;
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0hm ~ p_t_28_0hml;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_28_0h ~ p_t_28_0hml;
+p_t_28_0m -> p_t_28_0h * overlap_p_t_28_0;
+p_t_28_0l / p_t_28_0m -> - ((p_t_28_0m - p_t_28_0ml) / p_t_28_0ml) / (1 + ((p_t_28_0m - p_t_28_0ml) / p_t_28_0ml));
+(p_t_28_0hm - p_t_28_0hml) / p_t_28_0hml -> - (p_t_28_0l / p_t_28_0m) * (1 / (1 / overlap_p_t_28_0 + 1 + (p_t_28_0l / p_t_28_0m)));
+p_t_28_0ml -> p_t_28_0hml / ((1 + ((p_t_28_0m - p_t_28_0ml) / p_t_28_0ml)) / overlap_p_t_28_0 + 1);
+(p_t_28_0h - p_t_28_0hm) / p_t_28_0hm -> - 1 / (1 / overlap_p_t_28_0 + 1);
+p_t_28_0h -> p_t_28_0hml / (overlap_p_t_28_0 / (1 + ((p_t_28_0m - p_t_28_0ml) / p_t_28_0ml)) + 1);
+p_t_29_0hm ~ p_t_29_0hml;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_29_0h ~ p_t_29_0hml;
+p_t_29_0m -> p_t_29_0h * overlap_p_t_29_0;
+p_t_29_0l / p_t_29_0m -> - ((p_t_29_0m - p_t_29_0ml) / p_t_29_0ml) / (1 + ((p_t_29_0m - p_t_29_0ml) / p_t_29_0ml));
+(p_t_29_0hm - p_t_29_0hml) / p_t_29_0hml -> - (p_t_29_0l / p_t_29_0m) * (1 / (1 / overlap_p_t_29_0 + 1 + (p_t_29_0l / p_t_29_0m)));
+p_t_29_0ml -> p_t_29_0hml / ((1 + ((p_t_29_0m - p_t_29_0ml) / p_t_29_0ml)) / overlap_p_t_29_0 + 1);
+(p_t_29_0h - p_t_29_0hm) / p_t_29_0hm -> - 1 / (1 / overlap_p_t_29_0 + 1);
+p_t_29_0h -> p_t_29_0hml / (overlap_p_t_29_0 / (1 + ((p_t_29_0m - p_t_29_0ml) / p_t_29_0ml)) + 1);
+p_t_30_0hm ~ p_t_30_0hml;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_30_0h ~ p_t_30_0hml;
+p_t_30_0m -> p_t_30_0h * overlap_p_t_30_0;
+p_t_30_0l / p_t_30_0m -> - ((p_t_30_0m - p_t_30_0ml) / p_t_30_0ml) / (1 + ((p_t_30_0m - p_t_30_0ml) / p_t_30_0ml));
+(p_t_30_0hm - p_t_30_0hml) / p_t_30_0hml -> - (p_t_30_0l / p_t_30_0m) * (1 / (1 / overlap_p_t_30_0 + 1 + (p_t_30_0l / p_t_30_0m)));
+p_t_30_0ml -> p_t_30_0hml / ((1 + ((p_t_30_0m - p_t_30_0ml) / p_t_30_0ml)) / overlap_p_t_30_0 + 1);
+(p_t_30_0h - p_t_30_0hm) / p_t_30_0hm -> - 1 / (1 / overlap_p_t_30_0 + 1);
+p_t_30_0h -> p_t_30_0hml / (overlap_p_t_30_0 / (1 + ((p_t_30_0m - p_t_30_0ml) / p_t_30_0ml)) + 1);
+p_t_31_0hm ~ p_t_31_0hml;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_31_0h ~ p_t_31_0hml;
+p_t_31_0m -> p_t_31_0h * overlap_p_t_31_0;
+p_t_31_0l / p_t_31_0m -> - ((p_t_31_0m - p_t_31_0ml) / p_t_31_0ml) / (1 + ((p_t_31_0m - p_t_31_0ml) / p_t_31_0ml));
+(p_t_31_0hm - p_t_31_0hml) / p_t_31_0hml -> - (p_t_31_0l / p_t_31_0m) * (1 / (1 / overlap_p_t_31_0 + 1 + (p_t_31_0l / p_t_31_0m)));
+p_t_31_0ml -> p_t_31_0hml / ((1 + ((p_t_31_0m - p_t_31_0ml) / p_t_31_0ml)) / overlap_p_t_31_0 + 1);
+(p_t_31_0h - p_t_31_0hm) / p_t_31_0hm -> - 1 / (1 / overlap_p_t_31_0 + 1);
+p_t_31_0h -> p_t_31_0hml / (overlap_p_t_31_0 / (1 + ((p_t_31_0m - p_t_31_0ml) / p_t_31_0ml)) + 1);
+p_t_32_0hm ~ p_t_32_0hml;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_32_0h ~ p_t_32_0hml;
+p_t_32_0m -> p_t_32_0h * overlap_p_t_32_0;
+p_t_32_0l / p_t_32_0m -> - ((p_t_32_0m - p_t_32_0ml) / p_t_32_0ml) / (1 + ((p_t_32_0m - p_t_32_0ml) / p_t_32_0ml));
+(p_t_32_0hm - p_t_32_0hml) / p_t_32_0hml -> - (p_t_32_0l / p_t_32_0m) * (1 / (1 / overlap_p_t_32_0 + 1 + (p_t_32_0l / p_t_32_0m)));
+p_t_32_0ml -> p_t_32_0hml / ((1 + ((p_t_32_0m - p_t_32_0ml) / p_t_32_0ml)) / overlap_p_t_32_0 + 1);
+(p_t_32_0h - p_t_32_0hm) / p_t_32_0hm -> - 1 / (1 / overlap_p_t_32_0 + 1);
+p_t_32_0h -> p_t_32_0hml / (overlap_p_t_32_0 / (1 + ((p_t_32_0m - p_t_32_0ml) / p_t_32_0ml)) + 1);
+p_t_33_0hm ~ p_t_33_0hml;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_33_0h ~ p_t_33_0hml;
+p_t_33_0m -> p_t_33_0h * overlap_p_t_33_0;
+p_t_33_0l / p_t_33_0m -> - ((p_t_33_0m - p_t_33_0ml) / p_t_33_0ml) / (1 + ((p_t_33_0m - p_t_33_0ml) / p_t_33_0ml));
+(p_t_33_0hm - p_t_33_0hml) / p_t_33_0hml -> - (p_t_33_0l / p_t_33_0m) * (1 / (1 / overlap_p_t_33_0 + 1 + (p_t_33_0l / p_t_33_0m)));
+p_t_33_0ml -> p_t_33_0hml / ((1 + ((p_t_33_0m - p_t_33_0ml) / p_t_33_0ml)) / overlap_p_t_33_0 + 1);
+(p_t_33_0h - p_t_33_0hm) / p_t_33_0hm -> - 1 / (1 / overlap_p_t_33_0 + 1);
+p_t_33_0h -> p_t_33_0hml / (overlap_p_t_33_0 / (1 + ((p_t_33_0m - p_t_33_0ml) / p_t_33_0ml)) + 1);
+p_t_34_0hm ~ p_t_34_0hml;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_34_0h ~ p_t_34_0hml;
+p_t_34_0m -> p_t_34_0h * overlap_p_t_34_0;
+p_t_34_0l / p_t_34_0m -> - ((p_t_34_0m - p_t_34_0ml) / p_t_34_0ml) / (1 + ((p_t_34_0m - p_t_34_0ml) / p_t_34_0ml));
+(p_t_34_0hm - p_t_34_0hml) / p_t_34_0hml -> - (p_t_34_0l / p_t_34_0m) * (1 / (1 / overlap_p_t_34_0 + 1 + (p_t_34_0l / p_t_34_0m)));
+p_t_34_0ml -> p_t_34_0hml / ((1 + ((p_t_34_0m - p_t_34_0ml) / p_t_34_0ml)) / overlap_p_t_34_0 + 1);
+(p_t_34_0h - p_t_34_0hm) / p_t_34_0hm -> - 1 / (1 / overlap_p_t_34_0 + 1);
+p_t_34_0h -> p_t_34_0hml / (overlap_p_t_34_0 / (1 + ((p_t_34_0m - p_t_34_0ml) / p_t_34_0ml)) + 1);
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_x_0_pow2hm ~ Mp_x_0_pow2;
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0hm ~ Mp_t_7_0;
+p_t_8_0hm ~ Mp_t_8_0;
+p_t_9_0hm ~ Mp_t_9_0;
+p_t_10_0hm ~ Mp_t_10_0;
+p_t_11_0hm ~ Mp_t_11_0;
+p_t_12_0hm ~ Mp_t_12_0;
+p_t_13_0hm ~ Mp_t_13_0;
+p_t_14_0hm ~ Mp_t_14_0;
+p_t_15_0hm ~ Mp_t_15_0;
+p_t_16_0hm ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hml ~ Mp_t_28_0;
+p_t_29_0hml ~ Mp_t_29_0;
+p_t_30_0hml ~ Mp_t_30_0;
+p_t_31_0hml ~ Mp_t_31_0;
+p_t_32_0hml ~ Mp_t_32_0;
+p_t_33_0hml ~ Mp_t_33_0;
+p_t_34_0hml ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_28_0hml in (0);
+$ p_t_28_0ml in (0);
+$ p_t_29_0hml in (0);
+$ p_t_29_0ml in (0);
+$ p_t_30_0hml in (0);
+$ p_t_30_0ml in (0);
+$ p_t_31_0hml in (0);
+$ p_t_31_0ml in (0);
+$ p_t_32_0hml in (0);
+$ p_t_32_0ml in (0);
+$ p_t_33_0hml in (0);
+$ p_t_33_0ml in (0);
+$ p_t_34_0hml in (0);
+$ p_t_34_0ml in (0);
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR1.gappa b/src/crlibm/gappa/asin/asinAccuR1.gappa
new file mode 100644
index 0000000..0397b83
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR1.gappa
@@ -0,0 +1,450 @@
+# The polynomial to implement is: 12733824903478660485213924945761441b-115 + (x * (21274243840621107493132068550861b-104 + (x * (56506575121178698033892645299217b-108 + (x * (162352694585912342011697266345865b-109 + (x * (108824425124571119884970372511875b-109 + (x * (130962285214586424233709645857015b-109 + (x * (64538322654437688214573659252359b-108 + (x * (19138493711791118275730909715341b-106 + (x * (86948317116031170147801372254985b-108 + (x * (2926340027982217b-53 + (x * (707951991 [...]
+# The polynomial implemented is: 12733824903478660485213924945761441b-115 + (x * (21274243840621107493132068550861b-104 + (x * (56506575121178698033892645299217b-108 + (x * (162352694585912342011697266345865b-109 + (x * (108824425124571119884970372511875b-109 + (x * (130962285214586424233709645857015b-109 + (x * (64538322654437688214573659252359b-108 + (x * (19138493711791118275730909715341b-106 + (x * (86948317116031170147801372254985b-108 + (x * (2926340027982217b-53 + (x * (7079519916 [...]
+# The domain is [-466363011288839b-53;932726022577599b-54]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 63 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(3.06555683602418194144689778113388456404209136962890625000000000000000000000000000e-01);
+p_coeff_0m = double(1.38398751617026410180086928097698669616246328887899420551771401122209681489039212e-19);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.04890120337530645677759366662940010428428649902343750000000000000000000000000000e+00);
+p_coeff_1m = double(-1.03082627287649058162739898016810705246384011505786371110104937542928382754325867e-16);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(1.74124328129031780143520791170885786414146423339843750000000000000000000000000000e-01);
+p_coeff_2m = double(-1.22415542219236523063144722572481689558635471916500300770813680628634756430983543e-17);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(2.50143932843971239510239001901936717331409454345703125000000000000000000000000000e-01);
+p_coeff_3m = double(-4.13151149720064821141736364751386140320745355927365902171111144980386598035693169e-18);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(1.67670575222510526147701170884829480201005935668945312500000000000000000000000000e-01);
+p_coeff_4m = double(9.08471320692536034881317437634606200189439625594786317797080243963137036189436913e-18);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(2.01779349344123004605933147104224190115928649902343750000000000000000000000000000e-01);
+p_coeff_5m = double(-2.81327768912778086871203966934740276353563377312707108335310124402894871309399605e-18);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(1.98874061057130652185875874238263349980115890502929687500000000000000000000000000e-01);
+p_coeff_6m = double(4.84208641776008377910230190635861197948724910162295737015014651660749223083257675e-18);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(2.35900148032034129297329627661383710801601409912109375000000000000000000000000000e-01);
+p_coeff_7m = double(-7.70265627820459694705350308676046582995139915634938421185040624550310894846916199e-18);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(2.67930188076546671460675952403107658028602600097656250000000000000000000000000000e-01);
+p_coeff_8m = double(-1.74203278137786025999080009256505191287370077696727496685547009747097035869956017e-17);
+p_coeff_8hm = p_coeff_8h + p_coeff_8m;
+
+p_coeff_9h = double(3.24889007694808218396076426870422437787055969238281250000000000000000000000000000e-01);
+
+p_coeff_10h = double(3.92992300726306809099952488395501859486103057861328125000000000000000000000000000e-01);
+
+p_coeff_11h = double(4.88578374389609604300233058893354609608650207519531250000000000000000000000000000e-01);
+
+p_coeff_12h = double(6.11426267619878727188620359811466187238693237304687500000000000000000000000000000e-01);
+
+p_coeff_13h = double(7.76087253732093085289989176089875400066375732421875000000000000000000000000000000e-01);
+
+p_coeff_14h = double(9.92362795771243533238248346606269478797912597656250000000000000000000000000000000e-01);
+
+p_coeff_15h = double(1.28020190849177639691447438963223248720169067382812500000000000000000000000000000e+00);
+
+p_coeff_16h = double(1.66202082783864191206646410137182101607322692871093750000000000000000000000000000e+00);
+
+p_coeff_17h = double(2.17134697355479078240136914246249943971633911132812500000000000000000000000000000e+00);
+
+p_coeff_18h = double(2.85144941725608758176235824066679924726486206054687500000000000000000000000000000e+00);
+
+p_coeff_19h = double(3.76113082197504100534501958463806658983230590820312500000000000000000000000000000e+00);
+
+p_coeff_20h = double(4.98320258065187005058760405518114566802978515625000000000000000000000000000000000e+00);
+
+p_coeff_21h = double(6.83567147351494863727339179604314267635345458984375000000000000000000000000000000e+00);
+
+p_coeff_22h = double(9.17671174961649249723905086284503340721130371093750000000000000000000000000000000e+00);
+
+p_t_1_0h = p_coeff_22h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_21h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_20h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_19h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_18h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_17h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_16h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_15h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_14h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_13h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_12h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_11h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_10h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = mul_rel<102>(xh,p_t_25_0hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = add_rel<102>(p_coeff_9h,p_t_26_0hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_8hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_7hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_6hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_5hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = fma_rel<100>(p_t_31_0hm,xh,p_coeff_4hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hm = fma_rel<100>(p_t_32_0hm,xh,p_coeff_3hm);
+p_t_33_0h = double(p_t_33_0hm);
+p_t_33_0m = p_t_33_0hm - p_t_33_0h;
+
+p_t_34_0hm = mul_rel<102>(xh,p_t_33_0hm);
+p_t_34_0h = double(p_t_34_0hm);
+p_t_34_0m = p_t_34_0hm - p_t_34_0h;
+
+p_t_35_0hml = add_rel<140>(p_coeff_2hm,p_t_34_0hm);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_t_36_0hml = mul_rel<145>(xh,p_t_35_0hml);
+p_t_36_0ml = p_t_36_0hml - p_t_36_0h;
+p_t_36_0m = double(p_t_36_0ml);
+p_t_36_0l = p_t_36_0ml - p_t_36_0m;
+p_t_36_0hm = p_t_36_0h + p_t_36_0m;
+overlap_p_t_36_0 = p_t_36_0m / p_t_36_0h;
+
+p_t_37_0hml = add_rel<143>(p_coeff_1hm,p_t_36_0hml);
+p_t_37_0ml = p_t_37_0hml - p_t_37_0h;
+p_t_37_0m = double(p_t_37_0ml);
+p_t_37_0l = p_t_37_0ml - p_t_37_0m;
+p_t_37_0hm = p_t_37_0h + p_t_37_0m;
+overlap_p_t_37_0 = p_t_37_0m / p_t_37_0h;
+
+p_t_38_0hml = mul_rel<135>(xh,p_t_37_0hml);
+p_t_38_0ml = p_t_38_0hml - p_t_38_0h;
+p_t_38_0m = double(p_t_38_0ml);
+p_t_38_0l = p_t_38_0ml - p_t_38_0m;
+p_t_38_0hm = p_t_38_0h + p_t_38_0m;
+overlap_p_t_38_0 = p_t_38_0m / p_t_38_0h;
+
+p_t_39_0hml = add_rel<133>(p_coeff_0hm,p_t_38_0hml);
+p_t_39_0ml = p_t_39_0hml - p_t_39_0h;
+p_t_39_0m = double(p_t_39_0ml);
+p_t_39_0l = p_t_39_0ml - p_t_39_0m;
+p_t_39_0hm = p_t_39_0h + p_t_39_0m;
+overlap_p_t_39_0 = p_t_39_0m / p_t_39_0h;
+
+p_reshml = p_t_39_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8hm;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_22 = p_coeff_22h;
+Mp_t_1_0 = Mp_coeff_22;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_21 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_20 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_19 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_18 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_17 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_16 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_15 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_14 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_13 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_12 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_11 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_10 + Mp_t_24_0;
+Mp_t_26_0 = Mx * Mp_t_25_0;
+Mp_t_27_0 = Mp_coeff_9 + Mp_t_26_0;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_8;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_7;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_6;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_5;
+Mp_t_32_0 = (Mp_t_31_0 * Mx) + Mp_coeff_4;
+Mp_t_33_0 = (Mp_t_32_0 * Mx) + Mp_coeff_3;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_2 + Mp_t_34_0;
+Mp_t_36_0 = Mx * Mp_t_35_0;
+Mp_t_37_0 = Mp_coeff_1 + Mp_t_36_0;
+Mp_t_38_0 = Mx * Mp_t_37_0;
+Mp_t_39_0 = Mp_coeff_0 + Mp_t_38_0;
+Mp_res = Mp_t_39_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-466363011288839b-53,-466363011288839b-453]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [932726022577599b-454,932726022577599b-54]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_t_36_0hm ~ p_t_36_0hml;
+p_t_36_0h ~ p_t_36_0hm;
+p_t_36_0h ~ p_t_36_0hml;
+p_t_36_0m -> p_t_36_0h * overlap_p_t_36_0;
+p_t_36_0l / p_t_36_0m -> - ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml) / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml));
+(p_t_36_0hm - p_t_36_0hml) / p_t_36_0hml -> - (p_t_36_0l / p_t_36_0m) * (1 / (1 / overlap_p_t_36_0 + 1 + (p_t_36_0l / p_t_36_0m)));
+p_t_36_0ml -> p_t_36_0hml / ((1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) / overlap_p_t_36_0 + 1);
+(p_t_36_0h - p_t_36_0hm) / p_t_36_0hm -> - 1 / (1 / overlap_p_t_36_0 + 1);
+p_t_36_0h -> p_t_36_0hml / (overlap_p_t_36_0 / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) + 1);
+p_t_37_0hm ~ p_t_37_0hml;
+p_t_37_0h ~ p_t_37_0hm;
+p_t_37_0h ~ p_t_37_0hml;
+p_t_37_0m -> p_t_37_0h * overlap_p_t_37_0;
+p_t_37_0l / p_t_37_0m -> - ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml) / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml));
+(p_t_37_0hm - p_t_37_0hml) / p_t_37_0hml -> - (p_t_37_0l / p_t_37_0m) * (1 / (1 / overlap_p_t_37_0 + 1 + (p_t_37_0l / p_t_37_0m)));
+p_t_37_0ml -> p_t_37_0hml / ((1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) / overlap_p_t_37_0 + 1);
+(p_t_37_0h - p_t_37_0hm) / p_t_37_0hm -> - 1 / (1 / overlap_p_t_37_0 + 1);
+p_t_37_0h -> p_t_37_0hml / (overlap_p_t_37_0 / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) + 1);
+p_t_38_0hm ~ p_t_38_0hml;
+p_t_38_0h ~ p_t_38_0hm;
+p_t_38_0h ~ p_t_38_0hml;
+p_t_38_0m -> p_t_38_0h * overlap_p_t_38_0;
+p_t_38_0l / p_t_38_0m -> - ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml) / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml));
+(p_t_38_0hm - p_t_38_0hml) / p_t_38_0hml -> - (p_t_38_0l / p_t_38_0m) * (1 / (1 / overlap_p_t_38_0 + 1 + (p_t_38_0l / p_t_38_0m)));
+p_t_38_0ml -> p_t_38_0hml / ((1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) / overlap_p_t_38_0 + 1);
+(p_t_38_0h - p_t_38_0hm) / p_t_38_0hm -> - 1 / (1 / overlap_p_t_38_0 + 1);
+p_t_38_0h -> p_t_38_0hml / (overlap_p_t_38_0 / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) + 1);
+p_t_39_0hm ~ p_t_39_0hml;
+p_t_39_0h ~ p_t_39_0hm;
+p_t_39_0h ~ p_t_39_0hml;
+p_t_39_0m -> p_t_39_0h * overlap_p_t_39_0;
+p_t_39_0l / p_t_39_0m -> - ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml) / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml));
+(p_t_39_0hm - p_t_39_0hml) / p_t_39_0hml -> - (p_t_39_0l / p_t_39_0m) * (1 / (1 / overlap_p_t_39_0 + 1 + (p_t_39_0l / p_t_39_0m)));
+p_t_39_0ml -> p_t_39_0hml / ((1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) / overlap_p_t_39_0 + 1);
+(p_t_39_0h - p_t_39_0hm) / p_t_39_0hm -> - 1 / (1 / overlap_p_t_39_0 + 1);
+p_t_39_0h -> p_t_39_0hml / (overlap_p_t_39_0 / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hm ~ Mp_t_33_0;
+p_t_34_0hm ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_t_36_0hml ~ Mp_t_36_0;
+p_t_37_0hml ~ Mp_t_37_0;
+p_t_38_0hml ~ Mp_t_38_0;
+p_t_39_0hml ~ Mp_t_39_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_t_36_0hml in (0);
+$ p_t_36_0ml in (0);
+$ p_t_37_0hml in (0);
+$ p_t_37_0ml in (0);
+$ p_t_38_0hml in (0);
+$ p_t_38_0ml in (0);
+$ p_t_39_0hml in (0);
+$ p_t_39_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR2.gappa b/src/crlibm/gappa/asin/asinAccuR2.gappa
new file mode 100644
index 0000000..9eb1076
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR2.gappa
@@ -0,0 +1,450 @@
+# The polynomial to implement is: 537273513210223274716288889248434731b-120 + (x * (88240263986999722252297847012357b-106 + (x * (20526577571859871112569155652563b-106 + (x * (107789892750625855992013313785105b-108 + (x * (95062093602682177187811187465689b-108 + (x * (477193384067815679840324642654849b-110 + (x * (572921965627724688446677452418063b-110 + (x * (188719174585036872257517150346289b-108 + (x * (15724977217398503074240774828841b-104 + (x * (4815943101116825b-52 + (x * (3373125 [...]
+# The polynomial implemented is: 537273513210223274716288889248434731b-120 + (x * (88240263986999722252297847012357b-106 + (x * (20526577571859871112569155652563b-106 + (x * (107789892750625855992013313785105b-108 + (x * (95062093602682177187811187465689b-108 + (x * (477193384067815679840324642654849b-110 + (x * (572921965627724688446677452418063b-110 + (x * (188719174585036872257517150346289b-108 + (x * (15724977217398503074240774828841b-104 + (x * (4815943101116825b-52 + (x * (33731252 [...]
+# The domain is [-715705849514187b-54;178926462378499b-52]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 63 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(4.04199666960039116769820566332782618701457977294921875000000000000000000000000000e-01);
+p_coeff_0m = double(-6.46825370068901234687011200856515476665908008275043725957432344531028434175823350e-21);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.08764522696446319649510314775398001074790954589843750000000000000000000000000000e+00);
+p_coeff_1m = double(7.20122509204450857334003577729908463703780203035882678808121681868215091526508331e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(2.53009602569167157959384439891437068581581115722656250000000000000000000000000000e-01);
+p_coeff_2m = double(-2.62855515233500204494953653812414612827096270443634484781370019845780916512012482e-17);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(3.32153251441150376699340540653793141245841979980468750000000000000000000000000000e-01);
+p_coeff_3m = double(-2.17141385535786665092496720426544052591009587195721927677105611564911669120192528e-17);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(2.92932692232876656923679092869861051440238952636718750000000000000000000000000000e-01);
+p_coeff_4m = double(-2.54506532782342113657805222827712812531223364242776927013345300565561046823859215e-17);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(3.67616411055874059421455513074761256575584411621093750000000000000000000000000000e-01);
+p_coeff_5m = double(-6.76970835849273256879417289105284614692988316998734608931354017613557516597211361e-18);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(4.41363027759851866971274603201891295611858367919921875000000000000000000000000000e-01);
+p_coeff_6m = double(-2.90651996480231385490406350336172813253854649135862232844917940610685036517679691e-18);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(5.81535855061384165942683921457501128315925598144531250000000000000000000000000000e-01);
+p_coeff_7m = double(2.15506151894707480118506866417280461854749969158187919426872269923478597775101662e-17);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(7.75301235143548206352193119528237730264663696289062500000000000000000000000000000e-01);
+p_coeff_8m = double(-5.09980429509694427469186543286592667631136122693286116813737862685229629278182983e-17);
+p_coeff_8hm = p_coeff_8h + p_coeff_8m;
+
+p_coeff_9h = double(1.06935418322891551135001009242841973900794982910156250000000000000000000000000000e+00);
+
+p_coeff_10h = double(1.49796852292175275422891900234390050172805786132812500000000000000000000000000000e+00);
+
+p_coeff_11h = double(2.13528146071462776589555687678512185811996459960937500000000000000000000000000000e+00);
+
+p_coeff_12h = double(3.08095882478763538614430217421613633632659912109375000000000000000000000000000000e+00);
+
+p_coeff_13h = double(4.49525762116327154416239864076487720012664794921875000000000000000000000000000000e+00);
+
+p_coeff_14h = double(6.61832853156151212914437564904801547527313232421875000000000000000000000000000000e+00);
+
+p_coeff_15h = double(9.82196882969892293147040618350729346275329589843750000000000000000000000000000000e+00);
+
+p_coeff_16h = double(1.46763291696545170594845330924727022647857666015625000000000000000000000000000000e+01);
+
+p_coeff_17h = double(2.20625545956168913619421800831332802772521972656250000000000000000000000000000000e+01);
+
+p_coeff_18h = double(3.33428595472074320582578366156667470932006835937500000000000000000000000000000000e+01);
+
+p_coeff_19h = double(5.06298287402715487814930384047329425811767578125000000000000000000000000000000000e+01);
+
+p_coeff_20h = double(7.72361044088683854624832747504115104675292968750000000000000000000000000000000000e+01);
+
+p_coeff_21h = double(1.19605340680796203400859667453914880752563476562500000000000000000000000000000000e+02);
+
+p_coeff_22h = double(1.80182167313889749493682757019996643066406250000000000000000000000000000000000000e+02);
+
+p_t_1_0h = p_coeff_22h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_21h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_20h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_19h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_18h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_17h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_16h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_15h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_14h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_13h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_12h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_11h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_10h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = mul_rel<102>(xh,p_t_25_0hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = add_rel<102>(p_coeff_9h,p_t_26_0hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_8hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_7hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_6hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_5hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = fma_rel<100>(p_t_31_0hm,xh,p_coeff_4hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hm = fma_rel<100>(p_t_32_0hm,xh,p_coeff_3hm);
+p_t_33_0h = double(p_t_33_0hm);
+p_t_33_0m = p_t_33_0hm - p_t_33_0h;
+
+p_t_34_0hm = mul_rel<102>(xh,p_t_33_0hm);
+p_t_34_0h = double(p_t_34_0hm);
+p_t_34_0m = p_t_34_0hm - p_t_34_0h;
+
+p_t_35_0hml = add_rel<140>(p_coeff_2hm,p_t_34_0hm);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_t_36_0hml = mul_rel<145>(xh,p_t_35_0hml);
+p_t_36_0ml = p_t_36_0hml - p_t_36_0h;
+p_t_36_0m = double(p_t_36_0ml);
+p_t_36_0l = p_t_36_0ml - p_t_36_0m;
+p_t_36_0hm = p_t_36_0h + p_t_36_0m;
+overlap_p_t_36_0 = p_t_36_0m / p_t_36_0h;
+
+p_t_37_0hml = add_rel<143>(p_coeff_1hm,p_t_36_0hml);
+p_t_37_0ml = p_t_37_0hml - p_t_37_0h;
+p_t_37_0m = double(p_t_37_0ml);
+p_t_37_0l = p_t_37_0ml - p_t_37_0m;
+p_t_37_0hm = p_t_37_0h + p_t_37_0m;
+overlap_p_t_37_0 = p_t_37_0m / p_t_37_0h;
+
+p_t_38_0hml = mul_rel<135>(xh,p_t_37_0hml);
+p_t_38_0ml = p_t_38_0hml - p_t_38_0h;
+p_t_38_0m = double(p_t_38_0ml);
+p_t_38_0l = p_t_38_0ml - p_t_38_0m;
+p_t_38_0hm = p_t_38_0h + p_t_38_0m;
+overlap_p_t_38_0 = p_t_38_0m / p_t_38_0h;
+
+p_t_39_0hml = add_rel<133>(p_coeff_0hm,p_t_38_0hml);
+p_t_39_0ml = p_t_39_0hml - p_t_39_0h;
+p_t_39_0m = double(p_t_39_0ml);
+p_t_39_0l = p_t_39_0ml - p_t_39_0m;
+p_t_39_0hm = p_t_39_0h + p_t_39_0m;
+overlap_p_t_39_0 = p_t_39_0m / p_t_39_0h;
+
+p_reshml = p_t_39_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8hm;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_22 = p_coeff_22h;
+Mp_t_1_0 = Mp_coeff_22;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_21 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_20 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_19 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_18 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_17 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_16 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_15 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_14 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_13 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_12 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_11 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_10 + Mp_t_24_0;
+Mp_t_26_0 = Mx * Mp_t_25_0;
+Mp_t_27_0 = Mp_coeff_9 + Mp_t_26_0;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_8;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_7;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_6;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_5;
+Mp_t_32_0 = (Mp_t_31_0 * Mx) + Mp_coeff_4;
+Mp_t_33_0 = (Mp_t_32_0 * Mx) + Mp_coeff_3;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_2 + Mp_t_34_0;
+Mp_t_36_0 = Mx * Mp_t_35_0;
+Mp_t_37_0 = Mp_coeff_1 + Mp_t_36_0;
+Mp_t_38_0 = Mx * Mp_t_37_0;
+Mp_t_39_0 = Mp_coeff_0 + Mp_t_38_0;
+Mp_res = Mp_t_39_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-715705849514187b-54,-715705849514187b-454]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [178926462378499b-452,178926462378499b-52]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_t_36_0hm ~ p_t_36_0hml;
+p_t_36_0h ~ p_t_36_0hm;
+p_t_36_0h ~ p_t_36_0hml;
+p_t_36_0m -> p_t_36_0h * overlap_p_t_36_0;
+p_t_36_0l / p_t_36_0m -> - ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml) / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml));
+(p_t_36_0hm - p_t_36_0hml) / p_t_36_0hml -> - (p_t_36_0l / p_t_36_0m) * (1 / (1 / overlap_p_t_36_0 + 1 + (p_t_36_0l / p_t_36_0m)));
+p_t_36_0ml -> p_t_36_0hml / ((1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) / overlap_p_t_36_0 + 1);
+(p_t_36_0h - p_t_36_0hm) / p_t_36_0hm -> - 1 / (1 / overlap_p_t_36_0 + 1);
+p_t_36_0h -> p_t_36_0hml / (overlap_p_t_36_0 / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) + 1);
+p_t_37_0hm ~ p_t_37_0hml;
+p_t_37_0h ~ p_t_37_0hm;
+p_t_37_0h ~ p_t_37_0hml;
+p_t_37_0m -> p_t_37_0h * overlap_p_t_37_0;
+p_t_37_0l / p_t_37_0m -> - ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml) / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml));
+(p_t_37_0hm - p_t_37_0hml) / p_t_37_0hml -> - (p_t_37_0l / p_t_37_0m) * (1 / (1 / overlap_p_t_37_0 + 1 + (p_t_37_0l / p_t_37_0m)));
+p_t_37_0ml -> p_t_37_0hml / ((1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) / overlap_p_t_37_0 + 1);
+(p_t_37_0h - p_t_37_0hm) / p_t_37_0hm -> - 1 / (1 / overlap_p_t_37_0 + 1);
+p_t_37_0h -> p_t_37_0hml / (overlap_p_t_37_0 / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) + 1);
+p_t_38_0hm ~ p_t_38_0hml;
+p_t_38_0h ~ p_t_38_0hm;
+p_t_38_0h ~ p_t_38_0hml;
+p_t_38_0m -> p_t_38_0h * overlap_p_t_38_0;
+p_t_38_0l / p_t_38_0m -> - ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml) / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml));
+(p_t_38_0hm - p_t_38_0hml) / p_t_38_0hml -> - (p_t_38_0l / p_t_38_0m) * (1 / (1 / overlap_p_t_38_0 + 1 + (p_t_38_0l / p_t_38_0m)));
+p_t_38_0ml -> p_t_38_0hml / ((1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) / overlap_p_t_38_0 + 1);
+(p_t_38_0h - p_t_38_0hm) / p_t_38_0hm -> - 1 / (1 / overlap_p_t_38_0 + 1);
+p_t_38_0h -> p_t_38_0hml / (overlap_p_t_38_0 / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) + 1);
+p_t_39_0hm ~ p_t_39_0hml;
+p_t_39_0h ~ p_t_39_0hm;
+p_t_39_0h ~ p_t_39_0hml;
+p_t_39_0m -> p_t_39_0h * overlap_p_t_39_0;
+p_t_39_0l / p_t_39_0m -> - ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml) / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml));
+(p_t_39_0hm - p_t_39_0hml) / p_t_39_0hml -> - (p_t_39_0l / p_t_39_0m) * (1 / (1 / overlap_p_t_39_0 + 1 + (p_t_39_0l / p_t_39_0m)));
+p_t_39_0ml -> p_t_39_0hml / ((1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) / overlap_p_t_39_0 + 1);
+(p_t_39_0h - p_t_39_0hm) / p_t_39_0hm -> - 1 / (1 / overlap_p_t_39_0 + 1);
+p_t_39_0h -> p_t_39_0hml / (overlap_p_t_39_0 / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hm ~ Mp_t_33_0;
+p_t_34_0hm ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_t_36_0hml ~ Mp_t_36_0;
+p_t_37_0hml ~ Mp_t_37_0;
+p_t_38_0hml ~ Mp_t_38_0;
+p_t_39_0hml ~ Mp_t_39_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_t_36_0hml in (0);
+$ p_t_36_0ml in (0);
+$ p_t_37_0hml in (0);
+$ p_t_37_0ml in (0);
+$ p_t_38_0hml in (0);
+$ p_t_38_0ml in (0);
+$ p_t_39_0hml in (0);
+$ p_t_39_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR3.gappa b/src/crlibm/gappa/asin/asinAccuR3.gappa
new file mode 100644
index 0000000..2ad39a0
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR3.gappa
@@ -0,0 +1,450 @@
+# The polynomial to implement is: 630003272697881842134216252575451b-110 + (x * (91721878242709939892136825593527b-106 + (x * (218764722243419548644270705008141b-109 + (x * (143378738160791311151825186528399b-108 + (x * (306937566524655010129262065785625b-109 + (x * (105290255794522793027813910838891b-107 + (x * (292962667643541176300211307509459b-108 + (x * (54339736079161771142781818307313b-105 + (x * (20685535281765286913304275534467b-103 + (x * (7188477576369723b-51 + (x * (286536148 [...]
+# The polynomial implemented is: 630003272697881842134216252575451b-110 + (x * (91721878242709939892136825593527b-106 + (x * (218764722243419548644270705008141b-109 + (x * (143378738160791311151825186528399b-108 + (x * (306937566524655010129262065785625b-109 + (x * (105290255794522793027813910838891b-107 + (x * (292962667643541176300211307509459b-108 + (x * (54339736079161771142781818307313b-105 + (x * (20685535281765286913304275534467b-103 + (x * (7188477576369723b-51 + (x * (2865361488 [...]
+# The domain is [-603367941593347b-54;301683970796841b-53]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 63 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(4.85336867180323261461438733022077940404415130615234375000000000000000000000000000e-01);
+p_coeff_0m = double(2.48711731548431450339898686061161136444646421020973452165048200868113781325519085e-18);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.13055943592368102201817237073555588722229003906250000000000000000000000000000000e+00);
+p_coeff_1m = double(8.33253077521152707672020411779329031688034814541986283753516318029141984879970551e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(3.37060423475326498277127029723487794399261474609375000000000000000000000000000000e-01);
+p_coeff_2m = double(-1.06567668725757610844479862637418971752325776427227331522029629695680341683328152e-17);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(4.41819848339719767338351630314718931913375854492187500000000000000000000000000000e-01);
+p_coeff_3m = double(1.00442163349492148002936541754087371062381994416120786772772532913222676143050194e-17);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(4.72912200341745858622743980959057807922363281250000000000000000000000000000000000e-01);
+p_coeff_4m = double(4.32579192702017095690398912101462577298397752038590716172627992364141391590237617e-18);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(6.48901300757961929654982213833136484026908874511718750000000000000000000000000000e-01);
+p_coeff_5m = double(5.53173550473638312502352924376368778723557407693469517573348070982319768518209457e-17);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(9.02760918723618410730580308154458180069923400878906250000000000000000000000000000e-01);
+p_coeff_6m = double(1.83127184204758972652773042458306136013081307308989972848500826785311801359057426e-17);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(1.33957791852745100591448590421350672841072082519531250000000000000000000000000000e+00);
+p_coeff_7m = double(-8.08660441258249393782142982707336982340679568071958871477988850529072806239128113e-17);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(2.03975126091931757699171612330246716737747192382812500000000000000000000000000000e+00);
+p_coeff_8m = double(1.39326386720348649025304457272644525059897659732127683795965822355356067419052124e-16);
+p_coeff_8hm = p_coeff_8h + p_coeff_8m;
+
+p_coeff_9h = double(3.19232532691492343346340021525975316762924194335937500000000000000000000000000000e+00);
+
+p_coeff_10h = double(5.08990447700057480062696413369849324226379394531250000000000000000000000000000000e+00);
+
+p_coeff_11h = double(8.24681325581985547046315332408994436264038085937500000000000000000000000000000000e+00);
+
+p_coeff_12h = double(1.35339383861901847438957702252082526683807373046875000000000000000000000000000000e+01);
+
+p_coeff_13h = double(2.24533939052931295066173333907499909400939941406250000000000000000000000000000000e+01);
+
+p_coeff_14h = double(3.75945346965856899146274372469633817672729492187500000000000000000000000000000000e+01);
+
+p_coeff_15h = double(6.34457878603441614018265681806951761245727539062500000000000000000000000000000000e+01);
+
+p_coeff_16h = double(1.07811054823829493898301734589040279388427734375000000000000000000000000000000000e+02);
+
+p_coeff_17h = double(1.84306463662936579339657328091561794281005859375000000000000000000000000000000000e+02);
+
+p_coeff_18h = double(3.16759786376428792209480889141559600830078125000000000000000000000000000000000000e+02);
+
+p_coeff_19h = double(5.47025706678748861122585367411375045776367187500000000000000000000000000000000000e+02);
+
+p_coeff_20h = double(9.49215135261129944410640746355056762695312500000000000000000000000000000000000000e+02);
+
+p_coeff_21h = double(1.66325303120893772756971884518861770629882812500000000000000000000000000000000000e+03);
+
+p_coeff_22h = double(2.81005886721817250872845761477947235107421875000000000000000000000000000000000000e+03);
+
+p_t_1_0h = p_coeff_22h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_21h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_20h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_19h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_18h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_17h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_16h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_15h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_14h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_13h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_12h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_11h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_10h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = mul_rel<102>(xh,p_t_25_0hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = add_rel<102>(p_coeff_9h,p_t_26_0hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_8hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_7hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_6hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_5hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = fma_rel<100>(p_t_31_0hm,xh,p_coeff_4hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hm = fma_rel<100>(p_t_32_0hm,xh,p_coeff_3hm);
+p_t_33_0h = double(p_t_33_0hm);
+p_t_33_0m = p_t_33_0hm - p_t_33_0h;
+
+p_t_34_0hm = mul_rel<102>(xh,p_t_33_0hm);
+p_t_34_0h = double(p_t_34_0hm);
+p_t_34_0m = p_t_34_0hm - p_t_34_0h;
+
+p_t_35_0hml = add_rel<140>(p_coeff_2hm,p_t_34_0hm);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_t_36_0hml = mul_rel<145>(xh,p_t_35_0hml);
+p_t_36_0ml = p_t_36_0hml - p_t_36_0h;
+p_t_36_0m = double(p_t_36_0ml);
+p_t_36_0l = p_t_36_0ml - p_t_36_0m;
+p_t_36_0hm = p_t_36_0h + p_t_36_0m;
+overlap_p_t_36_0 = p_t_36_0m / p_t_36_0h;
+
+p_t_37_0hml = add_rel<143>(p_coeff_1hm,p_t_36_0hml);
+p_t_37_0ml = p_t_37_0hml - p_t_37_0h;
+p_t_37_0m = double(p_t_37_0ml);
+p_t_37_0l = p_t_37_0ml - p_t_37_0m;
+p_t_37_0hm = p_t_37_0h + p_t_37_0m;
+overlap_p_t_37_0 = p_t_37_0m / p_t_37_0h;
+
+p_t_38_0hml = mul_rel<135>(xh,p_t_37_0hml);
+p_t_38_0ml = p_t_38_0hml - p_t_38_0h;
+p_t_38_0m = double(p_t_38_0ml);
+p_t_38_0l = p_t_38_0ml - p_t_38_0m;
+p_t_38_0hm = p_t_38_0h + p_t_38_0m;
+overlap_p_t_38_0 = p_t_38_0m / p_t_38_0h;
+
+p_t_39_0hml = add_rel<133>(p_coeff_0hm,p_t_38_0hml);
+p_t_39_0ml = p_t_39_0hml - p_t_39_0h;
+p_t_39_0m = double(p_t_39_0ml);
+p_t_39_0l = p_t_39_0ml - p_t_39_0m;
+p_t_39_0hm = p_t_39_0h + p_t_39_0m;
+overlap_p_t_39_0 = p_t_39_0m / p_t_39_0h;
+
+p_reshml = p_t_39_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8hm;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_22 = p_coeff_22h;
+Mp_t_1_0 = Mp_coeff_22;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_21 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_20 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_19 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_18 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_17 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_16 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_15 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_14 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_13 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_12 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_11 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_10 + Mp_t_24_0;
+Mp_t_26_0 = Mx * Mp_t_25_0;
+Mp_t_27_0 = Mp_coeff_9 + Mp_t_26_0;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_8;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_7;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_6;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_5;
+Mp_t_32_0 = (Mp_t_31_0 * Mx) + Mp_coeff_4;
+Mp_t_33_0 = (Mp_t_32_0 * Mx) + Mp_coeff_3;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_2 + Mp_t_34_0;
+Mp_t_36_0 = Mx * Mp_t_35_0;
+Mp_t_37_0 = Mp_coeff_1 + Mp_t_36_0;
+Mp_t_38_0 = Mx * Mp_t_37_0;
+Mp_t_39_0 = Mp_coeff_0 + Mp_t_38_0;
+Mp_res = Mp_t_39_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-603367941593347b-54,-603367941593347b-454]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [301683970796841b-453,301683970796841b-53]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_t_36_0hm ~ p_t_36_0hml;
+p_t_36_0h ~ p_t_36_0hm;
+p_t_36_0h ~ p_t_36_0hml;
+p_t_36_0m -> p_t_36_0h * overlap_p_t_36_0;
+p_t_36_0l / p_t_36_0m -> - ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml) / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml));
+(p_t_36_0hm - p_t_36_0hml) / p_t_36_0hml -> - (p_t_36_0l / p_t_36_0m) * (1 / (1 / overlap_p_t_36_0 + 1 + (p_t_36_0l / p_t_36_0m)));
+p_t_36_0ml -> p_t_36_0hml / ((1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) / overlap_p_t_36_0 + 1);
+(p_t_36_0h - p_t_36_0hm) / p_t_36_0hm -> - 1 / (1 / overlap_p_t_36_0 + 1);
+p_t_36_0h -> p_t_36_0hml / (overlap_p_t_36_0 / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) + 1);
+p_t_37_0hm ~ p_t_37_0hml;
+p_t_37_0h ~ p_t_37_0hm;
+p_t_37_0h ~ p_t_37_0hml;
+p_t_37_0m -> p_t_37_0h * overlap_p_t_37_0;
+p_t_37_0l / p_t_37_0m -> - ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml) / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml));
+(p_t_37_0hm - p_t_37_0hml) / p_t_37_0hml -> - (p_t_37_0l / p_t_37_0m) * (1 / (1 / overlap_p_t_37_0 + 1 + (p_t_37_0l / p_t_37_0m)));
+p_t_37_0ml -> p_t_37_0hml / ((1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) / overlap_p_t_37_0 + 1);
+(p_t_37_0h - p_t_37_0hm) / p_t_37_0hm -> - 1 / (1 / overlap_p_t_37_0 + 1);
+p_t_37_0h -> p_t_37_0hml / (overlap_p_t_37_0 / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) + 1);
+p_t_38_0hm ~ p_t_38_0hml;
+p_t_38_0h ~ p_t_38_0hm;
+p_t_38_0h ~ p_t_38_0hml;
+p_t_38_0m -> p_t_38_0h * overlap_p_t_38_0;
+p_t_38_0l / p_t_38_0m -> - ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml) / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml));
+(p_t_38_0hm - p_t_38_0hml) / p_t_38_0hml -> - (p_t_38_0l / p_t_38_0m) * (1 / (1 / overlap_p_t_38_0 + 1 + (p_t_38_0l / p_t_38_0m)));
+p_t_38_0ml -> p_t_38_0hml / ((1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) / overlap_p_t_38_0 + 1);
+(p_t_38_0h - p_t_38_0hm) / p_t_38_0hm -> - 1 / (1 / overlap_p_t_38_0 + 1);
+p_t_38_0h -> p_t_38_0hml / (overlap_p_t_38_0 / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) + 1);
+p_t_39_0hm ~ p_t_39_0hml;
+p_t_39_0h ~ p_t_39_0hm;
+p_t_39_0h ~ p_t_39_0hml;
+p_t_39_0m -> p_t_39_0h * overlap_p_t_39_0;
+p_t_39_0l / p_t_39_0m -> - ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml) / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml));
+(p_t_39_0hm - p_t_39_0hml) / p_t_39_0hml -> - (p_t_39_0l / p_t_39_0m) * (1 / (1 / overlap_p_t_39_0 + 1 + (p_t_39_0l / p_t_39_0m)));
+p_t_39_0ml -> p_t_39_0hml / ((1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) / overlap_p_t_39_0 + 1);
+(p_t_39_0h - p_t_39_0hm) / p_t_39_0hm -> - 1 / (1 / overlap_p_t_39_0 + 1);
+p_t_39_0h -> p_t_39_0hml / (overlap_p_t_39_0 / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hm ~ Mp_t_33_0;
+p_t_34_0hm ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_t_36_0hml ~ Mp_t_36_0;
+p_t_37_0hml ~ Mp_t_37_0;
+p_t_38_0hml ~ Mp_t_38_0;
+p_t_39_0hml ~ Mp_t_39_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_t_36_0hml in (0);
+$ p_t_36_0ml in (0);
+$ p_t_37_0hml in (0);
+$ p_t_37_0ml in (0);
+$ p_t_38_0hml in (0);
+$ p_t_38_0ml in (0);
+$ p_t_39_0hml in (0);
+$ p_t_39_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR4.gappa b/src/crlibm/gappa/asin/asinAccuR4.gappa
new file mode 100644
index 0000000..9d60b8e
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR4.gappa
@@ -0,0 +1,450 @@
+# The polynomial to implement is: 23179288235074235572414273684753507b-115 + (x * (3060396379323915655525965395989715b-111 + (x * (140743048026270511662877904535769b-108 + (x * (192160797867958272369452195721767b-108 + (x * (60484226630360230815207732200825b-106 + (x * (92348318688015868651166719352511b-106 + (x * (36688451231400427366893071297149b-104 + (x * (61518808568240203990282236793039b-104 + (x * (13291614381561738069979153918799b-101 + (x * (2617096155665713b-48 + (x * (59148849 [...]
+# The polynomial implemented is: 23179288235074235572414273684753507b-115 + (x * (3060396379323915655525965395989715b-111 + (x * (140743048026270511662877904535769b-108 + (x * (192160797867958272369452195721767b-108 + (x * (60484226630360230815207732200825b-106 + (x * (92348318688015868651166719352511b-106 + (x * (36688451231400427366893071297149b-104 + (x * (61518808568240203990282236793039b-104 + (x * (13291614381561738069979153918799b-101 + (x * (2617096155665713b-48 + (x * (591488490 [...]
+# The domain is [-66447228468955b-51;265788913875259b-53]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 63 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(5.58021066268902909968119274708442389965057373046875000000000000000000000000000000e-01);
+p_coeff_0m = double(9.14056635248981946291334736807400951779846267656755277007663007537985322414897382e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.17882180572684136521388609253335744142532348632812500000000000000000000000000000e+00);
+p_coeff_1m = double(2.57506761959083747975269601591872190204330911429892510960959484123122820165008307e-18);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(4.33698001053000381510571514809271320700645446777343750000000000000000000000000000e-01);
+p_coeff_2m = double(-1.13987489167043526825762332057111190978471845558278249810335580605169525370001793e-17);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(5.92141175601989977472783266421174630522727966308593750000000000000000000000000000e-01);
+p_coeff_3m = double(1.51434599074934130528344780896022003291074232766760462864930047999223461374640465e-17);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(7.45525652675293803994804875401314347982406616210937500000000000000000000000000000e-01);
+p_coeff_4m = double(-4.95666529120828261720386639182573717908098482969568576717023233868530951440334320e-17);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(1.13828091056041680317889586149249225854873657226562500000000000000000000000000000e+00);
+p_coeff_5m = double(6.30476130024642952826684347359752494928069360322596403900519135277136228978633881e-17);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(1.80888030309746783430568939365912228822708129882812500000000000000000000000000000e+00);
+p_coeff_6m = double(6.53471855925770582546264336577217040248932212759963578108113324560690671205520630e-17);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(3.03311143845375674743536364985629916191101074218750000000000000000000000000000000e+00);
+p_coeff_7m = double(-2.14585117370534459252749227343052173552538040022033549725222201232099905610084534e-16);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(5.24261747644370590393236852833069860935211181640625000000000000000000000000000000e+00);
+p_coeff_8m = double(-5.46512862978737750269761176067830595023185492192796530730447557289153337478637695e-17);
+p_coeff_8hm = p_coeff_8h + p_coeff_8m;
+
+p_coeff_9h = double(9.29779331096978367554584110621362924575805664062500000000000000000000000000000000e+00);
+
+p_coeff_10h = double(1.68111140106672962701850337907671928405761718750000000000000000000000000000000000e+01);
+
+p_coeff_11h = double(3.08802874723923395094971056096255779266357421875000000000000000000000000000000000e+01);
+
+p_coeff_12h = double(5.74616531317601229034153220709413290023803710937500000000000000000000000000000000e+01);
+
+p_coeff_13h = double(1.08089434897446437844337197020649909973144531250000000000000000000000000000000000e+02);
+
+p_coeff_14h = double(2.05202846011656902192044071853160858154296875000000000000000000000000000000000000e+02);
+
+p_coeff_15h = double(3.92662709897826516680652275681495666503906250000000000000000000000000000000000000e+02);
+
+p_coeff_16h = double(7.56557048606022931380721274763345718383789062500000000000000000000000000000000000e+02);
+
+p_coeff_17h = double(1.46649727257876816111092921346426010131835937500000000000000000000000000000000000e+03);
+
+p_coeff_18h = double(2.85782276299161503629875369369983673095703125000000000000000000000000000000000000e+03);
+
+p_coeff_19h = double(5.59751274793538505036849528551101684570312500000000000000000000000000000000000000e+03);
+
+p_coeff_20h = double(1.10145801644146959006320685148239135742187500000000000000000000000000000000000000e+04);
+
+p_coeff_21h = double(2.15676400725272833369672298431396484375000000000000000000000000000000000000000000e+04);
+
+p_coeff_22h = double(4.10662669419021476642228662967681884765625000000000000000000000000000000000000000e+04);
+
+p_t_1_0h = p_coeff_22h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_21h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_20h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_19h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_18h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_17h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_16h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_15h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_14h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_13h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_12h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_11h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_10h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = mul_rel<102>(xh,p_t_25_0hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = add_rel<102>(p_coeff_9h,p_t_26_0hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_8hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_7hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_6hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_5hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = fma_rel<100>(p_t_31_0hm,xh,p_coeff_4hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hm = fma_rel<100>(p_t_32_0hm,xh,p_coeff_3hm);
+p_t_33_0h = double(p_t_33_0hm);
+p_t_33_0m = p_t_33_0hm - p_t_33_0h;
+
+p_t_34_0hm = mul_rel<102>(xh,p_t_33_0hm);
+p_t_34_0h = double(p_t_34_0hm);
+p_t_34_0m = p_t_34_0hm - p_t_34_0h;
+
+p_t_35_0hml = add_rel<140>(p_coeff_2hm,p_t_34_0hm);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_t_36_0hml = mul_rel<145>(xh,p_t_35_0hml);
+p_t_36_0ml = p_t_36_0hml - p_t_36_0h;
+p_t_36_0m = double(p_t_36_0ml);
+p_t_36_0l = p_t_36_0ml - p_t_36_0m;
+p_t_36_0hm = p_t_36_0h + p_t_36_0m;
+overlap_p_t_36_0 = p_t_36_0m / p_t_36_0h;
+
+p_t_37_0hml = add_rel<143>(p_coeff_1hm,p_t_36_0hml);
+p_t_37_0ml = p_t_37_0hml - p_t_37_0h;
+p_t_37_0m = double(p_t_37_0ml);
+p_t_37_0l = p_t_37_0ml - p_t_37_0m;
+p_t_37_0hm = p_t_37_0h + p_t_37_0m;
+overlap_p_t_37_0 = p_t_37_0m / p_t_37_0h;
+
+p_t_38_0hml = mul_rel<135>(xh,p_t_37_0hml);
+p_t_38_0ml = p_t_38_0hml - p_t_38_0h;
+p_t_38_0m = double(p_t_38_0ml);
+p_t_38_0l = p_t_38_0ml - p_t_38_0m;
+p_t_38_0hm = p_t_38_0h + p_t_38_0m;
+overlap_p_t_38_0 = p_t_38_0m / p_t_38_0h;
+
+p_t_39_0hml = add_rel<133>(p_coeff_0hm,p_t_38_0hml);
+p_t_39_0ml = p_t_39_0hml - p_t_39_0h;
+p_t_39_0m = double(p_t_39_0ml);
+p_t_39_0l = p_t_39_0ml - p_t_39_0m;
+p_t_39_0hm = p_t_39_0h + p_t_39_0m;
+overlap_p_t_39_0 = p_t_39_0m / p_t_39_0h;
+
+p_reshml = p_t_39_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8hm;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_22 = p_coeff_22h;
+Mp_t_1_0 = Mp_coeff_22;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_21 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_20 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_19 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_18 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_17 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_16 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_15 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_14 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_13 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_12 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_11 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_10 + Mp_t_24_0;
+Mp_t_26_0 = Mx * Mp_t_25_0;
+Mp_t_27_0 = Mp_coeff_9 + Mp_t_26_0;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_8;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_7;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_6;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_5;
+Mp_t_32_0 = (Mp_t_31_0 * Mx) + Mp_coeff_4;
+Mp_t_33_0 = (Mp_t_32_0 * Mx) + Mp_coeff_3;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_2 + Mp_t_34_0;
+Mp_t_36_0 = Mx * Mp_t_35_0;
+Mp_t_37_0 = Mp_coeff_1 + Mp_t_36_0;
+Mp_t_38_0 = Mx * Mp_t_37_0;
+Mp_t_39_0 = Mp_coeff_0 + Mp_t_38_0;
+Mp_res = Mp_t_39_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-66447228468955b-51,-66447228468955b-451]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [265788913875259b-453,265788913875259b-53]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_t_36_0hm ~ p_t_36_0hml;
+p_t_36_0h ~ p_t_36_0hm;
+p_t_36_0h ~ p_t_36_0hml;
+p_t_36_0m -> p_t_36_0h * overlap_p_t_36_0;
+p_t_36_0l / p_t_36_0m -> - ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml) / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml));
+(p_t_36_0hm - p_t_36_0hml) / p_t_36_0hml -> - (p_t_36_0l / p_t_36_0m) * (1 / (1 / overlap_p_t_36_0 + 1 + (p_t_36_0l / p_t_36_0m)));
+p_t_36_0ml -> p_t_36_0hml / ((1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) / overlap_p_t_36_0 + 1);
+(p_t_36_0h - p_t_36_0hm) / p_t_36_0hm -> - 1 / (1 / overlap_p_t_36_0 + 1);
+p_t_36_0h -> p_t_36_0hml / (overlap_p_t_36_0 / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) + 1);
+p_t_37_0hm ~ p_t_37_0hml;
+p_t_37_0h ~ p_t_37_0hm;
+p_t_37_0h ~ p_t_37_0hml;
+p_t_37_0m -> p_t_37_0h * overlap_p_t_37_0;
+p_t_37_0l / p_t_37_0m -> - ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml) / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml));
+(p_t_37_0hm - p_t_37_0hml) / p_t_37_0hml -> - (p_t_37_0l / p_t_37_0m) * (1 / (1 / overlap_p_t_37_0 + 1 + (p_t_37_0l / p_t_37_0m)));
+p_t_37_0ml -> p_t_37_0hml / ((1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) / overlap_p_t_37_0 + 1);
+(p_t_37_0h - p_t_37_0hm) / p_t_37_0hm -> - 1 / (1 / overlap_p_t_37_0 + 1);
+p_t_37_0h -> p_t_37_0hml / (overlap_p_t_37_0 / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) + 1);
+p_t_38_0hm ~ p_t_38_0hml;
+p_t_38_0h ~ p_t_38_0hm;
+p_t_38_0h ~ p_t_38_0hml;
+p_t_38_0m -> p_t_38_0h * overlap_p_t_38_0;
+p_t_38_0l / p_t_38_0m -> - ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml) / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml));
+(p_t_38_0hm - p_t_38_0hml) / p_t_38_0hml -> - (p_t_38_0l / p_t_38_0m) * (1 / (1 / overlap_p_t_38_0 + 1 + (p_t_38_0l / p_t_38_0m)));
+p_t_38_0ml -> p_t_38_0hml / ((1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) / overlap_p_t_38_0 + 1);
+(p_t_38_0h - p_t_38_0hm) / p_t_38_0hm -> - 1 / (1 / overlap_p_t_38_0 + 1);
+p_t_38_0h -> p_t_38_0hml / (overlap_p_t_38_0 / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) + 1);
+p_t_39_0hm ~ p_t_39_0hml;
+p_t_39_0h ~ p_t_39_0hm;
+p_t_39_0h ~ p_t_39_0hml;
+p_t_39_0m -> p_t_39_0h * overlap_p_t_39_0;
+p_t_39_0l / p_t_39_0m -> - ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml) / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml));
+(p_t_39_0hm - p_t_39_0hml) / p_t_39_0hml -> - (p_t_39_0l / p_t_39_0m) * (1 / (1 / overlap_p_t_39_0 + 1 + (p_t_39_0l / p_t_39_0m)));
+p_t_39_0ml -> p_t_39_0hml / ((1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) / overlap_p_t_39_0 + 1);
+(p_t_39_0h - p_t_39_0hm) / p_t_39_0hm -> - 1 / (1 / overlap_p_t_39_0 + 1);
+p_t_39_0h -> p_t_39_0hml / (overlap_p_t_39_0 / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hm ~ Mp_t_33_0;
+p_t_34_0hm ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_t_36_0hml ~ Mp_t_36_0;
+p_t_37_0hml ~ Mp_t_37_0;
+p_t_38_0hml ~ Mp_t_38_0;
+p_t_39_0hml ~ Mp_t_39_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_t_36_0hml in (0);
+$ p_t_36_0ml in (0);
+$ p_t_37_0hml in (0);
+$ p_t_37_0ml in (0);
+$ p_t_38_0hml in (0);
+$ p_t_38_0ml in (0);
+$ p_t_39_0hml in (0);
+$ p_t_39_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR5.gappa b/src/crlibm/gappa/asin/asinAccuR5.gappa
new file mode 100644
index 0000000..9df29b7
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR5.gappa
@@ -0,0 +1,450 @@
+# The polynomial to implement is: 207936752306311063879596363241397575b-118 + (x * (200188677279957379313404027895927b-107 + (x * (44618069117890863136015301040417b-106 + (x * (260684645695147510943269794340145b-108 + (x * (381061457037558230442783063668111b-108 + (x * (81771898601459245984531837067169b-105 + (x * (74010517123253970985200791902569b-104 + (x * (140730399485913888056405477478093b-104 + (x * (69075144564109197184455554933769b-102 + (x * (1930159181128091b-46 + (x * (4953677 [...]
+# The polynomial implemented is: 207936752306311063879596363241397575b-118 + (x * (200188677279957379313404027895927b-107 + (x * (44618069117890863136015301040417b-106 + (x * (260684645695147510943269794340145b-108 + (x * (381061457037558230442783063668111b-108 + (x * (81771898601459245984531837067169b-105 + (x * (74010517123253970985200791902569b-104 + (x * (140730399485913888056405477478093b-104 + (x * (69075144564109197184455554933769b-102 + (x * (1930159181128091b-46 + (x * (49536776 [...]
+# The domain is [-120145772825149b-52;60072886412803b-51]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 63 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(6.25736902820868912122875826753443107008934020996093750000000000000000000000000000e-01);
+p_coeff_0m = double(1.03044861946200352361105560063972534424839340803290894401332555840866689322865568e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.23375797792237640315704538807040080428123474121093750000000000000000000000000000e+00);
+p_coeff_1m = double(-1.56943153280384722085732805658465945105123195556662968330741136924189049750566483e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(5.49960162399266483390647408668883144855499267578125000000000000000000000000000000e-01);
+p_coeff_2m = double(4.77724544586887245869366226653936105958167895554379589473370515406713820993900299e-17);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(8.03296584298018756520320948766311630606651306152343750000000000000000000000000000e-01);
+p_coeff_3m = double(8.24298592592304193429233278946371287822415169276122487440616737330856267362833023e-18);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(1.17423627321674173273891028657089918851852416992187500000000000000000000000000000e+00);
+p_coeff_4m = double(6.51885136427795249608596859127055587343811181939758764292136561380175407975912094e-18);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(2.01583293601212298895575258939061313867568969726562500000000000000000000000000000e+00);
+p_coeff_5m = double(-1.74898605368430358273924263609101302050140983100449953990818130478146485984325409e-16);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(3.64900022085783248826373892370611429214477539062500000000000000000000000000000000e+00);
+p_coeff_6m = double(1.43304714197470670030886399120078425706334125872346008101487768726656213402748108e-16);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(6.93854439566079062018388867727480828762054443359375000000000000000000000000000000e+00);
+p_coeff_7m = double(-3.60750117305009285790273957823616258349535174413877380850124154676450416445732117e-16);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(1.36226702672788579917551032849587500095367431640625000000000000000000000000000000e+01);
+p_coeff_8m = double(5.62980642478103599614115253967152086402971956392848884576096679666079580783843994e-16);
+p_coeff_8hm = p_coeff_8h + p_coeff_8m;
+
+p_coeff_9h = double(2.74292117002245703361040796153247356414794921875000000000000000000000000000000000e+01);
+
+p_coeff_10h = double(5.63167951919359666135278530418872833251953125000000000000000000000000000000000000e+01);
+
+p_coeff_11h = double(1.17466533739617389642262423876672983169555664062500000000000000000000000000000000e+02);
+
+p_coeff_12h = double(2.48208400271530678082854137755930423736572265625000000000000000000000000000000000e+02);
+
+p_coeff_13h = double(5.30187120971580611694662366062402725219726562500000000000000000000000000000000000e+02);
+
+p_coeff_14h = double(1.14298685390676246242946945130825042724609375000000000000000000000000000000000000e+03);
+
+p_coeff_15h = double(2.48365898527212812041398137807846069335937500000000000000000000000000000000000000e+03);
+
+p_coeff_16h = double(5.43413912381613681645831093192100524902343750000000000000000000000000000000000000e+03);
+
+p_coeff_17h = double(1.19616511180501001945231109857559204101562500000000000000000000000000000000000000e+04);
+
+p_coeff_18h = double(2.64708277570606114750262349843978881835937500000000000000000000000000000000000000e+04);
+
+p_coeff_19h = double(5.88376889385143513209186494350433349609375000000000000000000000000000000000000000e+04);
+
+p_coeff_20h = double(1.31386216977166535798460245132446289062500000000000000000000000000000000000000000e+05);
+
+p_coeff_21h = double(3.03303368112601048778742551803588867187500000000000000000000000000000000000000000e+05);
+
+p_coeff_22h = double(6.82215743360355845652520656585693359375000000000000000000000000000000000000000000e+05);
+
+p_t_1_0h = p_coeff_22h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_21h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_20h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_19h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_18h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_17h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_16h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_15h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_14h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_13h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_12h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_11h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_10h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = mul_rel<102>(xh,p_t_25_0hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = add_rel<102>(p_coeff_9h,p_t_26_0hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_8hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_7hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_6hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_5hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = fma_rel<100>(p_t_31_0hm,xh,p_coeff_4hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hm = fma_rel<100>(p_t_32_0hm,xh,p_coeff_3hm);
+p_t_33_0h = double(p_t_33_0hm);
+p_t_33_0m = p_t_33_0hm - p_t_33_0h;
+
+p_t_34_0hm = mul_rel<102>(xh,p_t_33_0hm);
+p_t_34_0h = double(p_t_34_0hm);
+p_t_34_0m = p_t_34_0hm - p_t_34_0h;
+
+p_t_35_0hml = add_rel<140>(p_coeff_2hm,p_t_34_0hm);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_t_36_0hml = mul_rel<145>(xh,p_t_35_0hml);
+p_t_36_0ml = p_t_36_0hml - p_t_36_0h;
+p_t_36_0m = double(p_t_36_0ml);
+p_t_36_0l = p_t_36_0ml - p_t_36_0m;
+p_t_36_0hm = p_t_36_0h + p_t_36_0m;
+overlap_p_t_36_0 = p_t_36_0m / p_t_36_0h;
+
+p_t_37_0hml = add_rel<143>(p_coeff_1hm,p_t_36_0hml);
+p_t_37_0ml = p_t_37_0hml - p_t_37_0h;
+p_t_37_0m = double(p_t_37_0ml);
+p_t_37_0l = p_t_37_0ml - p_t_37_0m;
+p_t_37_0hm = p_t_37_0h + p_t_37_0m;
+overlap_p_t_37_0 = p_t_37_0m / p_t_37_0h;
+
+p_t_38_0hml = mul_rel<135>(xh,p_t_37_0hml);
+p_t_38_0ml = p_t_38_0hml - p_t_38_0h;
+p_t_38_0m = double(p_t_38_0ml);
+p_t_38_0l = p_t_38_0ml - p_t_38_0m;
+p_t_38_0hm = p_t_38_0h + p_t_38_0m;
+overlap_p_t_38_0 = p_t_38_0m / p_t_38_0h;
+
+p_t_39_0hml = add_rel<133>(p_coeff_0hm,p_t_38_0hml);
+p_t_39_0ml = p_t_39_0hml - p_t_39_0h;
+p_t_39_0m = double(p_t_39_0ml);
+p_t_39_0l = p_t_39_0ml - p_t_39_0m;
+p_t_39_0hm = p_t_39_0h + p_t_39_0m;
+overlap_p_t_39_0 = p_t_39_0m / p_t_39_0h;
+
+p_reshml = p_t_39_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8hm;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_22 = p_coeff_22h;
+Mp_t_1_0 = Mp_coeff_22;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_21 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_20 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_19 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_18 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_17 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_16 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_15 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_14 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_13 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_12 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_11 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_10 + Mp_t_24_0;
+Mp_t_26_0 = Mx * Mp_t_25_0;
+Mp_t_27_0 = Mp_coeff_9 + Mp_t_26_0;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_8;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_7;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_6;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_5;
+Mp_t_32_0 = (Mp_t_31_0 * Mx) + Mp_coeff_4;
+Mp_t_33_0 = (Mp_t_32_0 * Mx) + Mp_coeff_3;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_2 + Mp_t_34_0;
+Mp_t_36_0 = Mx * Mp_t_35_0;
+Mp_t_37_0 = Mp_coeff_1 + Mp_t_36_0;
+Mp_t_38_0 = Mx * Mp_t_37_0;
+Mp_t_39_0 = Mp_coeff_0 + Mp_t_38_0;
+Mp_res = Mp_t_39_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-120145772825149b-52,-120145772825149b-452]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [60072886412803b-451,60072886412803b-51]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_t_36_0hm ~ p_t_36_0hml;
+p_t_36_0h ~ p_t_36_0hm;
+p_t_36_0h ~ p_t_36_0hml;
+p_t_36_0m -> p_t_36_0h * overlap_p_t_36_0;
+p_t_36_0l / p_t_36_0m -> - ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml) / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml));
+(p_t_36_0hm - p_t_36_0hml) / p_t_36_0hml -> - (p_t_36_0l / p_t_36_0m) * (1 / (1 / overlap_p_t_36_0 + 1 + (p_t_36_0l / p_t_36_0m)));
+p_t_36_0ml -> p_t_36_0hml / ((1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) / overlap_p_t_36_0 + 1);
+(p_t_36_0h - p_t_36_0hm) / p_t_36_0hm -> - 1 / (1 / overlap_p_t_36_0 + 1);
+p_t_36_0h -> p_t_36_0hml / (overlap_p_t_36_0 / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) + 1);
+p_t_37_0hm ~ p_t_37_0hml;
+p_t_37_0h ~ p_t_37_0hm;
+p_t_37_0h ~ p_t_37_0hml;
+p_t_37_0m -> p_t_37_0h * overlap_p_t_37_0;
+p_t_37_0l / p_t_37_0m -> - ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml) / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml));
+(p_t_37_0hm - p_t_37_0hml) / p_t_37_0hml -> - (p_t_37_0l / p_t_37_0m) * (1 / (1 / overlap_p_t_37_0 + 1 + (p_t_37_0l / p_t_37_0m)));
+p_t_37_0ml -> p_t_37_0hml / ((1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) / overlap_p_t_37_0 + 1);
+(p_t_37_0h - p_t_37_0hm) / p_t_37_0hm -> - 1 / (1 / overlap_p_t_37_0 + 1);
+p_t_37_0h -> p_t_37_0hml / (overlap_p_t_37_0 / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) + 1);
+p_t_38_0hm ~ p_t_38_0hml;
+p_t_38_0h ~ p_t_38_0hm;
+p_t_38_0h ~ p_t_38_0hml;
+p_t_38_0m -> p_t_38_0h * overlap_p_t_38_0;
+p_t_38_0l / p_t_38_0m -> - ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml) / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml));
+(p_t_38_0hm - p_t_38_0hml) / p_t_38_0hml -> - (p_t_38_0l / p_t_38_0m) * (1 / (1 / overlap_p_t_38_0 + 1 + (p_t_38_0l / p_t_38_0m)));
+p_t_38_0ml -> p_t_38_0hml / ((1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) / overlap_p_t_38_0 + 1);
+(p_t_38_0h - p_t_38_0hm) / p_t_38_0hm -> - 1 / (1 / overlap_p_t_38_0 + 1);
+p_t_38_0h -> p_t_38_0hml / (overlap_p_t_38_0 / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) + 1);
+p_t_39_0hm ~ p_t_39_0hml;
+p_t_39_0h ~ p_t_39_0hm;
+p_t_39_0h ~ p_t_39_0hml;
+p_t_39_0m -> p_t_39_0h * overlap_p_t_39_0;
+p_t_39_0l / p_t_39_0m -> - ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml) / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml));
+(p_t_39_0hm - p_t_39_0hml) / p_t_39_0hml -> - (p_t_39_0l / p_t_39_0m) * (1 / (1 / overlap_p_t_39_0 + 1 + (p_t_39_0l / p_t_39_0m)));
+p_t_39_0ml -> p_t_39_0hml / ((1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) / overlap_p_t_39_0 + 1);
+(p_t_39_0h - p_t_39_0hm) / p_t_39_0hm -> - 1 / (1 / overlap_p_t_39_0 + 1);
+p_t_39_0h -> p_t_39_0hml / (overlap_p_t_39_0 / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hm ~ Mp_t_33_0;
+p_t_34_0hm ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_t_36_0hml ~ Mp_t_36_0;
+p_t_37_0hml ~ Mp_t_37_0;
+p_t_38_0hml ~ Mp_t_38_0;
+p_t_39_0hml ~ Mp_t_39_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_t_36_0hml in (0);
+$ p_t_36_0ml in (0);
+$ p_t_37_0hml in (0);
+$ p_t_37_0ml in (0);
+$ p_t_38_0hml in (0);
+$ p_t_38_0ml in (0);
+$ p_t_39_0hml in (0);
+$ p_t_39_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR6.gappa b/src/crlibm/gappa/asin/asinAccuR6.gappa
new file mode 100644
index 0000000..491e708
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR6.gappa
@@ -0,0 +1,450 @@
+# The polynomial to implement is: 1792581242326710567212291806223253b-111 + (x * (52617200066848308332099303297945b-105 + (x * (902150187593629183958092782443033b-110 + (x * (44965428859892640751057159071087b-105 + (x * (4752633902292393250779852752339b-101 + (x * (148125601965768399364062017841291b-105 + (x * (153165790916719773608400395315619b-104 + (x * (41511842370824976233500266801317b-101 + (x * (23248649506122112562773990099117b-99 + (x * (370572309710903b-42 + (x * (6944699428013 [...]
+# The polynomial implemented is: 1792581242326710567212291806223253b-111 + (x * (52617200066848308332099303297945b-105 + (x * (902150187593629183958092782443033b-110 + (x * (44965428859892640751057159071087b-105 + (x * (4752633902292393250779852752339b-101 + (x * (148125601965768399364062017841291b-105 + (x * (153165790916719773608400395315619b-104 + (x * (41511842370824976233500266801317b-101 + (x * (23248649506122112562773990099117b-99 + (x * (370572309710903b-42 + (x * (69446994280133 [...]
+# The domain is [-110485440722351b-52;55242720361239b-51]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 63 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(6.90477178468776764397318856936180964112281799316406250000000000000000000000000000e-01);
+p_coeff_0m = double(3.39466231816613032388245073452427079551490712938188829689289960356290976051241159e-18);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.29711412734153253012436834978871047496795654296875000000000000000000000000000000e+00);
+p_coeff_1m = double(-4.91536443957924304285159601199758593586250555616465329755726543226046487689018250e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(6.94991224248453054457286270917393267154693603515625000000000000000000000000000000e-01);
+p_coeff_2m = double(4.14055567174545404801311585696815622965502227300336503257316422832445823587477207e-18);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(1.10848340356455987709693999931914731860160827636718750000000000000000000000000000e+00);
+p_coeff_3m = double(4.16266958244922006708243033738862584564114206709881105261672473716316744685173035e-17);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(1.87458354117322345544494055502582341432571411132812500000000000000000000000000000e+00);
+p_coeff_4m = double(1.01371418047977543599188915056692109774560397669751488081146817421540617942810059e-16);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(3.65157801416010441286630339163821190595626831054687500000000000000000000000000000e+00);
+p_coeff_5m = double(1.26536476346012852031977695308463633490816727090143289924384362166165374219417572e-16);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(7.55165652946598697781155351549386978149414062500000000000000000000000000000000000e+00);
+p_coeff_6m = double(-2.14190464475496048348382959343551268818198527301224776131505223020212724804878235e-16);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(1.63735347750204702776954945875331759452819824218750000000000000000000000000000000e+01);
+p_coeff_7m = double(1.51055732062479748503833695277300766424363764363347772956558401347137987613677979e-15);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(3.66799013891310394797073968220502138137817382812500000000000000000000000000000000e+01);
+p_coeff_8m = double(-1.96467879903428952233615671924270070336884016354295212636316136922687292098999023e-15);
+p_coeff_8hm = p_coeff_8h + p_coeff_8m;
+
+p_coeff_9h = double(8.42583880764557306974893435835838317871093750000000000000000000000000000000000000e+01);
+
+p_coeff_10h = double(1.97380229224487067085647140629589557647705078125000000000000000000000000000000000e+02);
+
+p_coeff_11h = double(4.69729422521515630251087713986635208129882812500000000000000000000000000000000000e+02);
+
+p_coeff_12h = double(1.13246616901346669692429713904857635498046875000000000000000000000000000000000000e+03);
+
+p_coeff_13h = double(2.76004978747814584494335576891899108886718750000000000000000000000000000000000000e+03);
+
+p_coeff_14h = double(6.78908667818280082428827881813049316406250000000000000000000000000000000000000000e+03);
+
+p_coeff_15h = double(1.68324374222143451333977282047271728515625000000000000000000000000000000000000000e+04);
+
+p_coeff_16h = double(4.20216193300401428132317960262298583984375000000000000000000000000000000000000000e+04);
+
+p_coeff_17h = double(1.05540980227414402179419994354248046875000000000000000000000000000000000000000000e+05);
+
+p_coeff_18h = double(2.66494483142128563486039638519287109375000000000000000000000000000000000000000000e+05);
+
+p_coeff_19h = double(6.76009364551451755687594413757324218750000000000000000000000000000000000000000000e+05);
+
+p_coeff_20h = double(1.72216034198046685196459293365478515625000000000000000000000000000000000000000000e+06);
+
+p_coeff_21h = double(4.49188704440361727029085159301757812500000000000000000000000000000000000000000000e+06);
+
+p_coeff_22h = double(1.15993861480669919401407241821289062500000000000000000000000000000000000000000000e+07);
+
+p_t_1_0h = p_coeff_22h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_21h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_20h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_19h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_18h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_17h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_16h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_15h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_14h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_13h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_12h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_11h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_10h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = mul_rel<102>(xh,p_t_25_0hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = add_rel<102>(p_coeff_9h,p_t_26_0hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_8hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_7hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_6hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_5hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = fma_rel<100>(p_t_31_0hm,xh,p_coeff_4hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hm = fma_rel<100>(p_t_32_0hm,xh,p_coeff_3hm);
+p_t_33_0h = double(p_t_33_0hm);
+p_t_33_0m = p_t_33_0hm - p_t_33_0h;
+
+p_t_34_0hm = mul_rel<102>(xh,p_t_33_0hm);
+p_t_34_0h = double(p_t_34_0hm);
+p_t_34_0m = p_t_34_0hm - p_t_34_0h;
+
+p_t_35_0hml = add_rel<140>(p_coeff_2hm,p_t_34_0hm);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_t_36_0hml = mul_rel<145>(xh,p_t_35_0hml);
+p_t_36_0ml = p_t_36_0hml - p_t_36_0h;
+p_t_36_0m = double(p_t_36_0ml);
+p_t_36_0l = p_t_36_0ml - p_t_36_0m;
+p_t_36_0hm = p_t_36_0h + p_t_36_0m;
+overlap_p_t_36_0 = p_t_36_0m / p_t_36_0h;
+
+p_t_37_0hml = add_rel<143>(p_coeff_1hm,p_t_36_0hml);
+p_t_37_0ml = p_t_37_0hml - p_t_37_0h;
+p_t_37_0m = double(p_t_37_0ml);
+p_t_37_0l = p_t_37_0ml - p_t_37_0m;
+p_t_37_0hm = p_t_37_0h + p_t_37_0m;
+overlap_p_t_37_0 = p_t_37_0m / p_t_37_0h;
+
+p_t_38_0hml = mul_rel<135>(xh,p_t_37_0hml);
+p_t_38_0ml = p_t_38_0hml - p_t_38_0h;
+p_t_38_0m = double(p_t_38_0ml);
+p_t_38_0l = p_t_38_0ml - p_t_38_0m;
+p_t_38_0hm = p_t_38_0h + p_t_38_0m;
+overlap_p_t_38_0 = p_t_38_0m / p_t_38_0h;
+
+p_t_39_0hml = add_rel<133>(p_coeff_0hm,p_t_38_0hml);
+p_t_39_0ml = p_t_39_0hml - p_t_39_0h;
+p_t_39_0m = double(p_t_39_0ml);
+p_t_39_0l = p_t_39_0ml - p_t_39_0m;
+p_t_39_0hm = p_t_39_0h + p_t_39_0m;
+overlap_p_t_39_0 = p_t_39_0m / p_t_39_0h;
+
+p_reshml = p_t_39_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8hm;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_22 = p_coeff_22h;
+Mp_t_1_0 = Mp_coeff_22;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_21 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_20 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_19 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_18 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_17 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_16 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_15 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_14 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_13 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_12 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_11 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_10 + Mp_t_24_0;
+Mp_t_26_0 = Mx * Mp_t_25_0;
+Mp_t_27_0 = Mp_coeff_9 + Mp_t_26_0;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_8;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_7;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_6;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_5;
+Mp_t_32_0 = (Mp_t_31_0 * Mx) + Mp_coeff_4;
+Mp_t_33_0 = (Mp_t_32_0 * Mx) + Mp_coeff_3;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_2 + Mp_t_34_0;
+Mp_t_36_0 = Mx * Mp_t_35_0;
+Mp_t_37_0 = Mp_coeff_1 + Mp_t_36_0;
+Mp_t_38_0 = Mx * Mp_t_37_0;
+Mp_t_39_0 = Mp_coeff_0 + Mp_t_38_0;
+Mp_res = Mp_t_39_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-110485440722351b-52,-110485440722351b-452]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [55242720361239b-451,55242720361239b-51]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_t_36_0hm ~ p_t_36_0hml;
+p_t_36_0h ~ p_t_36_0hm;
+p_t_36_0h ~ p_t_36_0hml;
+p_t_36_0m -> p_t_36_0h * overlap_p_t_36_0;
+p_t_36_0l / p_t_36_0m -> - ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml) / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml));
+(p_t_36_0hm - p_t_36_0hml) / p_t_36_0hml -> - (p_t_36_0l / p_t_36_0m) * (1 / (1 / overlap_p_t_36_0 + 1 + (p_t_36_0l / p_t_36_0m)));
+p_t_36_0ml -> p_t_36_0hml / ((1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) / overlap_p_t_36_0 + 1);
+(p_t_36_0h - p_t_36_0hm) / p_t_36_0hm -> - 1 / (1 / overlap_p_t_36_0 + 1);
+p_t_36_0h -> p_t_36_0hml / (overlap_p_t_36_0 / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) + 1);
+p_t_37_0hm ~ p_t_37_0hml;
+p_t_37_0h ~ p_t_37_0hm;
+p_t_37_0h ~ p_t_37_0hml;
+p_t_37_0m -> p_t_37_0h * overlap_p_t_37_0;
+p_t_37_0l / p_t_37_0m -> - ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml) / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml));
+(p_t_37_0hm - p_t_37_0hml) / p_t_37_0hml -> - (p_t_37_0l / p_t_37_0m) * (1 / (1 / overlap_p_t_37_0 + 1 + (p_t_37_0l / p_t_37_0m)));
+p_t_37_0ml -> p_t_37_0hml / ((1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) / overlap_p_t_37_0 + 1);
+(p_t_37_0h - p_t_37_0hm) / p_t_37_0hm -> - 1 / (1 / overlap_p_t_37_0 + 1);
+p_t_37_0h -> p_t_37_0hml / (overlap_p_t_37_0 / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) + 1);
+p_t_38_0hm ~ p_t_38_0hml;
+p_t_38_0h ~ p_t_38_0hm;
+p_t_38_0h ~ p_t_38_0hml;
+p_t_38_0m -> p_t_38_0h * overlap_p_t_38_0;
+p_t_38_0l / p_t_38_0m -> - ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml) / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml));
+(p_t_38_0hm - p_t_38_0hml) / p_t_38_0hml -> - (p_t_38_0l / p_t_38_0m) * (1 / (1 / overlap_p_t_38_0 + 1 + (p_t_38_0l / p_t_38_0m)));
+p_t_38_0ml -> p_t_38_0hml / ((1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) / overlap_p_t_38_0 + 1);
+(p_t_38_0h - p_t_38_0hm) / p_t_38_0hm -> - 1 / (1 / overlap_p_t_38_0 + 1);
+p_t_38_0h -> p_t_38_0hml / (overlap_p_t_38_0 / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) + 1);
+p_t_39_0hm ~ p_t_39_0hml;
+p_t_39_0h ~ p_t_39_0hm;
+p_t_39_0h ~ p_t_39_0hml;
+p_t_39_0m -> p_t_39_0h * overlap_p_t_39_0;
+p_t_39_0l / p_t_39_0m -> - ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml) / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml));
+(p_t_39_0hm - p_t_39_0hml) / p_t_39_0hml -> - (p_t_39_0l / p_t_39_0m) * (1 / (1 / overlap_p_t_39_0 + 1 + (p_t_39_0l / p_t_39_0m)));
+p_t_39_0ml -> p_t_39_0hml / ((1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) / overlap_p_t_39_0 + 1);
+(p_t_39_0h - p_t_39_0hm) / p_t_39_0hm -> - 1 / (1 / overlap_p_t_39_0 + 1);
+p_t_39_0h -> p_t_39_0hml / (overlap_p_t_39_0 / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hm ~ Mp_t_33_0;
+p_t_34_0hm ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_t_36_0hml ~ Mp_t_36_0;
+p_t_37_0hml ~ Mp_t_37_0;
+p_t_38_0hml ~ Mp_t_38_0;
+p_t_39_0hml ~ Mp_t_39_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_t_36_0hml in (0);
+$ p_t_36_0ml in (0);
+$ p_t_37_0hml in (0);
+$ p_t_37_0ml in (0);
+$ p_t_38_0hml in (0);
+$ p_t_38_0ml in (0);
+$ p_t_39_0hml in (0);
+$ p_t_39_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR7.gappa b/src/crlibm/gappa/asin/asinAccuR7.gappa
new file mode 100644
index 0000000..6c29769
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR7.gappa
@@ -0,0 +1,450 @@
+# The polynomial to implement is: 15651770362713997207607972106972745b-114 + (x * (3476698806776688943652103662933b-101 + (x * (17894972500311187082269807705171b-104 + (x * (126976607296441025269345153102591b-106 + (x * (249107378895562413495151944042799b-106 + (x * (139053951649796304768149995225589b-104 + (x * (165428664168251249501887921888847b-103 + (x * (206167601873884163281098618631159b-102 + (x * (66386611260133347295510390653099b-99 + (x * (2433556521489987b-43 + (x * (409716955 [...]
+# The polynomial implemented is: 15651770362713997207607972106972745b-114 + (x * (3476698806776688943652103662933b-101 + (x * (17894972500311187082269807705171b-104 + (x * (126976607296441025269345153102591b-106 + (x * (249107378895562413495151944042799b-106 + (x * (139053951649796304768149995225589b-104 + (x * (165428664168251249501887921888847b-103 + (x * (206167601873884163281098618631159b-102 + (x * (66386611260133347295510390653099b-99 + (x * (2433556521489987b-43 + (x * (4097169554 [...]
+# The domain is [-205674681606191b-53;205674681606835b-53]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 63 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(7.53605330605588874526290510402759537100791931152343750000000000000000000000000000e-01);
+p_coeff_0m = double(-6.86303578932659590324882262388685086010663787564085999357010869914574868744239211e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.37131588394733516800272354885237291455268859863281250000000000000000000000000000e+00);
+p_coeff_1m = double(5.85729819349925155946752593741546617096794483808830378279708384070545434951782227e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(8.82290262843787198576706032326910644769668579101562500000000000000000000000000000e-01);
+p_coeff_2m = double(5.16377114572074856584788281695076928068533622922381409736658497422467917203903198e-17);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(1.56510752146505316417801623174455016851425170898437500000000000000000000000000000e+00);
+p_coeff_3m = double(-4.39163602371923391288987498767894166026634554891340533888666186612681485712528229e-17);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(3.07048550644979600932060748164076358079910278320312500000000000000000000000000000e+00);
+p_coeff_4m = double(-1.10182145686314872930592860300828689006905830376995686359364867712429258972406387e-16);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(6.85588913581356962367863161489367485046386718750000000000000000000000000000000000e+00);
+p_coeff_5m = double(4.35622325486244782178679451752414705321823684735019210911843856592895463109016418e-16);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(1.63125257206586802283254655776545405387878417968750000000000000000000000000000000e+01);
+p_coeff_6m = double(-1.42810985056358952027816317128163090933704222357941704402151117392349988222122192e-16);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(4.06593902603693564401510229799896478652954101562500000000000000000000000000000000e+01);
+p_coeff_7m = double(1.26451118649566617072575681437226509832616233499485991487176761438604444265365601e-15);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(1.04739604506448415577324340119957923889160156250000000000000000000000000000000000e+02);
+p_coeff_8m = double(-4.21355762035756719251654947961735015460869348269401513107368373312056064605712891e-16);
+p_coeff_8hm = p_coeff_8h + p_coeff_8m;
+
+p_coeff_9h = double(2.76663345345012544385099317878484725952148437500000000000000000000000000000000000e+02);
+
+p_coeff_10h = double(7.45270800399650397594086825847625732421875000000000000000000000000000000000000000e+02);
+
+p_coeff_11h = double(2.03955855522386173106497153639793395996093750000000000000000000000000000000000000e+03);
+
+p_coeff_12h = double(5.65453975726426688197534531354904174804687500000000000000000000000000000000000000e+03);
+
+p_coeff_13h = double(1.58480736247709683084394782781600952148437500000000000000000000000000000000000000e+04);
+
+p_coeff_14h = double(4.48292577388124118442647159099578857421875000000000000000000000000000000000000000e+04);
+
+p_coeff_15h = double(1.27817476628451069700531661510467529296875000000000000000000000000000000000000000e+05);
+
+p_coeff_16h = double(3.66953462486772332340478897094726562500000000000000000000000000000000000000000000e+05);
+
+p_coeff_17h = double(1.05988028936582896858453750610351562500000000000000000000000000000000000000000000e+06);
+
+p_coeff_18h = double(3.07766344983369577676057815551757812500000000000000000000000000000000000000000000e+06);
+
+p_coeff_19h = double(8.97598008321647346019744873046875000000000000000000000000000000000000000000000000e+06);
+
+p_coeff_20h = double(2.63006417766936272382736206054687500000000000000000000000000000000000000000000000e+07);
+
+p_coeff_21h = double(7.97293238009131550788879394531250000000000000000000000000000000000000000000000000e+07);
+
+p_coeff_22h = double(2.35266135040413618087768554687500000000000000000000000000000000000000000000000000e+08);
+
+p_t_1_0h = p_coeff_22h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_21h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_20h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_19h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_18h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_17h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_16h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_15h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_14h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_13h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_12h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_11h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_10h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = mul_rel<102>(xh,p_t_25_0hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = add_rel<102>(p_coeff_9h,p_t_26_0hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_8hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_7hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_6hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_5hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = fma_rel<100>(p_t_31_0hm,xh,p_coeff_4hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hm = fma_rel<100>(p_t_32_0hm,xh,p_coeff_3hm);
+p_t_33_0h = double(p_t_33_0hm);
+p_t_33_0m = p_t_33_0hm - p_t_33_0h;
+
+p_t_34_0hm = mul_rel<102>(xh,p_t_33_0hm);
+p_t_34_0h = double(p_t_34_0hm);
+p_t_34_0m = p_t_34_0hm - p_t_34_0h;
+
+p_t_35_0hml = add_rel<140>(p_coeff_2hm,p_t_34_0hm);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_t_36_0hml = mul_rel<145>(xh,p_t_35_0hml);
+p_t_36_0ml = p_t_36_0hml - p_t_36_0h;
+p_t_36_0m = double(p_t_36_0ml);
+p_t_36_0l = p_t_36_0ml - p_t_36_0m;
+p_t_36_0hm = p_t_36_0h + p_t_36_0m;
+overlap_p_t_36_0 = p_t_36_0m / p_t_36_0h;
+
+p_t_37_0hml = add_rel<143>(p_coeff_1hm,p_t_36_0hml);
+p_t_37_0ml = p_t_37_0hml - p_t_37_0h;
+p_t_37_0m = double(p_t_37_0ml);
+p_t_37_0l = p_t_37_0ml - p_t_37_0m;
+p_t_37_0hm = p_t_37_0h + p_t_37_0m;
+overlap_p_t_37_0 = p_t_37_0m / p_t_37_0h;
+
+p_t_38_0hml = mul_rel<135>(xh,p_t_37_0hml);
+p_t_38_0ml = p_t_38_0hml - p_t_38_0h;
+p_t_38_0m = double(p_t_38_0ml);
+p_t_38_0l = p_t_38_0ml - p_t_38_0m;
+p_t_38_0hm = p_t_38_0h + p_t_38_0m;
+overlap_p_t_38_0 = p_t_38_0m / p_t_38_0h;
+
+p_t_39_0hml = add_rel<133>(p_coeff_0hm,p_t_38_0hml);
+p_t_39_0ml = p_t_39_0hml - p_t_39_0h;
+p_t_39_0m = double(p_t_39_0ml);
+p_t_39_0l = p_t_39_0ml - p_t_39_0m;
+p_t_39_0hm = p_t_39_0h + p_t_39_0m;
+overlap_p_t_39_0 = p_t_39_0m / p_t_39_0h;
+
+p_reshml = p_t_39_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8hm;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_22 = p_coeff_22h;
+Mp_t_1_0 = Mp_coeff_22;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_21 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_20 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_19 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_18 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_17 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_16 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_15 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_14 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_13 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_12 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_11 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_10 + Mp_t_24_0;
+Mp_t_26_0 = Mx * Mp_t_25_0;
+Mp_t_27_0 = Mp_coeff_9 + Mp_t_26_0;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_8;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_7;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_6;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_5;
+Mp_t_32_0 = (Mp_t_31_0 * Mx) + Mp_coeff_4;
+Mp_t_33_0 = (Mp_t_32_0 * Mx) + Mp_coeff_3;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_2 + Mp_t_34_0;
+Mp_t_36_0 = Mx * Mp_t_35_0;
+Mp_t_37_0 = Mp_coeff_1 + Mp_t_36_0;
+Mp_t_38_0 = Mx * Mp_t_37_0;
+Mp_t_39_0 = Mp_coeff_0 + Mp_t_38_0;
+Mp_res = Mp_t_39_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-205674681606191b-53,-205674681606191b-453]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [205674681606835b-453,205674681606835b-53]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_t_36_0hm ~ p_t_36_0hml;
+p_t_36_0h ~ p_t_36_0hm;
+p_t_36_0h ~ p_t_36_0hml;
+p_t_36_0m -> p_t_36_0h * overlap_p_t_36_0;
+p_t_36_0l / p_t_36_0m -> - ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml) / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml));
+(p_t_36_0hm - p_t_36_0hml) / p_t_36_0hml -> - (p_t_36_0l / p_t_36_0m) * (1 / (1 / overlap_p_t_36_0 + 1 + (p_t_36_0l / p_t_36_0m)));
+p_t_36_0ml -> p_t_36_0hml / ((1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) / overlap_p_t_36_0 + 1);
+(p_t_36_0h - p_t_36_0hm) / p_t_36_0hm -> - 1 / (1 / overlap_p_t_36_0 + 1);
+p_t_36_0h -> p_t_36_0hml / (overlap_p_t_36_0 / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) + 1);
+p_t_37_0hm ~ p_t_37_0hml;
+p_t_37_0h ~ p_t_37_0hm;
+p_t_37_0h ~ p_t_37_0hml;
+p_t_37_0m -> p_t_37_0h * overlap_p_t_37_0;
+p_t_37_0l / p_t_37_0m -> - ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml) / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml));
+(p_t_37_0hm - p_t_37_0hml) / p_t_37_0hml -> - (p_t_37_0l / p_t_37_0m) * (1 / (1 / overlap_p_t_37_0 + 1 + (p_t_37_0l / p_t_37_0m)));
+p_t_37_0ml -> p_t_37_0hml / ((1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) / overlap_p_t_37_0 + 1);
+(p_t_37_0h - p_t_37_0hm) / p_t_37_0hm -> - 1 / (1 / overlap_p_t_37_0 + 1);
+p_t_37_0h -> p_t_37_0hml / (overlap_p_t_37_0 / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) + 1);
+p_t_38_0hm ~ p_t_38_0hml;
+p_t_38_0h ~ p_t_38_0hm;
+p_t_38_0h ~ p_t_38_0hml;
+p_t_38_0m -> p_t_38_0h * overlap_p_t_38_0;
+p_t_38_0l / p_t_38_0m -> - ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml) / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml));
+(p_t_38_0hm - p_t_38_0hml) / p_t_38_0hml -> - (p_t_38_0l / p_t_38_0m) * (1 / (1 / overlap_p_t_38_0 + 1 + (p_t_38_0l / p_t_38_0m)));
+p_t_38_0ml -> p_t_38_0hml / ((1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) / overlap_p_t_38_0 + 1);
+(p_t_38_0h - p_t_38_0hm) / p_t_38_0hm -> - 1 / (1 / overlap_p_t_38_0 + 1);
+p_t_38_0h -> p_t_38_0hml / (overlap_p_t_38_0 / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) + 1);
+p_t_39_0hm ~ p_t_39_0hml;
+p_t_39_0h ~ p_t_39_0hm;
+p_t_39_0h ~ p_t_39_0hml;
+p_t_39_0m -> p_t_39_0h * overlap_p_t_39_0;
+p_t_39_0l / p_t_39_0m -> - ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml) / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml));
+(p_t_39_0hm - p_t_39_0hml) / p_t_39_0hml -> - (p_t_39_0l / p_t_39_0m) * (1 / (1 / overlap_p_t_39_0 + 1 + (p_t_39_0l / p_t_39_0m)));
+p_t_39_0ml -> p_t_39_0hml / ((1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) / overlap_p_t_39_0 + 1);
+(p_t_39_0h - p_t_39_0hm) / p_t_39_0hm -> - 1 / (1 / overlap_p_t_39_0 + 1);
+p_t_39_0h -> p_t_39_0hml / (overlap_p_t_39_0 / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hm ~ Mp_t_33_0;
+p_t_34_0hm ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_t_36_0hml ~ Mp_t_36_0;
+p_t_37_0hml ~ Mp_t_37_0;
+p_t_38_0hml ~ Mp_t_38_0;
+p_t_39_0hml ~ Mp_t_39_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_t_36_0hml in (0);
+$ p_t_36_0ml in (0);
+$ p_t_37_0hml in (0);
+$ p_t_37_0ml in (0);
+$ p_t_38_0hml in (0);
+$ p_t_38_0ml in (0);
+$ p_t_39_0hml in (0);
+$ p_t_39_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR8.gappa b/src/crlibm/gappa/asin/asinAccuR8.gappa
new file mode 100644
index 0000000..5d47bae
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR8.gappa
@@ -0,0 +1,450 @@
+# The polynomial to implement is: 271231531131291488500256432295155355b-118 + (x * (59219663444275665418148029933093b-105 + (x * (91951771149333176184232653360269b-106 + (x * (92423083901517259878576132800551b-105 + (x * (106023148728483104576104226688181b-104 + (x * (2198352805121143801422469570143153b-107 + (x * (95066434162584819377607079588059b-101 + (x * (34442113666568245424103461394667b-98 + (x * (25796159680640669851948010272065b-96 + (x * (8798088372766967b-43 + (x * (2153449792 [...]
+# The polynomial implemented is: 271231531131291488500256432295155355b-118 + (x * (59219663444275665418148029933093b-105 + (x * (91951771149333176184232653360269b-106 + (x * (92423083901517259878576132800551b-105 + (x * (106023148728483104576104226688181b-104 + (x * (2198352805121143801422469570143153b-107 + (x * (95066434162584819377607079588059b-101 + (x * (34442113666568245424103461394667b-98 + (x * (25796159680640669851948010272065b-96 + (x * (8798088372766967b-43 + (x * (21534497920 [...]
+# The domain is [-96586942132361b-52;6036683883289b-48]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 63 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(8.16207699480864135033186812506755813956260681152343750000000000000000000000000000e-01);
+p_coeff_0m = double(1.10010191397663675140086054218782967355131241568134164879148861881930088202352636e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.45987741598546749699494284868706017732620239257812500000000000000000000000000000e+00);
+p_coeff_1m = double(1.03784174873658842691949705484313598874177727812186111666648002938018180429935455e-16);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(1.13339308477403566399743795045651495456695556640625000000000000000000000000000000e+00);
+p_coeff_2m = double(6.19984751477578508212901866489819694255822369395765580879498202193644829094409943e-17);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(2.27840492593338828086757530400063842535018920898437500000000000000000000000000000e+00);
+p_coeff_3m = double(1.29623917002581965214107410636027293901696556366158474826733026930014602839946747e-16);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(5.22734481752082214001120519242249429225921630859375000000000000000000000000000000e+00);
+p_coeff_4m = double(-3.48196612292005370465186545711763157537164151090688934964134659821866080164909363e-16);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(1.35483951862735629845246876357123255729675292968750000000000000000000000000000000e+01);
+p_coeff_5m = double(-4.53291289318611746967298644014774748053833951222640202827207644986629020422697067e-17);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(3.74970966548151878328098973724991083145141601562500000000000000000000000000000000e+01);
+p_coeff_6m = double(3.16809448186690022670167104047109366061463187579094746837427010177634656429290771e-15);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(1.08680147858936038574029225856065750122070312500000000000000000000000000000000000e+02);
+p_coeff_7m = double(-6.36137089188991992639408248982314785589906210028221522634339635260403156280517578e-15);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(3.25593310030335430838022148236632347106933593750000000000000000000000000000000000e+02);
+p_coeff_8m = double(1.91287227671501587672951512619431386699611966073497626439348096027970314025878906e-14);
+p_coeff_8hm = p_coeff_8h + p_coeff_8m;
+
+p_coeff_9h = double(1.00022684509519501716567901894450187683105468750000000000000000000000000000000000e+03);
+
+p_coeff_10h = double(3.13368188220144656952470541000366210937500000000000000000000000000000000000000000e+03);
+
+p_coeff_11h = double(9.97418849150001005909871309995651245117187500000000000000000000000000000000000000e+03);
+
+p_coeff_12h = double(3.21620985996262825210578739643096923828125000000000000000000000000000000000000000e+04);
+
+p_coeff_13h = double(1.04841470601619919762015342712402343750000000000000000000000000000000000000000000e+05);
+
+p_coeff_14h = double(3.44929702756780723575502634048461914062500000000000000000000000000000000000000000e+05);
+
+p_coeff_15h = double(1.14386293806761899031698703765869140625000000000000000000000000000000000000000000e+06);
+
+p_coeff_16h = double(3.81954181095832167193293571472167968750000000000000000000000000000000000000000000e+06);
+
+p_coeff_17h = double(1.28314429144318234175443649291992187500000000000000000000000000000000000000000000e+07);
+
+p_coeff_18h = double(4.33370274414261654019355773925781250000000000000000000000000000000000000000000000e+07);
+
+p_coeff_19h = double(1.46996088810462892055511474609375000000000000000000000000000000000000000000000000e+08);
+
+p_coeff_20h = double(5.00961200009291708469390869140625000000000000000000000000000000000000000000000000e+08);
+
+p_coeff_21h = double(1.77139381348167872428894042968750000000000000000000000000000000000000000000000000e+09);
+
+p_coeff_22h = double(6.08314919055301284790039062500000000000000000000000000000000000000000000000000000e+09);
+
+p_t_1_0h = p_coeff_22h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_21h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_20h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_19h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_18h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_17h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_16h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_15h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_14h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_13h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_12h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_11h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_10h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = mul_rel<102>(xh,p_t_25_0hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = add_rel<102>(p_coeff_9h,p_t_26_0hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_8hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_7hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_6hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_5hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = fma_rel<100>(p_t_31_0hm,xh,p_coeff_4hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hm = fma_rel<100>(p_t_32_0hm,xh,p_coeff_3hm);
+p_t_33_0h = double(p_t_33_0hm);
+p_t_33_0m = p_t_33_0hm - p_t_33_0h;
+
+p_t_34_0hm = mul_rel<102>(xh,p_t_33_0hm);
+p_t_34_0h = double(p_t_34_0hm);
+p_t_34_0m = p_t_34_0hm - p_t_34_0h;
+
+p_t_35_0hml = add_rel<140>(p_coeff_2hm,p_t_34_0hm);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_t_36_0hml = mul_rel<145>(xh,p_t_35_0hml);
+p_t_36_0ml = p_t_36_0hml - p_t_36_0h;
+p_t_36_0m = double(p_t_36_0ml);
+p_t_36_0l = p_t_36_0ml - p_t_36_0m;
+p_t_36_0hm = p_t_36_0h + p_t_36_0m;
+overlap_p_t_36_0 = p_t_36_0m / p_t_36_0h;
+
+p_t_37_0hml = add_rel<143>(p_coeff_1hm,p_t_36_0hml);
+p_t_37_0ml = p_t_37_0hml - p_t_37_0h;
+p_t_37_0m = double(p_t_37_0ml);
+p_t_37_0l = p_t_37_0ml - p_t_37_0m;
+p_t_37_0hm = p_t_37_0h + p_t_37_0m;
+overlap_p_t_37_0 = p_t_37_0m / p_t_37_0h;
+
+p_t_38_0hml = mul_rel<135>(xh,p_t_37_0hml);
+p_t_38_0ml = p_t_38_0hml - p_t_38_0h;
+p_t_38_0m = double(p_t_38_0ml);
+p_t_38_0l = p_t_38_0ml - p_t_38_0m;
+p_t_38_0hm = p_t_38_0h + p_t_38_0m;
+overlap_p_t_38_0 = p_t_38_0m / p_t_38_0h;
+
+p_t_39_0hml = add_rel<133>(p_coeff_0hm,p_t_38_0hml);
+p_t_39_0ml = p_t_39_0hml - p_t_39_0h;
+p_t_39_0m = double(p_t_39_0ml);
+p_t_39_0l = p_t_39_0ml - p_t_39_0m;
+p_t_39_0hm = p_t_39_0h + p_t_39_0m;
+overlap_p_t_39_0 = p_t_39_0m / p_t_39_0h;
+
+p_reshml = p_t_39_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8hm;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_coeff_21 = p_coeff_21h;
+Mp_coeff_22 = p_coeff_22h;
+Mp_t_1_0 = Mp_coeff_22;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_21 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_20 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_19 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_18 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_17 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_16 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_15 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_14 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_13 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_12 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_11 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_10 + Mp_t_24_0;
+Mp_t_26_0 = Mx * Mp_t_25_0;
+Mp_t_27_0 = Mp_coeff_9 + Mp_t_26_0;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_8;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_7;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_6;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_5;
+Mp_t_32_0 = (Mp_t_31_0 * Mx) + Mp_coeff_4;
+Mp_t_33_0 = (Mp_t_32_0 * Mx) + Mp_coeff_3;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_2 + Mp_t_34_0;
+Mp_t_36_0 = Mx * Mp_t_35_0;
+Mp_t_37_0 = Mp_coeff_1 + Mp_t_36_0;
+Mp_t_38_0 = Mx * Mp_t_37_0;
+Mp_t_39_0 = Mp_coeff_0 + Mp_t_38_0;
+Mp_res = Mp_t_39_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-96586942132361b-52,-96586942132361b-452]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [6036683883289b-448,6036683883289b-48]
+/\ |overlap_p_t_35_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_36_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_36_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_37_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_37_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_38_0| in [1b-400,1b-30]    # Verify the lower bound
+/\ |p_t_38_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_39_0| in [1b-400,1b-25]    # Verify the lower bound
+/\ |p_t_39_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_t_36_0hm ~ p_t_36_0hml;
+p_t_36_0h ~ p_t_36_0hm;
+p_t_36_0h ~ p_t_36_0hml;
+p_t_36_0m -> p_t_36_0h * overlap_p_t_36_0;
+p_t_36_0l / p_t_36_0m -> - ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml) / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml));
+(p_t_36_0hm - p_t_36_0hml) / p_t_36_0hml -> - (p_t_36_0l / p_t_36_0m) * (1 / (1 / overlap_p_t_36_0 + 1 + (p_t_36_0l / p_t_36_0m)));
+p_t_36_0ml -> p_t_36_0hml / ((1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) / overlap_p_t_36_0 + 1);
+(p_t_36_0h - p_t_36_0hm) / p_t_36_0hm -> - 1 / (1 / overlap_p_t_36_0 + 1);
+p_t_36_0h -> p_t_36_0hml / (overlap_p_t_36_0 / (1 + ((p_t_36_0m - p_t_36_0ml) / p_t_36_0ml)) + 1);
+p_t_37_0hm ~ p_t_37_0hml;
+p_t_37_0h ~ p_t_37_0hm;
+p_t_37_0h ~ p_t_37_0hml;
+p_t_37_0m -> p_t_37_0h * overlap_p_t_37_0;
+p_t_37_0l / p_t_37_0m -> - ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml) / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml));
+(p_t_37_0hm - p_t_37_0hml) / p_t_37_0hml -> - (p_t_37_0l / p_t_37_0m) * (1 / (1 / overlap_p_t_37_0 + 1 + (p_t_37_0l / p_t_37_0m)));
+p_t_37_0ml -> p_t_37_0hml / ((1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) / overlap_p_t_37_0 + 1);
+(p_t_37_0h - p_t_37_0hm) / p_t_37_0hm -> - 1 / (1 / overlap_p_t_37_0 + 1);
+p_t_37_0h -> p_t_37_0hml / (overlap_p_t_37_0 / (1 + ((p_t_37_0m - p_t_37_0ml) / p_t_37_0ml)) + 1);
+p_t_38_0hm ~ p_t_38_0hml;
+p_t_38_0h ~ p_t_38_0hm;
+p_t_38_0h ~ p_t_38_0hml;
+p_t_38_0m -> p_t_38_0h * overlap_p_t_38_0;
+p_t_38_0l / p_t_38_0m -> - ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml) / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml));
+(p_t_38_0hm - p_t_38_0hml) / p_t_38_0hml -> - (p_t_38_0l / p_t_38_0m) * (1 / (1 / overlap_p_t_38_0 + 1 + (p_t_38_0l / p_t_38_0m)));
+p_t_38_0ml -> p_t_38_0hml / ((1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) / overlap_p_t_38_0 + 1);
+(p_t_38_0h - p_t_38_0hm) / p_t_38_0hm -> - 1 / (1 / overlap_p_t_38_0 + 1);
+p_t_38_0h -> p_t_38_0hml / (overlap_p_t_38_0 / (1 + ((p_t_38_0m - p_t_38_0ml) / p_t_38_0ml)) + 1);
+p_t_39_0hm ~ p_t_39_0hml;
+p_t_39_0h ~ p_t_39_0hm;
+p_t_39_0h ~ p_t_39_0hml;
+p_t_39_0m -> p_t_39_0h * overlap_p_t_39_0;
+p_t_39_0l / p_t_39_0m -> - ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml) / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml));
+(p_t_39_0hm - p_t_39_0hml) / p_t_39_0hml -> - (p_t_39_0l / p_t_39_0m) * (1 / (1 / overlap_p_t_39_0 + 1 + (p_t_39_0l / p_t_39_0m)));
+p_t_39_0ml -> p_t_39_0hml / ((1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) / overlap_p_t_39_0 + 1);
+(p_t_39_0h - p_t_39_0hm) / p_t_39_0hm -> - 1 / (1 / overlap_p_t_39_0 + 1);
+p_t_39_0h -> p_t_39_0hml / (overlap_p_t_39_0 / (1 + ((p_t_39_0m - p_t_39_0ml) / p_t_39_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hm ~ Mp_t_33_0;
+p_t_34_0hm ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_t_36_0hml ~ Mp_t_36_0;
+p_t_37_0hml ~ Mp_t_37_0;
+p_t_38_0hml ~ Mp_t_38_0;
+p_t_39_0hml ~ Mp_t_39_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_t_36_0hml in (0);
+$ p_t_36_0ml in (0);
+$ p_t_37_0hml in (0);
+$ p_t_37_0ml in (0);
+$ p_t_38_0hml in (0);
+$ p_t_38_0ml in (0);
+$ p_t_39_0hml in (0);
+$ p_t_39_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinAccuR9.gappa b/src/crlibm/gappa/asin/asinAccuR9.gappa
new file mode 100644
index 0000000..df2269d
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinAccuR9.gappa
@@ -0,0 +1,380 @@
+# The polynomial to implement is: 10495927159903232351211685275788667b-113 + (x * ((-114617556493442511624717420939755b-110) + (x * (27305479231796324762706248415393b-110 + (x * ((-69064186447523516588334408074399b-113) + (x * (100011328992979175025945315294869b-115 + (x * ((-78413912811472400588428747081623b-116) + (x * (16197729753218861570784898965837b-115 + (x * ((-55561816015974041716967640671199b-118) + (x * (1359649836545143b-64 + (x * ((-4899041428846357b-67) + (x * (897841495687 [...]
+# The polynomial implemented is: 10495927159903232351211685275788667b-113 + (x * ((-114617556493442511624717420939755b-110) + (x * (27305479231796324762706248415393b-110 + (x * ((-69064186447523516588334408074399b-113) + (x * (100011328992979175025945315294869b-115 + (x * ((-78413912811472400588428747081623b-116) + (x * (16197729753218861570784898965837b-115 + (x * ((-55561816015974041716967640671199b-118) + (x * (1359649836545143b-64 + (x * ((-4899041428846357b-67) + (x * (8978414956877 [...]
+# The domain is [-140737488356209b-50;1125899906835577b-53]
+# The free variable x is a double precision number, the result p_res* is stored on a triple-double number.
+# The code produces 57 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(1.01072102056824553173441927356179803609848022460937500000000000000000000000000000e+00);
+p_coeff_0m = double(1.39129934510313097947345056199237890632902839379463674068793110905062349047511816e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(-8.82981536812866424357437722392205614596605300903320312500000000000000000000000000e-02);
+p_coeff_1m = double(2.41792724167186006978828150786347532734726726246399404474107797113902051933109760e-18);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(2.10353760393441266418612656252662418410181999206542968750000000000000000000000000e-02);
+p_coeff_2m = double(1.08336737333055412851633739558643005025128690376628494418387305131545872427523136e-18);
+p_coeff_2hm = p_coeff_2h + p_coeff_2m;
+
+p_coeff_3h = double(-6.65063923820143239329372164547748980112373828887939453125000000000000000000000000e-03);
+p_coeff_3m = double(-3.26520170221686406454105223534078119197675928213141878161951403569673857418820262e-19);
+p_coeff_3hm = p_coeff_3h + p_coeff_3m;
+
+p_coeff_4h = double(2.40768516606927433787443959545271354727447032928466796875000000000000000000000000e-03);
+p_coeff_4m = double(-1.97265146971483602383336920707508202998297784121844945705998020102356349525507540e-19);
+p_coeff_4hm = p_coeff_4h + p_coeff_4m;
+
+p_coeff_5h = double(-9.43873142126153748948658162021274620201438665390014648437500000000000000000000000e-04);
+p_coeff_5m = double(-1.00627526920533400945274389592272919368733418903938436114037235924456581415142864e-20);
+p_coeff_5hm = p_coeff_5h + p_coeff_5m;
+
+p_coeff_6h = double(3.89946159535203471478703729502512942417524755001068115234375000000000000000000000e-04);
+p_coeff_6m = double(-1.68716106145871574328060887792714981312318371720271803146373734705321112414821982e-21);
+p_coeff_6hm = p_coeff_6h + p_coeff_6m;
+
+p_coeff_7h = double(-1.67200258171404256496775375673280450428137555718421936035156250000000000000000000e-04);
+p_coeff_7m = double(1.19784970040097203700724589956273625590162416200800595011445592863452702658833005e-20);
+p_coeff_7hm = p_coeff_7h + p_coeff_7m;
+
+p_coeff_8h = double(7.37067653300902520495385683574340873747132718563079833984375000000000000000000000e-05);
+
+p_coeff_9h = double(-3.31971960015731878111157338029357788400375284254550933837890625000000000000000000e-05);
+
+p_coeff_10h = double(1.52100265651915579552836896293221968790021492168307304382324218750000000000000000e-05);
+
+p_coeff_11h = double(-7.06684216556374468498364499469133193088055122643709182739257812500000000000000000e-06);
+
+p_coeff_12h = double(3.32174016771150049044582924784307920162973459810018539428710937500000000000000000e-06);
+
+p_coeff_13h = double(-1.57676504579047108034364592377141178758392925374209880828857421875000000000000000e-06);
+
+p_coeff_14h = double(7.54770805302124936124669781628560016883966454770416021347045898437500000000000000e-07);
+
+p_coeff_15h = double(-3.63931772276869473623270951831432107326236291555687785148620605468750000000000000e-07);
+
+p_coeff_16h = double(1.76596931693785619791949872102454488498324280953966081142425537109375000000000000e-07);
+
+p_coeff_17h = double(-8.61593313016896376739609539688324879591618810081854462623596191406250000000000000e-08);
+
+p_coeff_18h = double(4.22538400682347749169000988064132107169257324130740016698837280273437500000000000e-08);
+
+p_coeff_19h = double(-2.12414533709850257115170054159070112120843987213447690010070800781250000000000000e-08);
+
+p_coeff_20h = double(1.04941939883081181921218176284101020190320241454173810780048370361328125000000000e-08);
+
+p_t_1_0h = p_coeff_20h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_19h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_18h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_17h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_16h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_15h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_14h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_13h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0hm = p_coeff_12h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(xh,p_t_17_0hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_11h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_t_21_0hm = add_rel<102>(p_coeff_10h,p_t_20_0hm);
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_9h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_t_24_0hm = mul_rel<102>(xh,p_t_23_0hm);
+p_t_24_0h = double(p_t_24_0hm);
+p_t_24_0m = p_t_24_0hm - p_t_24_0h;
+
+p_t_25_0hm = add_rel<102>(p_coeff_8h,p_t_24_0hm);
+p_t_25_0h = double(p_t_25_0hm);
+p_t_25_0m = p_t_25_0hm - p_t_25_0h;
+
+p_t_26_0hm = fma_rel<100>(p_t_25_0hm,xh,p_coeff_7hm);
+p_t_26_0h = double(p_t_26_0hm);
+p_t_26_0m = p_t_26_0hm - p_t_26_0h;
+
+p_t_27_0hm = fma_rel<100>(p_t_26_0hm,xh,p_coeff_6hm);
+p_t_27_0h = double(p_t_27_0hm);
+p_t_27_0m = p_t_27_0hm - p_t_27_0h;
+
+p_t_28_0hm = fma_rel<100>(p_t_27_0hm,xh,p_coeff_5hm);
+p_t_28_0h = double(p_t_28_0hm);
+p_t_28_0m = p_t_28_0hm - p_t_28_0h;
+
+p_t_29_0hm = fma_rel<100>(p_t_28_0hm,xh,p_coeff_4hm);
+p_t_29_0h = double(p_t_29_0hm);
+p_t_29_0m = p_t_29_0hm - p_t_29_0h;
+
+p_t_30_0hm = fma_rel<100>(p_t_29_0hm,xh,p_coeff_3hm);
+p_t_30_0h = double(p_t_30_0hm);
+p_t_30_0m = p_t_30_0hm - p_t_30_0h;
+
+p_t_31_0hm = fma_rel<100>(p_t_30_0hm,xh,p_coeff_2hm);
+p_t_31_0h = double(p_t_31_0hm);
+p_t_31_0m = p_t_31_0hm - p_t_31_0h;
+
+p_t_32_0hm = mul_rel<102>(xh,p_t_31_0hm);
+p_t_32_0h = double(p_t_32_0hm);
+p_t_32_0m = p_t_32_0hm - p_t_32_0h;
+
+p_t_33_0hml = add_rel<140>(p_coeff_1hm,p_t_32_0hm);
+p_t_33_0ml = p_t_33_0hml - p_t_33_0h;
+p_t_33_0m = double(p_t_33_0ml);
+p_t_33_0l = p_t_33_0ml - p_t_33_0m;
+p_t_33_0hm = p_t_33_0h + p_t_33_0m;
+overlap_p_t_33_0 = p_t_33_0m / p_t_33_0h;
+
+p_t_34_0hml = mul_rel<145>(xh,p_t_33_0hml);
+p_t_34_0ml = p_t_34_0hml - p_t_34_0h;
+p_t_34_0m = double(p_t_34_0ml);
+p_t_34_0l = p_t_34_0ml - p_t_34_0m;
+p_t_34_0hm = p_t_34_0h + p_t_34_0m;
+overlap_p_t_34_0 = p_t_34_0m / p_t_34_0h;
+
+p_t_35_0hml = add_rel<143>(p_coeff_0hm,p_t_34_0hml);
+p_t_35_0ml = p_t_35_0hml - p_t_35_0h;
+p_t_35_0m = double(p_t_35_0ml);
+p_t_35_0l = p_t_35_0ml - p_t_35_0m;
+p_t_35_0hm = p_t_35_0h + p_t_35_0m;
+overlap_p_t_35_0 = p_t_35_0m / p_t_35_0h;
+
+p_reshml = p_t_35_0hml;
+p_resml = p_reshml - p_resh;
+p_resm = double(p_resml);
+p_resl = p_resml - p_resm;
+p_reshm = p_resh + p_resm;
+overlap_p_res = p_resm / p_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2hm;
+Mp_coeff_3 = p_coeff_3hm;
+Mp_coeff_4 = p_coeff_4hm;
+Mp_coeff_5 = p_coeff_5hm;
+Mp_coeff_6 = p_coeff_6hm;
+Mp_coeff_7 = p_coeff_7hm;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_14 = p_coeff_14h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_16 = p_coeff_16h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_18 = p_coeff_18h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_coeff_20 = p_coeff_20h;
+Mp_t_1_0 = Mp_coeff_20;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_19 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_18 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_17 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_16 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_15 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_14 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_13 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_12 + Mp_t_16_0;
+Mp_t_18_0 = Mx * Mp_t_17_0;
+Mp_t_19_0 = Mp_coeff_11 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_t_21_0 = Mp_coeff_10 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_9 + Mp_t_22_0;
+Mp_t_24_0 = Mx * Mp_t_23_0;
+Mp_t_25_0 = Mp_coeff_8 + Mp_t_24_0;
+Mp_t_26_0 = (Mp_t_25_0 * Mx) + Mp_coeff_7;
+Mp_t_27_0 = (Mp_t_26_0 * Mx) + Mp_coeff_6;
+Mp_t_28_0 = (Mp_t_27_0 * Mx) + Mp_coeff_5;
+Mp_t_29_0 = (Mp_t_28_0 * Mx) + Mp_coeff_4;
+Mp_t_30_0 = (Mp_t_29_0 * Mx) + Mp_coeff_3;
+Mp_t_31_0 = (Mp_t_30_0 * Mx) + Mp_coeff_2;
+Mp_t_32_0 = Mx * Mp_t_31_0;
+Mp_t_33_0 = Mp_coeff_1 + Mp_t_32_0;
+Mp_t_34_0 = Mx * Mp_t_33_0;
+Mp_t_35_0 = Mp_coeff_0 + Mp_t_34_0;
+Mp_res = Mp_t_35_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshml - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-140737488356209b-50,-140737488356209b-450]
+/\ |overlap_p_t_33_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_33_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_34_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_34_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_35_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [1125899906835577b-453,1125899906835577b-53]
+/\ |overlap_p_t_33_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |p_t_33_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_34_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |p_t_34_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_t_35_0| in [1b-400,1b-35]    # Verify the lower bound
+/\ |p_t_35_0ml| in [1b-1021,1b1023]
+/\ |overlap_p_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |p_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+p_t_24_0h ~ p_t_24_0hm;
+p_t_25_0h ~ p_t_25_0hm;
+p_t_26_0h ~ p_t_26_0hm;
+p_t_27_0h ~ p_t_27_0hm;
+p_t_28_0h ~ p_t_28_0hm;
+p_t_29_0h ~ p_t_29_0hm;
+p_t_30_0h ~ p_t_30_0hm;
+p_t_31_0h ~ p_t_31_0hm;
+p_t_32_0h ~ p_t_32_0hm;
+p_t_33_0hm ~ p_t_33_0hml;
+p_t_33_0h ~ p_t_33_0hm;
+p_t_33_0h ~ p_t_33_0hml;
+p_t_33_0m -> p_t_33_0h * overlap_p_t_33_0;
+p_t_33_0l / p_t_33_0m -> - ((p_t_33_0m - p_t_33_0ml) / p_t_33_0ml) / (1 + ((p_t_33_0m - p_t_33_0ml) / p_t_33_0ml));
+(p_t_33_0hm - p_t_33_0hml) / p_t_33_0hml -> - (p_t_33_0l / p_t_33_0m) * (1 / (1 / overlap_p_t_33_0 + 1 + (p_t_33_0l / p_t_33_0m)));
+p_t_33_0ml -> p_t_33_0hml / ((1 + ((p_t_33_0m - p_t_33_0ml) / p_t_33_0ml)) / overlap_p_t_33_0 + 1);
+(p_t_33_0h - p_t_33_0hm) / p_t_33_0hm -> - 1 / (1 / overlap_p_t_33_0 + 1);
+p_t_33_0h -> p_t_33_0hml / (overlap_p_t_33_0 / (1 + ((p_t_33_0m - p_t_33_0ml) / p_t_33_0ml)) + 1);
+p_t_34_0hm ~ p_t_34_0hml;
+p_t_34_0h ~ p_t_34_0hm;
+p_t_34_0h ~ p_t_34_0hml;
+p_t_34_0m -> p_t_34_0h * overlap_p_t_34_0;
+p_t_34_0l / p_t_34_0m -> - ((p_t_34_0m - p_t_34_0ml) / p_t_34_0ml) / (1 + ((p_t_34_0m - p_t_34_0ml) / p_t_34_0ml));
+(p_t_34_0hm - p_t_34_0hml) / p_t_34_0hml -> - (p_t_34_0l / p_t_34_0m) * (1 / (1 / overlap_p_t_34_0 + 1 + (p_t_34_0l / p_t_34_0m)));
+p_t_34_0ml -> p_t_34_0hml / ((1 + ((p_t_34_0m - p_t_34_0ml) / p_t_34_0ml)) / overlap_p_t_34_0 + 1);
+(p_t_34_0h - p_t_34_0hm) / p_t_34_0hm -> - 1 / (1 / overlap_p_t_34_0 + 1);
+p_t_34_0h -> p_t_34_0hml / (overlap_p_t_34_0 / (1 + ((p_t_34_0m - p_t_34_0ml) / p_t_34_0ml)) + 1);
+p_t_35_0hm ~ p_t_35_0hml;
+p_t_35_0h ~ p_t_35_0hm;
+p_t_35_0h ~ p_t_35_0hml;
+p_t_35_0m -> p_t_35_0h * overlap_p_t_35_0;
+p_t_35_0l / p_t_35_0m -> - ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml) / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml));
+(p_t_35_0hm - p_t_35_0hml) / p_t_35_0hml -> - (p_t_35_0l / p_t_35_0m) * (1 / (1 / overlap_p_t_35_0 + 1 + (p_t_35_0l / p_t_35_0m)));
+p_t_35_0ml -> p_t_35_0hml / ((1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) / overlap_p_t_35_0 + 1);
+(p_t_35_0h - p_t_35_0hm) / p_t_35_0hm -> - 1 / (1 / overlap_p_t_35_0 + 1);
+p_t_35_0h -> p_t_35_0hml / (overlap_p_t_35_0 / (1 + ((p_t_35_0m - p_t_35_0ml) / p_t_35_0ml)) + 1);
+p_reshm ~ p_reshml;
+p_resh ~ p_reshm;
+p_resh ~ p_reshml;
+p_resm -> p_resh * overlap_p_res;
+p_resl / p_resm -> - ((p_resm - p_resml) / p_resml) / (1 + ((p_resm - p_resml) / p_resml));
+(p_reshm - p_reshml) / p_reshml -> - (p_resl / p_resm) * (1 / (1 / overlap_p_res + 1 + (p_resl / p_resm)));
+p_resml -> p_reshml / ((1 + ((p_resm - p_resml) / p_resml)) / overlap_p_res + 1);
+(p_resh - p_reshm) / p_reshm -> - 1 / (1 / overlap_p_res + 1);
+p_resh -> p_reshml / (overlap_p_res / (1 + ((p_resm - p_resml) / p_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_t_24_0hm ~ Mp_t_24_0;
+p_t_25_0hm ~ Mp_t_25_0;
+p_t_26_0hm ~ Mp_t_26_0;
+p_t_27_0hm ~ Mp_t_27_0;
+p_t_28_0hm ~ Mp_t_28_0;
+p_t_29_0hm ~ Mp_t_29_0;
+p_t_30_0hm ~ Mp_t_30_0;
+p_t_31_0hm ~ Mp_t_31_0;
+p_t_32_0hm ~ Mp_t_32_0;
+p_t_33_0hml ~ Mp_t_33_0;
+p_t_34_0hml ~ Mp_t_34_0;
+p_t_35_0hml ~ Mp_t_35_0;
+p_reshml ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+$ p_t_33_0hml in (0);
+$ p_t_33_0ml in (0);
+$ p_t_34_0hml in (0);
+$ p_t_34_0ml in (0);
+$ p_t_35_0hml in (0);
+$ p_t_35_0ml in (0);
+$ p_reshml in (0);
+$ p_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR0.gappa b/src/crlibm/gappa/asin/asinQuickR0.gappa
new file mode 100644
index 0000000..466fa33
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR0.gappa
@@ -0,0 +1,165 @@
+# The polynomial to implement is: x * (1b0 + ((x^(1b1)) * (6004799503160663b-55 + ((x^(1b1)) * (2702159776421267b-55 + ((x^(1b1)) * (6433713754276237b-57 + ((x^(1b1)) * (273656221440481b-53 + ((x^(1b1)) * (1612086811548785b-56 + ((x^(1b1)) * (2500589232146671b-57 + ((x^(1b1)) * (1008591508159575b-56 + ((x^(1b1)) * (6411982820477177b-59 + ((x^(1b1)) * 7401443504515565b-59))))))))))))))))))
+# The polynomial implemented is: x * (1b0 + ((x^(1b1)) * (6004799503160663b-55 + ((x^(1b1)) * (2702159776421267b-55 + ((x^(1b1)) * (6433713754276237b-57 + ((x^(1b1)) * (273656221440481b-53 + ((x^(1b1)) * (1612086811548785b-56 + ((x^(1b1)) * (2500589232146671b-57 + ((x^(1b1)) * (1008591508159575b-56 + ((x^(1b1)) * (6411982820477177b-59 + ((x^(1b1)) * 7401443504515565b-59))))))))))))))))))
+# The domain is [1b-54;9007199254740983b-55]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 32 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_1h = double(1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00);
+
+p_coeff_3h = double(1.66666666666666712925959359381522517651319503784179687500000000000000000000000000e-01);
+
+p_coeff_5h = double(7.49999999999713951037705328417359851300716400146484375000000000000000000000000000e-02);
+
+p_coeff_7h = double(4.46428571490314687886247213555179769173264503479003906250000000000000000000000000e-02);
+
+p_coeff_9h = double(3.03819437875142428495678359468001872301101684570312500000000000000000000000000000e-02);
+
+p_coeff_11h = double(2.23721986984502102524530187110940460115671157836914062500000000000000000000000000e-02);
+
+p_coeff_13h = double(1.73513233791185925158906400156411109492182731628417968750000000000000000000000000e-02);
+
+p_coeff_15h = double(1.39970189350021451124561622236797120422124862670898437500000000000000000000000000e-02);
+
+p_coeff_17h = double(1.11230171262417399519195626567125145811587572097778320312500000000000000000000000e-02);
+
+p_coeff_19h = double(1.28394578033992016324882357025671808514744043350219726562500000000000000000000000e-02);
+
+p_x_0_pow2hm = xh * xh;
+p_x_0_pow2h = double(p_x_0_pow2hm);
+p_x_0_pow2m = p_x_0_pow2hm - p_x_0_pow2h;
+
+p_t_1_0h = p_coeff_19h;
+
+p_t_2_0h = double(p_t_1_0h * p_x_0_pow2h);
+p_t_3_0h = double(p_coeff_17h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * p_x_0_pow2h);
+p_t_5_0h = double(p_coeff_15h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * p_x_0_pow2h);
+p_t_7_0h = double(p_coeff_13h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * p_x_0_pow2h);
+p_t_9_0h = double(p_coeff_11h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * p_x_0_pow2h);
+p_t_11_0h = double(p_coeff_9h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * p_x_0_pow2h);
+p_t_13_0h = double(p_coeff_7h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * p_x_0_pow2h);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * p_x_0_pow2h);
+p_t_17_0hm = p_coeff_3h + p_t_16_0h;
+p_t_17_0h = double(p_t_17_0hm);
+p_t_17_0m = p_t_17_0hm - p_t_17_0h;
+
+p_t_18_0hm = mul_rel<102>(p_t_17_0hm,p_x_0_pow2hm);
+p_t_18_0h = double(p_t_18_0hm);
+p_t_18_0m = p_t_18_0hm - p_t_18_0h;
+
+p_t_19_0hm = add_rel<102>(p_coeff_1h,p_t_18_0hm);
+p_t_19_0h = double(p_t_19_0hm);
+p_t_19_0m = p_t_19_0hm - p_t_19_0h;
+
+p_t_20_0hm = mul_rel<102>(xh,p_t_19_0hm);
+p_t_20_0h = double(p_t_20_0hm);
+p_t_20_0m = p_t_20_0hm - p_t_20_0h;
+
+p_reshm = p_t_20_0hm;
+p_resh = p_t_20_0h;
+p_resm = p_t_20_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_1 = p_coeff_1h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_13 = p_coeff_13h;
+Mp_coeff_15 = p_coeff_15h;
+Mp_coeff_17 = p_coeff_17h;
+Mp_coeff_19 = p_coeff_19h;
+Mp_x_0_pow2 = Mx * Mx;
+Mp_t_1_0 = Mp_coeff_19;
+Mp_t_2_0 = Mp_t_1_0 * Mp_x_0_pow2;
+Mp_t_3_0 = Mp_coeff_17 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mp_x_0_pow2;
+Mp_t_5_0 = Mp_coeff_15 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mp_x_0_pow2;
+Mp_t_7_0 = Mp_coeff_13 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mp_x_0_pow2;
+Mp_t_9_0 = Mp_coeff_11 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mp_x_0_pow2;
+Mp_t_11_0 = Mp_coeff_9 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mp_x_0_pow2;
+Mp_t_13_0 = Mp_coeff_7 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mp_x_0_pow2;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mp_x_0_pow2;
+Mp_t_17_0 = Mp_coeff_3 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mp_x_0_pow2;
+Mp_t_19_0 = Mp_coeff_1 + Mp_t_18_0;
+Mp_t_20_0 = Mx * Mp_t_19_0;
+Mp_res = Mp_t_20_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [1b-54,9007199254740983b-55]
+) \/
+(
+   x in [-9007199254740983b-55,-1b-54]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_x_0_pow2h ~ p_x_0_pow2hm;
+p_t_17_0h ~ p_t_17_0hm;
+p_t_18_0h ~ p_t_18_0hm;
+p_t_19_0h ~ p_t_19_0hm;
+p_t_20_0h ~ p_t_20_0hm;
+
+# Meta-Hints for Horner scheme
+p_x_0_pow2hm ~ Mp_x_0_pow2;
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0hm ~ Mp_t_17_0;
+p_t_18_0hm ~ Mp_t_18_0;
+p_t_19_0hm ~ Mp_t_19_0;
+p_t_20_0hm ~ Mp_t_20_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR1.gappa b/src/crlibm/gappa/asin/asinQuickR1.gappa
new file mode 100644
index 0000000..7ef94ce
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR1.gappa
@@ -0,0 +1,175 @@
+# The polynomial to implement is: 3183456225869665121297930434727189b-113 + (x * (85096975362484429898305796608495b-106 + (x * (1568372518556091b-53 + (x * (2253096245490285b-53 + (x * (1510242280185791b-53 + (x * (3634933609551149b-54 + (x * (7165193180030863b-55 + (x * (8499199876434095b-55 + (x * (1206650223448851b-52 + (x * (2926133895132309b-53 + (x * (13826886836375b-45 + (x * (8924243571351707b-54 + (x * 5562679466946017b-53)))))))))))))))))))))))
+# The polynomial implemented is: 3183456225869665121297930434727189b-113 + (x * (85096975362484429898305796608495b-106 + (x * (1568372518556091b-53 + (x * (2253096245490285b-53 + (x * (1510242280185791b-53 + (x * (3634933609551149b-54 + (x * (7165193180030863b-55 + (x * (8499199876434095b-55 + (x * (1206650223448851b-52 + (x * (2926133895132309b-53 + (x * (13826886836375b-45 + (x * (8924243571351707b-54 + (x * 5562679466946017b-53)))))))))))))))))))))))
+# The domain is [-466363011288839b-53;932726022577599b-54]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 37 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(3.06555683602418194144689778113388456404209136962890625000000000000000000000000000e-01);
+p_coeff_0m = double(1.37864228855288786229514205458277346294726855883500333047053665325165638932958245e-19);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.04890120337530645677759366662940010428428649902343750000000000000000000000000000e+00);
+p_coeff_1m = double(-1.03997489957388085277493589447823941146606896923035995294881672634801361709833145e-16);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(1.74124328129031780143520791170885786414146423339843750000000000000000000000000000e-01);
+
+p_coeff_3h = double(2.50143932843980842939402009506011381745338439941406250000000000000000000000000000e-01);
+
+p_coeff_4h = double(1.67670575222466200493443011509953066706657409667968750000000000000000000000000000e-01);
+
+p_coeff_5h = double(2.01779349315375722273557812513899989426136016845703125000000000000000000000000000e-01);
+
+p_coeff_6h = double(1.98874061108935212827120153633586596697568893432617187500000000000000000000000000e-01);
+
+p_coeff_7h = double(2.35900184842710441968094414733059238642454147338867187500000000000000000000000000e-01);
+
+p_coeff_8h = double(2.67930172148400869147621961019467562437057495117187500000000000000000000000000000e-01);
+
+p_coeff_9h = double(3.24866122351198272077965611970284953713417053222656250000000000000000000000000000e-01);
+
+p_coeff_10h = double(3.92983759990528369598905555903911590576171875000000000000000000000000000000000000e-01);
+
+p_coeff_11h = double(4.95395034513885057503301823089714162051677703857421875000000000000000000000000000e-01);
+
+p_coeff_12h = double(6.17581482281306048953695153613807633519172668457031250000000000000000000000000000e-01);
+
+p_t_1_0h = p_coeff_12h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_11h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_10h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_9h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_8h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_7h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_6h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_4h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_3h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_2h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = fma_rel<100>(p_t_21_0hm,xh,p_coeff_1hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = fma_rel<100>(p_t_22_0hm,xh,p_coeff_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_t_1_0 = Mp_coeff_12;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_11 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_10 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_9 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_8 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_7 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_6 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_4 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_3 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_2 + Mp_t_20_0;
+Mp_t_22_0 = (Mp_t_21_0 * Mx) + Mp_coeff_1;
+Mp_t_23_0 = (Mp_t_22_0 * Mx) + Mp_coeff_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-466363011288839b-53,-466363011288839b-453]
+) \/ (
+   x in [932726022577599b-454,932726022577599b-54]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR2.gappa b/src/crlibm/gappa/asin/asinQuickR2.gappa
new file mode 100644
index 0000000..c6108a6
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR2.gappa
@@ -0,0 +1,175 @@
+# The polynomial to implement is: 268636756605111637357595545192172111b-119 + (x * (44120131993499861117550393673295b-105 + (x * (2278907903703317b-53 + (x * (5983541037681123b-54 + (x * (2638503127167829b-53 + (x * (6622388527030519b-54 + (x * (7950889475864811b-54 + (x * (5238009708732451b-53 + (x * (3491644690235915b-52 + (x * (4815737384658755b-52 + (x * (3373487667168671b-51 + (x * (1215099289485353b-49 + (x * 6911419428626897b-51)))))))))))))))))))))))
+# The polynomial implemented is: 268636756605111637357595545192172111b-119 + (x * (44120131993499861117550393673295b-105 + (x * (2278907903703317b-53 + (x * (5983541037681123b-54 + (x * (2638503127167829b-53 + (x * (6622388527030519b-54 + (x * (7950889475864811b-54 + (x * (5238009708732451b-53 + (x * (3491644690235915b-52 + (x * (4815737384658755b-52 + (x * (3373487667168671b-51 + (x * (1215099289485353b-49 + (x * 6911419428626897b-51)))))))))))))))))))))))
+# The domain is [-715705849514187b-54;178926462378499b-52]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 37 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(4.04199666960039116769820566332782618701457977294921875000000000000000000000000000e-01);
+p_coeff_0m = double(-7.29414577305862355348006038497258990002592122212580672446953500287492033749003895e-21);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.08764522696446319649510314775398001074790954589843750000000000000000000000000000e+00);
+p_coeff_1m = double(7.18002807945845121967809924279486007735232949667977808694274699519155547022819519e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(2.53009602569167157959384439891437068581581115722656250000000000000000000000000000e-01);
+
+p_coeff_3h = double(3.32153251441154206968775497443857602775096893310546875000000000000000000000000000e-01);
+
+p_coeff_4h = double(2.92932692232720115477206945797661319375038146972656250000000000000000000000000000e-01);
+
+p_coeff_5h = double(3.67616411036137902268450261544785462319850921630859375000000000000000000000000000e-01);
+
+p_coeff_6h = double(4.41363028117747802081538566199014894664287567138671875000000000000000000000000000e-01);
+
+p_coeff_7h = double(5.81535898184487698436839764326578006148338317871093750000000000000000000000000000e-01);
+
+p_coeff_8h = double(7.75300865782017067928677533927839249372482299804687500000000000000000000000000000e-01);
+
+p_coeff_9h = double(1.06930850499925678143142704357160255312919616699218750000000000000000000000000000e+00);
+
+p_coeff_10h = double(1.49812947255186612594002326659392565488815307617187500000000000000000000000000000e+00);
+
+p_coeff_11h = double(2.15844993342769164712535712169483304023742675781250000000000000000000000000000000e+00);
+
+p_coeff_12h = double(3.06928679300128992579743680835235863924026489257812500000000000000000000000000000e+00);
+
+p_t_1_0h = p_coeff_12h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_11h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_10h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_9h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_8h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_7h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_6h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_4h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_3h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_2h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = fma_rel<100>(p_t_21_0hm,xh,p_coeff_1hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = fma_rel<100>(p_t_22_0hm,xh,p_coeff_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_t_1_0 = Mp_coeff_12;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_11 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_10 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_9 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_8 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_7 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_6 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_4 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_3 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_2 + Mp_t_20_0;
+Mp_t_22_0 = (Mp_t_21_0 * Mx) + Mp_coeff_1;
+Mp_t_23_0 = (Mp_t_22_0 * Mx) + Mp_coeff_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-715705849514187b-54,-715705849514187b-454]
+) \/ (
+   x in [178926462378499b-452,178926462378499b-52]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR3.gappa b/src/crlibm/gappa/asin/asinQuickR3.gappa
new file mode 100644
index 0000000..7517f5f
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR3.gappa
@@ -0,0 +1,175 @@
+# The polynomial to implement is: 630003272697881842133904116649941b-110 + (x * (22930469560677484970259027045179b-104 + (x * (758992598782411b-51 + (x * (7959118817390667b-54 + (x * (1064903604618827b-51 + (x * (5844783312361271b-53 + (x * (8131347476778009b-53 + (x * (1508230740643617b-50 + (x * (2296555345676609b-50 + (x * (7188218310357077b-51 + (x * (5730917143769297b-50 + (x * (4688813330751791b-49 + (x * 7638382581357819b-49)))))))))))))))))))))))
+# The polynomial implemented is: 630003272697881842133904116649941b-110 + (x * (22930469560677484970259027045179b-104 + (x * (758992598782411b-51 + (x * (7959118817390667b-54 + (x * (1064903604618827b-51 + (x * (5844783312361271b-53 + (x * (8131347476778009b-53 + (x * (1508230740643617b-50 + (x * (2296555345676609b-50 + (x * (7188218310357077b-51 + (x * (5730917143769297b-50 + (x * (4688813330751791b-49 + (x * 7638382581357819b-49)))))))))))))))))))))))
+# The domain is [-603367941593347b-54;301683970796841b-53]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 37 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(4.85336867180323261461438733022077940404415130615234375000000000000000000000000000e-01);
+p_coeff_0m = double(2.48687685471405101032185714779683260767432502103446885499682394993214984424412251e-18);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.13055943592368102201817237073555588722229003906250000000000000000000000000000000e+00);
+p_coeff_1m = double(8.31884808460703843039094509953103826114589262451931572783792034897487610578536987e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(3.37060423475326498277127029723487794399261474609375000000000000000000000000000000e-01);
+
+p_coeff_3h = double(4.41819848339723264540879199557821266353130340576171875000000000000000000000000000e-01);
+
+p_coeff_4h = double(4.72912200341658373048403518623672425746917724609375000000000000000000000000000000e-01);
+
+p_coeff_5h = double(6.48901300732837138518505071260733529925346374511718750000000000000000000000000000e-01);
+
+p_coeff_6h = double(9.02760918994661598624418274994241073727607727050781250000000000000000000000000000e-01);
+
+p_coeff_7h = double(1.33957799576799718721531462506391108036041259765625000000000000000000000000000000e+00);
+
+p_coeff_8h = double(2.03975089767692541187216193065978586673736572265625000000000000000000000000000000e+00);
+
+p_coeff_9h = double(3.19221018967622649498139253410045057535171508789062500000000000000000000000000000e+00);
+
+p_coeff_10h = double(5.09007693218536960699793780804611742496490478515625000000000000000000000000000000e+00);
+
+p_coeff_11h = double(8.32900562875201266876956651685759425163269042968750000000000000000000000000000000e+00);
+
+p_coeff_12h = double(1.35684931403507018643495030119083821773529052734375000000000000000000000000000000e+01);
+
+p_t_1_0h = p_coeff_12h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_11h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_10h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_9h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_8h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_7h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_6h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_4h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_3h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_2h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = fma_rel<100>(p_t_21_0hm,xh,p_coeff_1hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = fma_rel<100>(p_t_22_0hm,xh,p_coeff_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_t_1_0 = Mp_coeff_12;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_11 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_10 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_9 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_8 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_7 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_6 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_4 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_3 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_2 + Mp_t_20_0;
+Mp_t_22_0 = (Mp_t_21_0 * Mx) + Mp_coeff_1;
+Mp_t_23_0 = (Mp_t_22_0 * Mx) + Mp_coeff_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-603367941593347b-54,-603367941593347b-454]
+) \/ (
+   x in [301683970796841b-453,301683970796841b-53]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR4.gappa b/src/crlibm/gappa/asin/asinQuickR4.gappa
new file mode 100644
index 0000000..1413d63
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR4.gappa
@@ -0,0 +1,175 @@
+# The polynomial to implement is: 2897411029384279446550734201912699b-112 + (x * (1530198189661957827573916764927897b-110 + (x * (3906404311867243b-53 + (x * (2666766777791871b-52 + (x * (3357549051583063b-52 + (x * (2563180742222195b-51 + (x * (3977769854047b-41 + (x * (6829960164420871b-51 + (x * (5902661651242291b-50 + (x * (2617002045792421b-48 + (x * (4732026594888409b-48 + (x * (2194629853394353b-46 + (x * 4057612944155747b-46)))))))))))))))))))))))
+# The polynomial implemented is: 2897411029384279446550734201912699b-112 + (x * (1530198189661957827573916764927897b-110 + (x * (3906404311867243b-53 + (x * (2666766777791871b-52 + (x * (3357549051583063b-52 + (x * (2563180742222195b-51 + (x * (3977769854047b-41 + (x * (6829960164420871b-51 + (x * (5902661651242291b-50 + (x * (2617002045792421b-48 + (x * (4732026594888409b-48 + (x * (2194629853394353b-46 + (x * 4057612944155747b-46)))))))))))))))))))))))
+# The domain is [-66447228468955b-51;265788913875259b-53]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 37 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(5.58021066268902909968119274708442389965057373046875000000000000000000000000000000e-01);
+p_coeff_0m = double(9.12034392087434999453497016043152989309974709890359127750780743326686206273734570e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.17882180572684136521388609253335744142532348632812500000000000000000000000000000e+00);
+p_coeff_1m = double(2.42941652280796864299660766500640409154688815034626482580737416583360754884779453e-18);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(4.33698001053000381510571514809271320700645446777343750000000000000000000000000000e-01);
+
+p_coeff_3h = double(5.92141175601994751431789154594298452138900756835937500000000000000000000000000000e-01);
+
+p_coeff_4h = double(7.45525652675174788086565058620180934667587280273437500000000000000000000000000000e-01);
+
+p_coeff_5h = double(1.13828091051635160724231354834046214818954467773437500000000000000000000000000000e+00);
+
+p_coeff_6h = double(1.80888030356391027453355491161346435546875000000000000000000000000000000000000000e+00);
+
+p_coeff_7h = double(3.03311161272506835118178969423752278089523315429687500000000000000000000000000000e+00);
+
+p_coeff_8h = double(5.24261669742490976631188459577970206737518310546875000000000000000000000000000000e+00);
+
+p_coeff_9h = double(9.29745896553562900521683332044631242752075195312500000000000000000000000000000000e+00);
+
+p_coeff_10h = double(1.68115356121078072249019896844401955604553222656250000000000000000000000000000000e+01);
+
+p_coeff_11h = double(3.11875660002322234731764183379709720611572265625000000000000000000000000000000000e+01);
+
+p_coeff_12h = double(5.76621480399203818478781613521277904510498046875000000000000000000000000000000000e+01);
+
+p_t_1_0h = p_coeff_12h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_11h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_10h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_9h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_8h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_7h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_6h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_4h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_3h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_2h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = fma_rel<100>(p_t_21_0hm,xh,p_coeff_1hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = fma_rel<100>(p_t_22_0hm,xh,p_coeff_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_t_1_0 = Mp_coeff_12;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_11 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_10 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_9 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_8 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_7 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_6 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_4 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_3 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_2 + Mp_t_20_0;
+Mp_t_22_0 = (Mp_t_21_0 * Mx) + Mp_coeff_1;
+Mp_t_23_0 = (Mp_t_22_0 * Mx) + Mp_coeff_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-66447228468955b-51,-66447228468955b-451]
+) \/ (
+   x in [265788913875259b-453,265788913875259b-53]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR5.gappa b/src/crlibm/gappa/asin/asinQuickR5.gappa
new file mode 100644
index 0000000..3f29184
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR5.gappa
@@ -0,0 +1,175 @@
+# The polynomial to implement is: 51984188076577765969954972216329553b-116 + (x * (400377354559914758555498144461373b-108 + (x * (1238400191224977b-51 + (x * (7235452395425177b-53 + (x * (2644145021253385b-51 + (x * (2269626114756713b-50 + (x * (4108409004761789b-50 + (x * (7812107017201229b-50 + (x * (7668886762282561b-49 + (x * (7720327329412313b-48 + (x * (990526711637311b-44 + (x * (8352794841960659b-46 + (x * 2243673169183011b-43)))))))))))))))))))))))
+# The polynomial implemented is: 51984188076577765969954972216329553b-116 + (x * (400377354559914758555498144461373b-108 + (x * (1238400191224977b-51 + (x * (7235452395425177b-53 + (x * (2644145021253385b-51 + (x * (2269626114756713b-50 + (x * (4108409004761789b-50 + (x * (7812107017201229b-50 + (x * (7668886762282561b-49 + (x * (7720327329412313b-48 + (x * (990526711637311b-44 + (x * (8352794841960659b-46 + (x * 2243673169183011b-43)))))))))))))))))))))))
+# The domain is [-120145772825149b-52;60072886412803b-51]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 37 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(6.25736902820868912122875826753443107008934020996093750000000000000000000000000000e-01);
+p_coeff_0m = double(1.09771341515678393197247834713042073087550408801910172083143857335585380496922880e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.23375797792237640315704538807040080428123474121093750000000000000000000000000000e+00);
+p_coeff_1m = double(-1.59140559577392273960428308971385735880640476257478696520131222769123269245028496e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(5.49960162399266483390647408668883144855499267578125000000000000000000000000000000e-01);
+
+p_coeff_3h = double(8.03296584298027416259913024987326934933662414550781250000000000000000000000000000e-01);
+
+p_coeff_4h = double(1.17423627321739276752055047836620360612869262695312500000000000000000000000000000e+00);
+
+p_coeff_5h = double(2.01583293591475243289323771023191511631011962890625000000000000000000000000000000e+00);
+
+p_coeff_6h = double(3.64900021733109003463368935626931488513946533203125000000000000000000000000000000e+00);
+
+p_coeff_7h = double(6.93854486506604661855135418591089546680450439453125000000000000000000000000000000e+00);
+
+p_coeff_8h = double(1.36226794507666699729497850057668983936309814453125000000000000000000000000000000e+01);
+
+p_coeff_9h = double(2.74281125080204652988413727143779397010803222656250000000000000000000000000000000e+01);
+
+p_coeff_10h = double(5.63049247624184658889134880155324935913085937500000000000000000000000000000000000e+01);
+
+p_coeff_11h = double(1.18700353964991606403600599151104688644409179687500000000000000000000000000000000e+02);
+
+p_coeff_12h = double(2.55076107485252919104823376983404159545898437500000000000000000000000000000000000e+02);
+
+p_t_1_0h = p_coeff_12h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_11h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_10h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_9h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_8h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_7h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_6h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_4h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_3h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_2h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = fma_rel<100>(p_t_21_0hm,xh,p_coeff_1hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = fma_rel<100>(p_t_22_0hm,xh,p_coeff_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_t_1_0 = Mp_coeff_12;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_11 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_10 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_9 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_8 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_7 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_6 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_4 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_3 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_2 + Mp_t_20_0;
+Mp_t_22_0 = (Mp_t_21_0 * Mx) + Mp_coeff_1;
+Mp_t_23_0 = (Mp_t_22_0 * Mx) + Mp_coeff_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-120145772825149b-52,-120145772825149b-452]
+) \/ (
+   x in [60072886412803b-451,60072886412803b-51]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR6.gappa b/src/crlibm/gappa/asin/asinQuickR6.gappa
new file mode 100644
index 0000000..960de1d
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR6.gappa
@@ -0,0 +1,175 @@
+# The polynomial to implement is: 224072655290838820901547103663141b-108 + (x * (52617200066848308315160320054687b-105 + (x * (1564981109275549b-51 + (x * (4992165443239819b-52 + (x * (8442373737503053b-52 + (x * (1027827836419783b-48 + (x * (132850146592389b-44 + (x * (4608740736026111b-48 + (x * (2581118930247463b-46 + (x * (5928868654976949b-46 + (x * (108504530938057b-39 + (x * (522450050528739b-40 + (x * 5043156194756227b-42)))))))))))))))))))))))
+# The polynomial implemented is: 224072655290838820901547103663141b-108 + (x * (52617200066848308315160320054687b-105 + (x * (1564981109275549b-51 + (x * (4992165443239819b-52 + (x * (8442373737503053b-52 + (x * (1027827836419783b-48 + (x * (132850146592389b-44 + (x * (4608740736026111b-48 + (x * (2581118930247463b-46 + (x * (5928868654976949b-46 + (x * (108504530938057b-39 + (x * (522450050528739b-40 + (x * 5043156194756227b-42)))))))))))))))))))))))
+# The domain is [-110485440722351b-52;55242720361239b-51]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 37 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(6.90477178468776764397318856936180964112281799316406250000000000000000000000000000e-01);
+p_coeff_0m = double(3.39469506786599975391257859730058491397981612722623695477253136232320684939622879e-18);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.29711412734153253012436834978871047496795654296875000000000000000000000000000000e+00);
+p_coeff_1m = double(-4.95712225725049321877947559927504147795821978121980078135777603165479376912117004e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(6.94991224248453054457286270917393267154693603515625000000000000000000000000000000e-01);
+
+p_coeff_3h = double(1.10848340356457941702217340207425877451896667480468750000000000000000000000000000e+00);
+
+p_coeff_4h = double(1.87458354117332537391860114439623430371284484863281250000000000000000000000000000e+00);
+
+p_coeff_5h = double(3.65157801390048675216348783578723669052124023437500000000000000000000000000000000e+00);
+
+p_coeff_6h = double(7.55165652847091450894367881119251251220703125000000000000000000000000000000000000e+00);
+
+p_coeff_7h = double(1.63735362549250531571942701702937483787536621093750000000000000000000000000000000e+01);
+
+p_coeff_8h = double(3.66799061204043113093575811944901943206787109375000000000000000000000000000000000e+01);
+
+p_coeff_9h = double(8.42542910813925374213795294053852558135986328125000000000000000000000000000000000e+01);
+
+p_coeff_10h = double(1.97368592013039233279414474964141845703125000000000000000000000000000000000000000e+02);
+
+p_coeff_11h = double(4.75165552896886765665840357542037963867187500000000000000000000000000000000000000e+02);
+
+p_coeff_12h = double(1.14668095983602756859909277409315109252929687500000000000000000000000000000000000e+03);
+
+p_t_1_0h = p_coeff_12h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_11h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_10h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_9h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_8h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_7h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_6h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_4h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_3h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_2h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = fma_rel<100>(p_t_21_0hm,xh,p_coeff_1hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = fma_rel<100>(p_t_22_0hm,xh,p_coeff_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_t_1_0 = Mp_coeff_12;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_11 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_10 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_9 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_8 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_7 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_6 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_4 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_3 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_2 + Mp_t_20_0;
+Mp_t_22_0 = (Mp_t_21_0 * Mx) + Mp_coeff_1;
+Mp_t_23_0 = (Mp_t_22_0 * Mx) + Mp_coeff_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-110485440722351b-52,-110485440722351b-452]
+) \/ (
+   x in [55242720361239b-451,55242720361239b-51]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR7.gappa b/src/crlibm/gappa/asin/asinQuickR7.gappa
new file mode 100644
index 0000000..6e70cbe
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR7.gappa
@@ -0,0 +1,175 @@
+# The polynomial to implement is: 31303540725427994415236316926498277b-115 + (x * (55627180908427023057028403875349b-105 + (x * (3973482098975897b-52 + (x * (7048617650465021b-52 + (x * (6914118691349309b-51 + (x * (3859522469193581b-49 + (x * (4591567794769115b-48 + (x * (357643827686125b-43 + (x * (3685198568657065b-45 + (x * (4866801803033539b-44 + (x * (1638677454183417b-41 + (x * (4544581697576865b-41 + (x * 6325975157511843b-40)))))))))))))))))))))))
+# The polynomial implemented is: 31303540725427994415236316926498277b-115 + (x * (55627180908427023057028403875349b-105 + (x * (3973482098975897b-52 + (x * (7048617650465021b-52 + (x * (6914118691349309b-51 + (x * (3859522469193581b-49 + (x * (4591567794769115b-48 + (x * (357643827686125b-43 + (x * (3685198568657065b-45 + (x * (4866801803033539b-44 + (x * (1638677454183417b-41 + (x * (4544581697576865b-41 + (x * 6325975157511843b-40)))))))))))))))))))))))
+# The domain is [-205674681606191b-53;205674681606835b-53]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 37 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(7.53605330605588874526290510402759537100791931152343750000000000000000000000000000e-01);
+p_coeff_0m = double(-6.81399026788433814240085924387948818667013384621768622671778015131849315366707742e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.37131588394733516800272354885237291455268859863281250000000000000000000000000000e+00);
+p_coeff_1m = double(5.75522635997281408409017033924079017806689197384387157718776961701223626732826233e-17);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(8.82290262843787198576706032326910644769668579101562500000000000000000000000000000e-01);
+
+p_coeff_3h = double(1.56510752146510800919543271447764709591865539550781250000000000000000000000000000e+00);
+
+p_coeff_4h = double(3.07048550645086359978108703217003494501113891601562500000000000000000000000000000e+00);
+
+p_coeff_5h = double(6.85588913497096008597964100772514939308166503906250000000000000000000000000000000e+00);
+
+p_coeff_6h = double(1.63125257116160859993669873801991343498229980468750000000000000000000000000000000e+01);
+
+p_coeff_7h = double(4.06593958002900990322814323008060455322265625000000000000000000000000000000000000e+01);
+
+p_coeff_8h = double(1.04739642911711854367240448482334613800048828125000000000000000000000000000000000e+02);
+
+p_coeff_9h = double(2.76645653402371124229830456897616386413574218750000000000000000000000000000000000e+02);
+
+p_coeff_10h = double(7.45184231247284060373203828930854797363281250000000000000000000000000000000000000e+02);
+
+p_coeff_11h = double(2.06663648786018939063069410622119903564453125000000000000000000000000000000000000e+03);
+
+p_coeff_12h = double(5.75344088930418638483388349413871765136718750000000000000000000000000000000000000e+03);
+
+p_t_1_0h = p_coeff_12h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_11h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_10h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_9h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_8h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_7h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_6h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_4h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_3h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_2h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = fma_rel<100>(p_t_21_0hm,xh,p_coeff_1hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = fma_rel<100>(p_t_22_0hm,xh,p_coeff_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_t_1_0 = Mp_coeff_12;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_11 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_10 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_9 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_8 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_7 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_6 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_4 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_3 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_2 + Mp_t_20_0;
+Mp_t_22_0 = (Mp_t_21_0 * Mx) + Mp_coeff_1;
+Mp_t_23_0 = (Mp_t_22_0 * Mx) + Mp_coeff_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-205674681606191b-53,-205674681606191b-453]
+) \/ (
+   x in [205674681606835b-453,205674681606835b-53]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR8.gappa b/src/crlibm/gappa/asin/asinQuickR8.gappa
new file mode 100644
index 0000000..33a8791
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR8.gappa
@@ -0,0 +1,175 @@
+# The polynomial to implement is: 33903941391411436062548621898578847b-115 + (x * (118439326888551330576771230425869b-106 + (x * (1276087168563161b-50 + (x * (2565255893858397b-50 + (x * (5885467043083027b-50 + (x * (7627068437138929b-49 + (x * (5277247200778677b-47 + (x * (3823843648895481b-45 + (x * (5727900287195667b-44 + (x * (549830323588319b-39 + (x * (6890204176375445b-41 + (x * (5570398459840501b-39 + (x * 1124915619397507b-35)))))))))))))))))))))))
+# The polynomial implemented is: 33903941391411436062548621898578847b-115 + (x * (118439326888551330576771230425869b-106 + (x * (1276087168563161b-50 + (x * (2565255893858397b-50 + (x * (5885467043083027b-50 + (x * (7627068437138929b-49 + (x * (5277247200778677b-47 + (x * (3823843648895481b-45 + (x * (5727900287195667b-44 + (x * (549830323588319b-39 + (x * (6890204176375445b-41 + (x * (5570398459840501b-39 + (x * 1124915619397507b-35)))))))))))))))))))))))
+# The domain is [-96586942132361b-52;6036683883289b-48]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 37 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(8.16207699480864135033186812506755813956260681152343750000000000000000000000000000e-01);
+p_coeff_0m = double(1.13998759014226814082709277093003596330685011160153518976201336698750310461036861e-20);
+p_coeff_0hm = p_coeff_0h + p_coeff_0m;
+
+p_coeff_1h = double(1.45987741598546749699494284868706017732620239257812500000000000000000000000000000e+00);
+p_coeff_1m = double(1.00585284375539824516783136958955684505754068277117579954804682529356796294450760e-16);
+p_coeff_1hm = p_coeff_1h + p_coeff_1m;
+
+p_coeff_2h = double(1.13339308477403566399743795045651495456695556640625000000000000000000000000000000e+00);
+
+p_coeff_3h = double(2.27840492593358323603069948148913681507110595703125000000000000000000000000000000e+00);
+
+p_coeff_4h = double(5.22734481752265178755578745040111243724822998046875000000000000000000000000000000e+00);
+
+p_coeff_5h = double(1.35483951828855158083797505241818726062774658203125000000000000000000000000000000e+01);
+
+p_coeff_6h = double(3.74970966332361186346133763436228036880493164062500000000000000000000000000000000e+01);
+
+p_coeff_7h = double(1.08680173096203162685924326069653034210205078125000000000000000000000000000000000e+02);
+
+p_coeff_8h = double(3.25593435218005822662235004827380180358886718750000000000000000000000000000000000e+02);
+
+p_coeff_9h = double(1.00013553235534163832198828458786010742187500000000000000000000000000000000000000e+03);
+
+p_coeff_10h = double(3.13330209627358499346883036196231842041015625000000000000000000000000000000000000e+03);
+
+p_coeff_11h = double(1.01324957719780304614687338471412658691406250000000000000000000000000000000000000e+04);
+
+p_coeff_12h = double(3.27393534650766232516616582870483398437500000000000000000000000000000000000000000e+04);
+
+p_t_1_0h = p_coeff_12h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_11h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_10h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_9h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_8h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_7h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_6h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_5h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_4h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_3h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_2h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = fma_rel<100>(p_t_21_0hm,xh,p_coeff_1hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = fma_rel<100>(p_t_22_0hm,xh,p_coeff_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0hm;
+Mp_coeff_1 = p_coeff_1hm;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_coeff_12 = p_coeff_12h;
+Mp_t_1_0 = Mp_coeff_12;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_11 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_10 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_9 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_8 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_7 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_6 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_5 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_4 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_3 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_2 + Mp_t_20_0;
+Mp_t_22_0 = (Mp_t_21_0 * Mx) + Mp_coeff_1;
+Mp_t_23_0 = (Mp_t_22_0 * Mx) + Mp_coeff_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-96586942132361b-52,-96586942132361b-452]
+) \/ (
+   x in [6036683883289b-448,6036683883289b-48]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/asin/asinQuickR9.gappa b/src/crlibm/gappa/asin/asinQuickR9.gappa
new file mode 100644
index 0000000..f9d08d3
--- /dev/null
+++ b/src/crlibm/gappa/asin/asinQuickR9.gappa
@@ -0,0 +1,168 @@
+# The polynomial to implement is: 2275941405803339b-51 + (x * ((-6362552512264725b-56) + (x * (3031517174156445b-57 + (x * ((-1916916249275531b-58) + (x * (2775872004195495b-60 + (x * ((-8705693150762623b-63) + (x * (3596618703231213b-63 + (x * ((-3084299124302975b-64) + (x * (1359599812531581b-64 + (x * ((-4899514141103273b-67) + (x * (566891145413529b-65 + (x * (-8316266913880567b-70))))))))))))))))))))))
+# The polynomial implemented is: 2275941405803339b-51 + (x * ((-6362552512264725b-56) + (x * (3031517174156445b-57 + (x * ((-1916916249275531b-58) + (x * (2775872004195495b-60 + (x * ((-8705693150762623b-63) + (x * (3596618703231213b-63 + (x * ((-3084299124302975b-64) + (x * (1359599812531581b-64 + (x * ((-4899514141103273b-67) + (x * (566891145413529b-65 + (x * (-8316266913880567b-70))))))))))))))))))))))
+# The domain is [-140737488356209b-50;1125899906835577b-53]
+# The free variable x is a double precision number, the result p_res* is stored on a double-double number.
+# The code produces 36 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+p_coeff_0h = double(1.01072102056824553173441927356179803609848022460937500000000000000000000000000000e+00);
+
+p_coeff_1h = double(-8.82981536812866424357437722392205614596605300903320312500000000000000000000000000e-02);
+
+p_coeff_2h = double(2.10353760393442237863759203264635289087891578674316406250000000000000000000000000e-02);
+
+p_coeff_3h = double(-6.65063923819934552095212154654291225597262382507324218750000000000000000000000000e-03);
+
+p_coeff_4h = double(2.40768516599235756631136595729003602173179388046264648437500000000000000000000000e-03);
+
+p_coeff_5h = double(-9.43873142704901193882072174545783127541653811931610107421875000000000000000000000e-04);
+
+p_coeff_6h = double(3.89946181164527888064752492169873221428133547306060791015625000000000000000000000e-04);
+
+p_coeff_7h = double(-1.67200190558221219085804909454395783541258424520492553710937500000000000000000000e-04);
+
+p_coeff_8h = double(7.37040535228812338126858083597880977322347462177276611328125000000000000000000000e-05);
+
+p_coeff_9h = double(-3.32003992244226181431050737291599261880037374794483184814453125000000000000000000e-05);
+
+p_coeff_10h = double(1.53656152855036036170705004977321550541091710329055786132812500000000000000000000e-05);
+
+p_coeff_11h = double(-7.04415207421768136802344914548790200115035986527800559997558593750000000000000000e-06);
+
+p_t_1_0h = p_coeff_11h;
+
+p_t_2_0h = double(p_t_1_0h * xh);
+p_t_3_0h = double(p_coeff_10h + p_t_2_0h);
+p_t_4_0h = double(p_t_3_0h * xh);
+p_t_5_0h = double(p_coeff_9h + p_t_4_0h);
+p_t_6_0h = double(p_t_5_0h * xh);
+p_t_7_0h = double(p_coeff_8h + p_t_6_0h);
+p_t_8_0h = double(p_t_7_0h * xh);
+p_t_9_0h = double(p_coeff_7h + p_t_8_0h);
+p_t_10_0h = double(p_t_9_0h * xh);
+p_t_11_0h = double(p_coeff_6h + p_t_10_0h);
+p_t_12_0h = double(p_t_11_0h * xh);
+p_t_13_0h = double(p_coeff_5h + p_t_12_0h);
+p_t_14_0h = double(p_t_13_0h * xh);
+p_t_15_0h = double(p_coeff_4h + p_t_14_0h);
+p_t_16_0h = double(p_t_15_0h * xh);
+p_t_17_0h = double(p_coeff_3h + p_t_16_0h);
+p_t_18_0h = double(p_t_17_0h * xh);
+p_t_19_0h = double(p_coeff_2h + p_t_18_0h);
+p_t_20_0h = double(p_t_19_0h * xh);
+p_t_21_0hm = p_coeff_1h + p_t_20_0h;
+p_t_21_0h = double(p_t_21_0hm);
+p_t_21_0m = p_t_21_0hm - p_t_21_0h;
+
+p_t_22_0hm = mul_rel<102>(xh,p_t_21_0hm);
+p_t_22_0h = double(p_t_22_0hm);
+p_t_22_0m = p_t_22_0hm - p_t_22_0h;
+
+p_t_23_0hm = add_rel<102>(p_coeff_0h,p_t_22_0hm);
+p_t_23_0h = double(p_t_23_0hm);
+p_t_23_0m = p_t_23_0hm - p_t_23_0h;
+
+p_reshm = p_t_23_0hm;
+p_resh = p_t_23_0h;
+p_resm = p_t_23_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mp_coeff_0 = p_coeff_0h;
+Mp_coeff_1 = p_coeff_1h;
+Mp_coeff_2 = p_coeff_2h;
+Mp_coeff_3 = p_coeff_3h;
+Mp_coeff_4 = p_coeff_4h;
+Mp_coeff_5 = p_coeff_5h;
+Mp_coeff_6 = p_coeff_6h;
+Mp_coeff_7 = p_coeff_7h;
+Mp_coeff_8 = p_coeff_8h;
+Mp_coeff_9 = p_coeff_9h;
+Mp_coeff_10 = p_coeff_10h;
+Mp_coeff_11 = p_coeff_11h;
+Mp_t_1_0 = Mp_coeff_11;
+Mp_t_2_0 = Mp_t_1_0 * Mx;
+Mp_t_3_0 = Mp_coeff_10 + Mp_t_2_0;
+Mp_t_4_0 = Mp_t_3_0 * Mx;
+Mp_t_5_0 = Mp_coeff_9 + Mp_t_4_0;
+Mp_t_6_0 = Mp_t_5_0 * Mx;
+Mp_t_7_0 = Mp_coeff_8 + Mp_t_6_0;
+Mp_t_8_0 = Mp_t_7_0 * Mx;
+Mp_t_9_0 = Mp_coeff_7 + Mp_t_8_0;
+Mp_t_10_0 = Mp_t_9_0 * Mx;
+Mp_t_11_0 = Mp_coeff_6 + Mp_t_10_0;
+Mp_t_12_0 = Mp_t_11_0 * Mx;
+Mp_t_13_0 = Mp_coeff_5 + Mp_t_12_0;
+Mp_t_14_0 = Mp_t_13_0 * Mx;
+Mp_t_15_0 = Mp_coeff_4 + Mp_t_14_0;
+Mp_t_16_0 = Mp_t_15_0 * Mx;
+Mp_t_17_0 = Mp_coeff_3 + Mp_t_16_0;
+Mp_t_18_0 = Mp_t_17_0 * Mx;
+Mp_t_19_0 = Mp_coeff_2 + Mp_t_18_0;
+Mp_t_20_0 = Mp_t_19_0 * Mx;
+Mp_t_21_0 = Mp_coeff_1 + Mp_t_20_0;
+Mp_t_22_0 = Mx * Mp_t_21_0;
+Mp_t_23_0 = Mp_coeff_0 + Mp_t_22_0;
+Mp_res = Mp_t_23_0;
+
+# Definition of the relative arithmetical error
+epsilon = (p_reshm - Mp_res) / Mp_res;
+
+# Implication to prove
+{((
+   x in [-140737488356209b-50,-140737488356209b-450]
+) \/ (
+   x in [1125899906835577b-453,1125899906835577b-53]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+p_t_21_0h ~ p_t_21_0hm;
+p_t_22_0h ~ p_t_22_0hm;
+p_t_23_0h ~ p_t_23_0hm;
+
+# Meta-Hints for Horner scheme
+p_t_1_0h ~ Mp_t_1_0;
+p_t_2_0h ~ Mp_t_2_0;
+p_t_3_0h ~ Mp_t_3_0;
+p_t_4_0h ~ Mp_t_4_0;
+p_t_5_0h ~ Mp_t_5_0;
+p_t_6_0h ~ Mp_t_6_0;
+p_t_7_0h ~ Mp_t_7_0;
+p_t_8_0h ~ Mp_t_8_0;
+p_t_9_0h ~ Mp_t_9_0;
+p_t_10_0h ~ Mp_t_10_0;
+p_t_11_0h ~ Mp_t_11_0;
+p_t_12_0h ~ Mp_t_12_0;
+p_t_13_0h ~ Mp_t_13_0;
+p_t_14_0h ~ Mp_t_14_0;
+p_t_15_0h ~ Mp_t_15_0;
+p_t_16_0h ~ Mp_t_16_0;
+p_t_17_0h ~ Mp_t_17_0;
+p_t_18_0h ~ Mp_t_18_0;
+p_t_19_0h ~ Mp_t_19_0;
+p_t_20_0h ~ Mp_t_20_0;
+p_t_21_0hm ~ Mp_t_21_0;
+p_t_22_0hm ~ Mp_t_22_0;
+p_t_23_0hm ~ Mp_t_23_0;
+p_reshm ~ Mp_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/exp-td/exp-td-accurate1.gappa b/src/crlibm/gappa/exp-td/exp-td-accurate1.gappa
new file mode 100644
index 0000000..deebca8
--- /dev/null
+++ b/src/crlibm/gappa/exp-td/exp-td-accurate1.gappa
@@ -0,0 +1,141 @@
+# Gappa proof for the relative error of a polynomial approximation of exp(rh)-1
+# abs(rh) \leq 2^(-12)
+
+
+# Rounding operators and sequences definition
+
+ at double = float<ieee_64,ne>;
+ at Add22 = add_rel<102>;
+ at Mul22 = mul_rel<102>;
+ at Mul23 = mul_rel<149>;
+
+
+# Instantiating of constants
+accPolyC7 = double(_accPolyC7);
+accPolyC6 = double(_accPolyC6);
+accPolyC5 = double(_accPolyC5);
+accPolyC4h = double(_accPolyC4h);
+accPolyC4l = double(_accPolyC4l);
+accPolyC3h = double(_accPolyC3h);
+accPolyC3l = double(_accPolyC3l);
+
+AccPolyC4hl = accPolyC4h + accPolyC4l;
+AccPolyC3hl = accPolyC3h + accPolyC3l;
+
+
+#Translation of the C code
+
+highPoly double= accPolyC5 + rh * (accPolyC6 + rh * accPolyC7);
+
+T1hl = rh * highPoly;
+T2hl = Add22(AccPolyC4hl,T1hl);
+T3hl = Mul22(rh,T2hl);
+T4hl = Add22(AccPolyC3hl,T3hl);
+
+RhSquarehl = rh * rh;
+RhCubehml = Mul23(rh,RhSquarehl);
+
+RhSquareHalfhl = 0.5 * RhSquarehl;
+
+LowPolyhml = rh + RhSquareHalfhl;
+
+HighPolyMulthml = mul_rel<148>(T4hl,RhCubehml);
+
+Phml = add_rel<145>(LowPolyhml,HighPolyMulthml);
+
+#Mathematical definitions corresponding to the code
+
+MHighPoly = accPolyC5 + rh * (accPolyC6 + rh * accPolyC7);
+
+MT1 = rh * MHighPoly;
+MT2 = AccPolyC4hl + MT1;
+MT3 = rh * MT2;
+MT4 = AccPolyC3hl + MT3;
+
+MRhSquare = rh * rh;
+MRhCube = rh * MRhSquare;
+
+MRhSquareHalf = 0.5 * MRhSquare;
+
+MLowPoly = rh + MRhSquareHalf;
+
+MHighPolyMult = MT4 * MRhCube;
+
+MP = MLowPoly + MHighPolyMult;
+
+
+#Definition of the errors
+
+epsilonApprox = (MP - MExpM1) / MExpM1;
+
+epsilonApproxRh = (Phml - MExpM1) / MExpM1;
+
+epsilon1  = (highPoly - MHighPoly) / MHighPoly;
+epsilon2  = (T1hl - MT1) / MT1;
+epsilon3  = (T2hl - MT2) / MT2;
+epsilon4  = (T3hl - MT3) / MT3;
+epsilon5  = (T4hl - MT4) / MT4;
+epsilon6  = (RhSquarehl - MRhSquare) / MRhSquare;
+epsilon7  = (RhCubehml - MRhCube) / MRhCube;
+epsilon8  = (RhSquareHalfhl - MRhSquareHalf) / MRhSquareHalf;
+epsilon9  = (LowPolyhml - MLowPoly) / MLowPoly;
+epsilon10 = (HighPolyMulthml - MHighPolyMult) / MHighPolyMult;
+epsilon11 = (Phml - MP) / MP;
+epsilon12 = ((LowPolyhml + HighPolyMulthml) - MP)/MP;
+epsilon13 = (Phml - (LowPolyhml + HighPolyMulthml)) / (LowPolyhml + HighPolyMulthml);
+
+
+# Additional mathematical definitions (values divided by rh)
+
+MRhHalf = rh * 0.5;
+
+
+
+#Logical implication to prove
+
+{
+( rh in [-_rhmax,-1b-800] 
+/\ epsilonApprox in [-_epsilonApproxAccurate, _epsilonApproxAccurate]
+
+->
+   epsilonApproxRh in [-1b-112,1b-112]
+/\ Phml in [-1b-12,-1b-820]
+)
+/\
+( rh in [1b-800,_rhmax] 
+/\ epsilonApprox in [-_epsilonApproxAccurate, _epsilonApproxAccurate]
+
+->
+   epsilonApproxRh in [-1b-112,1b-112]
+/\ Phml in [1b-820,1b-12]
+)
+/\
+( rh in [-1b-30,-1b-800]
+/\ epsilonApprox in [-_epsilonApproxSpecial, _epsilonApproxSpecial]
+
+->
+   epsilonApproxRh in [-1b-144,1b-144]
+/\ Phml in [-1b-29,-1b-820]
+)
+/\
+( rh in [1b-800,1b-30] 
+/\ epsilonApprox in [-_epsilonApproxSpecial, _epsilonApproxSpecial]
+
+->
+   epsilonApproxRh in [-1b-144,1b-144]
+/\ Phml in [-1b-820,1b-29]
+)
+}
+
+
+#Hints for composing the errors in the different levels
+
+epsilonApproxRh -> epsilon11 + epsilonApprox + epsilon11 * epsilonApprox;
+epsilon11 -> epsilon12 + epsilon13 + epsilon12 * epsilon13;
+epsilon12 -> (epsilon9 + epsilon9 * MRhHalf + epsilon10 * MRhSquare * MT4) / (1 + MRhHalf + MRhSquare * MT4);
+
+
+#Hints for convincing Gappa that some terms do not cross zero
+
+MLowPoly -> rh * (1 + MRhHalf);
+
diff --git a/src/crlibm/gappa/exp-td/exp-td-accurate2.gappa b/src/crlibm/gappa/exp-td/exp-td-accurate2.gappa
new file mode 100644
index 0000000..a9e77ad
--- /dev/null
+++ b/src/crlibm/gappa/exp-td/exp-td-accurate2.gappa
@@ -0,0 +1,109 @@
+# Gappa proof for the relative error of the approximation of (exp(rh)-1)*(exp(rm)-1)*(exp(rl)-1)
+# abs(rh) \leq 2^(-12) using the proof for the approximation of exp(rh)-1
+
+
+# Rounding operators and sequences definition
+
+ at double = float<ieee_64,ne>;
+ at Add22 = add_rel<102>;
+ at Mul22 = mul_rel<102>;
+ at Mul23 = mul_rel<149>;
+
+#Different approximations of Rhml and definition of pl
+
+Rhml = rh + rm + rl;
+Rml = rm + rl;
+
+pl = double(Phml - Phm);
+
+#Translation of the C code
+
+RmlMultPhl = Mul22(Rml,Phm);
+Qhl = Add22(Rml,RmlMultPhl);
+FullPolyhml = add_rel<142>(Qhl,Phml);
+
+#Additional mathematical definitions
+
+MExpRmM1PExpRlM1 = MExpRmM1 + MExpRlM1;
+MExpRmM1MultExpRlM1 = MExpRmM1 * MExpRlM1;
+
+#Mathematical definitions corresponding to the code
+
+MExpRmM1PExpRlM1MultExpRhM1 = MExpRmM1PExpRlM1 * MExpRhM1;
+MExpLowerM1 = MExpRmM1PExpRlM1 + MExpRmM1PExpRlM1MultExpRhM1;
+MExpRhmlM1 = (MExpLowerM1 + MExpRhM1) + MExpRmM1MultExpRlM1;
+
+#Definition of the errors
+
+epsilonApproxRh = (Phml - MExpRhM1) / MExpRhM1;
+epsilonApproxRm = (rm - MExpRmM1) / MExpRmM1;
+epsilonApproxRl = (rl - MExpRlM1) / MExpRlM1;
+
+epsilonApproxPhm = (Phm - Phml) / Phml;
+
+deltaApproxExpRhml = FullPolyhml - MExpRhmlM1;
+
+delta1 = Phml - MExpRhM1;
+delta2 = FullPolyhml - (Qhl + Phml);
+delta3 = Qhl - MExpLowerM1;
+delta4 = Qhl - (Rml + RmlMultPhl);
+delta5 = Rml - MExpRmM1PExpRlM1;
+delta6 = RmlMultPhl - MExpRmM1PExpRlM1MultExpRhM1;
+delta7 = RmlMultPhl - (Rml * Phm);
+delta8 = (Rml * Phm) - MExpRmM1PExpRlM1MultExpRhM1;
+delta9 = Phm - MExpRhM1;
+
+epsilon1 = (FullPolyhml - (Qhl + Phml)) / (Qhl + Phml);
+epsilon2 = (Qhl - (Rml + RmlMultPhl)) / (Rml + RmlMultPhl);
+epsilon3 = (RmlMultPhl - (Rml * Phm)) / (Rml * Phm);
+
+
+#Logical implication to prove
+
+{
+(  epsilonApproxRh in [-1b-112,1b-112]
+/\ epsilonApproxRm in [-_epsilonApproxRmAccurate,_epsilonApproxRmAccurate]
+/\ epsilonApproxRl in [-_epsilonApproxRlAccurate,_epsilonApproxRlAccurate]
+/\ ( rh in [-_rhmax,-1b-800] \/ rh in [1b-800,_rhmax] ) 
+/\ ( rm in [-_rmmax,-1b-800] \/ rm in [1b-800,_rmmax] ) 
+/\ ( rl in [-_rlmax,-1b-800] \/ rl in [1b-800,_rlmax] ) 
+/\ ( Phml in [-1b-12,-1b-820] \/ Phml in [1b-820,1b-12] )
+/\ epsilonApproxPhm in [-1b-91,1b-91]
+
+-> deltaApproxExpRhml in [-1b-122,1b-122]
+/\ FullPolyhml in [-1b-11,1b-11]
+)
+/\
+(  epsilonApproxRh in [-1b-144,1b-144]
+/\ epsilonApproxRm in [0,0]
+/\ epsilonApproxRl in [0,0]
+/\ ( rh in [-1b-30,-1b-800] \/ rh in [1b-800,1b-30] ) 
+/\   rm in [0,0] 
+/\   rl in [0,0] 
+/\ ( Phml in [-1b-29,-1b-820] \/ Phml in [1b-820,1b-29] )
+/\ epsilonApproxPhm in [-1b-91,1b-91]
+
+-> deltaApproxExpRhml in [-1b-170,1b-170]
+/\ FullPolyhml in [-1b-28,1b-28]
+)
+}
+
+#Hints for composing the errors in the different levels
+
+deltaApproxExpRhml -> delta1 + delta2 + delta3 - MExpRmM1MultExpRlM1;
+delta1 -> epsilonApproxRh * MExpRhM1;
+delta2 -> epsilon1 * (Qhl + Phml);
+delta4 -> epsilon2 * (Rml + RmlMultPhl);
+delta3 -> delta4 + delta5 + delta6;
+delta7 -> epsilon3 * (Rml * Phm);
+delta6 -> delta7 + delta8;
+delta9 -> epsilonApproxPhm * Phml + delta1;
+delta8 -> delta5 * MExpRhM1 + delta9 * MExpRmM1PExpRlM1 + delta5 * delta9;
+
+#Hints for computing the absolute mathematical values for the arithmetical ones
+
+MExpRhM1 -> Phml * (1 / (1 + epsilonApproxRh));
+MExpRmM1 -> rm * (1 / (1 + epsilonApproxRm));
+MExpRlM1 -> rl * (1 / (1 + epsilonApproxRl));
+Phm -> Phml + epsilonApproxPhm * Phml;
+Phml - Phm -> -epsilonApproxPhm * Phml;
\ No newline at end of file
diff --git a/src/crlibm/gappa/exp-td/exp-td-accurate3.gappa b/src/crlibm/gappa/exp-td/exp-td-accurate3.gappa
new file mode 100644
index 0000000..01da671
--- /dev/null
+++ b/src/crlibm/gappa/exp-td/exp-td-accurate3.gappa
@@ -0,0 +1,46 @@
+# Gappa proof for the relative error of a polynomial approximation of exp(r)
+# abs(r) \leq 2^(-12), 
+# integrating the final adding step, the errors made in the polynomial approximation 
+# and the argument reduction error
+#
+# THIS IS THE SIMPLE CASE WHERE THERE IS NO GAPPING EFFECT TO PROVE
+#
+
+#Translation of the C code
+
+PolyAddOnehml = add_rel<138>(1,FullPolyhml);
+
+#Mathematical definitions corresponding to the code
+
+MExpRhml = 1 + MExpRhmlM1;
+
+#Definition of the errors
+
+deltaApproxExpRhml = FullPolyhml - MExpRhmlM1;
+epsilonArgRed = (MExpRhml - MExpR) / MExpR;
+
+epsilon = (PolyAddOnehml - MExpR) / MExpR;
+
+epsilon1 = (PolyAddOnehml - MExpRhml) / MExpRhml;
+
+
+#Logical implication to prove
+
+{
+deltaApproxExpRhml in [-1b-122,1b-122]
+/\ FullPolyhml in [-1b-11,1b-11]
+/\ epsilonArgRed in [-1b-141,1b-141]
+
+->
+
+   epsilon in [-1b-121,1b-121]
+}
+
+#Hints for composing the errors in the different levels
+
+epsilon -> epsilonArgRed + epsilon1 + epsilonArgRed * epsilon1;
+
+#Hints for computing the absolute mathematical values for the arithmetical ones
+
+MExpRhmlM1 -> FullPolyhml - deltaApproxExpRhml;
+
diff --git a/src/crlibm/gappa/exp-td/exp-td-accurate4.gappa b/src/crlibm/gappa/exp-td/exp-td-accurate4.gappa
new file mode 100644
index 0000000..f67d207
--- /dev/null
+++ b/src/crlibm/gappa/exp-td/exp-td-accurate4.gappa
@@ -0,0 +1,46 @@
+# Gappa proof for the relative error of a polynomial approximation of exp(r)
+# abs(r) \leq 2^(-12), 
+# integrating the final adding step, the errors made in the polynomial approximation 
+# and the argument reduction error
+#
+# THIS IS THE DIFFICULT CASE WHERE WE MUST SHOW THE EXACTNESS OF THE LAST ADD
+#
+
+#Translation of the C code
+
+PolyAddOnehml = 1 + FullPolyhml; # MUST SHOW THIS EXACTNESS ON PAPER
+
+#Mathematical definitions corresponding to the code
+
+MExpRhml = 1 + MExpRhmlM1;
+
+#Definition of the errors
+
+deltaApproxExpRhml = FullPolyhml - MExpRhmlM1;
+epsilonArgRed = (MExpRhml - MExpR) / MExpR;
+
+epsilon = (PolyAddOnehml - MExpR) / MExpR;
+
+epsilon1 = (PolyAddOnehml - MExpRhml) / MExpRhml;
+
+
+#Logical implication to prove
+
+{
+deltaApproxExpRhml in [-1b-170,1b-170]
+/\ FullPolyhml in [-1b-28,1b-28]
+/\ epsilonArgRed in [0,0]
+
+->
+
+   epsilon in [-1b-169,1b-169]
+}
+
+#Hints for composing the errors in the different levels
+
+epsilon -> epsilonArgRed + epsilon1 + epsilonArgRed * epsilon1;
+
+#Hints for computing the absolute mathematical values for the arithmetical ones
+
+MExpRhmlM1 -> FullPolyhml - deltaApproxExpRhml;
+
diff --git a/src/crlibm/gappa/exp-td/exp-td-proof.sh b/src/crlibm/gappa/exp-td/exp-td-proof.sh
new file mode 100755
index 0000000..aad4b44
--- /dev/null
+++ b/src/crlibm/gappa/exp-td/exp-td-proof.sh
@@ -0,0 +1,10 @@
+#/bin/bash
+
+
+GAPPA=~/gappa/src/gappa
+
+sed -f ../maple/TEMPEXP/exp-td-accurate.sed exp-td-accurate1.gappa | $GAPPA 
+sed -f ../maple/TEMPEXP/exp-td-accurate.sed exp-td-accurate2.gappa | $GAPPA 
+sed -f ../maple/TEMPEXP/exp-td-accurate.sed exp-td-accurate3.gappa | $GAPPA 
+sed -f ../maple/TEMPEXP/exp-td-accurate.sed exp-td-accurate4.gappa | $GAPPA 
+
diff --git a/src/crlibm/gappa/log-de/README b/src/crlibm/gappa/log-de/README
new file mode 100644
index 0000000..f2b8e8a
--- /dev/null
+++ b/src/crlibm/gappa/log-de/README
@@ -0,0 +1,28 @@
+
+
+There are (too) many proof files for log-de. 
+
+Those with "acc" in the filename concern the accurate step (double-double-extended computation).
+
+The others concern the quick phase (double-extended computation, with Estrin polynomial evaluation).
+
+The most interesting files are the latter. There are three files:
+  log-de-index1N-E0N.gappa covers all the table index values, except 0.
+  log-de-index0-E1N.gappa covers the index 0 and all the exponents, except 0.
+  log-de-index0-E0.gappa covers the case where both the index and the exponent are zero.
+ 
+The hints given to Gappa need to be different in the three
+cases. Basically, as soon as either the exponent or the index is
+different from zero, Gappa computes the relative error by dividing an
+absolute error by the max value of the function, which is sufficiently
+large. In these cases, Estrin evaluation is just as easy as Horner to
+handle.  However, in the case where both index and exponent are zero
+(this correspond to the interval where the logarithm goes through
+zero) we have to compute directly the relative error of the Estrin
+evaluation. 
+
+The same holds for log-de-acc, but without the Estrin bravery.
+
+Note that some of these files forget the case z=0. It is easy the prove by
+hand that the Estrin evaluation, in this case, returns logir+E*log2 (with
+roundings on logir, log2, the + and the *), which is accurate enough.
diff --git a/src/crlibm/gappa/log-de/log-de-acc-index0-E0.gappa b/src/crlibm/gappa/log-de/log-de-acc-index0-E0.gappa
new file mode 100644
index 0000000..394582b
--- /dev/null
+++ b/src/crlibm/gappa/log-de/log-de-acc-index0-E0.gappa
@@ -0,0 +1,146 @@
+# Usage: This files builds an error computation for one index value
+#only. To get a complete proof you need to run it through gappa for all
+#the possible values of the constants.
+
+# Running the ../maple/log-de.mpl Maple script
+# should create the required sed files and give the command to run.
+# Example   sed  -f ../maple/TEMPLOG/polynomials.sed  -f ../maple/TEMPLOG/log-de_1.sed ../gappa/log-de-accurate.gappa | ~/gappa/src/gappa 
+
+#  Remove the following line when editing this file, to get back the warnings (all the current ones are harmless)
+#@ -Wno-hint-difference -Wno-null-denominator
+# Remark: asking for  warnings resuires at least 512MB of memory
+
+#This is to prevent another warning which might let you think Gappa failed when it eventually succeeds. 
+#@ -Wno-dichotomy-failure
+
+# Rounding operators and sequences definition
+ at IEEEdouble = float<ieee_64,ne>;
+ at IEEEext = float<x86_80,ne>;
+ at Add22ext = add_rel<124>;
+ at Mul22ext = mul_rel<124>;
+
+
+E=0;
+
+# polynomial coefficients, computed by Maple
+c14 = IEEEext(_c14h);
+c13 = IEEEext(_c13h);
+c12 = IEEEext(_c12h);
+c11 = IEEEext(_c11h);
+c10 = IEEEext(_c10h);
+c9 = IEEEext(_c9h);
+c8 = IEEEext(_c8h);
+
+c7h = IEEEext(_c7h);
+c7l = IEEEext(_c7l);
+c7=c7h+c7l;
+
+c6h = IEEEext(_c6h);
+c6l = IEEEext(_c6l);
+c6=c6h+c6l;
+
+c5h = IEEEext(_c5h);
+c5l = IEEEext(_c5l);
+c5=c5h+c5l;
+
+c4h = IEEEext(_c4h);
+c4l = IEEEext(_c4l);
+c4=c4h+c4l;
+
+c3h = IEEEext(_c3h);
+c3l = IEEEext(_c3l);
+c3=c3h+c3l;
+
+c2h = IEEEext(_c2h);
+c2l = IEEEext(_c2l);
+c2=c2h+c2l;
+
+c1h = IEEEext(_c1h);
+c1l = IEEEext(_c1l);
+c1=c1h+c1l;
+
+log2h = IEEEext(_log2h);
+log2l  = IEEEext(_log2l);
+log2=log2h+log2l;
+logirh = IEEEext(_logirh);
+logirl = IEEEext(_logirl);
+logir=logirh+logirl;
+   
+# Transcription of C code
+
+t13 IEEEext= c13 + z*c14;
+t12 IEEEext= c12 + z*t13;
+t11 IEEEext= c11 + z*t12;
+t10 IEEEext= c10 + z*t11;
+t9  IEEEext= c9  + z*t10;
+t8  IEEEext= c8  + z*t9;
+
+#Mul12ext(&p7h, &p7l,   z, t8);
+p7=z*t8;
+#Add22ext(&t7h, &t7l,   p7h,p7l, c7h,c7l);
+t7=Add22ext(c7,p7);
+
+#FMA22ext(&t6h, &t6l,   z,0,   t7h,t7l,    c6h,c6l);
+p6=Mul22ext(z,t7);
+t6=Add22ext(c6,p6);
+
+#FMA22ext(&t5h, &t5l,   z,0,   t6h,t6l,    c5h,c5l);
+p5=Mul22ext(z,t6);
+t5=Add22ext(c5,p5);
+
+#FMA22ext(&t4h, &t4l,   z,0,   t5h,t5l,    c4h,c4l);
+p4=Mul22ext(z,t5);
+t4=Add22ext(c4,p4);
+
+#FMA22ext(&t3h, &t3l,   z,0,   t4h,t4l,    c3h,c3l);
+p3=Mul22ext(z,t4);
+t3=Add22ext(c3,p3);
+
+#FMA22ext(&t2h, &t2l,   z,0,   t3h,t3l,    c2h,c2l);
+p2=Mul22ext(z,t3);
+t2=Add22ext(c2,p2);
+
+#FMA22ext(&t1h, &t1l,   z,0,   t2h,t2l,    c1h,c1l);
+p1=Mul22ext(z,t2);
+t1=Add22ext(c1,p1);
+
+#FMA22ext(&t0h, &t0l,   z,0,   t1h,t1l,    argredtable[index].logirh, argredtable[index].logirl);
+p0=Mul22ext(z,t1);
+# Addition of 0 is exact
+t0=p0;
+
+#Mul22ext(&eh, &el,   log2h,log2l, E, 0);
+#Mul by 0 is exact
+e=log2*E;
+
+#Add22ext(prh, prl,   eh,el,  t0h,t0l);
+#Then, e is also equal to 0 so the last addition is exact again
+logz=e+t0;
+
+#---------- What this code is supposed to approximate
+# Exact mathematical definition of the log
+Mlogz =  Log1pz;
+
+PolyLog1pz = z*(c1+z*(c2+z*(c3+z*(c4+z*(c5+z*(c6+z*(c7+z*(c8+z*(c9+z*(c10+z*(c11+z*(c12+z*(c13+z*c14)))))))))))));
+
+epsilon = (logz - Mlogz)/Mlogz;
+
+epspoly=(p0-Log1pz)/Log1pz;
+epsolyRound=(p0-PolyLog1pz)/PolyLog1pz;
+epspolyApprox=(PolyLog1pz - Log1pz)/Log1pz;
+
+{
+    |z| in [1b-200, _zabsmax] 
+/\  log2 - Mlog2    in [-1b-129, 1b-129] 
+/\  (PolyLog1pz - Log1pz)/Log1pz in [-_epsilonApproxAccurate, _epsilonApproxAccurate]
+/\  (PolyLog1pz - Log1pz) in [-_deltaApproxAccurate, _deltaApproxAccurate]
+->
+epsilon in [-1b-119,1b-119]
+}
+
+epspoly -> epsolyRound + epspolyApprox + epsolyRound*epspolyApprox; 
+
+Log1pz  ->  PolyLog1pz - (PolyLog1pz-Log1pz);
+
+
+epsilon-> epspoly;
diff --git a/src/crlibm/gappa/log-de/log-de-acc-index0-E1N.gappa b/src/crlibm/gappa/log-de/log-de-acc-index0-E1N.gappa
new file mode 100644
index 0000000..fc22140
--- /dev/null
+++ b/src/crlibm/gappa/log-de/log-de-acc-index0-E1N.gappa
@@ -0,0 +1,161 @@
+# Usage: This files builds an error computation for one index value
+#only. To get a complete proof you need to run it through gappa for all
+#the possible values of the constants.
+
+# Running the ../maple/log-de.mpl Maple script
+# should create the required sed files and give the command to run.
+# Example   sed  -f ../maple/TEMPLOG/polynomials.sed  -f ../maple/TEMPLOG/log-de_1.sed ../gappa/log-de-accurate.gappa | ~/gappa/src/gappa 
+
+#  Remove the following line when editing this file, to get back the warnings (all the current ones are harmless)
+#@ -Wno-hint-difference -Wno-null-denominator
+# Remark: asking for  warnings resuires at least 512MB of memory
+
+#This is to prevent another warning which might let you think Gappa failed when it eventually succeeds. 
+#@ -Wno-dichotomy-failure
+
+# Rounding operators and sequences definition
+ at IEEEdouble = float<ieee_64,ne>;
+ at IEEEext = float<x86_80,ne>;
+ at Add22ext = add_rel<124>;
+ at Mul22ext = mul_rel<124>;
+
+
+# This is to tell Gappa that E is an integer.
+E=int<ne>(dummyE);
+
+# polynomial coefficients, computed by Maple
+c14 = IEEEext(_c14h);
+c13 = IEEEext(_c13h);
+c12 = IEEEext(_c12h);
+c11 = IEEEext(_c11h);
+c10 = IEEEext(_c10h);
+c9 = IEEEext(_c9h);
+c8 = IEEEext(_c8h);
+
+c7h = IEEEext(_c7h);
+c7l = IEEEext(_c7l);
+c7=c7h+c7l;
+
+c6h = IEEEext(_c6h);
+c6l = IEEEext(_c6l);
+c6=c6h+c6l;
+
+c5h = IEEEext(_c5h);
+c5l = IEEEext(_c5l);
+c5=c5h+c5l;
+
+c4h = IEEEext(_c4h);
+c4l = IEEEext(_c4l);
+c4=c4h+c4l;
+
+c3h = IEEEext(_c3h);
+c3l = IEEEext(_c3l);
+c3=c3h+c3l;
+
+c2h = IEEEext(_c2h);
+c2l = IEEEext(_c2l);
+c2=c2h+c2l;
+
+c1h = IEEEext(_c1h);
+c1l = IEEEext(_c1l);
+c1=c1h+c1l;
+
+log2h = IEEEext(_log2h);
+log2l  = IEEEext(_log2l);
+log2=log2h+log2l;
+logirh = IEEEext(_logirh);
+logirl = IEEEext(_logirl);
+logir=logirh+logirl;
+   
+# Transcription of C code
+
+t13 IEEEext= c13 + z*c14;
+t12 IEEEext= c12 + z*t13;
+t11 IEEEext= c11 + z*t12;
+t10 IEEEext= c10 + z*t11;
+t9  IEEEext= c9  + z*t10;
+t8  IEEEext= c8  + z*t9;
+
+#Mul12ext(&p7h, &p7l,   z, t8);
+p7=z*t8;
+#Add22ext(&t7h, &t7l,   p7h,p7l, c7h,c7l);
+t7=Add22ext(c7,p7);
+
+#FMA22ext(&t6h, &t6l,   z,0,   t7h,t7l,    c6h,c6l);
+p6=Mul22ext(z,t7);
+t6=Add22ext(c6,p6);
+
+#FMA22ext(&t5h, &t5l,   z,0,   t6h,t6l,    c5h,c5l);
+p5=Mul22ext(z,t6);
+t5=Add22ext(c5,p5);
+
+#FMA22ext(&t4h, &t4l,   z,0,   t5h,t5l,    c4h,c4l);
+p4=Mul22ext(z,t5);
+t4=Add22ext(c4,p4);
+
+#FMA22ext(&t3h, &t3l,   z,0,   t4h,t4l,    c3h,c3l);
+p3=Mul22ext(z,t4);
+t3=Add22ext(c3,p3);
+
+#FMA22ext(&t2h, &t2l,   z,0,   t3h,t3l,    c2h,c2l);
+p2=Mul22ext(z,t3);
+t2=Add22ext(c2,p2);
+
+#FMA22ext(&t1h, &t1l,   z,0,   t2h,t2l,    c1h,c1l);
+p1=Mul22ext(z,t2);
+t1=Add22ext(c1,p1);
+
+#FMA22ext(&t0h, &t0l,   z,0,   t1h,t1l,    argredtable[index].logirh, argredtable[index].logirl);
+p0=Mul22ext(z,t1);
+# Addition of 0 is exact
+t0=logir+p0;
+
+#Mul22ext(&eh, &el,   log2h,log2l, E, 0);
+e=Mul22ext(log2,E);
+
+#Add22ext(prh, prl,   eh,el,  t0h,t0l);
+logz=Add22ext(e,t0);
+
+#---------- What this code is supposed to approximate
+# Exact mathematical definition of the log
+Mlogz =  E*Mlog2 + (Mlogir + Log1pz);
+
+PolyLog1pz = z*(c1+z*(c2+z*(c3+z*(c4+z*(c5+z*(c6+z*(c7+z*(c8+z*(c9+z*(c10+z*(c11+z*(c12+z*(c13+z*c14)))))))))))));
+
+epsilon = (logz - Mlogz)/Mlogz;
+
+# Auxiliary epsilons
+Alogz = e + (logir+p0); # exact, before approximating by the Add22
+eps1 = (Alogz - Mlogz)/Mlogz;
+eps2 = (logz - Alogz)/Alogz;
+
+epspoly=(p0-Log1pz)/Log1pz;
+epsolyRound=(p0-PolyLog1pz)/PolyLog1pz;
+epspolyApprox=(PolyLog1pz - Log1pz)/Log1pz;
+
+{
+   |E| in [1,1024]
+/\    |z| in [1b-200, _zabsmax] 
+/\  log2 - Mlog2    in [-1b-129, 1b-129] 
+/\  logir - Mlogir in [-1b-129, 1b-129]  
+/\  (PolyLog1pz - Log1pz)/Log1pz in [-_epsilonApproxAccurate, _epsilonApproxAccurate]
+/\  (PolyLog1pz - Log1pz) in [-_deltaApproxAccurate, _deltaApproxAccurate]
+->
+epsilon in [-1b-119,1b-119]
+}
+
+epspoly -> epsolyRound + epspolyApprox + epsolyRound*epspolyApprox; 
+
+Log1pz  ->  PolyLog1pz - (PolyLog1pz-Log1pz);
+
+#(Alogz2-Mlogz)/Mlogz -> ( (e + (logir +p0)) - (E*Mlog2 + (Mlogir + Log1pz)) ) / Mlogz;
+(Alogz-Mlogz)/Mlogz -> ( (e - Mlog2*E) + (logir-Mlogir) + Log1pz*((p0 - Log1pz)/Log1pz) )  / Mlogz;
+
+Mlog2 -> log2 - (log2-Mlog2);
+Mlogir -> logir - (logir - Mlogir);
+
+e-E*Mlog2 -> (e-E*log2) + (E*(log2-Mlog2)) ; 
+
+epsilon-> eps1 + eps2 + eps1*eps2;
+
+epsilon $ E; 
\ No newline at end of file
diff --git a/src/crlibm/gappa/log-de/log-de-acc-index1N-E0.gappa b/src/crlibm/gappa/log-de/log-de-acc-index1N-E0.gappa
new file mode 100644
index 0000000..34c911e
--- /dev/null
+++ b/src/crlibm/gappa/log-de/log-de-acc-index1N-E0.gappa
@@ -0,0 +1,166 @@
+# This file works for the case E=0 and logir!=0
+
+
+# sed -f ../maple/TEMPLOG/polynomials.sed  -f ../maple/TEMPLOG/log-de_1.sed ../gappa/log-de-acc-logirN-E0.gappa | ~/gappa/src/gappa 
+
+
+# Usage: This files builds an error computation for one index value
+#only. To get a complete proof you need to run it through gappa for all
+#the possible values of the constants.
+
+# Running the ../maple/log-de.mpl Maple script
+# should create the required sed files and give the command to run.
+# Example   sed  -f ../maple/TEMPLOG/polynomials.sed  -f ../maple/TEMPLOG/log-de_1.sed ../gappa/log-de-accurate.gappa | ~/gappa/src/gappa 
+
+#  Remove the following line when editing this file, to get back the warnings (all the current ones are harmless)
+#@ -Wno-hint-difference -Wno-null-denominator
+# Remark: asking for  warnings resuires at least 512MB of memory
+
+#This is to prevent another warning which might let you think Gappa failed when it eventually succeeds. 
+#@ -Wno-dichotomy-failure
+
+
+# Rounding operators and sequences definition
+ at IEEEdouble = float<ieee_64,ne>;
+ at IEEEext = float<x86_80,ne>;
+ at Add22ext = add_rel<124>;
+ at Mul22ext = mul_rel<124>;
+
+
+E=0;
+
+# polynomial coefficients, computed by Maple
+c14 = IEEEext(_c14h);
+c13 = IEEEext(_c13h);
+c12 = IEEEext(_c12h);
+c11 = IEEEext(_c11h);
+c10 = IEEEext(_c10h);
+c9 = IEEEext(_c9h);
+c8 = IEEEext(_c8h);
+
+c7h = IEEEext(_c7h);
+c7l = IEEEext(_c7l);
+c7=c7h+c7l;
+
+c6h = IEEEext(_c6h);
+c6l = IEEEext(_c6l);
+c6=c6h+c6l;
+
+c5h = IEEEext(_c5h);
+c5l = IEEEext(_c5l);
+c5=c5h+c5l;
+
+c4h = IEEEext(_c4h);
+c4l = IEEEext(_c4l);
+c4=c4h+c4l;
+
+c3h = IEEEext(_c3h);
+c3l = IEEEext(_c3l);
+c3=c3h+c3l;
+
+c2h = IEEEext(_c2h);
+c2l = IEEEext(_c2l);
+c2=c2h+c2l;
+
+c1h = IEEEext(_c1h);
+c1l = IEEEext(_c1l);
+c1=c1h+c1l;
+
+log2h = IEEEext(_log2h);
+log2l  = IEEEext(_log2l);
+log2=log2h+log2l;
+logirh = IEEEext(_logirh);
+logirl = IEEEext(_logirl);
+logir=logirh+logirl;
+   
+# Transcription of C code
+
+t13 IEEEext= c13 + z*c14;
+t12 IEEEext= c12 + z*t13;
+t11 IEEEext= c11 + z*t12;
+t10 IEEEext= c10 + z*t11;
+t9  IEEEext= c9  + z*t10;
+t8  IEEEext= c8  + z*t9;
+
+#Mul12ext(&p7h, &p7l,   z, t8);
+p7=z*t8;
+#Add22ext(&t7h, &t7l,   p7h,p7l, c7h,c7l);
+t7=Add22ext(c7,p7);
+
+#FMA22ext(&t6h, &t6l,   z,0,   t7h,t7l,    c6h,c6l);
+p6=Mul22ext(z,t7);
+t6=Add22ext(c6,p6);
+
+#FMA22ext(&t5h, &t5l,   z,0,   t6h,t6l,    c5h,c5l);
+p5=Mul22ext(z,t6);
+t5=Add22ext(c5,p5);
+
+#FMA22ext(&t4h, &t4l,   z,0,   t5h,t5l,    c4h,c4l);
+p4=Mul22ext(z,t5);
+t4=Add22ext(c4,p4);
+
+#FMA22ext(&t3h, &t3l,   z,0,   t4h,t4l,    c3h,c3l);
+p3=Mul22ext(z,t4);
+t3=Add22ext(c3,p3);
+
+#FMA22ext(&t2h, &t2l,   z,0,   t3h,t3l,    c2h,c2l);
+p2=Mul22ext(z,t3);
+t2=Add22ext(c2,p2);
+
+#FMA22ext(&t1h, &t1l,   z,0,   t2h,t2l,    c1h,c1l);
+p1=Mul22ext(z,t2);
+t1=Add22ext(c1,p1);
+
+#FMA22ext(&t0h, &t0l,   z,0,   t1h,t1l,    argredtable[index].logirh, argredtable[index].logirl);
+p0=Mul22ext(z,t1);
+t0=Add22ext(logir,p0);
+
+#Mul22ext(&eh, &el,   log2h,log2l, E, 0);
+#Mul22 is exact when multipluing by 0
+e=log2*E;
+
+#Add22ext(prh, prl,   eh,el,  t0h,t0l);
+# Same for Add22
+logz=e+t0;
+
+#---------- What this code is supposed to approximate
+# Exact mathematical definition of the log
+Mlogz =  E*Mlog2 + (Mlogir + Log1pz);
+
+PolyLog1pz = z*(c1+z*(c2+z*(c3+z*(c4+z*(c5+z*(c6+z*(c7+z*(c8+z*(c9+z*(c10+z*(c11+z*(c12+z*(c13+z*c14)))))))))))));
+
+epsilon = (logz - Mlogz)/Mlogz;
+
+# Auxiliary epsilons
+Alogz = e + (logir+p0); # exact, before approximating by the Add22
+eps1 = (Alogz - Mlogz)/Mlogz;
+eps2 = (logz - Alogz)/Alogz;
+
+epspoly=(p0-Log1pz)/Log1pz;
+epsolyRound=(p0-PolyLog1pz)/PolyLog1pz;
+epspolyApprox=(PolyLog1pz - Log1pz)/Log1pz;
+
+{
+    |z| in [1b-200, _zabsmax] 
+/\  log2 - Mlog2    in [-1b-129, 1b-129] 
+/\  logir - Mlogir in [-1b-129, 1b-129]  
+/\  (PolyLog1pz - Log1pz)/Log1pz in [-_epsilonApproxAccurate, _epsilonApproxAccurate]
+/\  (PolyLog1pz - Log1pz) in [-_deltaApproxAccurate, _deltaApproxAccurate]
+->
+epsilon in   [-1b-119,1b-119]
+}
+
+epspoly -> epsolyRound + epspolyApprox + epsolyRound*epspolyApprox; 
+
+Log1pz  ->  PolyLog1pz - (PolyLog1pz-Log1pz);
+
+#(Alogz2-Mlogz)/Mlogz -> ( (e + (logir +p0)) - (E*Mlog2 + (Mlogir + Log1pz)) ) / Mlogz;
+(Alogz-Mlogz)/Mlogz -> ( (e - Mlog2*E) + (logir-Mlogir) + Log1pz*((p0 - Log1pz)/Log1pz) )  / Mlogz;
+
+
+Mlog2 -> log2 - (log2-Mlog2);
+Mlogir -> logir - (logir - Mlogir);
+
+e-E*Mlog2 -> (e-E*log2) + (E*(log2-Mlog2)) ; 
+
+epsilon-> eps1 + eps2 + eps1*eps2;
diff --git a/src/crlibm/gappa/log-de/log-de-acc-index1N-E1N.gappa b/src/crlibm/gappa/log-de/log-de-acc-index1N-E1N.gappa
new file mode 100644
index 0000000..1acee0e
--- /dev/null
+++ b/src/crlibm/gappa/log-de/log-de-acc-index1N-E1N.gappa
@@ -0,0 +1,161 @@
+# Usage: This files builds an error computation for one index value
+#only. To get a complete proof you need to run it through gappa for all
+#the possible values of the constants.
+
+# Running the ../maple/log-de.mpl Maple script
+# should create the required sed files and give the command to run.
+# Example   sed  -f ../maple/TEMPLOG/polynomials.sed  -f ../maple/TEMPLOG/log-de_1.sed ../gappa/log-de-accurate.gappa | ~/gappa/src/gappa 
+
+#  Remove the following line when editing this file, to get back the warnings (all the current ones are harmless)
+#@ -Wno-hint-difference -Wno-null-denominator
+# Remark: asking for  warnings resuires at least 512MB of memory
+
+#This is to prevent another warning which might let you think Gappa failed when it eventually succeeds. 
+#@ -Wno-dichotomy-failure
+
+# Rounding operators and sequences definition
+ at IEEEdouble = float<ieee_64,ne>;
+ at IEEEext = float<x86_80,ne>;
+ at Add22ext = add_rel<124>;
+ at Mul22ext = mul_rel<124>;
+
+
+# This is to tell Gappa that E is an integer.
+E=int<ne>(dummyE);
+
+# polynomial coefficients, computed by Maple
+c14 = IEEEext(_c14h);
+c13 = IEEEext(_c13h);
+c12 = IEEEext(_c12h);
+c11 = IEEEext(_c11h);
+c10 = IEEEext(_c10h);
+c9 = IEEEext(_c9h);
+c8 = IEEEext(_c8h);
+
+c7h = IEEEext(_c7h);
+c7l = IEEEext(_c7l);
+c7=c7h+c7l;
+
+c6h = IEEEext(_c6h);
+c6l = IEEEext(_c6l);
+c6=c6h+c6l;
+
+c5h = IEEEext(_c5h);
+c5l = IEEEext(_c5l);
+c5=c5h+c5l;
+
+c4h = IEEEext(_c4h);
+c4l = IEEEext(_c4l);
+c4=c4h+c4l;
+
+c3h = IEEEext(_c3h);
+c3l = IEEEext(_c3l);
+c3=c3h+c3l;
+
+c2h = IEEEext(_c2h);
+c2l = IEEEext(_c2l);
+c2=c2h+c2l;
+
+c1h = IEEEext(_c1h);
+c1l = IEEEext(_c1l);
+c1=c1h+c1l;
+
+log2h = IEEEext(_log2h);
+log2l  = IEEEext(_log2l);
+log2=log2h+log2l;
+logirh = IEEEext(_logirh);
+logirl = IEEEext(_logirl);
+logir=logirh+logirl;
+   
+# Transcription of C code
+
+t13 IEEEext= c13 + z*c14;
+t12 IEEEext= c12 + z*t13;
+t11 IEEEext= c11 + z*t12;
+t10 IEEEext= c10 + z*t11;
+t9  IEEEext= c9  + z*t10;
+t8  IEEEext= c8  + z*t9;
+
+#Mul12ext(&p7h, &p7l,   z, t8);
+p7=z*t8;
+#Add22ext(&t7h, &t7l,   p7h,p7l, c7h,c7l);
+t7=Add22ext(c7,p7);
+
+#FMA22ext(&t6h, &t6l,   z,0,   t7h,t7l,    c6h,c6l);
+p6=Mul22ext(z,t7);
+t6=Add22ext(c6,p6);
+
+#FMA22ext(&t5h, &t5l,   z,0,   t6h,t6l,    c5h,c5l);
+p5=Mul22ext(z,t6);
+t5=Add22ext(c5,p5);
+
+#FMA22ext(&t4h, &t4l,   z,0,   t5h,t5l,    c4h,c4l);
+p4=Mul22ext(z,t5);
+t4=Add22ext(c4,p4);
+
+#FMA22ext(&t3h, &t3l,   z,0,   t4h,t4l,    c3h,c3l);
+p3=Mul22ext(z,t4);
+t3=Add22ext(c3,p3);
+
+#FMA22ext(&t2h, &t2l,   z,0,   t3h,t3l,    c2h,c2l);
+p2=Mul22ext(z,t3);
+t2=Add22ext(c2,p2);
+
+#FMA22ext(&t1h, &t1l,   z,0,   t2h,t2l,    c1h,c1l);
+p1=Mul22ext(z,t2);
+t1=Add22ext(c1,p1);
+
+#FMA22ext(&t0h, &t0l,   z,0,   t1h,t1l,    argredtable[index].logirh, argredtable[index].logirl);
+p0=Mul22ext(z,t1);
+t0=Add22ext(logir,p0);
+
+#Mul22ext(&eh, &el,   log2h,log2l, E, 0);
+e=Mul22ext(log2,E);
+
+#Add22ext(prh, prl,   eh,el,  t0h,t0l);
+logz=Add22ext(e,t0);
+
+#---------- What this code is supposed to approximate
+# Exact mathematical definition of the log
+Mlogz =  E*Mlog2 + (Mlogir + Log1pz);
+
+PolyLog1pz = z*(c1+z*(c2+z*(c3+z*(c4+z*(c5+z*(c6+z*(c7+z*(c8+z*(c9+z*(c10+z*(c11+z*(c12+z*(c13+z*c14)))))))))))));
+
+epsilon = (logz - Mlogz)/Mlogz;
+
+# Auxiliary epsilons
+Alogz = e + (logir+p0); # exact, before approximating by the Add22
+eps1 = (Alogz - Mlogz)/Mlogz;
+eps2 = (logz - Alogz)/Alogz;
+
+epspoly=(p0-Log1pz)/Log1pz;
+epsolyRound=(p0-PolyLog1pz)/PolyLog1pz;
+epspolyApprox=(PolyLog1pz - Log1pz)/Log1pz;
+
+{
+   |E| in [1,1024]
+/\    |z| in [1b-200, _zabsmax] 
+/\  log2 - Mlog2    in [-1b-129, 1b-129] 
+/\  logir - Mlogir in [-1b-129, 1b-129]  
+/\  (PolyLog1pz - Log1pz)/Log1pz in [-_epsilonApproxAccurate, _epsilonApproxAccurate]
+/\  (PolyLog1pz - Log1pz) in [-_deltaApproxAccurate, _deltaApproxAccurate]
+->
+epsilon in [-1b-119,1b-119]
+}
+
+epspoly -> epsolyRound + epspolyApprox + epsolyRound*epspolyApprox; 
+
+Log1pz  ->  PolyLog1pz - (PolyLog1pz-Log1pz);
+
+#(Alogz2-Mlogz)/Mlogz -> ( (e + (logir +p0)) - (E*Mlog2 + (Mlogir + Log1pz)) ) / Mlogz;
+(Alogz-Mlogz)/Mlogz -> ( (e - Mlog2*E) + (logir-Mlogir) + Log1pz*((p0 - Log1pz)/Log1pz) )  / Mlogz;
+
+
+Mlog2 -> log2 - (log2-Mlog2);
+Mlogir -> logir - (logir - Mlogir);
+
+e-E*Mlog2 -> (e-E*log2) + (E*(log2-Mlog2)) ; 
+
+epsilon-> eps1 + eps2 + eps1*eps2;
+
+epsilon $ E; 
\ No newline at end of file
diff --git a/src/crlibm/gappa/log-de/log-de-index0-E0.gappa b/src/crlibm/gappa/log-de/log-de-index0-E0.gappa
new file mode 100644
index 0000000..62d2ca2
--- /dev/null
+++ b/src/crlibm/gappa/log-de/log-de-index0-E0.gappa
@@ -0,0 +1,196 @@
+# Usage: This files builds an error computation for the case when both the
+#�index and the exponent are zero.
+
+# sed -f ../maple/TEMPLOG/polynomials.sed  -f ../maple/TEMPLOG/log-de_0.sed ../gappa/log-de-index0-E0.gappa | $GAPPA 
+
+
+
+# NOTATION CONVENTION 
+# Variables that will be replaced with Maple-computed constants begin with an underscore
+# Variables that correspond to double-precision variables in the code begin with a small letter
+# variable eps_xxx denote the relative rounding error of the last machine operation that computes xxx
+
+#  Remove the following line when editing this file, to get back the warnings (all the current ones are harmless)
+#@ -Wno-hint-difference -Wno-null-denominator
+# Remark: asking for  warnings resuires at least 512MB of memory
+
+ at IEEEdouble = float<ieee_64,ne>;
+ at IEEEext = float<x86_80,ne>;
+
+
+# polynomial coefficients, computed by Maple
+#c1 = IEEEext(_c1);
+c2 = IEEEext(_c2);
+c3 = IEEEext(_c3);
+c4 = IEEEext(_c4);
+c5 = IEEEext(_c5);
+c6 = IEEEext(_c6);
+c7 = IEEEext(_c7);
+log2h = IEEEext(_log2h);
+log2l  = IEEEext(_log2l);
+#r     = IEEEext(_rval);
+#logirh = IEEEext(_logirh);
+#logirl = IEEEext(_logirl);
+
+
+# Transcription of the code, NOT using FMA
+
+# We have removed logirh and Elog2
+z2   IEEEext= z*z;    
+p67  IEEEext= c6 + z*c7;       
+p45  IEEEext= c4 + z*c5;      
+p23  IEEEext= c2 + z*c3;    
+#p01  IEEEext=  z;
+z4   IEEEext= z2*z2;  
+p47  IEEEext= p45 + z2*p67;    
+p03  IEEEext= z + z2*p23; # suppressed by hand the exact additions of 0 
+logz IEEEext= p03 + z4*p47;
+
+#---------- What this code is supposed to approximate
+# Exact mathematical definition of the log
+Mlogz = Log1pz;
+
+#############   Now come auxiliary definitions
+
+# Give the polynomial in Estrin form (no need to transcribe the intermediate steps)
+# Since the argument reduction is exact, Mz = z.
+Mz2 = z*z;
+Mz4 = Mz2*Mz2;
+Mz3 = z*z*z;
+Mz5 = z*z*z*z*z;
+Mz6 = z*z*z*z*z*z;
+eps_z2 = (z2 - z*z)/(z*z);
+eps_z4 = (z4 - z2*z2)/(z2*z2);
+t3 = IEEEext(z*c3);
+t5 = IEEEext(z*c5);
+t7 = IEEEext(z*c7);
+t23 = IEEEext(z2*p23);
+t47 = IEEEext(z4*p47);
+t67 = IEEEext(z2*p67);
+eps_t3 = (t3 - z*c3)/(z*c3);
+eps_t5 = (t5 - z*c5)/(z*c5);
+eps_t7 = (t7 - z*c7)/(z*c7);
+eps_t23 = (t23 - z2*p23)/(z2*p23);
+eps_t67 = (t67 - z2*p67)/(z2*p67);
+eps_t47 = (t47 - z4*p47)/(z4*p47);
+eps_p03 = (p03 - (z+t23)) / (z+t23);
+eps_p23 = (p23 - (c2 + t3)) / (c2 + t3);
+eps_p45 = (p45 - (c4 + t5)) / (c4 + t5);
+eps_p67 = (p67 - (c6 + t7)) / (c6 + t7);
+eps_p47 = (p47 - (p45 + t67)) / (p45 + t67);
+eps_logz = (logz - (p03 + t47))/(p03 + t47);
+
+# The following are just for lightening notations
+eps2_z4 = (1+eps_z2)*(1+eps_z2)*(1+eps_z4)-1;
+eps2_p67 = (1+eps_z2)*(1+eps_p67) -1;
+eps2_p47 = (1+eps2_z4)*(1+eps_p47) -1;
+
+PolyLog1pz = z + Mz2*(c2+z*c3) + Mz4*( (c4+z*c5) + Mz2*(c6+z*c7)  );
+
+epsilon = (logz - Mlogz)/Mlogz;
+
+epsilon_approx = (PolyLog1pz - Log1pz)/Log1pz;
+epsilon_round = (logz-PolyLog1pz)/PolyLog1pz;
+
+# The theorem. Remark that the case z=0 has to be proven by hand (fortunately it is easy)
+
+{
+    (z in [1b-200, _zabsmax] \/ z in [-_zabsmax, -1b-200])  
+/\  epsilon_approx in [-_epsilonApproxQuick, _epsilonApproxQuick]
+/\  (PolyLog1pz - Log1pz) in [-_deltaApproxQuick, _deltaApproxQuick]
+->
+epsilon in [-1b-63, 1b-63]
+}
+
+epsilon -> epsilon_approx + epsilon_round + epsilon_approx*epsilon_round;
+
+#We need to factor z by using : 
+(logz-PolyLog1pz)/PolyLog1pz   ->   ((logz/z) - PolyLog1pz/z) / (PolyLog1pz/z);
+# Here the denominator will be bound properly:
+PolyLog1pz/z  -> 1 + z*(c2+z*c3) + z*z*z*( (c4+z*c5) + z*z*(c6+z*c7) ) ;
+# so all we have is to cancel as much as possible from the numerator.
+# As all the polynomials come close to zero, we do this by forcing appearance of rel error
+
+# (1) logz = IEEEext(p03 + t47).   Since p03+t47 comes close to zero, force appearance of relative error
+logz/z   ->   (1+  (IEEEext(p03 + t47) - (p03 + t47))/(p03 + t47) ) * ((p03 + t47)/z) ;
+#                   ------------------rel error-----------------      --closer to PolyLog1pz/z---  
+
+# Now if we try to print out the rel error above, it  is undefined. 
+# This is because Gappa is not able to prove that  p03+t47 does not contain 0. 
+# So the first job is to get a better enclosure of p03+t47, without 0.
+
+# First get a good enclosure on p03 (so that it does not contain zero): same process as (1)
+p03 ->  (1+ eps_p03) * (z+t23);
+# Again, the relative error above exists only if z+t23 does not contain 0
+z+t23-> z*(1+t23/z); 
+# now we force the relative error of the rounding of t23
+t23/z  -> eps_t23 * ((z2/z)*p23) + (z2/z)*p23;
+z2/z -> ( (z2 - z*z)/(z*z) ) * z + z;  # that's eps_z2
+# Now p03 is OK, but p03 + t47 still contains 0: rewrite it, first by rewriting t47:
+t47  -> (1 + eps_t47) * (z4*p47) ;
+# now we may rewrite p03+t47, with the purpose to factor z
+p03+t47 -> z*(    (1+eps_p03)*(1+t23/z) + (1+eps_t47)*(z4*p47/z)); 
+# remains to bound z4*p47/z, a piece of cake (we even recycle z2/z)
+z4*p47/z -> (1 + (IEEEext(z2*z2) - z2*z2)/(z2*z2)) * p47*z2*(z2/z) ; 
+
+
+# At this point the relative error in (1) exists at last. Beside we have almost built a good approx of:
+(p03+t47)/z -> (1+eps_p03)*(1+t23/z) + (1+eps_t47)*(z4*p47/z) ;
+# The previous gives a bound of 2^-8 for the approximation error. Let us refine it.
+# Replacing the terms with the best expression we have for them gives: 
+(logz-PolyLog1pz)/PolyLog1pz   ->   
+      (  (1+ eps_logz)*(  (1+eps_p03)*(1+t23/z) 
+                        + (1+eps_t47)*(z4*p47/z) ) 
+       - (1 + z*(c2+z*c3) + z*z*z*( (c4+z*c5) + z*z*(c6+z*c7) ))
+      ) / (PolyLog1pz/z);
+# We develop and simplify the logz/z part of the expression in Maple using expand(). Need to set: interface(prettyprint=0);
+#expand( (1+ eps_logz)*(  (1+eps_p03)*(1+t23/z)  + (1+eps_t47)*(z4*p47/z) ));
+# Then we may cancel the 1s. 
+# Then we regroup the next significant terms:  t23/z - z*(c2+z*c3), and  
+# (also  add parentheses around (z4*p47/z) and (t23/z) so that the remainder is bound properly using previous hints) 
+(logz-PolyLog1pz)/PolyLog1pz   ->   
+      ( 
+         (t23/z - z*(c2+z*c3))
+	+((z4*p47/z) - z*z*z*( (c4+z*c5) + z*z*(c6+z*c7)))  
+        + (eps_p03 + eps_p03*(t23/z) +  + (z4*p47/z)*eps_t47+eps_logz+eps_logz*(t23/z)
+            + eps_logz*eps_p03 + eps_logz*eps_p03*(t23/z) + eps_logz*(z4*p47/z) + eps_logz*(z4*p47/z)*eps_t47 )  
+      ) / (PolyLog1pz/z);
+# A quick check gives a bound of 2^-62 for the third term (sum of epsilons), which is OK for now. 
+# Now let us work on this next significant term, starting with the expression we already have for t23/z:
+t23/z - z*(c2+z*c3) -> eps_t23 * ((z2/z)*p23) + ( (z2/z)*p23   - z*(c2+z*c3)) ;
+#                      ----------small-------
+# insert rel error of p23, and replace z2/z with the hint already given, then simplify and look for the most significant term : 
+# expand((eps_z2 * z + z) * (1+eps_p23)*(c2+t3)    - z*(c2+z*c3));
+(z2/z)*p23  - z*(c2+z*c3)   ->  (z*t3 - z*z*c3) + eps_z2*z*c2 + eps_z2*z*t3 + eps_z2*z*eps_p23*c2 + eps_z2*z*eps_p23*t3 +  z*eps_p23*c2 + z*eps_p23*t3  ;
+(z*t3 - z*z*c3) -> z*(z*c3*eps_t3);
+
+# At this point we have a bound of 2^-71 for t23/z - z*(c2+z*c3), perfect. 
+
+# Let us attack (z4*p47/z) - z*z*z*( (c4+z*c5) + z*z*(c6+z*c7)) (currently 2^-25 -- interval arithmetic on z^3)
+
+# Rewrite z4 as z2*z2*(1+eps_z4), then inside this rewrite z2 as z*z*(1+eps_z2).
+z4/z -> z*z*z + z*z*z*((1+eps_z2)*(1+eps_z2)*(1+eps_z4) -1); #OK
+# Also rewrite p47 all the way down : we get
+# p47 -> (1+eps_p47)*(p45 + (1+eps_t67)*(z2*p67));
+# p45 -> (1+eps_p45)*(c4+(1+eps_t5)*(z*c5));
+# z2*p67 -> (1+eps_z2)*z*z*(1+eps_p67)*(c6+(1+eps_t7)*(c7*z));
+# Putting together:
+(z4*p47/z) - z*z*z*( (c4+z*c5) + z*z*(c6+z*c7)) ->  
+   z*z*z*(  (1+eps2_p47)*(((1+eps_p45)*(c4+(1+eps_t5)*(z*c5))) + (1+eps_t67)*(z*z*(1+eps2_p67)*(c6+(1+eps_t7)*c7*z))) - c4 - z*c5 - z*z*(c6+z*c7)) ;
+
+
+# This last hint is computed by one expand() and one collect(,z) in maple
+ (1+eps2_p47)*(((1+eps_p45)*(c4+(1+eps_t5)*(z*c5))) + (1+eps_t67)*(z*z*(1+eps2_p67)*(c6+(1+eps_t7)*c7*z))) - c4 -  z*c5 - z*z*(c6+z*c7)  -> 
+(eps2_z4*c7*eps_t7+eps2_z4*eps2_p67*c7+c7*eps_t7+eps2_z4*c7+eps2_p67*c7+eps2_p67*c7*eps_t7+eps2_z4*eps2_p67*c7*eps_t7+eps_t67*
+c7+eps_p47*c7+eps_t67*c7*eps_t7+eps_p47*c7*eps_t7+eps_p47*eps_t67*c7+eps2_z4*eps_p47*c7+eps2_z4*eps_t67*c7+eps_t67*eps2_p67*c7
++eps_p47*eps2_p67*c7+eps_p47*eps_t67*c7*eps_t7+eps2_z4*eps_p47*c7*eps_t7+eps2_z4*eps_p47*eps_t67*c7+eps2_z4*eps_t67*c7*eps_t7+
+eps_t67*eps2_p67*c7*eps_t7+eps2_z4*eps_p47*eps2_p67*c7+eps_p47*eps2_p67*c7*eps_t7+eps_p47*eps_t67*eps2_p67*c7+eps2_z4*eps_t67*
+eps2_p67*c7+eps2_z4*eps_p47*eps_t67*c7*eps_t7+eps2_z4*eps_p47*eps2_p67*c7*eps_t7+eps2_z4*eps_p47*eps_t67*eps2_p67*c7+eps2_z4*
+eps_p47*eps_t67*eps2_p67*c7*eps_t7+eps_p47*eps_t67*eps2_p67*c7*eps_t7+eps2_z4*eps_t67*eps2_p67*c7*eps_t7)*Mz3+(eps_t67*
+eps2_p67*c6+eps_p47*eps2_p67*c6+eps_p47*c6+eps2_z4*eps_p47*c6+eps_p47*eps_t67*eps2_p67*c6+eps_t67*c6+eps2_z4*eps_p47*eps2_p67*
+c6+eps2_p67*c6+eps2_z4*eps_t67*eps2_p67*c6+eps2_z4*eps_p47*eps_t67*eps2_p67*c6+eps2_z4*eps_t67*c6+eps2_z4*eps_p47*eps_t67*c6+
+eps2_z4*c6+eps2_z4*eps2_p67*c6+eps_p47*eps_t67*c6)*Mz2+(eps2_z4*eps_p47*eps_p45*c5+c5*eps_t5+eps2_z4*eps_p45*c5*eps_t5+eps_p47
+*c5+eps_p45*c5+eps_p47*eps_p45*c5+eps_p45*c5*eps_t5+eps_p47*eps_p45*c5*eps_t5+eps_p47*c5*eps_t5+eps2_z4*eps_p47*c5+eps2_z4*
+eps_p45*c5+eps2_z4*eps_p47*eps_p45*c5*eps_t5+eps2_z4*eps_p47*c5*eps_t5+eps2_z4*c5*eps_t5+eps2_z4*c5)*z+eps_p47*c4+eps2_z4*
+eps_p45*c4+eps2_z4*eps_p47*c4+eps2_z4*c4+eps_p47*eps_p45*c4+eps2_z4*eps_p47*eps_p45*c4+eps_p45*c4
+; 
\ No newline at end of file
diff --git a/src/crlibm/gappa/log-de/log-de-index0-E1N.gappa b/src/crlibm/gappa/log-de/log-de-index0-E1N.gappa
new file mode 100644
index 0000000..d9375f5
--- /dev/null
+++ b/src/crlibm/gappa/log-de/log-de-index0-E1N.gappa
@@ -0,0 +1,96 @@
+# This file is exactly log-de-logirN-E0N.gappa, with the case E=0 removed in the theorem.
+# It is useful only to allow for a full automated proof.
+
+
+#  Remove the following line when editing this file, to get back the warnings (all the current ones are harmless)
+#@ -Wno-hint-difference -Wno-null-denominator
+# Remark: asking for  warnings resuires at least 512MB of memory
+
+#This is to prevent another warning which might let you think Gappa failed when it eventually succeeds. 
+#@ -Wno-dichotomy-failure
+
+ at IEEEdouble = float<ieee_64,ne>;
+ at IEEEext = float<x86_80,ne>;
+
+# This is to tell Gappa that E is an integer.
+E=int<ne>(dummyE);
+
+# polynomial coefficients, computed by Maple
+#c1 = IEEEext(_c1); # Since c1=1, it does not appear in the C code anymode
+c2 = IEEEext(_c2);
+c3 = IEEEext(_c3);
+c4 = IEEEext(_c4);
+c5 = IEEEext(_c5);
+c6 = IEEEext(_c6);
+c7 = IEEEext(_c7);
+
+# other constants, also from Maple
+log2h = IEEEext(_log2h);
+log2l  = IEEEext(_log2l);
+
+#table values
+r     = IEEEext(_rval);
+logirh = IEEEext(_logirh);
+logirl = IEEEext(_logirl);
+
+
+# Transcription of the code, NOT using FMA
+z2   IEEEext= z*z;    
+p67  IEEEext= c6 + z*c7;       
+p45  IEEEext= c4 + z*c5;      
+p23  IEEEext= c2 + z*c3;    
+p01  IEEEext= logirh + z;
+z4   IEEEext= z2*z2;  
+p47  IEEEext= p45 + z2*p67;    
+p03  IEEEext= p01 + z2*p23; 
+p07  IEEEext= p03 + z4*p47;
+logz IEEEext= p07 + E*log2h;
+
+#---------- What this code is supposed to approximate
+# Exact mathematical definition of the log
+Mlogz = Log1pz + Logir + E*Mlog2;
+
+#############   Now come auxiliary definitions
+Log2hl = log2h + log2l;
+Logirhl = logirh + logirl;
+
+# Give the polynomial in Estrin form (no need to transcribe the intermediate steps)
+# Since the argument reduction is exact, Mz = z.
+Mz2 = z*z;
+Mz4 = Mz2*Mz2;
+P07  =  ( (logirh+z) + Mz2*(c2+z*c3) )     + Mz4*( (c4+z*c5) + Mz2*(c6+z*c7)  ); 
+
+Alogz = P07 + E*Mlog2;
+
+PolyLog1pz = z + Mz2*(c2+z*c3) + Mz4*( (c4+z*c5) + Mz2*(c6+z*c7)  );
+
+epsilon = (logz - Mlogz)/Mlogz;
+
+
+{
+
+|E| in [1,1024]
+/\    |z| in [1b-200, _zabsmax] 
+/\  Log2hl - Mlog2    in [-1b-129, 1b-129] 
+/\  Logirhl - Logir in [-1b-129, 1b-129]  
+/\  (PolyLog1pz - Log1pz) in [-_deltaApproxQuick, _deltaApproxQuick]
+->
+epsilon in [-1b-63, 1b-63]
+
+}
+
+logz ~ Alogz;
+Alogz ~ Mlogz;
+
+
+# Trivialities which cannot be expressed using ~
+logirh - Logir ->  (logirh +logirl -Logir) - logirl;
+log2h-Mlog2  -> ((log2h + log2l) - Mlog2) - log2l;
+Mlog2  -> (log2h + log2l) - ((log2h + log2l) - Mlog2);
+Logir -> logirh + ((logirl - (logirh +logirl -Logir)));
+Mlogz   -> Alogz - (Alogz-Mlogz);
+
+Alogz - Mlogz -> (logirh-Logir) + (PolyLog1pz  - Log1pz);
+
+epsilon $ E;
+epsilon $ z;
diff --git a/src/crlibm/gappa/log-de/log-de-index1N-E0N.gappa b/src/crlibm/gappa/log-de/log-de-index1N-E0N.gappa
new file mode 100644
index 0000000..6be94dd
--- /dev/null
+++ b/src/crlibm/gappa/log-de/log-de-index1N-E0N.gappa
@@ -0,0 +1,121 @@
+# Usage: This files builds an error computation for all possible
+#exponent values, but for one index value only. To get a complete
+#proof you need to run it through gappa for all the possible values of
+#the constants. However, it doesn't work for the index value 0: use
+#file log-de-logir0-E0 instead
+
+# Running the ../maple/log-de.mpl Maple script
+# should create the required sed files and give the command to run.
+# Example   sed  -f ../maple/TEMPLOG/polynomials.sed  -f ../maple/TEMPLOG/log-de_1.sed ../gappa/log-de.gappa | ~/gappa/src/gappa 
+
+
+# NOTATION CONVENTION 
+# Variables that will be replaced with Maple-computed constants begin with an underscore
+# Variables that correspond to double-precision variables in the code begin with a small letter
+# Other variables begin with a capital letter.
+
+#  Remove the following line when editing this file, to get back the warnings (all the current ones are harmless)
+#@ -Wno-hint-difference -Wno-null-denominator
+# Remark: asking for  warnings resuires at least 512MB of memory
+
+#This is to prevent another warning which might let you think Gappa failed when it eventually succeeds. 
+#@ -Wno-dichotomy-failure
+
+ at IEEEdouble = float<ieee_64,ne>;
+ at IEEEext = float<x86_80,ne>;
+
+# This is to tell Gappa that E is an integer.
+E=int<ne>(dummyE);
+
+# polynomial coefficients, computed by Maple
+#c1 = IEEEext(_c1); # Since c1=1, it does not appear in the C code anymode
+c2 = IEEEext(_c2);
+c3 = IEEEext(_c3);
+c4 = IEEEext(_c4);
+c5 = IEEEext(_c5);
+c6 = IEEEext(_c6);
+c7 = IEEEext(_c7);
+
+# other constants, also from Maple
+log2h = IEEEext(_log2h);
+log2l  = IEEEext(_log2l);
+
+#table values
+r     = IEEEext(_rval);
+logirh = IEEEext(_logirh);
+logirl = IEEEext(_logirl);
+
+
+# Transcription of the code, NOT using FMA
+z2   IEEEext= z*z;    
+p67  IEEEext= c6 + z*c7;       
+p45  IEEEext= c4 + z*c5;      
+p23  IEEEext= c2 + z*c3;    
+p01  IEEEext= logirh + z;
+z4   IEEEext= z2*z2;  
+p47  IEEEext= p45 + z2*p67;    
+p03  IEEEext= p01 + z2*p23; 
+p07  IEEEext= p03 + z4*p47;
+logz IEEEext= p07 + E*log2h;
+
+#---------- What this code is supposed to approximate
+# Exact mathematical definition of the log
+Mlogz = Log1pz + Logir + E*Mlog2;
+
+#############   Now come auxiliary definitions
+Log2hl = log2h + log2l;
+Logirhl = logirh + logirl;
+
+# Give the polynomial in Estrin form (no need to transcribe the intermediate steps)
+# Since the argument reduction is exact, Mz = z.
+Mz2 = z*z;
+Mz4 = Mz2*Mz2;
+P07  =  ( (logirh+z) + Mz2*(c2+z*c3) )     + Mz4*( (c4+z*c5) + Mz2*(c6+z*c7)  ); 
+
+Alogz = P07 + E*Mlog2;
+
+PolyLog1pz = z + Mz2*(c2+z*c3) + Mz4*( (c4+z*c5) + Mz2*(c6+z*c7)  );
+
+epsilon = (logz - Mlogz)/Mlogz;
+
+
+{
+(
+|E| in [1,1024]
+/\  |z| in [1b-200, _zabsmax] 
+/\  Log2hl - Mlog2    in [-1b-129, 1b-129] 
+/\  Logirhl - Logir in [-1b-129, 1b-129]  
+/\  (PolyLog1pz - Log1pz) in [-_deltaApproxQuick, _deltaApproxQuick]
+->
+epsilon in [-1b-63, 1b-63]
+)
+
+/\
+
+(
+E in [0,0]
+/\    z in [-_zabsmax, _zabsmax] 
+/\  Log2hl - Mlog2    in [-1b-129, 1b-129] 
+/\  Logirhl - Logir in [-1b-129, 1b-129]  
+/\  (PolyLog1pz - Log1pz) in [-_deltaApproxQuick, _deltaApproxQuick]
+->
+epsilon in [-1b-63, 1b-63]
+)
+
+}
+
+logz ~ Alogz;
+Alogz ~ Mlogz;
+
+
+# Trivialities which cannot be expressed using ~
+logirh - Logir ->  (logirh +logirl -Logir) - logirl;
+log2h-Mlog2  -> ((log2h + log2l) - Mlog2) - log2l;
+Mlog2  -> (log2h + log2l) - ((log2h + log2l) - Mlog2);
+Logir -> logirh + ((logirl - (logirh +logirl -Logir)));
+Mlogz   -> Alogz - (Alogz-Mlogz);
+
+Alogz - Mlogz -> (logirh-Logir) + (PolyLog1pz  - Log1pz);
+
+epsilon $ E;
+epsilon $ z;
diff --git a/src/crlibm/gappa/log-td/log-td-E0-logir0.gappa b/src/crlibm/gappa/log-td/log-td-E0-logir0.gappa
new file mode 100644
index 0000000..4006253
--- /dev/null
+++ b/src/crlibm/gappa/log-td/log-td-E0-logir0.gappa
@@ -0,0 +1,126 @@
+
+c3 = <float64ne> (_c3);
+c4 = <float64ne> (_c4);
+c5 = <float64ne> (_c5);
+c6 = <float64ne> (_c6);
+c7 = <float64ne> (_c7);
+
+
+E = 0; #MAPLE
+
+zh = <float64ne> (Z);
+zl = Z - zh; #MAPLE
+
+polyHorner <float64ne>= c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+
+ZhSquarehl = zh * zh; #MAPLE
+zhSquareh = <float64ne> (ZhSquarehl);
+zhSquarel = <float64ne> (ZhSquarehl - zhSquareh);
+
+zhSquareHalfh = zhSquareh * (-0.5); #MAPLE
+zhSquareHalfl = zhSquarel * (-0.5); #MAPLE
+ZhSquareHalfhl = ZhSquarehl * (-0.5); #MAPLE
+
+ZhCube <float64ne>= (zh * zhSquareh);
+polyUpper <float64ne>= polyHorner * ZhCube;
+
+temp = <float64ne> (zh * zl);
+T1hl = polyUpper - temp; #MAPLE
+t1h = <float64ne> (T1hl);
+t1l = <float64ne> (T1hl - t1h);
+
+T2 = Z + ZhSquareHalfhl; #MAPLE
+t2h = <float64ne> (T2hl);
+t2l = <float64ne> (T2hl - t2h);
+
+PE = T2hl + T1hl; #MAPLE
+ph = <float64ne> (Phl);
+pl = <float64ne> (Phl - ph);
+
+
+#We can simplify the computations in the function in this case as we know that 
+#all operations (add, mult) on 0 (as a double double) are exact.
+
+Loghm = Phl; #MAPLE
+
+logh = <float64ne> (Loghm);
+logm = <float64ne> (Loghm - logh);
+
+#Mathematical definition of the logarithm and the polynomial
+
+Phigher = (c3 + Z * (c4 + Z * (c5 + Z * (c6 + Z * c7)))); #MAPLE
+ZZZ = Z*Z*Z; #MAPLE
+ZZZPhigher = ZZZ * Phigher; #MAPLE
+HZZ = (-0.5*Z*Z); #MAPLE
+ZpHZZ = Z + HZZ; #MAPLE
+P = ZpHZZ + ZZZPhigher; #MAPLE
+
+#We apply the same simplification on the mathematical definition of the log
+Log = Log1pZ; #MAPLE
+
+
+#Additional useful definitions
+
+ZZ = Z*Z; #MAPLE
+ZZZPhigherPzhzl = ZZZPhigher - zh * zl; #MAPLE
+
+HZ = -0.5*Z; #MAPLE
+
+Flzhzl = temp; #MAPLE
+
+{
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (Phl - PE) / PE in [-1b-103,1b-103]
+/\ Z in [_zmin,_zmax]
+/\ (P - Log1pZ) / Log1pZ in [-_epsilonApproxQuick,_epsilonApproxQuick]
+/\ ((logh + logm) - Loghm) / Loghm in [-1b-106,1b-106]
+->
+((logh + logm) - Log) / Log in [-5b-65,5b-65]
+}
+
+T2hl - T2 -> ((T2hl - T2) / T2) * T2;
+T2hl -> (T2hl - T2) + T2;
+
+Phl - PE -> ((Phl - PE) / PE) * PE;
+Phl -> (Phl - PE) + PE;
+
+
+(ZhSquarehl - ZZ) / ZZ -> 2 * ((zh - Z) / Z) + ((zh - Z) / Z) * ((zh - Z) / Z);
+
+(zhSquareh - ZZ) / ZZ -> ((ZhSquarehl - ZZ) / ZZ) + ((zhSquareh - ZhSquarehl) / ZZ);
+
+(zhSquareh - ZhSquarehl) / ZZ -> ((zhSquareh - ZhSquarehl) / ZhSquarehl) * (ZhSquarehl / ZZ);
+
+ZhSquarehl / ZZ -> ((ZhSquarehl - ZZ) / ZZ) + 1;
+
+(ZhCube - ZZZ) / ZZZ -> (((zh * zhSquareh) - ZZZ) / ZZZ) + ((ZhCube - (zh * zhSquareh)) / ZZZ);
+
+((zh * zhSquareh) - ZZZ) / ZZZ -> (1 + ((zh - Z) / Z)) * (1 + ((zhSquareh - ZZ) / ZZ)) - 1;
+
+((ZhCube - (zh * zhSquareh)) / ZZZ) -> ((ZhCube - (zh * zhSquareh)) / (zh * zhSquareh)) * (((zh - Z) / Z) + 1) * (((zhSquareh - ZZ) / ZZ) + 1);
+
+polyHorner / Phigher -> ((polyHorner - Phigher) / Phigher) + 1;
+
+(polyUpper - ZZZPhigher) / ZZZPhigher -> ((polyHorner - Phigher) / Phigher) + ((ZhCube - ZZZ) / ZZZ) * (polyHorner / Phigher) + 
+					  + ((polyUpper - (polyHorner * ZhCube)) / (polyHorner * ZhCube)) * (polyHorner / Phigher) +
+					  + ((ZhCube - ZZZ) / ZZZ) * ((polyUpper - (polyHorner * ZhCube)) / (polyHorner * ZhCube)) * 
+					    (polyHorner / Phigher);
+
+
+((ZhSquareHalfhl - (zh * zl)) - HZZ) / HZZ -> - ((zh - Z) / Z) * ((zh - Z) / Z);
+
+(ZhSquareHalfhl - HZZ) / HZZ -> (ZhSquarehl - ZZ) / ZZ;
+
+((T2hl - (zh * zl)) - ZpHZZ) / ZpHZZ -> ((HZ * (((ZhSquareHalfhl - (zh * zl)) - HZZ) / HZZ)) + ((T2hl - T2) / T2) 
+                                        + (HZ * ((T2hl - T2) / T2)) 
+					+ (HZ * ((ZhSquareHalfhl - HZZ) / HZZ) * ((T2hl - T2) / T2))) / (1 + HZ);
+
+(PE - P) / P -> (((1 + HZ) * (((T2hl - (zh * zl)) - ZpHZZ) / ZpHZZ)) +
+		((1 + ((zh - Z) / Z)) * (Z * ((zh - Z) / Z)) * ((Flzhzl - (zh * zl)) / (zh * zl))) 
+	        + (ZZ * Phigher * ((polyUpper - ZZZPhigher) / ZZZPhigher))) / (1 + HZ + ZZ * Phigher);
+
+(Phl - P) / P -> ((PE - P) / P) + ((((PE - P) / P) + 1) * ((Phl - PE) / PE));
+
+(Loghm - Log) / Log -> ((Loghm - P) / P) + ((P - Log) / Log) + ((Loghm - P) / P) * ((P - Log) / Log);
+
+(((logh + logm) - Log) / Log) -> (((logh + logm) - Loghm) / Loghm) + ((Loghm - Log) / Log) + (((logh + logm) - Loghm) / Loghm) * ((Loghm - Log) / Log);
diff --git a/src/crlibm/gappa/log-td/log-td-E0.gappa b/src/crlibm/gappa/log-td/log-td-E0.gappa
new file mode 100644
index 0000000..934c2cb
--- /dev/null
+++ b/src/crlibm/gappa/log-td/log-td-E0.gappa
@@ -0,0 +1,143 @@
+
+c3 = <float64ne> (_c3);
+c4 = <float64ne> (_c4);
+c5 = <float64ne> (_c5);
+c6 = <float64ne> (_c6);
+c7 = <float64ne> (_c7);
+
+E = 0; #MAPLE
+
+logih = <float64ne> (_logih);
+logim = <float64ne> (_logim);
+logil = <float64ne> (_logil);
+
+
+zh = <float64ne> (Z);
+zl = Z - zh; #MAPLE
+
+polyHorner <float64ne>= c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+
+ZhSquarehl = zh * zh; #MAPLE
+zhSquareh = <float64ne> (ZhSquarehl);
+zhSquarel = <float64ne> (ZhSquarehl - zhSquareh);
+
+zhSquareHalfh = zhSquareh * (-0.5); #MAPLE
+zhSquareHalfl = zhSquarel * (-0.5); #MAPLE
+ZhSquareHalfhl = ZhSquarehl * (-0.5); #MAPLE
+
+polyUpper <float64ne>= polyHorner * (zh * zhSquareh);
+
+temp = <float64ne> (zh * zl);
+T1hl = polyUpper - temp; #MAPLE
+t1h = <float64ne> (T1hl);
+t1l = <float64ne> (T1hl - t1h);
+
+T2 = Z + ZhSquareHalfhl; #MAPLE
+t2h = <float64ne> (T2hl);
+t2l = <float64ne> (T2hl - t2h);
+
+PE = T2hl + T1hl; #MAPLE
+ph = <float64ne> (Phl);
+pl = <float64ne> (Phl - ph);
+
+
+#Useful additional definitions
+Log2hm = log2h + log2m; #MAPLE
+Logihm = logih + logim; #MAPLE
+#End additional
+
+LogTabPoly = Logihm + Phl; #MAPLE
+logTabPolyh = <float64ne> (LogTabPolyhl);
+logTabPolyl = <float64ne> (LogTabPolyhl - logTabPolyh);
+
+#We know that the addition of E * log2hm = 0 and logTabPolyhl is exact
+#Thus we simplify the proof at this level
+
+Loghm = LogTabPolyhl; #MAPLE
+
+logh = <float64ne> (Loghm);
+logm = <float64ne> (Loghm - logh);
+
+#Mathematical definition of the logarithm and the polynomial
+
+Phigher = (c3 + Z * (c4 + Z * (c5 + Z * (c6 + Z * c7)))); #MAPLE
+ZZZ = Z*Z*Z; #MAPLE
+ZZZPhigher = ZZZ * Phigher; #MAPLE
+HZZ = (-0.5*Z*Z); #MAPLE
+ZpHZZ = Z + HZZ; #MAPLE
+P = ZpHZZ + ZZZPhigher; #MAPLE
+Log1pZpTab = Log1pZ + Logir; #MAPLE
+
+#We apply the same simplification to the mathematical definition of the logarithm
+
+Log = Log1pZpTab; #MAPLE
+
+# Useful additional definitions
+
+HZZsimp = HZZ + (zh * zl); #MAPLE
+ZpHZZsimp = Z + HZZsimp; #MAPLE
+ZZZPhigherPzhzl = ZZZPhigher - zh * zl; #MAPLE
+zhCube = zh * zhSquareh; #MAPLE
+
+delta1 = T2hl - T2; #MAPLE
+delta2 = polyUpper - (polyHorner * zhCube); #MAPLE
+delta3 = zhCube - ZZZ; #MAPLE
+delta4 = Phl - PE; #MAPLE
+delta6 = P - Log1pZ; #MAPLE
+delta7 = LogTabPolyhl - LogTabPoly; #MAPLE
+
+# End additional
+
+
+{
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (Phl - PE) / PE in [-1b-103,1b-103]
+/\ (LogTabPolyhl - LogTabPoly) / LogTabPoly in [-1b-103,1b-103]
+/\ (Log2hm - Log2) / Log2 in [-1b-84,1b-84]
+/\ (Logihm - Logir) / Logir in [-1b-106,1b-106]
+/\ Z in [_zmin,_zmax]
+/\ (P - Log1pZ) / Log1pZ in [-_epsilonApproxQuick,_epsilonApproxQuick]
+/\ ((logh + logm) - Loghm) / Loghm in [-1b-106,1b-106]
+->
+((logh + logm) - Log) / Log in [-5b-65,5b-65]
+}
+
+T2hl - T2 -> ((T2hl - T2) / T2) * T2;
+T2hl -> (T2hl - T2) + T2;
+
+Phl - PE -> ((Phl - PE) / PE) * PE;
+Phl -> (Phl - PE) + PE;
+
+
+LogTabPolyhl -> (LogTabPolyhl - LogTabPoly) + LogTabPoly;
+
+Loghm -> (Loghm - LogE) + LogE;
+
+Log2 -> Log2hm * (1 / (((Log2hm - Log2) / Log2) + 1));
+
+Logir -> Logihm * (1 / (((Logihm - Logir) / Logir) + 1));
+
+
+
+HZZsimp -> (-0.5 * zh * zh) - (0.5 * zl * zl);
+
+T2hl - ZpHZZsimp -> (0.5 * zl * zl) + delta1;
+
+zhCube - ZZZ -> (Z * (zhSquareh - Z * Z)) - (zl * zhSquareh);
+
+polyUpper - ZZZPhigher -> ZZZ * (polyHorner - Phigher) + polyHorner * delta3 + delta2;
+
+ZpHZZ + ZZZPhigher -> ZpHZZsimp + ZZZPhigherPzhzl;
+
+Phl - P -> (T2hl - ZpHZZsimp) + (T1hl - ZZZPhigherPzhzl) + delta4;
+
+Log1pZ -> P * (1 / (((P - Log1pZ) / Log1pZ) + 1));
+P - Log1pZ -> ((P - Log1pZ) / Log1pZ) * Log1pZ;
+
+Phl - Log1pZ -> (Phl - P) + delta6;
+
+LogTabPolyhl - Log1pZpTab -> (Logihm - Logir) + (Phl - Log1pZ) + delta7;
+
+(logh + logm) - Loghm -> (((logh + logm) - Loghm) / Loghm) * Loghm;
+
+(logh + logm) - Log -> ((logh + logm) - Loghm) + (Loghm - Log);
\ No newline at end of file
diff --git a/src/crlibm/gappa/log-td/log-td-accurate-E0-logir0.gappa b/src/crlibm/gappa/log-td/log-td-accurate-E0-logir0.gappa
new file mode 100644
index 0000000..27ef9a5
--- /dev/null
+++ b/src/crlibm/gappa/log-td/log-td-accurate-E0-logir0.gappa
@@ -0,0 +1,230 @@
+
+
+accPolyC14 = <float64ne> (_accPolyC14);
+accPolyC13 = <float64ne> (_accPolyC13);
+accPolyC12 = <float64ne> (_accPolyC12);
+accPolyC11 = <float64ne> (_accPolyC11);
+accPolyC10 = <float64ne> (_accPolyC10);
+
+accPolyC9h = <float64ne> (_accPolyC9h);
+accPolyC9l = <float64ne> (_accPolyC9l);
+AccPolyC9hl = accPolyC9h + accPolyC9l; #MAPLE
+accPolyC8h = <float64ne> (_accPolyC8h);
+accPolyC8l = <float64ne> (_accPolyC8l);
+AccPolyC8hl = accPolyC8h + accPolyC8l; #MAPLE
+accPolyC7h = <float64ne> (_accPolyC7h);
+accPolyC7l = <float64ne> (_accPolyC7l);
+AccPolyC7hl = accPolyC7h + accPolyC7l; #MAPLE
+accPolyC6h = <float64ne> (_accPolyC6h);
+accPolyC6l = <float64ne> (_accPolyC6l);
+AccPolyC6hl = accPolyC6h + accPolyC6l; #MAPLE
+accPolyC5h = <float64ne> (_accPolyC5h);
+accPolyC5l = <float64ne> (_accPolyC5l);
+AccPolyC5hl = accPolyC5h + accPolyC5l; #MAPLE
+accPolyC4h = <float64ne> (_accPolyC4h);
+accPolyC4l = <float64ne> (_accPolyC4l);
+AccPolyC4hl = accPolyC4h + accPolyC4l; #MAPLE
+accPolyC3h = <float64ne> (_accPolyC3h);
+accPolyC3l = <float64ne> (_accPolyC3l);
+AccPolyC3hl = accPolyC3h + accPolyC3l; #MAPLE
+
+E = 0; #MAPLE
+
+zh = <float64ne> (Z);
+zl = Z - zh; #MAPLE
+
+highPoly <float64ne> = accPolyC10 + zh * (accPolyC11 + zh * (accPolyC12 + zh * (accPolyC13 + zh * accPolyC14)));
+
+T1hl = zh * highPoly; #MAPLE
+
+T2 = AccPolyC9hl + T1hl; #MAPLE
+T3 = Z * T2hl; #MAPLE
+T4 = AccPolyC8hl + T3hl; #MAPLE
+T5 = Z * T4hl; #MAPLE
+T6 = AccPolyC7hl + T5hl; #MAPLE
+T7 = Z * T6hl; #MAPLE
+T8 = AccPolyC6hl + T7hl; #MAPLE
+T9 = Z * T8hl; #MAPLE
+T10 = AccPolyC5hl + T9hl; #MAPLE
+T11 = Z * T10hl; #MAPLE
+T12 = AccPolyC4hl + T11hl; #MAPLE
+T13 = Z * T12hl; #MAPLE
+T14 = AccPolyC3hl + T13hl; #MAPLE
+
+
+ZSquare = Z * Z; #MAPLE
+ZCube = Z * ZSquarehml; #MAPLE
+HigherPolyMultZ = T14hl * ZCubehml; #MAPLE
+ZSquareHalfhml = -0.5 * ZSquarehml; #MAPLE
+PolyWithSquare = ZSquareHalfhml + HigherPolyMultZhml; #MAPLE
+Poly = Z + PolyWithSquarehml; #MAPLE
+
+#We can simplify the proof in this case since we know that adding a triple double which is 
+#equal to 0 exactly is exact.
+
+Loghml = Polyhml; #MAPLE
+
+
+#Mathematical definition of the logarithm
+
+MHighPoly = accPolyC10 + Z * (accPolyC11 + Z * (accPolyC12 + Z * (accPolyC13 + Z * accPolyC14))); #MAPLE
+MT1 = Z * MHighPoly; #MAPLE
+MT2 = AccPolyC9hl + MT1; #MAPLE
+MT3 = Z * MT2; #MAPLE
+MT4 = AccPolyC8hl + MT3; #MAPLE
+MT5 = Z * MT4; #MAPLE
+MT6 = AccPolyC7hl + MT5; #MAPLE
+MT7 = Z * MT6; #MAPLE
+MT8 = AccPolyC6hl + MT7; #MAPLE
+MT9 = Z * MT8; #MAPLE
+MT10 = AccPolyC5hl + MT9; #MAPLE
+MT11 = Z * MT10; #MAPLE
+MT12 = AccPolyC4hl + MT11; #MAPLE
+MT13 = Z * MT12; #MAPLE
+MT14 = AccPolyC3hl + MT13; #MAPLE
+MZSquare = Z * Z; #MAPLE
+MZCube = Z * MZSquare; #MAPLE
+MHigherPolyMultZ = MT14 * MZCube; #MAPLE
+MZSquareHalf = -0.5 * MZSquare; #MAPLE
+MPolyWithSquare = MZSquareHalf + MHigherPolyMultZ; #MAPLE
+MPoly = Z + MPolyWithSquare; #MAPLE
+
+#We apply the same simplification here
+
+MLog = MLog1pZ; #MAPLE
+
+
+#Useful additional definitions
+
+epsilon1 = (highPoly - MHighPoly) / MHighPoly; #MAPLE
+epsilon2 = (T1hl - MT1) / MT1; #MAPLE
+epsilon3 = (T2hl - MT2) / MT2; #MAPLE
+epsilon4 = (T3hl - MT3) / MT3; #MAPLE
+epsilon5 = (T4hl - MT4) / MT4; #MAPLE
+epsilon6 = (T5hl - MT5) / MT5; #MAPLE
+epsilon7 = (T6hl - MT6) / MT6; #MAPLE
+epsilon8 = (T7hl - MT7) / MT7; #MAPLE
+epsilon9 = (T8hl - MT8) / MT8; #MAPLE
+epsilon10 = (T9hl - MT9) / MT9; #MAPLE
+epsilon11 = (T10hl - MT10) / MT10; #MAPLE
+epsilon12 = (T11hl - MT11) / MT11; #MAPLE
+epsilon13 = (T12hl - MT12) / MT12; #MAPLE
+epsilon14 = (T13hl - MT13) / MT13; #MAPLE
+epsilon15 = (T14hl - MT14) / MT14; #MAPLE
+
+epsilon16 = (ZCubehml - MZCube) / MZCube; #MAPLE 
+epsilon17 = (HigherPolyMultZhml - MHigherPolyMultZ) / MHigherPolyMultZ; #MAPLE
+epsilon18 = (ZSquareHalfhml - MZSquareHalf) / MZSquareHalf; #MAPLE
+epsilon19 = (PolyWithSquarehml - MPolyWithSquare) / MPolyWithSquare; #MAPLE
+epsilon20 = (Polyhml - MLog1pZ) / MLog1pZ; #MAPLE
+
+epsilon21 = (PolyWithSquare - MPolyWithSquare) / MPolyWithSquare; #MAPLE
+epsilon22 = (Polyhml - MPoly) / MPoly; #MAPLE
+epsilon23 = (Poly - MPoly) / MPoly; #MAPLE
+
+aux1 = -0.5 * Z + MZSquare * MT14; #MAPLE
+
+
+#End additional definitions
+
+{
+(
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (T3hl - T3) / T3 in [-1b-102,1b-102]
+/\ (T4hl - T4) / T4 in [-1b-103,1b-103]
+/\ (T5hl - T5) / T5 in [-1b-102,1b-102]
+/\ (T6hl - T6) / T6 in [-1b-103,1b-103]
+/\ (T7hl - T7) / T7 in [-1b-102,1b-102]
+/\ (T8hl - T8) / T8 in [-1b-103,1b-103]
+/\ (T9hl - T9) / T9 in [-1b-102,1b-102]
+/\ (T10hl - T10) / T10 in [-1b-103,1b-103]
+/\ (T11hl - T11) / T11 in [-1b-102,1b-102]
+/\ (T12hl - T12) / T12 in [-1b-103,1b-103]
+/\ (T13hl - T13) / T13 in [-1b-102,1b-102]
+/\ (T14hl - T14) / T14 in [-1b-103,1b-103]
+/\ (ZSquarehml - ZSquare) / ZSquare in [-1b-149,1b-149]
+/\ (ZCubehml - ZCube) / ZCube in [-1b-144,1b-144]
+/\ (HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ in [-1b-141,1b-141]
+/\ (PolyWithSquarehml - PolyWithSquare) / PolyWithSquare in [-1b-137,1b-137]
+/\ (Polyhml - Poly) / Poly in [-1b-134,1b-134]
+/\ (MPoly - MLog1pZ) / MLog1pZ in [-_epsilonApproxAccurate,_epsilonApproxAccurate]
+/\ Z in [1b-900,_zmax]
+/\ ((logh + logm + logl) - Loghml) / Loghml in [-1b-159,1b-159]
+->
+((logh + logm + logl) - MLog) / MLog in [-5735b-132,5735b-132]
+)
+/\
+(
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (T3hl - T3) / T3 in [-1b-102,1b-102]
+/\ (T4hl - T4) / T4 in [-1b-103,1b-103]
+/\ (T5hl - T5) / T5 in [-1b-102,1b-102]
+/\ (T6hl - T6) / T6 in [-1b-103,1b-103]
+/\ (T7hl - T7) / T7 in [-1b-102,1b-102]
+/\ (T8hl - T8) / T8 in [-1b-103,1b-103]
+/\ (T9hl - T9) / T9 in [-1b-102,1b-102]
+/\ (T10hl - T10) / T10 in [-1b-103,1b-103]
+/\ (T11hl - T11) / T11 in [-1b-102,1b-102]
+/\ (T12hl - T12) / T12 in [-1b-103,1b-103]
+/\ (T13hl - T13) / T13 in [-1b-102,1b-102]
+/\ (T14hl - T14) / T14 in [-1b-103,1b-103]
+/\ (ZSquarehml - ZSquare) / ZSquare in [-1b-149,1b-149]
+/\ (ZCubehml - ZCube) / ZCube in [-1b-144,1b-144]
+/\ (HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ in [-1b-141,1b-141]
+/\ (PolyWithSquarehml - PolyWithSquare) / PolyWithSquare in [-1b-137,1b-137]
+/\ (Polyhml - Poly) / Poly in [-1b-134,1b-134]
+/\ (MPoly - MLog1pZ) / MLog1pZ in [-_epsilonApproxAccurate,_epsilonApproxAccurate]
+/\ Z in [_zmin,-1b-900]
+/\ ((logh + logm + logl) - Loghml) / Loghml in [-1b-159,1b-159]
+->
+((logh + logm + logl) - MLog) / MLog in [-5735b-132,5735b-132]
+)
+}
+
+((logh + logm + logl) - MLog) / MLog -> ((Loghml - MLog) / MLog) + ((((logh + logm + logl) - Loghml) / Loghml) * (((Loghml - MLog) / MLog) + 1));
+
+T2hl -> (T2 * ((T2hl - T2) / T2)) + T2;
+T3hl -> (T3 * ((T3hl - T3) / T3)) + T3;
+T4hl -> (T4 * ((T4hl - T4) / T4)) + T4;
+T5hl -> (T5 * ((T5hl - T5) / T5)) + T5;
+T6hl -> (T6 * ((T6hl - T6) / T6)) + T6;
+T7hl -> (T7 * ((T7hl - T7) / T7)) + T7;
+T8hl -> (T8 * ((T8hl - T8) / T8)) + T8;
+T9hl -> (T9 * ((T9hl - T9) / T9)) + T9;
+T10hl -> (T10 * ((T10hl - T10) / T10)) + T10;
+T11hl -> (T11 * ((T11hl - T11) / T11)) + T11;
+T12hl -> (T12 * ((T12hl - T12) / T12)) + T12;
+T13hl -> (T13 * ((T13hl - T13) / T13)) + T13;
+T14hl -> (T14 * ((T14hl - T14) / T14)) + T14;
+
+
+ZSquarehml -> (ZSquare * ((ZSquarehml - ZSquare) / ZSquare)) + ZSquare;
+ZCubehml -> (ZCube * ((ZCubehml - ZCube) / ZCube)) + ZCube;
+HigherPolyMultZhml -> (HigherPolyMultZ * ((HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ)) + HigherPolyMultZ;
+PolyWithSquarehml -> (PolyWithSquare * ((PolyWithSquarehml - PolyWithSquare) / PolyWithSquare)) + PolyWithSquare;
+Polyhml -> (Poly * ((Polyhml - Poly) / Poly)) + Poly;
+
+
+epsilon2 -> epsilon1 + (((zh - Z) / Z) * (epsilon1 + 1));
+epsilon3 -> ((epsilon2 * MT1) / (AccPolyC9hl + MT1)) + (((AccPolyC9hl + T1hl) / (AccPolyC9hl + MT1)) * ((T2hl - T2) / T2));
+epsilon4 -> epsilon3 + (((T3hl - T3) / T3) * (epsilon3 + 1));
+epsilon5 -> ((epsilon4 * MT3) / (AccPolyC8hl + MT3)) + (((AccPolyC8hl + T3hl) / (AccPolyC8hl + MT3)) * ((T4hl - T4) / T4));
+epsilon6 -> epsilon5 + (((T5hl - T5) / T5) * (epsilon5 + 1));
+epsilon7 -> ((epsilon6 * MT5) / (AccPolyC7hl + MT5)) + (((AccPolyC7hl + T5hl) / (AccPolyC7hl + MT5)) * ((T6hl - T6) / T6));
+epsilon8 -> epsilon7 + (((T7hl - T7) / T7) * (epsilon7 + 1));
+epsilon9 -> ((epsilon8 * MT7) / (AccPolyC6hl + MT7)) + (((AccPolyC6hl + T7hl) / (AccPolyC6hl + MT7)) * ((T8hl - T8) / T8));
+epsilon10 -> epsilon9 + (((T9hl - T9) / T9) * (epsilon9 + 1));
+epsilon11 -> ((epsilon10 * MT9) / (AccPolyC5hl + MT9)) + (((AccPolyC5hl + T9hl) / (AccPolyC5hl + MT9)) * ((T10hl - T10) / T10));
+epsilon12 -> epsilon11 + (((T11hl - T11) / T11) * (epsilon11 + 1));
+epsilon13 -> ((epsilon12 * MT11) / (AccPolyC4hl + MT11)) + (((AccPolyC4hl + T11hl) / (AccPolyC4hl + MT11)) * ((T12hl - T12) / T12));
+epsilon14 -> epsilon13 + (((T13hl - T13) / T13) * (epsilon13 + 1));
+epsilon15 -> ((epsilon14 * MT13) / (AccPolyC3hl + MT13)) + (((AccPolyC3hl + T13hl) / (AccPolyC3hl + MT13)) * ((T14hl - T14) / T14));
+epsilon16 -> ((ZSquarehml - MZSquare) / MZSquare) + (((ZCubehml - ZCube) / ZCube) * (((ZSquarehml - MZSquare) / MZSquare) + 1));
+epsilon17 -> epsilon15 + epsilon16 + epsilon15 * epsilon16 + 
+((HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ) * (1 + epsilon15 + epsilon16 + epsilon15 * epsilon16);
+epsilon18 -> (ZSquarehml - MZSquare) / MZSquare;
+epsilon19 -> epsilon21 + (1 + epsilon21) * ((PolyWithSquarehml - PolyWithSquare) / PolyWithSquare);
+epsilon20 -> (((Polyhml - MPoly) / MPoly) + ((MPoly - MLog1pZ) / MLog1pZ)) + (((Polyhml - MPoly) / MPoly) * ((MPoly - MLog1pZ) / MLog1pZ));
+epsilon21 -> ((-0.5 * epsilon18) + (Z * MT14 * epsilon17)) / (-0.5 + (Z * MT14));
+epsilon22 -> epsilon23 + (((Polyhml - Poly) / Poly) * (1+ epsilon23));
+epsilon23 -> epsilon19 * (aux1 / (1 + aux1));
diff --git a/src/crlibm/gappa/log-td/log-td-accurate-E0.gappa b/src/crlibm/gappa/log-td/log-td-accurate-E0.gappa
new file mode 100644
index 0000000..63d6810
--- /dev/null
+++ b/src/crlibm/gappa/log-td/log-td-accurate-E0.gappa
@@ -0,0 +1,213 @@
+
+logih = <float64ne> (_logih);
+logim = <float64ne> (_logim);
+logil = <float64ne> (_logil);
+
+Logihml = logih + logim + logil; #MAPLE
+
+
+accPolyC14 = <float64ne> (_accPolyC14);
+accPolyC13 = <float64ne> (_accPolyC13);
+accPolyC12 = <float64ne> (_accPolyC12);
+accPolyC11 = <float64ne> (_accPolyC11);
+accPolyC10 = <float64ne> (_accPolyC10);
+
+accPolyC9h = <float64ne> (_accPolyC9h);
+accPolyC9l = <float64ne> (_accPolyC9l);
+AccPolyC9hl = accPolyC9h + accPolyC9l; #MAPLE
+accPolyC8h = <float64ne> (_accPolyC8h);
+accPolyC8l = <float64ne> (_accPolyC8l);
+AccPolyC8hl = accPolyC8h + accPolyC8l; #MAPLE
+accPolyC7h = <float64ne> (_accPolyC7h);
+accPolyC7l = <float64ne> (_accPolyC7l);
+AccPolyC7hl = accPolyC7h + accPolyC7l; #MAPLE
+accPolyC6h = <float64ne> (_accPolyC6h);
+accPolyC6l = <float64ne> (_accPolyC6l);
+AccPolyC6hl = accPolyC6h + accPolyC6l; #MAPLE
+accPolyC5h = <float64ne> (_accPolyC5h);
+accPolyC5l = <float64ne> (_accPolyC5l);
+AccPolyC5hl = accPolyC5h + accPolyC5l; #MAPLE
+accPolyC4h = <float64ne> (_accPolyC4h);
+accPolyC4l = <float64ne> (_accPolyC4l);
+AccPolyC4hl = accPolyC4h + accPolyC4l; #MAPLE
+accPolyC3h = <float64ne> (_accPolyC3h);
+accPolyC3l = <float64ne> (_accPolyC3l);
+AccPolyC3hl = accPolyC3h + accPolyC3l; #MAPLE
+
+E = 0; #MAPLE
+
+zh = <float64ne> (Z);
+zl = Z - zh; #MAPLE
+
+highPoly <float64ne> = accPolyC10 + zh * (accPolyC11 + zh * (accPolyC12 + zh * (accPolyC13 + zh * accPolyC14)));
+
+T1hl = zh * highPoly; #MAPLE
+
+T2 = AccPolyC9hl + T1hl; #MAPLE
+T3 = Z * T2hl; #MAPLE
+T4 = AccPolyC8hl + T3hl; #MAPLE
+T5 = Z * T4hl; #MAPLE
+T6 = AccPolyC7hl + T5hl; #MAPLE
+T7 = Z * T6hl; #MAPLE
+T8 = AccPolyC6hl + T7hl; #MAPLE
+T9 = Z * T8hl; #MAPLE
+T10 = AccPolyC5hl + T9hl; #MAPLE
+T11 = Z * T10hl; #MAPLE
+T12 = AccPolyC4hl + T11hl; #MAPLE
+T13 = Z * T12hl; #MAPLE
+T14 = AccPolyC3hl + T13hl; #MAPLE
+
+
+ZSquare = Z * Z; #MAPLE
+ZCube = Z * ZSquarehml; #MAPLE
+HigherPolyMultZ = T14hl * ZCubehml; #MAPLE
+ZSquareHalfhml = -0.5 * ZSquarehml; #MAPLE
+PolyWithSquare = ZSquareHalfhml + HigherPolyMultZhml; #MAPLE
+Poly = Z + PolyWithSquarehml; #MAPLE
+Logy = Logihml + Polyhml; #MAPLE
+
+#We can simplify the proof in this case since we know that adding a triple double which is 
+#equal to 0 exactly is exact.
+
+Loghml = Logyhml; #MAPLE
+
+
+#Mathematical definition of the logarithm
+
+MHighPoly = accPolyC10 + Z * (accPolyC11 + Z * (accPolyC12 + Z * (accPolyC13 + Z * accPolyC14))); #MAPLE
+MT1 = Z * MHighPoly; #MAPLE
+MT2 = AccPolyC9hl + MT1; #MAPLE
+MT3 = Z * MT2; #MAPLE
+MT4 = AccPolyC8hl + MT3; #MAPLE
+MT5 = Z * MT4; #MAPLE
+MT6 = AccPolyC7hl + MT5; #MAPLE
+MT7 = Z * MT6; #MAPLE
+MT8 = AccPolyC6hl + MT7; #MAPLE
+MT9 = Z * MT8; #MAPLE
+MT10 = AccPolyC5hl + MT9; #MAPLE
+MT11 = Z * MT10; #MAPLE
+MT12 = AccPolyC4hl + MT11; #MAPLE
+MT13 = Z * MT12; #MAPLE
+MT14 = AccPolyC3hl + MT13; #MAPLE
+MZSquare = Z * Z; #MAPLE
+MZCube = Z * MZSquare; #MAPLE
+MHigherPolyMultZ = MT14 * MZCube; #MAPLE
+MZSquareHalf = -0.5 * MZSquare; #MAPLE
+MPolyWithSquare = MZSquareHalf + MHigherPolyMultZ; #MAPLE
+MPoly = Z + MPolyWithSquare; #MAPLE
+MLogy = MLogi + MLog1pZ; #MAPLE
+
+#We apply the same simplification here
+
+MLog = MLogy; #MAPLE
+
+
+#Useful additional definitions
+
+delta1 = highPoly - MHighPoly; #MAPLE
+delta2 = T1hl - MT1; #MAPLE
+delta3 = T2hl - MT2; #MAPLE
+delta4 = T3hl - MT3; #MAPLE
+delta5 = T4hl - MT4; #MAPLE
+delta6 = T5hl - MT5; #MAPLE
+delta7 = T6hl - MT6; #MAPLE
+delta8 = T7hl - MT7; #MAPLE
+delta9 = T8hl - MT8; #MAPLE
+delta10 = T9hl - MT9; #MAPLE
+delta11 = T10hl - MT10; #MAPLE
+delta12 = T11hl - MT11; #MAPLE
+delta13 = T12hl - MT12; #MAPLE
+delta14 = T13hl - MT13; #MAPLE
+delta15 = T14hl - MT14; #MAPLE
+delta16 = ZSquarehml - MZSquare; #MAPLE
+delta17 = ZCubehml - MZCube; #MAPLE
+delta18 = HigherPolyMultZhml - MHigherPolyMultZ; #MAPLE
+delta19 = ZSquareHalfhml - MZSquareHalf; #MAPLE
+delta20 = PolyWithSquarehml - MPolyWithSquare; #MAPLE
+delta21 = Polyhml - MPoly; #MAPLE
+delta22 = Logyhml - MLogy; #MAPLE
+delta24 = Loghml - MLog; #MAPLE
+delta25 = Logihml - MLogi; #MAPLE
+delta26 = Polyhml - MLog1pZ; #MAPLE
+
+
+#End additional definitions
+
+{
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (T3hl - T3) / T3 in [-1b-102,1b-102]
+/\ (T4hl - T4) / T4 in [-1b-103,1b-103]
+/\ (T5hl - T5) / T5 in [-1b-102,1b-102]
+/\ (T6hl - T6) / T6 in [-1b-103,1b-103]
+/\ (T7hl - T7) / T7 in [-1b-102,1b-102]
+/\ (T8hl - T8) / T8 in [-1b-103,1b-103]
+/\ (T9hl - T9) / T9 in [-1b-102,1b-102]
+/\ (T10hl - T10) / T10 in [-1b-103,1b-103]
+/\ (T11hl - T11) / T11 in [-1b-102,1b-102]
+/\ (T12hl - T12) / T12 in [-1b-103,1b-103]
+/\ (T13hl - T13) / T13 in [-1b-102,1b-102]
+/\ (T14hl - T14) / T14 in [-1b-103,1b-103]
+/\ (ZSquarehml - ZSquare) / ZSquare in [-1b-149,1b-149]
+/\ (ZCubehml - ZCube) / ZCube in [-1b-144,1b-144]
+/\ (HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ in [-1b-141,1b-141]
+/\ (PolyWithSquarehml - PolyWithSquare) / PolyWithSquare in [-1b-137,1b-137]
+/\ (Polyhml - Poly) / Poly in [-1b-134,1b-134]
+/\ (Logyhml - Logy) / Logy in [-1b-128,1b-128]
+/\ (Logihml - MLogi) / MLogi in [-1b-159,1b-159]
+/\ (MPoly - MLog1pZ) / MLog1pZ in [-_epsilonApproxAccurate,_epsilonApproxAccurate]
+/\ Z in [_zmin,_zmax]
+/\ ((logh + logm + logl) - Loghml) / Loghml in [-1b-159,1b-159]
+->
+((logh + logm + logl) - MLog) / MLog in [-5735b-132,5735b-132]
+}
+
+MLog1pZ -> MPoly * (1 / (((MPoly - MLog1pZ) / MLog1pZ) + 1));
+MLog2 -> Log2hml * (1 / (((Log2hml - MLog2) / MLog2) + 1));
+MLogi -> Logihml * (1 / (((Logihml - MLogi) / MLogi) + 1));
+
+T2hl -> (T2 * ((T2hl - T2) / T2)) + T2;
+T3hl -> (T3 * ((T3hl - T3) / T3)) + T3;
+T4hl -> (T4 * ((T4hl - T4) / T4)) + T4;
+T5hl -> (T5 * ((T5hl - T5) / T5)) + T5;
+T6hl -> (T6 * ((T6hl - T6) / T6)) + T6;
+T7hl -> (T7 * ((T7hl - T7) / T7)) + T7;
+T8hl -> (T8 * ((T8hl - T8) / T8)) + T8;
+T9hl -> (T9 * ((T9hl - T9) / T9)) + T9;
+T10hl -> (T10 * ((T10hl - T10) / T10)) + T10;
+T11hl -> (T11 * ((T11hl - T11) / T11)) + T11;
+T12hl -> (T12 * ((T12hl - T12) / T12)) + T12;
+T13hl -> (T13 * ((T13hl - T13) / T13)) + T13;
+T14hl -> (T14 * ((T14hl - T14) / T14)) + T14;
+
+ZSquarehml -> (ZSquare * ((ZSquarehml - ZSquare) / ZSquare)) + ZSquare;
+ZCubehml -> (ZCube * ((ZCubehml - ZCube) / ZCube)) + ZCube;
+HigherPolyMultZhml -> (HigherPolyMultZ * ((HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ)) + HigherPolyMultZ;
+PolyWithSquarehml -> (PolyWithSquare * ((PolyWithSquarehml - PolyWithSquare) / PolyWithSquare)) + PolyWithSquare;
+Polyhml -> (Poly * ((Polyhml - Poly) / Poly)) + Poly;
+Logyhml -> (Logy * ((Logyhml - Logy) / Logy)) + Logy;
+
+
+delta3 -> delta2 + (T2 * ((T2hl - T2) / T2));
+delta4 -> Z * delta3 + T3 * ((T3hl - T3) / T3);
+delta5 -> delta4 + (T4 * ((T4hl - T4) / T4));
+delta6 -> Z * delta5 + T5 * ((T5hl - T5) / T5);
+delta7 -> delta6 + (T6 * ((T6hl - T6) / T6));
+delta8 -> Z * delta7 + T7 * ((T7hl - T7) / T7);
+delta9 -> delta8 + (T8 * ((T8hl - T8) / T8));
+delta10 -> Z * delta9 + T9 * ((T9hl - T9) / T9);
+delta11 -> delta10 + (T10 * ((T10hl - T10) / T10));
+delta12 -> Z * delta11 + T11 * ((T11hl - T11) / T11);
+delta13 -> delta12 + (T12 * ((T12hl - T12) / T12));
+delta14 -> Z * delta13 + T13 * ((T13hl - T13) / T13);
+delta15 -> delta14 + (T14 * ((T14hl - T14) / T14));
+delta16 -> Z*Z*((ZSquarehml - ZSquare) / ZSquare);
+delta17 -> Z * delta16 + ZCube * ((ZCubehml - ZCube) / ZCube);
+delta18 -> delta15 * delta17 + delta15 * MZCube + delta17 * MT14 + 
+		HigherPolyMultZ * ((HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ);
+delta20 -> delta19 + delta18 + PolyWithSquare * ((PolyWithSquarehml - PolyWithSquare) / PolyWithSquare);
+delta21 -> delta20 + Poly * ((Polyhml - Poly) / Poly);
+delta22 -> delta25 + delta26 + Logy * ((Logyhml - Logy) / Logy);
+delta26 -> delta21 + MLog1pZ * ((MPoly - MLog1pZ) / MLog1pZ);
+
+
+((logh + logm + logl) - MLog) / MLog -> ((Loghml - MLog) / MLog) + ((((logh + logm + logl) - Loghml) / Loghml) * (((Loghml - MLog) / MLog) + 1));
diff --git a/src/crlibm/gappa/log-td/log-td-accurate.gappa b/src/crlibm/gappa/log-td/log-td-accurate.gappa
new file mode 100644
index 0000000..772b23a
--- /dev/null
+++ b/src/crlibm/gappa/log-td/log-td-accurate.gappa
@@ -0,0 +1,217 @@
+
+log2h = <float64ne> (_log2h);
+log2m = <float64ne> (_log2m);
+log2l = <float64ne> (_log2l);
+
+Log2hml = log2h + log2m + log2l; #MAPLE
+
+logih = <float64ne> (_logih);
+logim = <float64ne> (_logim);
+logil = <float64ne> (_logil);
+
+Logihml = logih + logim + logil; #MAPLE
+
+
+accPolyC14 = <float64ne> (_accPolyC14);
+accPolyC13 = <float64ne> (_accPolyC13);
+accPolyC12 = <float64ne> (_accPolyC12);
+accPolyC11 = <float64ne> (_accPolyC11);
+accPolyC10 = <float64ne> (_accPolyC10);
+
+accPolyC9h = <float64ne> (_accPolyC9h);
+accPolyC9l = <float64ne> (_accPolyC9l);
+AccPolyC9hl = accPolyC9h + accPolyC9l; #MAPLE
+accPolyC8h = <float64ne> (_accPolyC8h);
+accPolyC8l = <float64ne> (_accPolyC8l);
+AccPolyC8hl = accPolyC8h + accPolyC8l; #MAPLE
+accPolyC7h = <float64ne> (_accPolyC7h);
+accPolyC7l = <float64ne> (_accPolyC7l);
+AccPolyC7hl = accPolyC7h + accPolyC7l; #MAPLE
+accPolyC6h = <float64ne> (_accPolyC6h);
+accPolyC6l = <float64ne> (_accPolyC6l);
+AccPolyC6hl = accPolyC6h + accPolyC6l; #MAPLE
+accPolyC5h = <float64ne> (_accPolyC5h);
+accPolyC5l = <float64ne> (_accPolyC5l);
+AccPolyC5hl = accPolyC5h + accPolyC5l; #MAPLE
+accPolyC4h = <float64ne> (_accPolyC4h);
+accPolyC4l = <float64ne> (_accPolyC4l);
+AccPolyC4hl = accPolyC4h + accPolyC4l; #MAPLE
+accPolyC3h = <float64ne> (_accPolyC3h);
+accPolyC3l = <float64ne> (_accPolyC3l);
+AccPolyC3hl = accPolyC3h + accPolyC3l; #MAPLE
+
+E = 1; #MAPLE
+
+zh = <float64ne> (Z);
+zl = Z - zh; #MAPLE
+
+highPoly <float64ne> = accPolyC10 + zh * (accPolyC11 + zh * (accPolyC12 + zh * (accPolyC13 + zh * accPolyC14)));
+
+T1hl = zh * highPoly; #MAPLE
+
+T2 = AccPolyC9hl + T1hl; #MAPLE
+T3 = Z * T2hl; #MAPLE
+T4 = AccPolyC8hl + T3hl; #MAPLE
+T5 = Z * T4hl; #MAPLE
+T6 = AccPolyC7hl + T5hl; #MAPLE
+T7 = Z * T6hl; #MAPLE
+T8 = AccPolyC6hl + T7hl; #MAPLE
+T9 = Z * T8hl; #MAPLE
+T10 = AccPolyC5hl + T9hl; #MAPLE
+T11 = Z * T10hl; #MAPLE
+T12 = AccPolyC4hl + T11hl; #MAPLE
+T13 = Z * T12hl; #MAPLE
+T14 = AccPolyC3hl + T13hl; #MAPLE
+
+
+ZSquare = Z * Z; #MAPLE
+ZCube = Z * ZSquarehml; #MAPLE
+HigherPolyMultZ = T14hl * ZCubehml; #MAPLE
+ZSquareHalfhml = -0.5 * ZSquarehml; #MAPLE
+PolyWithSquare = ZSquareHalfhml + HigherPolyMultZhml; #MAPLE
+Poly = Z + PolyWithSquarehml; #MAPLE
+Logy = Logihml + Polyhml; #MAPLE
+Log2edhml = E * Log2hml; #MAPLE
+Logover = Log2edhml + Logyhml; #MAPLE
+
+
+#Mathematical definition of the logarithm
+
+MHighPoly = accPolyC10 + Z * (accPolyC11 + Z * (accPolyC12 + Z * (accPolyC13 + Z * accPolyC14))); #MAPLE
+MT1 = Z * MHighPoly; #MAPLE
+MT2 = AccPolyC9hl + MT1; #MAPLE
+MT3 = Z * MT2; #MAPLE
+MT4 = AccPolyC8hl + MT3; #MAPLE
+MT5 = Z * MT4; #MAPLE
+MT6 = AccPolyC7hl + MT5; #MAPLE
+MT7 = Z * MT6; #MAPLE
+MT8 = AccPolyC6hl + MT7; #MAPLE
+MT9 = Z * MT8; #MAPLE
+MT10 = AccPolyC5hl + MT9; #MAPLE
+MT11 = Z * MT10; #MAPLE
+MT12 = AccPolyC4hl + MT11; #MAPLE
+MT13 = Z * MT12; #MAPLE
+MT14 = AccPolyC3hl + MT13; #MAPLE
+MZSquare = Z * Z; #MAPLE
+MZCube = Z * MZSquare; #MAPLE
+MHigherPolyMultZ = MT14 * MZCube; #MAPLE
+MZSquareHalf = -0.5 * MZSquare; #MAPLE
+MPolyWithSquare = MZSquareHalf + MHigherPolyMultZ; #MAPLE
+MPoly = Z + MPolyWithSquare; #MAPLE
+MLogy = MLogi + MLog1pZ; #MAPLE
+MLog2E = E * MLog2; #MAPLE
+MLog = MLog2E + MLogy; #MAPLE
+
+
+#Useful additional definitions
+
+delta1 = highPoly - MHighPoly; #MAPLE
+delta2 = T1hl - MT1; #MAPLE
+delta3 = T2hl - MT2; #MAPLE
+delta4 = T3hl - MT3; #MAPLE
+delta5 = T4hl - MT4; #MAPLE
+delta6 = T5hl - MT5; #MAPLE
+delta7 = T6hl - MT6; #MAPLE
+delta8 = T7hl - MT7; #MAPLE
+delta9 = T8hl - MT8; #MAPLE
+delta10 = T9hl - MT9; #MAPLE
+delta11 = T10hl - MT10; #MAPLE
+delta12 = T11hl - MT11; #MAPLE
+delta13 = T12hl - MT12; #MAPLE
+delta14 = T13hl - MT13; #MAPLE
+delta15 = T14hl - MT14; #MAPLE
+delta16 = ZSquarehml - MZSquare; #MAPLE
+delta17 = ZCubehml - MZCube; #MAPLE
+delta18 = HigherPolyMultZhml - MHigherPolyMultZ; #MAPLE
+delta19 = ZSquareHalfhml - MZSquareHalf; #MAPLE
+delta20 = PolyWithSquarehml - MPolyWithSquare; #MAPLE
+delta21 = Polyhml - MPoly; #MAPLE
+delta22 = Logyhml - MLogy; #MAPLE
+delta23 = Log2edhml - MLog2E; #MAPLE
+delta24 = Loghml - MLog; #MAPLE
+delta25 = Logihml - MLogi; #MAPLE
+delta26 = Polyhml - MLog1pZ; #MAPLE
+
+
+#End additional definitions
+
+{
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (T3hl - T3) / T3 in [-1b-102,1b-102]
+/\ (T4hl - T4) / T4 in [-1b-103,1b-103]
+/\ (T5hl - T5) / T5 in [-1b-102,1b-102]
+/\ (T6hl - T6) / T6 in [-1b-103,1b-103]
+/\ (T7hl - T7) / T7 in [-1b-102,1b-102]
+/\ (T8hl - T8) / T8 in [-1b-103,1b-103]
+/\ (T9hl - T9) / T9 in [-1b-102,1b-102]
+/\ (T10hl - T10) / T10 in [-1b-103,1b-103]
+/\ (T11hl - T11) / T11 in [-1b-102,1b-102]
+/\ (T12hl - T12) / T12 in [-1b-103,1b-103]
+/\ (T13hl - T13) / T13 in [-1b-102,1b-102]
+/\ (T14hl - T14) / T14 in [-1b-103,1b-103]
+/\ (ZSquarehml - ZSquare) / ZSquare in [-1b-149,1b-149]
+/\ (ZCubehml - ZCube) / ZCube in [-1b-144,1b-144]
+/\ (HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ in [-1b-141,1b-141]
+/\ (PolyWithSquarehml - PolyWithSquare) / PolyWithSquare in [-1b-137,1b-137]
+/\ (Polyhml - Poly) / Poly in [-1b-134,1b-134]
+/\ (Logyhml - Logy) / Logy in [-1b-128,1b-128]
+/\ (Loghml - Logover) / Logover in [-1b-123,1b-123]
+/\ (Log2hml - MLog2) / MLog2 in [-1b-126,1b-126]
+/\ (Logihml - MLogi) / MLogi in [-1b-159,1b-159]
+/\ (MPoly - MLog1pZ) / MLog1pZ in [-_epsilonApproxAccurate,_epsilonApproxAccurate]
+/\ Z in [_zmin,_zmax]
+/\ ((logh + logm + logl) - Loghml) / Loghml in [-1b-159,1b-159]
+->
+((logh + logm + logl) - MLog) / MLog in [-5735b-132,5735b-132]
+}
+
+MLog1pZ -> MPoly * (1 / (((MPoly - MLog1pZ) / MLog1pZ) + 1));
+MLog2 -> Log2hml * (1 / (((Log2hml - MLog2) / MLog2) + 1));
+MLogi -> Logihml * (1 / (((Logihml - MLogi) / MLogi) + 1));
+
+T2hl -> (T2 * ((T2hl - T2) / T2)) + T2;
+T3hl -> (T3 * ((T3hl - T3) / T3)) + T3;
+T4hl -> (T4 * ((T4hl - T4) / T4)) + T4;
+T5hl -> (T5 * ((T5hl - T5) / T5)) + T5;
+T6hl -> (T6 * ((T6hl - T6) / T6)) + T6;
+T7hl -> (T7 * ((T7hl - T7) / T7)) + T7;
+T8hl -> (T8 * ((T8hl - T8) / T8)) + T8;
+T9hl -> (T9 * ((T9hl - T9) / T9)) + T9;
+T10hl -> (T10 * ((T10hl - T10) / T10)) + T10;
+T11hl -> (T11 * ((T11hl - T11) / T11)) + T11;
+T12hl -> (T12 * ((T12hl - T12) / T12)) + T12;
+T13hl -> (T13 * ((T13hl - T13) / T13)) + T13;
+T14hl -> (T14 * ((T14hl - T14) / T14)) + T14;
+
+ZSquarehml -> (ZSquare * ((ZSquarehml - ZSquare) / ZSquare)) + ZSquare;
+ZCubehml -> (ZCube * ((ZCubehml - ZCube) / ZCube)) + ZCube;
+HigherPolyMultZhml -> (HigherPolyMultZ * ((HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ)) + HigherPolyMultZ;
+PolyWithSquarehml -> (PolyWithSquare * ((PolyWithSquarehml - PolyWithSquare) / PolyWithSquare)) + PolyWithSquare;
+Polyhml -> (Poly * ((Polyhml - Poly) / Poly)) + Poly;
+Logyhml -> (Logy * ((Logyhml - Logy) / Logy)) + Logy;
+
+
+delta3 -> delta2 + (T2 * ((T2hl - T2) / T2));
+delta4 -> Z * delta3 + T3 * ((T3hl - T3) / T3);
+delta5 -> delta4 + (T4 * ((T4hl - T4) / T4));
+delta6 -> Z * delta5 + T5 * ((T5hl - T5) / T5);
+delta7 -> delta6 + (T6 * ((T6hl - T6) / T6));
+delta8 -> Z * delta7 + T7 * ((T7hl - T7) / T7);
+delta9 -> delta8 + (T8 * ((T8hl - T8) / T8));
+delta10 -> Z * delta9 + T9 * ((T9hl - T9) / T9);
+delta11 -> delta10 + (T10 * ((T10hl - T10) / T10));
+delta12 -> Z * delta11 + T11 * ((T11hl - T11) / T11);
+delta13 -> delta12 + (T12 * ((T12hl - T12) / T12));
+delta14 -> Z * delta13 + T13 * ((T13hl - T13) / T13);
+delta15 -> delta14 + (T14 * ((T14hl - T14) / T14));
+delta16 -> Z*Z*((ZSquarehml - ZSquare) / ZSquare);
+delta17 -> Z * delta16 + ZCube * ((ZCubehml - ZCube) / ZCube);
+delta18 -> delta15 * delta17 + delta15 * MZCube + delta17 * MT14 + 
+		HigherPolyMultZ * ((HigherPolyMultZhml - HigherPolyMultZ) / HigherPolyMultZ);
+delta20 -> delta19 + delta18 + PolyWithSquare * ((PolyWithSquarehml - PolyWithSquare) / PolyWithSquare);
+delta21 -> delta20 + Poly * ((Polyhml - Poly) / Poly);
+delta22 -> delta25 + delta26 + Logy * ((Logyhml - Logy) / Logy);
+delta26 -> delta21 + MLog1pZ * ((MPoly - MLog1pZ) / MLog1pZ);
+delta24 -> delta23 + delta22 + Logover * ((Loghml - Logover) / Logover);
+
+((logh + logm + logl) - MLog) / MLog -> ((Loghml - MLog) / MLog) + ((((logh + logm + logl) - Loghml) / Loghml) * (((Loghml - MLog) / MLog) + 1));
\ No newline at end of file
diff --git a/src/crlibm/gappa/log-td/log-td.gappa b/src/crlibm/gappa/log-td/log-td.gappa
new file mode 100644
index 0000000..6125fb1
--- /dev/null
+++ b/src/crlibm/gappa/log-td/log-td.gappa
@@ -0,0 +1,156 @@
+
+
+
+log2h = <float64ne> (_log2h);
+log2m = <float64ne> (_log2m);
+log2l = <float64ne> (_log2l);
+
+c3 = <float64ne> (_c3);
+c4 = <float64ne> (_c4);
+c5 = <float64ne> (_c5);
+c6 = <float64ne> (_c6);
+c7 = <float64ne> (_c7);
+
+
+E = 1; #MAPLE
+
+logih = <float64ne> (_logih);
+logim = <float64ne> (_logim);
+logil = <float64ne> (_logil);
+
+
+zh = <float64ne> (Z);
+zl = Z - zh; #MAPLE
+
+polyHorner <float64ne>= c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+
+ZhSquarehl = zh * zh; #MAPLE
+zhSquareh = <float64ne> (ZhSquarehl);
+zhSquarel = <float64ne> (ZhSquarehl - zhSquareh);
+
+zhSquareHalfh = zhSquareh * (-0.5); #MAPLE
+zhSquareHalfl = zhSquarel * (-0.5); #MAPLE
+ZhSquareHalfhl = ZhSquarehl * (-0.5); #MAPLE
+
+polyUpper <float64ne>= polyHorner * (zh * zhSquareh);
+
+
+temp = <float64ne> (zh * zl);
+T1hl = polyUpper - temp; #MAPLE
+t1h = <float64ne> (T1hl);
+t1l = <float64ne> (T1hl - t1h);
+
+T2 = Z + ZhSquareHalfhl; #MAPLE
+t2h = <float64ne> (T2hl);
+t2l = <float64ne> (T2hl - t2h);
+
+PE = T2hl + T1hl; #MAPLE
+ph = <float64ne> (Phl);
+pl = <float64ne> (Phl - ph);
+
+Log2hed = E * log2h; #MAPLE
+Log2med = E * log2m; #MAPLE
+
+Log2edhm = Log2hed + Log2med; #MAPLE
+log2edh = <float64ne> (Log2edhm);
+log2edl = <float64ne> (Log2edhm - log2edh);
+
+#Useful additional definitions
+Log2hm = log2h + log2m; #MAPLE
+Logihm = logih + logim; #MAPLE
+#End additional
+
+LogTabPoly = Logihm + Phl; #MAPLE
+logTabPolyh = <float64ne> (LogTabPolyhl);
+logTabPolyl = <float64ne> (LogTabPolyhl - logTabPolyh);
+
+LogE = Log2edhm + LogTabPolyhl; #MAPLE
+logh = <float64ne> (Loghm);
+logm = <float64ne> (Loghm - logh);
+
+#Mathematical definition of the logarithm and the polynomial
+
+Phigher = (c3 + Z * (c4 + Z * (c5 + Z * (c6 + Z * c7)))); #MAPLE
+ZZZ = Z*Z*Z; #MAPLE
+ZZZPhigher = ZZZ * Phigher; #MAPLE
+HZZ = (-0.5*Z*Z); #MAPLE
+ZpHZZ = Z + HZZ; #MAPLE
+P = ZpHZZ + ZZZPhigher; #MAPLE
+Log2E = E * Log2; #MAPLE
+Log1pZpTab = Log1pZ + Logir; #MAPLE
+Log = Log2E + Log1pZpTab; #MAPLE
+
+# Useful additional definitions
+
+HZZsimp = HZZ + (zh * zl); #MAPLE
+ZpHZZsimp = Z + HZZsimp; #MAPLE
+ZZZPhigherPzhzl = ZZZPhigher - zh * zl; #MAPLE
+zhCube = zh * zhSquareh; #MAPLE
+
+delta1 = T2hl - T2; #MAPLE
+delta2 = polyUpper - (polyHorner * zhCube); #MAPLE
+delta3 = zhCube - ZZZ; #MAPLE
+delta4 = Phl - PE; #MAPLE
+delta5 = Loghm - LogE; #MAPLE
+delta6 = P - Log1pZ; #MAPLE
+delta7 = LogTabPolyhl - LogTabPoly; #MAPLE
+
+# End additional
+
+
+{
+(T2hl - T2) / T2 in [-1b-103,1b-103]
+/\ (Phl - PE) / PE in [-1b-103,1b-103]
+/\ (LogTabPolyhl - LogTabPoly) / LogTabPoly in [-1b-103,1b-103]
+/\ (Loghm - LogE) / LogE in [-1b-103,1b-103]
+/\ (Log2hm - Log2) / Log2 in [-1b-84,1b-84]
+/\ (Logihm - Logir) / Logir in [-1b-106,1b-106]
+/\ Z in [_zmin,_zmax]
+/\ (P - Log1pZ) / Log1pZ in [-_epsilonApproxQuick,_epsilonApproxQuick]
+/\ ((logh + logm) - Loghm) / Loghm in [-1b-106,1b-106]
+->
+((logh + logm) - Log) / Log in [-5b-65,5b-65]
+}
+
+T2hl - T2 -> ((T2hl - T2) / T2) * T2;
+T2hl -> (T2hl - T2) + T2;
+
+Phl - PE -> ((Phl - PE) / PE) * PE;
+Phl -> (Phl - PE) + PE;
+
+
+LogTabPolyhl -> (LogTabPolyhl - LogTabPoly) + LogTabPoly;
+
+Loghm -> (Loghm - LogE) + LogE;
+
+Log2 -> Log2hm * (1 / (((Log2hm - Log2) / Log2) + 1));
+
+Logir -> Logihm * (1 / (((Logihm - Logir) / Logir) + 1));
+
+
+LogTabPolyhl - LogTabPoly -> ((LogTabPolyhl - LogTabPoly) / LogTabPoly) * LogTabPoly;
+
+HZZsimp -> (-0.5 * zh * zh) - (0.5 * zl * zl);
+
+T2hl - ZpHZZsimp -> (0.5 * zl * zl) + delta1;
+
+zhCube - ZZZ -> (Z * (zhSquareh - Z * Z)) - (zl * zhSquareh);
+
+polyUpper - ZZZPhigher -> ZZZ * (polyHorner - Phigher) + polyHorner * delta3 + delta2;
+
+ZpHZZ + ZZZPhigher -> ZpHZZsimp + ZZZPhigherPzhzl;
+
+Phl - P -> (T2hl - ZpHZZsimp) + (T1hl - ZZZPhigherPzhzl) + delta4;
+
+Log1pZ -> P * (1 / (((P - Log1pZ) / Log1pZ) + 1));
+P - Log1pZ -> ((P - Log1pZ) / Log1pZ) * Log1pZ;
+
+Phl - Log1pZ -> (Phl - P) + delta6;
+
+LogTabPolyhl - Log1pZpTab -> (Logihm - Logir) + (Phl - Log1pZ) + delta7;
+
+Loghm - Log -> (Log2edhm - Log2E) + (LogTabPolyhl - Log1pZpTab) + delta5;
+
+(logh + logm) - Loghm -> (((logh + logm) - Loghm) / Loghm) * Loghm;
+
+(logh + logm) - Log -> ((logh + logm) - Loghm) + (Loghm - Log);
\ No newline at end of file
diff --git a/src/crlibm/gappa/sqrt-proof.sh b/src/crlibm/gappa/sqrt-proof.sh
new file mode 100755
index 0000000..d69e619
--- /dev/null
+++ b/src/crlibm/gappa/sqrt-proof.sh
@@ -0,0 +1,10 @@
+#/bin/bash
+
+
+GAPPA=~/schorle/gappa/src/gappa
+
+echo Proving error bound on sqrt12...
+sed -f sqrt.sed sqrt12.gappa | $GAPPA
+echo Proving error bound on sqrt13...
+sed -f sqrt.sed sqrt13.gappa | $GAPPA
+
diff --git a/src/crlibm/gappa/sqrt.sed b/src/crlibm/gappa/sqrt.sed
new file mode 100644
index 0000000..2285e03
--- /dev/null
+++ b/src/crlibm/gappa/sqrt.sed
@@ -0,0 +1,8 @@
+s/_epsilonApprox/3.19769311343973090277659766935447078312230091629790e-03/g
+s/_ERecSqrtmMin/7.07000000000000000000000000000000000000000000000000e-01/g
+s/_ERecSqrtmMax/1.41430000000000000000000000000000000000000000000000e+00/g
+s/_SQRTPOLYC0/2.50385236695888790947606139525305479764938354492188e+00/g
+s/_SQRTPOLYC1/-3.29763389114324168005509818613063544034957885742188e+00/g
+s/_SQRTPOLYC2/2.75726076139124520736345402838196605443954467773438e+00/g
+s/_SQRTPOLYC3/-1.15233725777933848632983426796272397041320800781250e+00/g
+s/_SQRTPOLYC4/1.86900066679800969104974228685023263096809387207031e-01/g
diff --git a/src/crlibm/gappa/sqrt12.gappa b/src/crlibm/gappa/sqrt12.gappa
new file mode 100644
index 0000000..1dbb840
--- /dev/null
+++ b/src/crlibm/gappa/sqrt12.gappa
@@ -0,0 +1,183 @@
+#@ -Eprecision=108
+
+# In this Gappa file, the mathematical values are not
+# marked with a leading M but with a leading E (for exact)
+# The reason is that we have already variables starting
+# with the letter M
+
+
+# Rounding operators and sequences definition
+
+ at double = float<ieee_64,ne>;
+ at Add22 = add_rel<102>;
+ at Mul22 = mul_rel<102>;
+
+
+# Instantiating of constants
+SQRTPOLYC0 = double(_SQRTPOLYC0);
+SQRTPOLYC1 = double(_SQRTPOLYC1);
+SQRTPOLYC2 = double(_SQRTPOLYC2);
+SQRTPOLYC3 = double(_SQRTPOLYC3);
+SQRTPOLYC4 = double(_SQRTPOLYC4);
+
+
+# Definition of what is a sqrt 
+# We start with the reciprocal square root. The square root is its reciprocal. 
+# The reduced argument m is the square of its root.
+
+ESqrtm = 1 / ERecSqrtm;
+m = ESqrtm * ESqrtm;
+ERecM = 1 / m;
+
+# Translation of the code
+r0 double= SQRTPOLYC0 + m * (SQRTPOLYC1 + m * (SQRTPOLYC2 + m * (SQRTPOLYC3 + m * SQRTPOLYC4)));
+
+r1 double= (1/2) * r0 * (3 - m * (r0 * r0));
+r2 double= (1/2) * r1 * (3 - m * (r1 * r1));
+
+R2Sqhl = r2 * r2;
+R2PHr2hl = (3/2) * r2;
+
+MMr2hl = m * r2;
+
+MMr2Chl = Mul22(MMr2hl, R2Sqhl);
+
+MHmMr2Chl = -(1/2) * MMr2Chl;
+
+R3hl = Add22(R2PHr2hl, MHmMr2Chl);
+
+R3Sqhl = Mul22(R3hl,R3hl);
+
+MMr3Sqhl = Mul22(m,R3Sqhl);
+
+# The next translation of the code is correct only if we can prove that 
+# mMr3Sqh is exactly 1 in each case
+# We show this below
+
+T1 = 1 + -(1/2) * (MMr3Sqhl - 1);                    
+
+R4hl = Mul22(R3hl,T1);
+
+Srtmhl = Mul22(m,R4hl);
+
+# Show that mMr3Sqh is exactly 1 in each case
+# We round the double-double result MMr3Sqhl to double 
+# precision and show that the result is in the singleton
+# interval [1,1]
+
+mMr3Sqh = double(MMr3Sqhl);
+
+# Mathematical equivalents (marked with E for exact)
+
+Er0 = SQRTPOLYC0 + m * (SQRTPOLYC1 + m * (SQRTPOLYC2 + m * (SQRTPOLYC3 + m * SQRTPOLYC4)));
+
+Er1 = (1/2) * Er0 * (3 - m * (Er0 * Er0));
+Er2 = (1/2) * Er1 * (3 - m * (Er1 * Er1));
+
+#Definition of the errors
+
+epsilon = (Srtmhl - ESqrtm) / ESqrtm;
+
+epsilonApproxMath0 = (Er0 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxMath1 = (Er1 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxMath2 = (Er2 - ERecSqrtm) / ERecSqrtm;
+
+epsilonApproxArith0 = (r0 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith1 = (r1 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith2 = (r2 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith3 = (R3hl - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith4 = (R4hl - ERecSqrtm) / ERecSqrtm;
+
+epsilon0 = (r0 - Er0) / Er0;
+epsilon1 = (r1 - Er1) / Er1;
+epsilon2 = (r2 - Er2) / Er2;
+
+epsilon3 = ((R2PHr2hl + MHmMr2Chl) - ERecSqrtm) / ERecSqrtm;
+epsilon4 = ((R3hl * T1) - ERecSqrtm) / ERecSqrtm;
+
+epsilon5 = ((T1 - 3/2) - (-1/2 * m * R3hl * R3hl)) / (-1/2 * m * R3hl * R3hl);
+epsilon6 = (MMr3Sqhl - (m * (R3hl * R3hl))) / (m * (R3hl * R3hl));
+
+epsilon7 = (R3Sqhl - ERecM) / ERecM;
+epsilon8 = (MMr3Sqhl - 1) / 1;
+
+epsilon9 = ((R3hl * R3hl) - ERecM) / ERecM;
+epsilon10 = ((m * R3Sqhl) - 1) / 1;
+
+epsilon11 = ((m * R4hl) - ESqrtm) / ESqrtm;
+
+epsilonOp0 = (MMr2Chl - (MMr2hl * R2Sqhl)) / (MMr2hl * R2Sqhl);
+epsilonOp1 = (R3hl - (R2PHr2hl + MHmMr2Chl)) / (R2PHr2hl + MHmMr2Chl);
+epsilonOp2 = (R3Sqhl - (R3hl * R3hl)) / (R3hl * R3hl);
+epsilonOp3 = (MMr3Sqhl - (m * R3Sqhl)) / (m * R3Sqhl);
+epsilonOp4 = (R4hl - (R3hl * T1)) / (R3hl * T1);
+epsilonOp5 = (Srtmhl - (m * R4hl)) / (m * R4hl);
+
+
+#Logical implication to prove
+
+{
+(
+   ERecSqrtm in [_ERecSqrtmMin,_ERecSqrtmMax]
+/\ epsilonApproxMath0 in [-_epsilonApprox,_epsilonApprox]
+)
+->
+(
+   epsilon in [-1b-100,1b-100]               # Accuracy bound
+/\ mMr3Sqh in [1,1]                          # For showing that mMr3Sqh is always equal to 1 (see above)
+)
+}
+
+# Hints for bounding the variables in the code (not the errors)
+
+Er0 -> ERecSqrtm * epsilonApproxMath0 + ERecSqrtm;
+Er1 -> ERecSqrtm * epsilonApproxMath1 + ERecSqrtm;
+Er2 -> ERecSqrtm * epsilonApproxMath2 + ERecSqrtm;
+
+r0 -> Er0 * epsilon0 + Er0;
+r1 -> Er1 * epsilon1 + Er1;
+r2 -> Er2 * epsilon2 + Er2;
+
+(R2PHr2hl + MHmMr2Chl) -> ERecSqrtm * epsilon3 + ERecSqrtm;
+
+MMr3Sqhl -> 1 + epsilon8;
+
+
+# Hints for the Newton iteration
+
+epsilonApproxMath1 -> -3/2 * epsilonApproxMath0 * epsilonApproxMath0 - 
+                      1/2 * epsilonApproxMath0 * epsilonApproxMath0 * epsilonApproxMath0;
+
+epsilonApproxMath2 -> -3/2 * epsilonApproxMath1 * epsilonApproxMath1 - 
+                      1/2 * epsilonApproxMath1 * epsilonApproxMath1 * epsilonApproxMath1;
+
+
+# Hints for the Newton iteration with integrated arithmetical errors
+
+epsilon3 -> -3/2 * epsilonApproxArith2 * epsilonApproxArith2 
+            -1/2 * epsilonApproxArith2 * epsilonApproxArith2 * epsilonApproxArith2 
+            -1/2 * epsilonOp0 
+            -3/2 * epsilonApproxArith2 * epsilonOp0 
+            -3/2 * epsilonApproxArith2 * epsilonApproxArith2 * epsilonOp0
+            -1/2 * epsilonApproxArith2 * epsilonApproxArith2 * epsilonApproxArith2 * epsilonOp0;
+
+epsilon5 -> epsilon6;
+
+epsilon4 -> -3/2 * epsilonApproxArith3 * epsilonApproxArith3
+            -1/2 * epsilonApproxArith3 * epsilonApproxArith3 * epsilonApproxArith3
+            -1/2 * epsilon5
+            -3/2 * epsilon5 * epsilonApproxArith3
+            -3/2 * epsilon5 * epsilonApproxArith3 * epsilonApproxArith3
+            -1/2 * epsilon5 * epsilonApproxArith3 * epsilonApproxArith3 * epsilonApproxArith3;
+
+epsilon9 -> 2 * epsilonApproxArith3 + epsilonApproxArith3 * epsilonApproxArith3;
+
+epsilon10 -> epsilon7;
+
+epsilon11 -> epsilonApproxArith4;
+
+# Meta-Hints
+
+r0 ~ Er0;
+r1 ~ Er1;
+r2 ~ Er2;
diff --git a/src/crlibm/gappa/sqrt13.gappa b/src/crlibm/gappa/sqrt13.gappa
new file mode 100644
index 0000000..66f6f49
--- /dev/null
+++ b/src/crlibm/gappa/sqrt13.gappa
@@ -0,0 +1,222 @@
+#@ -Eprecision=108
+
+# In this Gappa file, the mathematical values are not
+# marked with a leading M but with a leading E (for exact)
+# The reason is that we have already variables starting
+# with the letter M
+
+
+# Rounding operators and sequences definition
+
+ at double = float<ieee_64,ne>;
+ at Add22 = add_rel<102>;
+ at Mul22 = mul_rel<102>;
+
+
+# Instantiating of constants
+SQRTPOLYC0 = double(_SQRTPOLYC0);
+SQRTPOLYC1 = double(_SQRTPOLYC1);
+SQRTPOLYC2 = double(_SQRTPOLYC2);
+SQRTPOLYC3 = double(_SQRTPOLYC3);
+SQRTPOLYC4 = double(_SQRTPOLYC4);
+
+
+# Definition of what is a sqrt 
+# We start with the reciprocal square root. The square root is its reciprocal. 
+# The reduced argument m is the square of its root.
+
+ESqrtm = 1 / ERecSqrtm;
+m = ESqrtm * ESqrtm;
+ERecM = 1 / m;
+
+# Translation of the code
+r0 double= SQRTPOLYC0 + m * (SQRTPOLYC1 + m * (SQRTPOLYC2 + m * (SQRTPOLYC3 + m * SQRTPOLYC4)));
+
+r1 double= (1/2) * r0 * (3 - m * (r0 * r0));
+r2 double= (1/2) * r1 * (3 - m * (r1 * r1));
+
+R2Sqhl = r2 * r2;
+R2PHr2hl = (3/2) * r2;
+
+MMr2hl = m * r2;
+
+MMr2Chl = Mul22(MMr2hl, R2Sqhl);
+
+MHmMr2Chl = -(1/2) * MMr2Chl;
+
+R3hl = Add22(R2PHr2hl, MHmMr2Chl);
+
+R3Sqhl = Mul22(R3hl,R3hl);
+
+MMr3Sqhl = Mul22(m,R3Sqhl);
+
+# The next translation of the code is correct only if we can prove that 
+# mMr3Sqh is exactly 1 in each case
+# We show this below
+
+T1 = 1 + -(1/2) * (MMr3Sqhl - 1);                    
+
+R4hl = Mul22(R3hl,T1);
+
+R4Sqhml = mul_rel<149>(R4hl,R4hl);
+
+MMr4Sqhml = mul_rel<148>(m,R4Sqhml);
+
+# The next translation of the code is correct only if we can prove that 
+# mMr4Sqh is exactly 1 in each case
+# We show this below
+
+T2 = 1 + -(1/2) * (MMr4Sqhml - 1);
+
+R5hml = mul_rel<148>(R4hl,T2);
+                                                                                             
+Srtmhml = mul_rel<148>(m,R5hml);
+
+
+# Show that mMr3Sqh and mMr4Sqh are exactly 1 in each case
+# We round the double-double and triple-double results MMr3Sqhl
+# and MMr3Sqhml to double precision and show that the rounding 
+# result is in the singleton interval [1,1]
+
+mMr3Sqh = double(MMr3Sqhl);
+mMr4Sqh = double(MMr4Sqhml);
+
+# Mathematical equivalents (marked with E for exact)
+
+Er0 = SQRTPOLYC0 + m * (SQRTPOLYC1 + m * (SQRTPOLYC2 + m * (SQRTPOLYC3 + m * SQRTPOLYC4)));
+
+Er1 = (1/2) * Er0 * (3 - m * (Er0 * Er0));
+Er2 = (1/2) * Er1 * (3 - m * (Er1 * Er1));
+
+#Definition of the errors
+
+epsilon = (Srtmhml - ESqrtm) / ESqrtm;
+
+epsilonApproxMath0 = (Er0 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxMath1 = (Er1 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxMath2 = (Er2 - ERecSqrtm) / ERecSqrtm;
+
+epsilonApproxArith0 = (r0 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith1 = (r1 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith2 = (r2 - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith3 = (R3hl - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith4 = (R4hl - ERecSqrtm) / ERecSqrtm;
+epsilonApproxArith5 = (R5hml - ERecSqrtm) / ERecSqrtm;
+
+epsilon0 = (r0 - Er0) / Er0;
+epsilon1 = (r1 - Er1) / Er1;
+epsilon2 = (r2 - Er2) / Er2;
+
+epsilon3 = ((R2PHr2hl + MHmMr2Chl) - ERecSqrtm) / ERecSqrtm;
+epsilon4 = ((R3hl * T1) - ERecSqrtm) / ERecSqrtm;
+
+epsilon5 = ((T1 - 3/2) - (-1/2 * m * R3hl * R3hl)) / (-1/2 * m * R3hl * R3hl);
+epsilon6 = (MMr3Sqhl - (m * (R3hl * R3hl))) / (m * (R3hl * R3hl));
+
+epsilon7 = (R3Sqhl - ERecM) / ERecM;
+epsilon8 = (MMr3Sqhl - 1) / 1;
+
+epsilon9 = ((R3hl * R3hl) - ERecM) / ERecM;
+epsilon10 = ((m * R3Sqhl) - 1) / 1;
+epsilon11 = ((T2 - 3/2) - (-1/2 * m * R4hl * R4hl)) / (-1/2 * m * R4hl * R4hl);
+epsilon12 = (MMr4Sqhml - (m * (R4hl * R4hl))) / (m * (R4hl * R4hl));
+
+epsilon13 = ((R4hl * T2) - ERecSqrtm) / ERecSqrtm;
+
+epsilon14 = (MMr4Sqhml - 1) / 1;
+epsilon15 = (R4Sqhml - ERecM) / ERecM;
+epsilon16 = ((R4hl * R4hl) - ERecM) / ERecM;
+epsilon17 = ((m * R4Sqhml) - 1) / 1;
+
+epsilon18 = ((m * R5hml) - ESqrtm) / ESqrtm;
+
+epsilonOp0 = (MMr2Chl - (MMr2hl * R2Sqhl)) / (MMr2hl * R2Sqhl);
+epsilonOp1 = (R3hl - (R2PHr2hl + MHmMr2Chl)) / (R2PHr2hl + MHmMr2Chl);
+epsilonOp2 = (R3Sqhl - (R3hl * R3hl)) / (R3hl * R3hl);
+epsilonOp3 = (MMr3Sqhl - (m * R3Sqhl)) / (m * R3Sqhl);
+epsilonOp4 = (R4hl - (R3hl * T1)) / (R3hl * T1);
+epsilonOp5 = (R4Sqhml - (R4hl * R4hl)) / (R4hl * R4hl);
+epsilonOp6 = (MMr4Sqhml - (m * R4Sqhml)) / (m * R4Sqhml);
+epsilonOp7 = (R5hml - (R4hl * T2)) / (R4hl * T2);
+
+#Logical implication to prove
+
+{
+(
+   ERecSqrtm in [_ERecSqrtmMin,_ERecSqrtmMax]
+/\ epsilonApproxMath0 in [-_epsilonApprox,_epsilonApprox]
+)
+->
+(
+   epsilon in [-1b-146,1b-146]               # Accuracy bound
+/\ mMr3Sqh in [1,1]                          # For showing that mMr3Sqh is always equal to 1 (see above)
+/\ mMr4Sqh in [1,1]                          # For showing that mMr4Sqh is always equal to 1 (see above)
+)
+}
+
+# Hints for bounding the variables in the code (not the errors)
+
+Er0 -> ERecSqrtm * epsilonApproxMath0 + ERecSqrtm;
+Er1 -> ERecSqrtm * epsilonApproxMath1 + ERecSqrtm;
+Er2 -> ERecSqrtm * epsilonApproxMath2 + ERecSqrtm;
+
+r0 -> Er0 * epsilon0 + Er0;
+r1 -> Er1 * epsilon1 + Er1;
+r2 -> Er2 * epsilon2 + Er2;
+
+(R2PHr2hl + MHmMr2Chl) -> ERecSqrtm * epsilon3 + ERecSqrtm;
+
+MMr3Sqhl -> 1 + epsilon8;
+MMr4Sqhml -> 1 + epsilon14;
+
+# Hints for the Newton iteration
+
+epsilonApproxMath1 -> -3/2 * epsilonApproxMath0 * epsilonApproxMath0 - 
+                      1/2 * epsilonApproxMath0 * epsilonApproxMath0 * epsilonApproxMath0;
+
+epsilonApproxMath2 -> -3/2 * epsilonApproxMath1 * epsilonApproxMath1 - 
+                      1/2 * epsilonApproxMath1 * epsilonApproxMath1 * epsilonApproxMath1;
+
+
+# Hints for the Newton iteration with integrated arithmetical errors
+
+epsilon3 -> -3/2 * epsilonApproxArith2 * epsilonApproxArith2 
+            -1/2 * epsilonApproxArith2 * epsilonApproxArith2 * epsilonApproxArith2 
+            -1/2 * epsilonOp0 
+            -3/2 * epsilonApproxArith2 * epsilonOp0 
+            -3/2 * epsilonApproxArith2 * epsilonApproxArith2 * epsilonOp0
+            -1/2 * epsilonApproxArith2 * epsilonApproxArith2 * epsilonApproxArith2 * epsilonOp0;
+
+epsilon5 -> epsilon6;
+
+epsilon4 -> -3/2 * epsilonApproxArith3 * epsilonApproxArith3
+            -1/2 * epsilonApproxArith3 * epsilonApproxArith3 * epsilonApproxArith3
+            -1/2 * epsilon5
+            -3/2 * epsilon5 * epsilonApproxArith3
+            -3/2 * epsilon5 * epsilonApproxArith3 * epsilonApproxArith3
+            -1/2 * epsilon5 * epsilonApproxArith3 * epsilonApproxArith3 * epsilonApproxArith3;
+
+epsilon9 -> 2 * epsilonApproxArith3 + epsilonApproxArith3 * epsilonApproxArith3;
+
+epsilon10 -> epsilon7;
+
+epsilon11 -> epsilon12;
+
+epsilon13 -> -3/2 * epsilonApproxArith4 * epsilonApproxArith4
+             -1/2 * epsilonApproxArith4 * epsilonApproxArith4 * epsilonApproxArith4
+             -1/2 * epsilon11
+             -3/2 * epsilon11 * epsilonApproxArith4
+             -3/2 * epsilon11 * epsilonApproxArith4 * epsilonApproxArith4
+             -1/2 * epsilon11 * epsilonApproxArith4 * epsilonApproxArith4 * epsilonApproxArith4;
+
+epsilon16 -> 2 * epsilonApproxArith4 + epsilonApproxArith4 * epsilonApproxArith4;
+
+epsilon17 -> epsilon15;
+
+epsilon18 -> epsilonApproxArith5;
+
+# Meta-Hints
+
+r0 ~ Er0;
+r1 ~ Er1;
+r2 ~ Er2;
diff --git a/src/crlibm/gappa/trigos/SinCosCase3.gappa b/src/crlibm/gappa/trigos/SinCosCase3.gappa
new file mode 100644
index 0000000..d0402fc
--- /dev/null
+++ b/src/crlibm/gappa/trigos/SinCosCase3.gappa
@@ -0,0 +1,216 @@
+# Usage: You need to set the constants cah, cal, sah, sal. Running the trigo.mpl Maple script
+# should create 64 files in maple/TEMPTRIG, which can be tested independently as 
+#    sed -f    ../maple/TEMPTRIG/SinACosA_1.sed  trigoSinCosCase3.gappa | ~/gappa/src/gappa > /dev/null
+
+# NOTATION CONVENTION 
+# Variables that correspond to double-precision variables in the code begin with a small letter
+# Other variables begin with a capital letter.
+# Variables that will be replaced with Maple-computed constants begin with an underscore
+# Otherwise avoid underscores as they are painful to carry on to LaTeX :)
+
+
+# Rounding operators and sequences definition
+
+ at IEEEdouble = float<ieee_64,ne>;
+
+
+# polynomial coefficients, computed by Maple
+s3 = IEEEdouble(_s3);
+s5 = IEEEdouble(_s5);
+s7 = IEEEdouble(_s7);
+c2 = IEEEdouble(_c2);
+c4 = IEEEdouble(_c4);
+c6 = IEEEdouble(_c6);
+
+# Table values, computed by Maple
+cah = IEEEdouble(_cah);
+cal = IEEEdouble(_cal);
+sah = IEEEdouble(_sah);
+sal = IEEEdouble(_sal);
+
+# The variables used here:
+# x input
+# My perfect reduced argument
+# Yhl = yh+yl, his distance to My is specified as an hypothesis 
+# Mts perfect ts
+# Mtc perfect tc
+# Msinx exact result for sin(x)
+# Msina, Mcosa perfect sin(kPi/256) and cos(kPi/256)
+
+
+yh = IEEEdouble(Yhl);
+yl = Yhl - yh;
+
+#######################################################################
+
+# First, a transcription of the actual computation, which could (and
+# should eventually) be generated automatically from the actual code
+
+# ---------------------Code shared by sin and cos, cut from ComputeTrigWithArgRed : 
+yh2 IEEEdouble=  yh * yh;
+ts  IEEEdouble=  yh2 * (s3 + yh2*(s5 + yh2*s7));
+tc  IEEEdouble=  yh2 * (c2 + yh2*(c4 + yh2*c6));
+
+# ---------------------Code for the sine, cut from DosinNotZero: 
+# Mul12(&cahyh_h,&cahyh_l, cah, yh);
+cahyh = cah * yh;
+cahyh_h = IEEEdouble(cahyh);
+cahyh_l = cahyh - cahyh_h;    # Exact equation because Mul12 is exact
+
+# Add12(thi, tlo, sah, cahyh_h);
+TSin = sah + cahyh_h;
+thiSin = IEEEdouble(TSin);
+tloSin1 = TSin - thiSin;          # Exact equation because Add12 is exact
+
+# Rem: need to Rename tlo to tloSin1, and its second use to tloSin2.
+# It would be safer to translate code to single-assignment before
+# using Gappa, modern compilers won't make any difference.
+
+#  tlo = tc*sah+(ts*cahyh_h+(sal+(tlo+(cahyh_l+(cal*yh + cah*yl))))) ;
+tloSin2 IEEEdouble= tc*sah + (ts*cahyh_h + (sal + (tloSin1 + (cahyh_l + (cal*yh + cah*yl)))));
+
+# Add12(*reshi, *reslo, thi, tlo);
+ResSinhilo = thiSin + tloSin2; # we don't need to split it for the proof.
+
+
+# ---------------------Code for the cos, cut from DoCosNotZero: 
+#  Mul12(&sahyh_h,&sahyh_l, sah, yh);			            
+sahyh = sah * yh;
+sahyh_h = IEEEdouble(sahyh);
+sahyh_l = sahyh - sahyh_h;    # Exact equation because Mul12 is exact
+
+#  Add12(thi, tlo,  cah, -sahyh_h);			            
+TCos = cah - sahyh_h;
+thiCos = IEEEdouble(TCos);
+tloCos1 = TCos - thiCos; # Exact equation because Add12 is exact
+
+#  tlo = tc*sah+(ts*cahyh_h+(sal+(tlo+(cahyh_l+(cal*yh + cah*yl))))) ;
+tloCos2 IEEEdouble= tc*cah-(ts*sahyh_h-(cal+(tloCos1-(sahyh_l+(sal*yh+sah*yl))))) ; 
+
+#  Add12(*pch, *pcl,    thi, tlo);                                   
+ResCoshilo = thiCos + tloCos2;   # No need to split it for the proof.
+
+
+#######################################################################
+
+#Definitions of the mathematical objects
+
+#------------------------------------- 
+#With these notations, the exact sine and cosine are given by these
+#exact mathematical formulae
+
+Msinx =  Msiny * Mcosa  +  Mcosy * Msina;
+Mcosx =  Mcosy * Mcosa  -  Msiny * Msina;
+
+# Now let us pile up layers of approximations
+#-------------------------------------
+# yh2 is an approximation to :
+My2 = My*My;
+# through three layers: 
+# 1/    Yhl=yh+hl = My +/- delta_ArgRed  : in the hypotheses below
+# 2/    yh = Yhl - yl                       : already written
+# 3/    rounding error in the mult          : already written       
+
+#-------------------------------------
+# ts is an approximation to :
+Mts = My2 * (s3 + My2*(s5 + My2*s7));
+# through two layers: 
+# 1/ the approximation y2 of My2        : done just above
+# 2/ the rounding errors in Horner         : already written
+
+#-------------------------------------
+PolySinY = My * (1 + Mts);
+# PolySinY is an approximation to sin(My) as expressed in the hypotheses below :
+#  PolySinY - Msiny in [-0.24126e-23, 0.24126e-23]     # delta_approx_Sin_Case3
+
+#-------------------------------------
+# Same for PolyCosY
+Mtc = My2 * (c2 +(My2 * (c4 + (My2 * c6))));
+PolyCosY = 1 + Mtc;
+
+#------------------------------------- 
+#tc is an approximation to Mtc through the rounding errors, defined
+#in the definition of tc. Same for ts
+
+#-------------------------------------
+# SinReconstrExact is an approximation to ResSinhilo 
+SinReconstrExact = PolySinY * Mcosa  +  PolyCosY * Msina ;
+
+# The delta between ResSinhilo and SinReconstrExact is due to the two
+# mathematical poly approx, and has been defined just above
+CosReconstrExact = PolyCosY * Mcosa  -  PolySinY * Msina ;
+
+#-------------------------------------
+# The reconstruction approximates the following
+SinReconstrNoRound = Yhl*(1 + ts)*(cah+cal) + (1 + tc)*(sah+sal);
+# where Yhl is an approximation to Y
+#       ts is an approximation to Mts
+#       tc is an approximation to Mtc : all already described
+# All what we still need to express is that the actual computation will neglect some terms
+CosReconstrNoRound = ( (1 + tc) * (cah+cal)   -  Yhl * (1 + ts)  * (sah+sal) );
+
+#-------------------------------------
+# tloSin2 is an approximation to TloSin2NoRound (because of rounding error in the operations, already described) 
+TloSin2NoRound = tc*sah+(ts*cahyh_h+(sal+(tloSin1+(cahyh_l+(cal*yh+cah*yl))))) ;
+TloCos2NoRound = tc*cah-(ts*sahyh_h-(cal+(tloCos1-(sahyh_l+(sal*yh+sah*yl)))));
+
+#  tloSinNoRound is an approximation to SinReconstrNoRound - tSinhi, the
+#  difference being the neglected terms. This error will be given as an hint
+
+NeglectedSinTerms = SinReconstrNoRound - (thiSin + TloSin2NoRound);
+NeglectedCosTerms = CosReconstrNoRound - (thiCos + TloCos2NoRound);
+
+# And finally, ResSinhilo is an approximation to Msinx through many layers which are given in the hints.
+
+###########################################################################################
+#  The theorem to prove
+{
+#    (Yhl in [-_ymaxCase3, -1b-200]    \/   Yhl in [-1b-200, _ymaxCase3])                            # computed by Maple
+     Yhl in [-_ymaxCase3, _ymaxCase3]                            # computed by Maple
+ /\ Yhl - My in         [-_delta_ArgRed,  _delta_ArgRed]                         # computed by Maple
+ /\ PolySinY - Msiny in [-_delta_approx_Sin_Case3,  _delta_approx_Sin_Case3]     # computed by Maple
+ /\ PolyCosY - Mcosy in [-_delta_approx_Cos_Case3,  _delta_approx_Cos_Case3]     # computed by Maple
+ /\ Msina-sah-sal in [-1b-104, 1b-104] 
+ /\ Mcosa-cah-cal in [-1b-104, 1b-104] # double-double absolute rounding error, with margin
+
+ -> 
+(ResSinhilo - Msinx)/Msinx in    [-3b-66,3b-66]
+/\ 
+(ResCoshilo - Mcosx)/Mcosx in   [-3b-66,3b-66]
+}
+
+
+###########################################################################################
+# Hints to the reduction engine: Gappa is not supposed to be clever, it's an assistant 
+
+# To get bounds on Msinx, try ResSinhilo
+Msinx -> ResSinhilo - (ResSinhilo - Msinx);
+Mcosx -> ResCoshilo - (ResCoshilo - Mcosx);
+
+# To get bounds on Msina, try sah+sal
+Msina -> sah + sal + (Msina - sah - sal);
+Mcosa -> cah + cal + (Mcosa - cah - cal);
+
+# To get bounds on My, try Yhl
+ My ->  Yhl - (Yhl - My); 
+
+# One layer of approx error, and one layer of rounding error for Msiny and Mcosy
+1 + tc - Mcosy   ->   (1 + tc - PolyCosY) + (PolyCosY - Mcosy);
+(My + My * ts) - Msiny ->   ((My + My * ts) - PolySinY) + (PolySinY - Msiny);
+
+# Layers of approximations
+ResSinhilo - Msinx ->  (ResSinhilo - SinReconstrNoRound) + (SinReconstrNoRound - SinReconstrExact) + (SinReconstrExact - Msinx);
+ResCoshilo - Mcosx ->  (ResCoshilo - CosReconstrNoRound) + (CosReconstrNoRound - CosReconstrExact) + (CosReconstrExact - Mcosx);
+
+NeglectedSinTerms ->  sal*tc + cal*yl + ts*(cahyh_l + cah*yl + cal*yh + cal*yl); 
+ResSinhilo - SinReconstrNoRound -> (ResSinhilo - (thiSin + TloSin2NoRound)) - (SinReconstrNoRound    -  (thiSin + TloSin2NoRound)) ;
+
+NeglectedCosTerms ->  cal*tc - sal*yl - ts*(sahyh_l + sah*yl + sal*yh + sal*yl); 
+ResCoshilo - CosReconstrNoRound -> (ResCoshilo - (thiCos + TloCos2NoRound)) - (CosReconstrNoRound    -  (thiCos + TloCos2NoRound)) ;
+
+
+
+Yhl*(1 + ts)*(cah+cal) - PolySinY * Mcosa ->  (Yhl*(1 + ts)- PolySinY)*(cah+cal) -  PolySinY*(Mcosa - cah - cal) ;
+(1 + tc) * (cah+cal) - PolyCosY * Mcosa   ->  ((1 + tc)- PolyCosY) * (cah+cal)   - PolyCosY * (Mcosa - cah -cal);
+(1 + tc)*(sah+sal) -   PolyCosY * Msina   ->  ((1 + tc)- PolyCosY) * (sah+sal)   - PolyCosY * (Msina - sah -sal);
+
diff --git a/src/crlibm/gappa/trigos/SinZero.gappa b/src/crlibm/gappa/trigos/SinZero.gappa
new file mode 100644
index 0000000..b83beaa
--- /dev/null
+++ b/src/crlibm/gappa/trigos/SinZero.gappa
@@ -0,0 +1,190 @@
+# test with   gappa -Munconstrained < sin.gappa
+# The proof is not complete, as it doesn't work without -Munconstrained.
+# What it means is that Gappa is unable to prove that some denominators are not null.
+# It's OK to me but it takes some more work to get a formal proof.
+
+ at IEEEdouble = float<ieee_64,ne>;
+# Convention 1: uncapitalized variables match the variables in the C code. Other variables begin with a capital letter
+# Convention 2: variables beginning with "M" are mathematical ideal
+
+# yh+yl is a double-double (call it Yhl)
+
+
+yh = IEEEdouble(Yhl);
+yl = Yhl-yh;
+
+
+# The following, along with one hypothesis, ensures that yl is a double, too.
+dummyZero = IEEEdouble(yl)-yl;
+
+
+#--------------- Transcription of the C code --------------------------
+
+s3 = IEEEdouble(-1.6666666666666665741480812812369549646974e-01); 
+s5 = IEEEdouble(8.3333333333333332176851016015461937058717e-03); 
+s7 = IEEEdouble(-1.9841269841269841252631711547849135968136e-04);
+
+yh2 IEEEdouble=  yh * yh;
+ts  IEEEdouble=  yh2 * (s3 + yh2*(s5 + yh2*s7));
+r   IEEEdouble=  yl + yh*ts;
+s             =  yh + r;   # no rounding, it is the Fast2Sum 
+
+#-------- Mathematical definition of what we are approximating --------
+
+
+My2 = My*My;
+Mts = My2 * (s3 + My2*(s5 + My2*s7));
+PolySinY = My + My*Mts;
+
+
+
+
+
+ 
+
+epsargred = (Yhl - My)/My;
+epstotal = (s - SinY)/SinY;
+epsapprox = (PolySinY - SinY)/SinY;
+epsround = (s - PolySinY)/PolySinY;
+
+
+
+# Layers of approximation on s
+S1 = yh + (yl + IEEEdouble(yh*ts));   # remove last round
+S2 = yh + (yl + yh*ts);               # remove penultimate round
+S3 = (yh+yl) + (yh+yl)*ts;            # put yl back in
+
+eps1 = (s-S1)/S1;
+eps2 = (S1-S2)/S2;
+eps3 = (S2-S3)/S3;
+eps4 = (S3-PolySinY)/PolySinY;
+
+
+yhts = IEEEdouble(yh*ts);             # just to make the hints lighter
+p3 IEEEdouble=  s3 + yh2*(s5 + yh2*s7);  # idem
+
+
+tsNoRound = yh2 * (s3 + yh2*(s5 + yh2*s7));
+
+epsy2 = (yh2-My2)/My2;
+epsy2_argred = (Yhl*Yhl-My2)/My2;
+epsy2_negl_yl = (yh*yh-Yhl*Yhl)/(Yhl*Yhl);
+epsy2_rnd = (yh2-yh*yh)/(yh*yh);
+
+
+#----------------------  The theorem to prove --------------------------
+{
+  # Hypotheses 
+    (Yhl in [1b-200, 6.29e-03] \/  Yhl in [ -6.29e-03, -1b-200])
+         # lower bound guaranteed by Kahan-Douglas algorithm
+ /\ epsargred in [-2.53e-23, 2.53e-23] 
+ /\ epsapprox in [-2.26e-24, 2.26e-24] 
+ /\ (yl in [1b-200, 6.29e-03] \/ yl in [-6.29e-03, -1b-200])
+ /\ dummyZero in [0, 0]
+
+-> 
+
+#goal to prove
+   epstotal in ?# [-1b-67, 1b-67]
+#/\ |s| in ? # At the moment it contains zero
+}
+
+
+# Yes, it takes one definition, one hypothesis and one hint to manage a double-double input.
+yl -> IEEEdouble(yl) - dummyZero;
+
+
+# First, some hints for epsy2
+
+# Combination of three relative errors 
+epsy2 -> epsy2_negl_yl + epsy2_rnd + epsy2_argred 
+	+ epsy2_negl_yl*epsy2_rnd + epsy2_negl_yl*epsy2_argred + epsy2_rnd*epsy2_argred
+	+ epsy2_negl_yl*epsy2_rnd*epsy2_argred;
+
+# Rewriting hint to remove decorrelation 
+epsy2_argred ->  #  (epsargred+1)*(epsargred+1) - 1;
+                    epsargred*(epsargred + 2);
+
+# Another one
+epsy2_negl_yl ->  # (yh*yh-(Yhl*Yhl))/(Yhl*Yhl);
+                  # (yh*yh-((yh+yl)*(yh+yl))) / ((yh+yl)*(yh+yl));
+                  # (-2*yh*yl -yl*yl) / (yh*yh + 2*yh*yl + yl*yl);
+                    (-2*yl -yl*yl/yh) / (yh + 2*yl + yl*yl/yh) ;
+
+
+
+# Now the hints for epsround
+
+s~S1;
+S1~S2;
+S2~S3;
+S3~PolySinY;
+
+eps4 -> #  (S3-PolySinY)/PolySinY;
+#   S3/PolySinY - 1;
+#   ((yh+yl) + (yh+yl)*ts) / (My + My*Mts)  - 1;
+#   ((yh+yl)/My) * (1+ts)/(1+Mts)  - 1;
+#   (epsargred+1) * (1+ts)/(1+Mts)  - 1;
+#    epsargred * (1+ts)/(1+Mts)   +  1 * (1+ts)/(1+Mts)  - 1;
+#    epsargred * (1+ts)/(1+Mts)   +  (ts-Mts)/(1+Mts);
+   epsargred * (1+ts)/(1+Mts)   +  Mts*((ts-Mts)/Mts) / (1+Mts);
+
+# Now we just need to bound ts-Mts: 
+ts ~ tsNoRound;
+(tsNoRound - Mts)/Mts -> 
+#     yh2/My2  * (s3 + yh2*(s5 + yh2*s7)) / (s3 + My2*(s5 + My2*s7))  - 1 ;
+      (1+epsy2)  * (s3 + yh2*(s5 + yh2*s7)) / (s3 + My2*(s5 + My2*s7)) -1;
+# Now we just need to express My2 in terms of yh2 and epsy2
+My2 -> yh2/(1+epsy2);
+
+
+
+eps3 -> #(S2-S3)/S3 
+#  S2/S3 - 1; 
+#   (yh + (yl + yh*ts)) / ((yh+yl) + (yh+yl)*ts)   - 1 ;
+#   ((yh+yl) + (yh+yl)*ts - yl*ts) / ((yh+yl) + (yh+yl)*ts)   - 1 ;
+#    - yl*ts / ((yh+yl) + (yh+yl)*ts)   ;
+#    - (yl/Yhl)  * (ts / (1+ts))   ;
+     ((yh-Yhl)/Yhl)  * (ts / (1+ts))   ; # change sign to have the expression of a rounding error
+
+
+eps2 -> # (S1-S2)/S2; 
+#   (yh + (yl + IEEEdouble(yh*ts))) / (yh + (yl + yh*ts))   -1 ;
+#   (IEEEdouble(yh*ts) - yh*ts) / (yh + yl + yh*ts) ;
+#   ((IEEEdouble(yh*ts) - yh*ts)/(yh*ts)) / ( (yh+yl)/(yh*ts) + 1 ) ;
+#    ts * ((IEEEdouble(yh*ts) - yh*ts)/(yh*ts)) / ( 1 + yl/yh + ts ) ; # Almost OK, just the denominator is poorly bounded
+    ts * ((IEEEdouble(yh*ts) - yh*ts)/(yh*ts)) / ( 1/(1+(yh-Yhl)/Yhl) + ts ) ; 
+
+
+yl/yh -> - ((yh-Yhl)/Yhl) / (1+(yh-Yhl)/Yhl);
+
+yhts/yh -> ts*((yhts-yh*ts)/(yh*ts) + 1);
+
+
+# !here the most difficult bit. 
+#eps1 -> #(s-S1)/S1;
+#   (IEEEdouble(yl+yhts) - (yl+yhts)) / (yh + yl + yhts);
+# First make a rounding error appear at the numerator, and factor yh in the denominator, using the hints for  yh/yl and yhts/yh below
+#    ((IEEEdouble(yl+yhts) - (yl+yhts))/((yl+yhts)) )  * (yl/yh + yhts/yh) / (1 + yl/yh + yhts/yh);
+# Now denominator is OK, problem is that numerator needs a proof that yl+yhts is not equal to zero. 
+
+
+(yl+yhts)/yh -> yl/yh + yhts/yh;
+
+
+ 
+
+#Hints for epstotal
+
+epstotal  -> epsapprox + epsround + epsapprox*epsround;
+
+
+
+
+# The following are hints added to remove the -Munconstrained
+
+PolySinY -> My*(1+Mts);
+
+# To show that s doesn't go through zero, we have to make a correlation appear between yl and yh in the sum below:
+#s ->   yh +  IEEEdouble(yl + IEEEdouble(yh*ts));
+s ->   yh * (1+  IEEEdouble(yl + IEEEdouble(yh*ts) )/yh );
diff --git a/src/crlibm/gappa/trigos/TanCase2.gappa b/src/crlibm/gappa/trigos/TanCase2.gappa
new file mode 100644
index 0000000..58da455
--- /dev/null
+++ b/src/crlibm/gappa/trigos/TanCase2.gappa
@@ -0,0 +1,73 @@
+# Usage: You need to replace a few constants (beginning by _) by numerical
+# values. Running the trigo.mpl Maple script will generate a
+# TEMPTRIG/tanCase2.sed sed script that does it.
+# Then sed -f TEMPTRIG/TanCase2.sed trigoTanCase2.gappa | gappa  > /dev/null
+
+
+# NOTATION CONVENTION 
+# Variables that correspond to double-precision variables in the code begin with a small letter
+# Other variables begin with a capital letter.
+# Otherwise avoid underscores as they are painful to carry on to LaTeX :)
+
+
+
+# Definition of the polynomial constants:
+t11 = <float64ne>(_t11);
+t9  = <float64ne>(_t9);
+t7  = <float64ne>(_t7);
+t5  = <float64ne>(_t5);
+t3h = <float64ne>(_t3h);
+t3l = <float64ne>(_t3l);
+
+#######################################################################
+
+# First, a transcription of the actual computation, which could (and
+# should eventually) be generated automatically from the actual code
+
+# ---------------------Code cut from tan_rn : 
+#    x2 = x*x;
+x2 <float64ne>= x * x;
+X2 = x*x;
+
+#    p5 = t5 + x2*(t7 + x2*(t9 + x2*t11));
+p5 <float64ne>= t5 + x2*(t7 + x2*(t9 + x2*t11));
+P5            = t5 + X2*(t7 + X2*(t9 + X2*t11));
+
+#    tt = x2*(t3h + (t3l + x2*p5));
+tt <float64ne>= x2*(t3h + (t3l + x2*p5));
+Tt            = X2*(t3h + (t3l + X2*p5));
+
+#    Add12(rri.rh, rri.rl, x, x*tt);   
+rdd = x + <float64ne>(x*tt);  # The Add12 is exact
+
+Poly = x+x*Tt;
+
+epsilon=(rdd - TanX)/TanX;
+
+{
+    x in [1b-30, _xmax]
+ /\ (Poly - TanX)/TanX in [-_maxEpsApprox, _maxEpsApprox]
+ /\ ((Poly - TanX)/TanX)/x in [-_maxEpsApproxOverX, _maxEpsApproxOverX]
+
+->  
+
+epsilon in ?
+/\
+epsilon/x in  [-1b-56,1b-56] 
+ 
+}
+
+# Use a dichotomy on x to get an interval of epsilon/x
+epsilon/x $ x;
+
+# The usual hint for relative errors, with an additional /x*x so that Gappa uses the Maple-computed mathematical bound
+(rdd - TanX)/TanX -> (rdd - Poly)/Poly  + (((Poly - TanX)/TanX)/x)*x + ((rdd - Poly)/Poly) * ((Poly - TanX)/TanX) ; 
+
+(rdd - Poly)/Poly  ->  ((<float64ne>(x*tt) - x*Tt) / x) * (x/Poly);
+
+# I'm not sure I understand why this one improves the result
+(<float64ne>(x*tt) - x*Tt)/x -> ((<float64ne>(x*tt) - x*tt)/(x*tt)) * tt   +  (tt - Tt);  
+
+# Easy hints
+x/Poly -> 1/(Poly/x);
+Poly/x -> 1+Tt;
diff --git a/src/crlibm/gappa/trigpi/cospi-accurate.gappa b/src/crlibm/gappa/trigpi/cospi-accurate.gappa
new file mode 100644
index 0000000..51fdacc
--- /dev/null
+++ b/src/crlibm/gappa/trigpi/cospi-accurate.gappa
@@ -0,0 +1,148 @@
+# The polynomial to implement is: 1b0 + ((x^(1b1)) * ((-50044839772224400049002264095087b-103) + ((x^(1b1)) * (10290057726411619042605446323595b-101 + ((x^(1b1)) * ((-3006744454127613b-51) + ((x^(1b1)) * (4239339756765869b-54 + ((x^(1b1)) * (-7438313106810207b-58))))))))))
+# The polynomial implemented is: 1b0 + ((x^(1b1)) * ((-50044839772224400049002264095087b-103) + ((x^(1b1)) * (10290057726411619042605446323595b-101 + ((x^(1b1)) * ((-3006744454127613b-51) + ((x^(1b1)) * (4239339756765869b-54 + ((x^(1b1)) * (-7438313106810207b-58))))))))))
+# The domain is [-1b-8;1b-8]
+# The free variable x is a double precision number, the result cospiprecise_res* is stored on a triple-double number.
+# The code produces 17 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+cospiprecise_coeff_0h = double(1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00);
+
+cospiprecise_coeff_2h = double(-4.93480220054467899615247006295248866081237792968750000000000000000000000000000000e+00);
+cospiprecise_coeff_2m = double(-3.13264775437072047133490817894057799839785556899468543790021612949203699827194214e-16);
+cospiprecise_coeff_2hm = cospiprecise_coeff_2h + cospiprecise_coeff_2m;
+
+cospiprecise_coeff_4h = double(4.05871212641676848420502210501581430435180664062500000000000000000000000000000000e+00);
+cospiprecise_coeff_4m = double(-2.66019969731660223662555032718185048048635055542576743903282476821914315223693848e-16);
+cospiprecise_coeff_4hm = cospiprecise_coeff_4h + cospiprecise_coeff_4m;
+
+cospiprecise_coeff_6h = double(-1.33526276885458949905682857206556946039199829101562500000000000000000000000000000e+00);
+
+cospiprecise_coeff_8h = double(2.35330630358513925859398341344785876572132110595703125000000000000000000000000000e-01);
+
+cospiprecise_coeff_10h = double(-2.58068327360992909313974763563237502239644527435302734375000000000000000000000000e-02);
+
+cospiprecise_x_0_pow2hm = xh * xh;
+cospiprecise_x_0_pow2h = double(cospiprecise_x_0_pow2hm);
+cospiprecise_x_0_pow2m = cospiprecise_x_0_pow2hm - cospiprecise_x_0_pow2h;
+
+cospiprecise_t_1_0h = cospiprecise_coeff_10h;
+
+cospiprecise_t_2_0h = double(cospiprecise_t_1_0h * cospiprecise_x_0_pow2h);
+cospiprecise_t_3_0h = double(cospiprecise_coeff_8h + cospiprecise_t_2_0h);
+cospiprecise_t_4_0h = double(cospiprecise_t_3_0h * cospiprecise_x_0_pow2h);
+cospiprecise_t_5_0hm = cospiprecise_coeff_6h + cospiprecise_t_4_0h;
+cospiprecise_t_5_0h = double(cospiprecise_t_5_0hm);
+cospiprecise_t_5_0m = cospiprecise_t_5_0hm - cospiprecise_t_5_0h;
+
+cospiprecise_t_6_0hm = fma_rel<100>(cospiprecise_t_5_0hm,cospiprecise_x_0_pow2hm,cospiprecise_coeff_4hm);
+cospiprecise_t_6_0h = double(cospiprecise_t_6_0hm);
+cospiprecise_t_6_0m = cospiprecise_t_6_0hm - cospiprecise_t_6_0h;
+
+cospiprecise_t_7_0hm = fma_rel<100>(cospiprecise_t_6_0hm,cospiprecise_x_0_pow2hm,cospiprecise_coeff_2hm);
+cospiprecise_t_7_0h = double(cospiprecise_t_7_0hm);
+cospiprecise_t_7_0m = cospiprecise_t_7_0hm - cospiprecise_t_7_0h;
+
+cospiprecise_t_8_0hm = mul_rel<102>(cospiprecise_t_7_0hm,cospiprecise_x_0_pow2hm);
+cospiprecise_t_8_0h = double(cospiprecise_t_8_0hm);
+cospiprecise_t_8_0m = cospiprecise_t_8_0hm - cospiprecise_t_8_0h;
+
+cospiprecise_t_9_0hml = add_rel<159>(cospiprecise_coeff_0h,cospiprecise_t_8_0hm);
+cospiprecise_t_9_0ml = cospiprecise_t_9_0hml - cospiprecise_t_9_0h;
+cospiprecise_t_9_0m = double(cospiprecise_t_9_0ml);
+cospiprecise_t_9_0l = cospiprecise_t_9_0ml - cospiprecise_t_9_0m;
+cospiprecise_t_9_0hm = cospiprecise_t_9_0h + cospiprecise_t_9_0m;
+overlap_cospiprecise_t_9_0 = cospiprecise_t_9_0m / cospiprecise_t_9_0h;
+
+cospiprecise_reshml = cospiprecise_t_9_0hml;
+cospiprecise_reshm = cospiprecise_t_9_0hm;
+cospiprecise_resml = cospiprecise_t_9_0ml;
+cospiprecise_resh = cospiprecise_t_9_0h;
+cospiprecise_resm = cospiprecise_t_9_0m;
+cospiprecise_resl = cospiprecise_t_9_0l;
+overlap_cospiprecise_res = overlap_cospiprecise_t_9_0;
+
+
+# Mathematical equivalents
+Mx = x;
+Mcospiprecise_coeff_0 = cospiprecise_coeff_0h;
+Mcospiprecise_coeff_2 = cospiprecise_coeff_2hm;
+Mcospiprecise_coeff_4 = cospiprecise_coeff_4hm;
+Mcospiprecise_coeff_6 = cospiprecise_coeff_6h;
+Mcospiprecise_coeff_8 = cospiprecise_coeff_8h;
+Mcospiprecise_coeff_10 = cospiprecise_coeff_10h;
+Mcospiprecise_x_0_pow2 = Mx * Mx;
+Mcospiprecise_t_1_0 = Mcospiprecise_coeff_10;
+Mcospiprecise_t_2_0 = Mcospiprecise_t_1_0 * Mcospiprecise_x_0_pow2;
+Mcospiprecise_t_3_0 = Mcospiprecise_coeff_8 + Mcospiprecise_t_2_0;
+Mcospiprecise_t_4_0 = Mcospiprecise_t_3_0 * Mcospiprecise_x_0_pow2;
+Mcospiprecise_t_5_0 = Mcospiprecise_coeff_6 + Mcospiprecise_t_4_0;
+Mcospiprecise_t_6_0 = (Mcospiprecise_t_5_0 * Mcospiprecise_x_0_pow2) + Mcospiprecise_coeff_4;
+Mcospiprecise_t_7_0 = (Mcospiprecise_t_6_0 * Mcospiprecise_x_0_pow2) + Mcospiprecise_coeff_2;
+Mcospiprecise_t_8_0 = Mcospiprecise_t_7_0 * Mcospiprecise_x_0_pow2;
+Mcospiprecise_t_9_0 = Mcospiprecise_coeff_0 + Mcospiprecise_t_8_0;
+Mcospiprecise_res = Mcospiprecise_t_9_0;
+
+# Definition of the relative arithmetical error
+epsilon = (cospiprecise_reshml - Mcospiprecise_res) / Mcospiprecise_res;
+
+# Implication to prove
+{((
+   x in [-1b-8,-1b-408]
+/\ |overlap_cospiprecise_t_9_0| in [1b-400,1b-52]    # Verify the lower bound
+/\ |cospiprecise_t_9_0ml| in [1b-1021,1b1023]
+) \/ (
+   x in [1b-408,1b-8]
+/\ |overlap_cospiprecise_t_9_0| in [1b-400,1b-52]    # Verify the lower bound
+/\ |cospiprecise_t_9_0ml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+cospiprecise_x_0_pow2h ~ cospiprecise_x_0_pow2hm;
+cospiprecise_t_5_0h ~ cospiprecise_t_5_0hm;
+cospiprecise_t_6_0h ~ cospiprecise_t_6_0hm;
+cospiprecise_t_7_0h ~ cospiprecise_t_7_0hm;
+cospiprecise_t_8_0h ~ cospiprecise_t_8_0hm;
+cospiprecise_t_9_0hm ~ cospiprecise_t_9_0hml;
+cospiprecise_t_9_0h ~ cospiprecise_t_9_0hm;
+cospiprecise_t_9_0h ~ cospiprecise_t_9_0hml;
+cospiprecise_t_9_0m -> cospiprecise_t_9_0h * overlap_cospiprecise_t_9_0;
+cospiprecise_t_9_0l / cospiprecise_t_9_0m -> - ((cospiprecise_t_9_0m - cospiprecise_t_9_0ml) / cospiprecise_t_9_0ml) / (1 + ((cospiprecise_t_9_0m - cospiprecise_t_9_0ml) / cospiprecise_t_9_0ml));
+(cospiprecise_t_9_0hm - cospiprecise_t_9_0hml) / cospiprecise_t_9_0hml -> - (cospiprecise_t_9_0l / cospiprecise_t_9_0m) * (1 / (1 / overlap_cospiprecise_t_9_0 + 1 + (cospiprecise_t_9_0l / cospiprecise_t_9_0m)));
+cospiprecise_t_9_0ml -> cospiprecise_t_9_0hml / ((1 + ((cospiprecise_t_9_0m - cospiprecise_t_9_0ml) / cospiprecise_t_9_0ml)) / overlap_cospiprecise_t_9_0 + 1);
+(cospiprecise_t_9_0h - cospiprecise_t_9_0hm) / cospiprecise_t_9_0hm -> - 1 / (1 / overlap_cospiprecise_t_9_0 + 1);
+cospiprecise_t_9_0h -> cospiprecise_t_9_0hml / (overlap_cospiprecise_t_9_0 / (1 + ((cospiprecise_t_9_0m - cospiprecise_t_9_0ml) / cospiprecise_t_9_0ml)) + 1);
+
+# Meta-Hints for Horner scheme
+cospiprecise_x_0_pow2hm ~ Mcospiprecise_x_0_pow2;
+cospiprecise_t_1_0h ~ Mcospiprecise_t_1_0;
+cospiprecise_t_2_0h ~ Mcospiprecise_t_2_0;
+cospiprecise_t_3_0h ~ Mcospiprecise_t_3_0;
+cospiprecise_t_4_0h ~ Mcospiprecise_t_4_0;
+cospiprecise_t_5_0hm ~ Mcospiprecise_t_5_0;
+cospiprecise_t_6_0hm ~ Mcospiprecise_t_6_0;
+cospiprecise_t_7_0hm ~ Mcospiprecise_t_7_0;
+cospiprecise_t_8_0hm ~ Mcospiprecise_t_8_0;
+cospiprecise_t_9_0hml ~ Mcospiprecise_t_9_0;
+cospiprecise_reshml ~ Mcospiprecise_res;
+
+# Dichotomies for triple-double decomposition
+$ cospiprecise_t_9_0hml in (0);
+$ cospiprecise_t_9_0ml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/trigpi/cospi-quick.gappa b/src/crlibm/gappa/trigpi/cospi-quick.gappa
new file mode 100644
index 0000000..27fb277
--- /dev/null
+++ b/src/crlibm/gappa/trigpi/cospi-quick.gappa
@@ -0,0 +1,103 @@
+# The polynomial to implement is: 1b0 + ((x^(1b1)) * ((-2778046668940015b-49) + ((x^(1b1)) * (4569703604931271b-50 + ((x^(1b1)) * (-6013451953439851b-52))))))
+# The polynomial implemented is: 1b0 + ((x^(1b1)) * ((-2778046668940015b-49) + ((x^(1b1)) * (4569703604931271b-50 + ((x^(1b1)) * (-6013451953439851b-52))))))
+# The domain is [-1b-8;1b-8]
+# The free variable x is a double precision number, the result cospiquick_res* is stored on a double-double number.
+# The code produces 13 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+cospiquick_coeff_0h = double(1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00);
+
+cospiquick_coeff_2h = double(-4.93480220054467899615247006295248866081237792968750000000000000000000000000000000e+00);
+
+cospiquick_coeff_4h = double(4.05871212632582167856298838160000741481781005859375000000000000000000000000000000e+00);
+
+cospiquick_coeff_6h = double(-1.33525456323720947970912220625905320048332214355468750000000000000000000000000000e+00);
+
+cospiquick_x_0_pow2hm = xh * xh;
+cospiquick_x_0_pow2h = double(cospiquick_x_0_pow2hm);
+cospiquick_x_0_pow2m = cospiquick_x_0_pow2hm - cospiquick_x_0_pow2h;
+
+cospiquick_t_1_0h = cospiquick_coeff_6h;
+
+cospiquick_t_2_0h = double(cospiquick_t_1_0h * cospiquick_x_0_pow2h);
+cospiquick_t_3_0h = double(cospiquick_coeff_4h + cospiquick_t_2_0h);
+cospiquick_t_4_0h = double(cospiquick_t_3_0h * cospiquick_x_0_pow2h);
+cospiquick_t_5_0hm = cospiquick_coeff_2h + cospiquick_t_4_0h;
+cospiquick_t_5_0h = double(cospiquick_t_5_0hm);
+cospiquick_t_5_0m = cospiquick_t_5_0hm - cospiquick_t_5_0h;
+
+cospiquick_t_6_0hm = mul_rel<102>(cospiquick_t_5_0hm,cospiquick_x_0_pow2hm);
+cospiquick_t_6_0h = double(cospiquick_t_6_0hm);
+cospiquick_t_6_0m = cospiquick_t_6_0hm - cospiquick_t_6_0h;
+
+cospiquick_t_7_0hm = add_rel<102>(cospiquick_coeff_0h,cospiquick_t_6_0hm);
+cospiquick_t_7_0h = double(cospiquick_t_7_0hm);
+cospiquick_t_7_0m = cospiquick_t_7_0hm - cospiquick_t_7_0h;
+
+cospiquick_reshm = cospiquick_t_7_0hm;
+cospiquick_resh = cospiquick_t_7_0h;
+cospiquick_resm = cospiquick_t_7_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Mcospiquick_coeff_0 = cospiquick_coeff_0h;
+Mcospiquick_coeff_2 = cospiquick_coeff_2h;
+Mcospiquick_coeff_4 = cospiquick_coeff_4h;
+Mcospiquick_coeff_6 = cospiquick_coeff_6h;
+Mcospiquick_x_0_pow2 = Mx * Mx;
+Mcospiquick_t_1_0 = Mcospiquick_coeff_6;
+Mcospiquick_t_2_0 = Mcospiquick_t_1_0 * Mcospiquick_x_0_pow2;
+Mcospiquick_t_3_0 = Mcospiquick_coeff_4 + Mcospiquick_t_2_0;
+Mcospiquick_t_4_0 = Mcospiquick_t_3_0 * Mcospiquick_x_0_pow2;
+Mcospiquick_t_5_0 = Mcospiquick_coeff_2 + Mcospiquick_t_4_0;
+Mcospiquick_t_6_0 = Mcospiquick_t_5_0 * Mcospiquick_x_0_pow2;
+Mcospiquick_t_7_0 = Mcospiquick_coeff_0 + Mcospiquick_t_6_0;
+Mcospiquick_res = Mcospiquick_t_7_0;
+
+# Definition of the relative arithmetical error
+epsilon = (cospiquick_reshm - Mcospiquick_res) / Mcospiquick_res;
+
+# Implication to prove
+{((
+   x in [-1b-8,-1b-408]
+) \/ (
+   x in [1b-408,1b-8]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+cospiquick_x_0_pow2h ~ cospiquick_x_0_pow2hm;
+cospiquick_t_5_0h ~ cospiquick_t_5_0hm;
+cospiquick_t_6_0h ~ cospiquick_t_6_0hm;
+cospiquick_t_7_0h ~ cospiquick_t_7_0hm;
+
+# Meta-Hints for Horner scheme
+cospiquick_x_0_pow2hm ~ Mcospiquick_x_0_pow2;
+cospiquick_t_1_0h ~ Mcospiquick_t_1_0;
+cospiquick_t_2_0h ~ Mcospiquick_t_2_0;
+cospiquick_t_3_0h ~ Mcospiquick_t_3_0;
+cospiquick_t_4_0h ~ Mcospiquick_t_4_0;
+cospiquick_t_5_0hm ~ Mcospiquick_t_5_0;
+cospiquick_t_6_0hm ~ Mcospiquick_t_6_0;
+cospiquick_t_7_0hm ~ Mcospiquick_t_7_0;
+cospiquick_reshm ~ Mcospiquick_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/gappa/trigpi/sinpi-accurate.gappa b/src/crlibm/gappa/trigpi/sinpi-accurate.gappa
new file mode 100644
index 0000000..685ac5f
--- /dev/null
+++ b/src/crlibm/gappa/trigpi/sinpi-accurate.gappa
@@ -0,0 +1,189 @@
+# The polynomial to implement is: x * (286965175440513682586550324983956956112624645035b-156 + ((x^(1b1)) * ((-3275427103718718266226722463013b-99) + ((x^(1b1)) * (51723471613295412653622130742483b-104 + ((x^(1b1)) * ((-2698847510945475b-52) + ((x^(1b1)) * (2959617474724135b-55 + ((x^(1b1)) * (-4248785555898559b-59)))))))))))
+# The polynomial implemented is: x * (286965175440513682586550324983956956112624645035b-156 + ((x^(1b1)) * ((-3275427103718718266226722463013b-99) + ((x^(1b1)) * (51723471613295412653622130742483b-104 + ((x^(1b1)) * ((-2698847510945475b-52) + ((x^(1b1)) * (2959617474724135b-55 + ((x^(1b1)) * (-4248785555898559b-59)))))))))))
+# The domain is [-1b-8;1b-8]
+# The free variable x is a double precision number, the result sinpiprecise_res* is stored on a triple-double number.
+# The code produces 18 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+sinpiprecise_coeff_1h = double(3.14159265358979311599796346854418516159057617187500000000000000000000000000000000e+00);
+sinpiprecise_coeff_1m = double(1.22464679914735320717376402945839660462569212467758006379625612680683843791484833e-16);
+sinpiprecise_coeff_1l = double(-2.87889731599645993207191707893463395148177292198731390393739579574603302514349608e-33);
+sinpiprecise_coeff_1hml = sinpiprecise_coeff_1h + sinpiprecise_coeff_1m + sinpiprecise_coeff_1l;
+
+sinpiprecise_coeff_3h = double(-5.16771278004997025590228076907806098461151123046875000000000000000000000000000000e+00);
+sinpiprecise_coeff_3m = double(2.26656228257550136196266687046492287115561324595258696490418515168130397796630859e-16);
+sinpiprecise_coeff_3hm = sinpiprecise_coeff_3h + sinpiprecise_coeff_3m;
+
+sinpiprecise_coeff_5h = double(2.55016403987734552316624103696085512638092041015625000000000000000000000000000000e+00);
+sinpiprecise_coeff_5m = double(-7.93098961936403945684716222915171282926664203267314023904077657789457589387893677e-17);
+sinpiprecise_coeff_5hm = sinpiprecise_coeff_5h + sinpiprecise_coeff_5m;
+
+sinpiprecise_coeff_7h = double(-5.99264529320792105338000510528218001127243041992187500000000000000000000000000000e-01);
+
+sinpiprecise_coeff_9h = double(8.21458866130424236740026344705256633460521697998046875000000000000000000000000000e-02);
+
+sinpiprecise_coeff_11h = double(-7.37046804820839888960914976223648409359157085418701171875000000000000000000000000e-03);
+
+sinpiprecise_x_0_pow2hm = xh * xh;
+sinpiprecise_x_0_pow2h = double(sinpiprecise_x_0_pow2hm);
+sinpiprecise_x_0_pow2m = sinpiprecise_x_0_pow2hm - sinpiprecise_x_0_pow2h;
+
+sinpiprecise_t_1_0h = sinpiprecise_coeff_11h;
+
+sinpiprecise_t_2_0h = double(sinpiprecise_t_1_0h * sinpiprecise_x_0_pow2h);
+sinpiprecise_t_3_0h = double(sinpiprecise_coeff_9h + sinpiprecise_t_2_0h);
+sinpiprecise_t_4_0h = double(sinpiprecise_t_3_0h * sinpiprecise_x_0_pow2h);
+sinpiprecise_t_5_0hm = sinpiprecise_coeff_7h + sinpiprecise_t_4_0h;
+sinpiprecise_t_5_0h = double(sinpiprecise_t_5_0hm);
+sinpiprecise_t_5_0m = sinpiprecise_t_5_0hm - sinpiprecise_t_5_0h;
+
+sinpiprecise_t_6_0hm = fma_rel<100>(sinpiprecise_t_5_0hm,sinpiprecise_x_0_pow2hm,sinpiprecise_coeff_5hm);
+sinpiprecise_t_6_0h = double(sinpiprecise_t_6_0hm);
+sinpiprecise_t_6_0m = sinpiprecise_t_6_0hm - sinpiprecise_t_6_0h;
+
+sinpiprecise_t_7_0hm = fma_rel<100>(sinpiprecise_t_6_0hm,sinpiprecise_x_0_pow2hm,sinpiprecise_coeff_3hm);
+sinpiprecise_t_7_0h = double(sinpiprecise_t_7_0hm);
+sinpiprecise_t_7_0m = sinpiprecise_t_7_0hm - sinpiprecise_t_7_0h;
+
+sinpiprecise_t_8_0hm = mul_rel<102>(sinpiprecise_t_7_0hm,sinpiprecise_x_0_pow2hm);
+sinpiprecise_t_8_0h = double(sinpiprecise_t_8_0hm);
+sinpiprecise_t_8_0m = sinpiprecise_t_8_0hm - sinpiprecise_t_8_0h;
+
+sinpiprecise_t_9_0hml = add_rel<152>(sinpiprecise_t_8_0hm,sinpiprecise_coeff_1hml);
+sinpiprecise_t_9_0ml = sinpiprecise_t_9_0hml - sinpiprecise_t_9_0h;
+sinpiprecise_t_9_0m = double(sinpiprecise_t_9_0ml);
+sinpiprecise_t_9_0l = sinpiprecise_t_9_0ml - sinpiprecise_t_9_0m;
+sinpiprecise_t_9_0hm = sinpiprecise_t_9_0h + sinpiprecise_t_9_0m;
+overlap_sinpiprecise_t_9_0 = sinpiprecise_t_9_0m / sinpiprecise_t_9_0h;
+
+sinpiprecise_t_10_0hml = mul_rel<145>(xh,sinpiprecise_t_9_0hml);
+sinpiprecise_t_10_0ml = sinpiprecise_t_10_0hml - sinpiprecise_t_10_0h;
+sinpiprecise_t_10_0m = double(sinpiprecise_t_10_0ml);
+sinpiprecise_t_10_0l = sinpiprecise_t_10_0ml - sinpiprecise_t_10_0m;
+sinpiprecise_t_10_0hm = sinpiprecise_t_10_0h + sinpiprecise_t_10_0m;
+overlap_sinpiprecise_t_10_0 = sinpiprecise_t_10_0m / sinpiprecise_t_10_0h;
+
+sinpiprecise_reshml = sinpiprecise_t_10_0hml;
+sinpiprecise_resml = sinpiprecise_reshml - sinpiprecise_resh;
+sinpiprecise_resm = double(sinpiprecise_resml);
+sinpiprecise_resl = sinpiprecise_resml - sinpiprecise_resm;
+sinpiprecise_reshm = sinpiprecise_resh + sinpiprecise_resm;
+overlap_sinpiprecise_res = sinpiprecise_resm / sinpiprecise_resh;
+
+
+# Mathematical equivalents
+Mx = x;
+Msinpiprecise_coeff_1 = sinpiprecise_coeff_1hml;
+Msinpiprecise_coeff_3 = sinpiprecise_coeff_3hm;
+Msinpiprecise_coeff_5 = sinpiprecise_coeff_5hm;
+Msinpiprecise_coeff_7 = sinpiprecise_coeff_7h;
+Msinpiprecise_coeff_9 = sinpiprecise_coeff_9h;
+Msinpiprecise_coeff_11 = sinpiprecise_coeff_11h;
+Msinpiprecise_x_0_pow2 = Mx * Mx;
+Msinpiprecise_t_1_0 = Msinpiprecise_coeff_11;
+Msinpiprecise_t_2_0 = Msinpiprecise_t_1_0 * Msinpiprecise_x_0_pow2;
+Msinpiprecise_t_3_0 = Msinpiprecise_coeff_9 + Msinpiprecise_t_2_0;
+Msinpiprecise_t_4_0 = Msinpiprecise_t_3_0 * Msinpiprecise_x_0_pow2;
+Msinpiprecise_t_5_0 = Msinpiprecise_coeff_7 + Msinpiprecise_t_4_0;
+Msinpiprecise_t_6_0 = (Msinpiprecise_t_5_0 * Msinpiprecise_x_0_pow2) + Msinpiprecise_coeff_5;
+Msinpiprecise_t_7_0 = (Msinpiprecise_t_6_0 * Msinpiprecise_x_0_pow2) + Msinpiprecise_coeff_3;
+Msinpiprecise_t_8_0 = Msinpiprecise_t_7_0 * Msinpiprecise_x_0_pow2;
+Msinpiprecise_t_9_0 = Msinpiprecise_t_8_0 + Msinpiprecise_coeff_1;
+Msinpiprecise_t_10_0 = Mx * Msinpiprecise_t_9_0;
+Msinpiprecise_res = Msinpiprecise_t_10_0;
+
+# Definition of the relative arithmetical error
+epsilon = (sinpiprecise_reshml - Msinpiprecise_res) / Msinpiprecise_res;
+
+# Implication to prove
+{((
+   x in [-1b-8,-1b-408]
+/\ |overlap_sinpiprecise_t_9_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |sinpiprecise_t_9_0ml| in [1b-1021,1b1023]
+/\ |overlap_sinpiprecise_t_10_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |sinpiprecise_t_10_0ml| in [1b-1021,1b1023]
+/\ |overlap_sinpiprecise_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |sinpiprecise_resml| in [1b-1021,1b1023]
+) \/ (
+   x in [1b-408,1b-8]
+/\ |overlap_sinpiprecise_t_9_0| in [1b-400,1b-45]    # Verify the lower bound
+/\ |sinpiprecise_t_9_0ml| in [1b-1021,1b1023]
+/\ |overlap_sinpiprecise_t_10_0| in [1b-400,1b-40]    # Verify the lower bound
+/\ |sinpiprecise_t_10_0ml| in [1b-1021,1b1023]
+/\ |overlap_sinpiprecise_res| in [1b-400,1b-52]    # Verify the lower bound
+/\ |sinpiprecise_resml| in [1b-1021,1b1023]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+sinpiprecise_x_0_pow2h ~ sinpiprecise_x_0_pow2hm;
+sinpiprecise_t_5_0h ~ sinpiprecise_t_5_0hm;
+sinpiprecise_t_6_0h ~ sinpiprecise_t_6_0hm;
+sinpiprecise_t_7_0h ~ sinpiprecise_t_7_0hm;
+sinpiprecise_t_8_0h ~ sinpiprecise_t_8_0hm;
+sinpiprecise_t_9_0hm ~ sinpiprecise_t_9_0hml;
+sinpiprecise_t_9_0h ~ sinpiprecise_t_9_0hm;
+sinpiprecise_t_9_0h ~ sinpiprecise_t_9_0hml;
+sinpiprecise_t_9_0m -> sinpiprecise_t_9_0h * overlap_sinpiprecise_t_9_0;
+sinpiprecise_t_9_0l / sinpiprecise_t_9_0m -> - ((sinpiprecise_t_9_0m - sinpiprecise_t_9_0ml) / sinpiprecise_t_9_0ml) / (1 + ((sinpiprecise_t_9_0m - sinpiprecise_t_9_0ml) / sinpiprecise_t_9_0ml));
+(sinpiprecise_t_9_0hm - sinpiprecise_t_9_0hml) / sinpiprecise_t_9_0hml -> - (sinpiprecise_t_9_0l / sinpiprecise_t_9_0m) * (1 / (1 / overlap_sinpiprecise_t_9_0 + 1 + (sinpiprecise_t_9_0l / sinpiprecise_t_9_0m)));
+sinpiprecise_t_9_0ml -> sinpiprecise_t_9_0hml / ((1 + ((sinpiprecise_t_9_0m - sinpiprecise_t_9_0ml) / sinpiprecise_t_9_0ml)) / overlap_sinpiprecise_t_9_0 + 1);
+(sinpiprecise_t_9_0h - sinpiprecise_t_9_0hm) / sinpiprecise_t_9_0hm -> - 1 / (1 / overlap_sinpiprecise_t_9_0 + 1);
+sinpiprecise_t_9_0h -> sinpiprecise_t_9_0hml / (overlap_sinpiprecise_t_9_0 / (1 + ((sinpiprecise_t_9_0m - sinpiprecise_t_9_0ml) / sinpiprecise_t_9_0ml)) + 1);
+sinpiprecise_t_10_0hm ~ sinpiprecise_t_10_0hml;
+sinpiprecise_t_10_0h ~ sinpiprecise_t_10_0hm;
+sinpiprecise_t_10_0h ~ sinpiprecise_t_10_0hml;
+sinpiprecise_t_10_0m -> sinpiprecise_t_10_0h * overlap_sinpiprecise_t_10_0;
+sinpiprecise_t_10_0l / sinpiprecise_t_10_0m -> - ((sinpiprecise_t_10_0m - sinpiprecise_t_10_0ml) / sinpiprecise_t_10_0ml) / (1 + ((sinpiprecise_t_10_0m - sinpiprecise_t_10_0ml) / sinpiprecise_t_10_0ml));
+(sinpiprecise_t_10_0hm - sinpiprecise_t_10_0hml) / sinpiprecise_t_10_0hml -> - (sinpiprecise_t_10_0l / sinpiprecise_t_10_0m) * (1 / (1 / overlap_sinpiprecise_t_10_0 + 1 + (sinpiprecise_t_10_0l / sinpiprecise_t_10_0m)));
+sinpiprecise_t_10_0ml -> sinpiprecise_t_10_0hml / ((1 + ((sinpiprecise_t_10_0m - sinpiprecise_t_10_0ml) / sinpiprecise_t_10_0ml)) / overlap_sinpiprecise_t_10_0 + 1);
+(sinpiprecise_t_10_0h - sinpiprecise_t_10_0hm) / sinpiprecise_t_10_0hm -> - 1 / (1 / overlap_sinpiprecise_t_10_0 + 1);
+sinpiprecise_t_10_0h -> sinpiprecise_t_10_0hml / (overlap_sinpiprecise_t_10_0 / (1 + ((sinpiprecise_t_10_0m - sinpiprecise_t_10_0ml) / sinpiprecise_t_10_0ml)) + 1);
+sinpiprecise_reshm ~ sinpiprecise_reshml;
+sinpiprecise_resh ~ sinpiprecise_reshm;
+sinpiprecise_resh ~ sinpiprecise_reshml;
+sinpiprecise_resm -> sinpiprecise_resh * overlap_sinpiprecise_res;
+sinpiprecise_resl / sinpiprecise_resm -> - ((sinpiprecise_resm - sinpiprecise_resml) / sinpiprecise_resml) / (1 + ((sinpiprecise_resm - sinpiprecise_resml) / sinpiprecise_resml));
+(sinpiprecise_reshm - sinpiprecise_reshml) / sinpiprecise_reshml -> - (sinpiprecise_resl / sinpiprecise_resm) * (1 / (1 / overlap_sinpiprecise_res + 1 + (sinpiprecise_resl / sinpiprecise_resm)));
+sinpiprecise_resml -> sinpiprecise_reshml / ((1 + ((sinpiprecise_resm - sinpiprecise_resml) / sinpiprecise_resml)) / overlap_sinpiprecise_res + 1);
+(sinpiprecise_resh - sinpiprecise_reshm) / sinpiprecise_reshm -> - 1 / (1 / overlap_sinpiprecise_res + 1);
+sinpiprecise_resh -> sinpiprecise_reshml / (overlap_sinpiprecise_res / (1 + ((sinpiprecise_resm - sinpiprecise_resml) / sinpiprecise_resml)) + 1);
+
+# Meta-Hints for Horner scheme
+sinpiprecise_x_0_pow2hm ~ Msinpiprecise_x_0_pow2;
+sinpiprecise_t_1_0h ~ Msinpiprecise_t_1_0;
+sinpiprecise_t_2_0h ~ Msinpiprecise_t_2_0;
+sinpiprecise_t_3_0h ~ Msinpiprecise_t_3_0;
+sinpiprecise_t_4_0h ~ Msinpiprecise_t_4_0;
+sinpiprecise_t_5_0hm ~ Msinpiprecise_t_5_0;
+sinpiprecise_t_6_0hm ~ Msinpiprecise_t_6_0;
+sinpiprecise_t_7_0hm ~ Msinpiprecise_t_7_0;
+sinpiprecise_t_8_0hm ~ Msinpiprecise_t_8_0;
+sinpiprecise_t_9_0hml ~ Msinpiprecise_t_9_0;
+sinpiprecise_t_10_0hml ~ Msinpiprecise_t_10_0;
+sinpiprecise_reshml ~ Msinpiprecise_res;
+
+# Dichotomies for triple-double decomposition
+$ sinpiprecise_t_9_0hml in (0);
+$ sinpiprecise_t_9_0ml in (0);
+$ sinpiprecise_t_10_0hml in (0);
+$ sinpiprecise_t_10_0ml in (0);
+$ sinpiprecise_reshml in (0);
+$ sinpiprecise_resml in (0);
+
+# Dichotomy for the error bound
+epsilon $ xhml;
+
diff --git a/src/crlibm/gappa/trigpi/sinpi-quick.gappa b/src/crlibm/gappa/trigpi/sinpi-quick.gappa
new file mode 100644
index 0000000..9410438
--- /dev/null
+++ b/src/crlibm/gappa/trigpi/sinpi-quick.gappa
@@ -0,0 +1,105 @@
+# The polynomial to implement is: x * (63719069007931157819019535590437b-104 + ((x^(1b1)) * ((-5818327337647699b-50) + ((x^(1b1)) * (717807363739183b-48 + ((x^(1b1)) * (-337355592074089b-49)))))))
+# The polynomial implemented is: x * (63719069007931157819019535590437b-104 + ((x^(1b1)) * ((-5818327337647699b-50) + ((x^(1b1)) * (717807363739183b-48 + ((x^(1b1)) * (-337355592074089b-49)))))))
+# The domain is [-1b-8;1b-8]
+# The free variable x is a double precision number, the result sinpiquick_res* is stored on a double-double number.
+# The code produces 13 intermediate and final arithmetical approximations.
+
+# Double precision rounding operator:
+ at double = float<ieee_64,ne>;
+
+# Disable some annoying warnings:
+#@-Wno-dichotomy-failure
+
+# Helper definitions for decomposing the free variable
+xh = x;
+
+# Transcription of the C code
+sinpiquick_coeff_1h = double(3.14159265358979311599796346854418516159057617187500000000000000000000000000000000e+00);
+sinpiquick_coeff_1m = double(1.22464971683184787123862072310058851157814368464452070561776508839102461934089661e-16);
+sinpiquick_coeff_1hm = sinpiquick_coeff_1h + sinpiquick_coeff_1m;
+
+sinpiquick_coeff_3h = double(-5.16771278004997025590228076907806098461151123046875000000000000000000000000000000e+00);
+
+sinpiquick_coeff_5h = double(2.55016403989992213041659852024167776107788085937500000000000000000000000000000000e+00);
+
+sinpiquick_coeff_7h = double(-5.99263913290728922333983064163476228713989257812500000000000000000000000000000000e-01);
+
+sinpiquick_x_0_pow2hm = xh * xh;
+sinpiquick_x_0_pow2h = double(sinpiquick_x_0_pow2hm);
+sinpiquick_x_0_pow2m = sinpiquick_x_0_pow2hm - sinpiquick_x_0_pow2h;
+
+sinpiquick_t_1_0h = sinpiquick_coeff_7h;
+
+sinpiquick_t_2_0h = double(sinpiquick_t_1_0h * sinpiquick_x_0_pow2h);
+sinpiquick_t_3_0h = double(sinpiquick_coeff_5h + sinpiquick_t_2_0h);
+sinpiquick_t_4_0h = double(sinpiquick_t_3_0h * sinpiquick_x_0_pow2h);
+sinpiquick_t_5_0hm = sinpiquick_coeff_3h + sinpiquick_t_4_0h;
+sinpiquick_t_5_0h = double(sinpiquick_t_5_0hm);
+sinpiquick_t_5_0m = sinpiquick_t_5_0hm - sinpiquick_t_5_0h;
+
+sinpiquick_t_6_0hm = fma_rel<100>(sinpiquick_t_5_0hm,sinpiquick_x_0_pow2hm,sinpiquick_coeff_1hm);
+sinpiquick_t_6_0h = double(sinpiquick_t_6_0hm);
+sinpiquick_t_6_0m = sinpiquick_t_6_0hm - sinpiquick_t_6_0h;
+
+sinpiquick_t_7_0hm = mul_rel<102>(xh,sinpiquick_t_6_0hm);
+sinpiquick_t_7_0h = double(sinpiquick_t_7_0hm);
+sinpiquick_t_7_0m = sinpiquick_t_7_0hm - sinpiquick_t_7_0h;
+
+sinpiquick_reshm = sinpiquick_t_7_0hm;
+sinpiquick_resh = sinpiquick_t_7_0h;
+sinpiquick_resm = sinpiquick_t_7_0m;
+
+
+# Mathematical equivalents
+Mx = x;
+Msinpiquick_coeff_1 = sinpiquick_coeff_1hm;
+Msinpiquick_coeff_3 = sinpiquick_coeff_3h;
+Msinpiquick_coeff_5 = sinpiquick_coeff_5h;
+Msinpiquick_coeff_7 = sinpiquick_coeff_7h;
+Msinpiquick_x_0_pow2 = Mx * Mx;
+Msinpiquick_t_1_0 = Msinpiquick_coeff_7;
+Msinpiquick_t_2_0 = Msinpiquick_t_1_0 * Msinpiquick_x_0_pow2;
+Msinpiquick_t_3_0 = Msinpiquick_coeff_5 + Msinpiquick_t_2_0;
+Msinpiquick_t_4_0 = Msinpiquick_t_3_0 * Msinpiquick_x_0_pow2;
+Msinpiquick_t_5_0 = Msinpiquick_coeff_3 + Msinpiquick_t_4_0;
+Msinpiquick_t_6_0 = (Msinpiquick_t_5_0 * Msinpiquick_x_0_pow2) + Msinpiquick_coeff_1;
+Msinpiquick_t_7_0 = Mx * Msinpiquick_t_6_0;
+Msinpiquick_res = Msinpiquick_t_7_0;
+
+# Definition of the relative arithmetical error
+epsilon = (sinpiquick_reshm - Msinpiquick_res) / Msinpiquick_res;
+
+# Implication to prove
+{((
+   x in [-1b-8,-1b-408]
+) \/ (
+   x in [1b-408,1b-8]
+))
+->
+(
+   epsilon in ?
+)}
+
+# Hints and Meta-Hints for expansion decomposition
+
+sinpiquick_x_0_pow2h ~ sinpiquick_x_0_pow2hm;
+sinpiquick_t_5_0h ~ sinpiquick_t_5_0hm;
+sinpiquick_t_6_0h ~ sinpiquick_t_6_0hm;
+sinpiquick_t_7_0h ~ sinpiquick_t_7_0hm;
+
+# Meta-Hints for Horner scheme
+sinpiquick_x_0_pow2hm ~ Msinpiquick_x_0_pow2;
+sinpiquick_t_1_0h ~ Msinpiquick_t_1_0;
+sinpiquick_t_2_0h ~ Msinpiquick_t_2_0;
+sinpiquick_t_3_0h ~ Msinpiquick_t_3_0;
+sinpiquick_t_4_0h ~ Msinpiquick_t_4_0;
+sinpiquick_t_5_0hm ~ Msinpiquick_t_5_0;
+sinpiquick_t_6_0hm ~ Msinpiquick_t_6_0;
+sinpiquick_t_7_0hm ~ Msinpiquick_t_7_0;
+sinpiquick_reshm ~ Msinpiquick_res;
+
+# Dichotomies for triple-double decomposition
+
+# Dichotomy for the error bound
+epsilon $ xhm;
+
diff --git a/src/crlibm/install-sh b/src/crlibm/install-sh
new file mode 100755
index 0000000..756420d
--- /dev/null
+++ b/src/crlibm/install-sh
@@ -0,0 +1,534 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	# Protect names problematic for 'test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call 'install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names problematic for 'test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+            # $RANDOM is not portable (e.g. dash);  use it when possible to
+            # lower collision chance
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	     # As "mkdir -p" follows symlinks and we work in /tmp possibly;  so
+	     # create the $tmpdir first (and fail if unsuccessful) to make sure
+	     # that nobody tries to guess the $tmpdir name.
+	    if (umask $mkdir_umask &&
+		$mkdirprog $mkdir_mode "$tmpdir" &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   test_tmpdir="$tmpdir/a"
+		   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	[-=\(\)!]*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test X"$d" = X && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/crlibm/interval.h b/src/crlibm/interval.h
new file mode 100644
index 0000000..fadab5b
--- /dev/null
+++ b/src/crlibm/interval.h
@@ -0,0 +1,238 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+
+typedef struct interval { double INF, SUP;} interval ;
+
+#define LOW(x) x.INF
+#define UP(x) x.SUP
+
+#define ASSIGN_LOW(x,e) x.INF=e
+#define ASSIGN_UP(x,e) x.SUP=e
+
+#define TRUE (1+1==2)
+#define FALSE (1+1==3)
+
+interval j_log();
+
+#define TEST_AND_COPY_RDRU_LOG(__cond__, __res_rd__, __yh_rd__, __yl_rd__, __res_ru__, __yh_ru__, __yl_ru__, __eps__)  \
+{                                                                      \
+  db_number yh_rd, yl_rd, u53_rd, yh_ru, yl_ru, u53_ru;                    \
+  int yh_rd_neg, yl_rd_neg, yh_ru_neg, yl_ru_neg;                             \
+  int rd_ok, ru_ok;                                                        \
+  double save_res_rd=__res_rd__;                                              \
+  yh_rd.d = __yh_rd__;    yl_rd.d = __yl_rd__;                                     \
+  yh_rd_neg = (yh_rd.i[HI] & 0x80000000);                                    \
+  yl_rd_neg = (yl_rd.i[HI] & 0x80000000);                                    \
+  yh_rd.l = yh_rd.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl_rd.l = yl_rd.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53_rd.l     = (yh_rd.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  yh_ru.d = __yh_ru__;    yl_ru.d = __yl_ru__;                                     \
+  yh_ru_neg = (yh_ru.i[HI] & 0x80000000);                                    \
+  yl_ru_neg = (yl_ru.i[HI] & 0x80000000);                                    \
+  yh_ru.l = yh_ru.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl_ru.l = yl_ru.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53_ru.l     = (yh_ru.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  __cond__ = 0;                                                        \
+  rd_ok=(yl_rd.d > __eps__ * u53_rd.d);                                  \
+  ru_ok=(yl_ru.d > __eps__ * u53_ru.d);                                   \
+     if(yl_rd_neg) {  /* The case yl==0 is filtered by the above test*/    \
+      /* return next down */                                           \
+      yh_rd.d = __yh_rd__;                                                   \
+      if(yh_rd_neg) yh_rd.l++;  else yh_rd.l--; /* Beware: fails for zero */    \
+      __res_rd__ = yh_rd.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res_rd__ = __yh_rd__;                                                \
+    }                                                                  \
+    if(!yl_ru_neg) {  /* The case yl==0 is filtered by the above test*/   \
+      /* return next up */                                             \
+      yh_ru.d = __yh_ru__;                                                   \
+      if(yh_ru_neg) yh_ru.l--;  else yh_ru.l++; /* Beware: fails for zero */    \
+      __res_ru__ = yh_ru.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res_ru__ = __yh_ru__;                                                \
+    }                                                                  \
+  if(save_res_rd==-1.0/0.0) __res_rd__=-1.0/0.0;           \
+  if(rd_ok && ru_ok){\
+    interval _res;                                                     \
+    ASSIGN_LOW(_res,__res_rd__);                                       \
+    ASSIGN_UP(_res,__res_ru__);                                        \
+    return(_res);                                                      \
+  }                                                                    \
+  else if (rd_ok){\
+    __cond__=1;                                                \
+  }\
+  else if (ru_ok){\
+     __cond__=2;                                     \
+  }\
+}
+
+#define TEST_AND_COPY_RDRU_EXP(__cond__, cond1, cond2, __res_rd__, __yh_rd__, __yl_rd__, __res_ru__, __yh_ru__, __yl_ru__, __eps__)  \
+{                                                                      \
+  db_number yh_rd, yl_rd, u53_rd, yh_ru, yl_ru, u53_ru;                    \
+  int yh_rd_neg, yl_rd_neg, yh_ru_neg, yl_ru_neg;                             \
+  int rd_ok, ru_ok;                                                        \
+  double save_res_rd=__res_rd__;                                              \
+  double save_res_ru=__res_ru__;                                              \
+  yh_rd.d = __yh_rd__;    yl_rd.d = __yl_rd__;                                     \
+  yh_rd_neg = (yh_rd.i[HI] & 0x80000000);                                    \
+  yl_rd_neg = (yl_rd.i[HI] & 0x80000000);                                    \
+  yh_rd.l = yh_rd.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl_rd.l = yl_rd.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53_rd.l     = (yh_rd.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  yh_ru.d = __yh_ru__;    yl_ru.d = __yl_ru__;                                     \
+  yh_ru_neg = (yh_ru.i[HI] & 0x80000000);                                    \
+  yl_ru_neg = (yl_ru.i[HI] & 0x80000000);                                    \
+  yh_ru.l = yh_ru.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl_ru.l = yl_ru.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53_ru.l     = (yh_ru.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  __cond__ = 0;                                                        \
+  rd_ok=(yl_rd.d > __eps__ * u53_rd.d);                                  \
+  ru_ok=(yl_ru.d > __eps__ * u53_ru.d);                                   \
+     if(yl_rd_neg) {  /* The case yl==0 is filtered by the above test*/    \
+      /* return next down */                                           \
+      yh_rd.d = __yh_rd__;                                                   \
+      if(yh_rd_neg) yh_rd.l++;  else yh_rd.l--; /* Beware: fails for zero */    \
+      __res_rd__ = yh_rd.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res_rd__ = __yh_rd__;                                                \
+    }                                                                  \
+    if(!yl_ru_neg) {  /* The case yl==0 is filtered by the above test*/   \
+      /* return next up */                                             \
+      yh_ru.d = __yh_ru__;                                                   \
+      if(yh_ru_neg) yh_ru.l--;  else yh_ru.l++; /* Beware: fails for zero */    \
+      __res_ru__ = yh_ru.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res_ru__ = __yh_ru__;                                                \
+    }                                                                  \
+  if(cond1) __res_rd__=save_res_rd;           \
+  if(cond2) __res_ru__=save_res_ru;           \
+  if(rd_ok && ru_ok){\
+    __cond__=3;                                                      \
+  }                                                                    \
+  else if (rd_ok){\
+    __cond__=1;                                                \
+  }\
+  else if (ru_ok){\
+     __cond__=2;                                     \
+  }\
+}
+
+
+#define TEST_AND_COPY_RDRU_EXPM1(__cond__, __res_rd__, __yh_rd__, __yl_rd__, __res_ru__, __yh_ru__, __yl_ru__, __eps__)  \
+{                                                                      \
+  db_number yh_rd, yl_rd, u53_rd, yh_ru, yl_ru, u53_ru;                    \
+  int yh_rd_neg, yl_rd_neg, yh_ru_neg, yl_ru_neg;                             \
+  int rd_ok, ru_ok;                                                        \
+  yh_rd.d = __yh_rd__;    yl_rd.d = __yl_rd__;                                     \
+  yh_rd_neg = (yh_rd.i[HI] & 0x80000000);                                    \
+  yl_rd_neg = (yl_rd.i[HI] & 0x80000000);                                    \
+  yh_rd.l = yh_rd.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl_rd.l = yl_rd.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53_rd.l     = (yh_rd.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  yh_ru.d = __yh_ru__;    yl_ru.d = __yl_ru__;                                     \
+  yh_ru_neg = (yh_ru.i[HI] & 0x80000000);                                    \
+  yl_ru_neg = (yl_ru.i[HI] & 0x80000000);                                    \
+  yh_ru.l = yh_ru.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl_ru.l = yl_ru.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53_ru.l     = (yh_ru.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  __cond__ = 0;                                                        \
+  rd_ok=(yl_rd.d > __eps__ * u53_rd.d);                                  \
+  ru_ok=(yl_ru.d > __eps__ * u53_ru.d);                                   \
+     if(yl_rd_neg) {  /* The case yl==0 is filtered by the above test*/    \
+      /* return next down */                                           \
+      yh_rd.d = __yh_rd__;                                                   \
+      if(yh_rd_neg) yh_rd.l++;  else yh_rd.l--; /* Beware: fails for zero */    \
+      __res_rd__ = yh_rd.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res_rd__ = __yh_rd__;                                                \
+    }                                                                  \
+    if(!yl_ru_neg) {  /* The case yl==0 is filtered by the above test*/   \
+      /* return next up */                                             \
+      yh_ru.d = __yh_ru__;                                                   \
+      if(yh_ru_neg) yh_ru.l--;  else yh_ru.l++; /* Beware: fails for zero */    \
+      __res_ru__ = yh_ru.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res_ru__ = __yh_ru__;                                                \
+    }                                                                  \
+  if(rd_ok && ru_ok){\
+    interval _res;                                                     \
+    ASSIGN_LOW(_res,__res_rd__);                                       \
+    ASSIGN_UP(_res,__res_ru__);                                        \
+    return(_res);                                                      \
+  }                                                                    \
+  else if (rd_ok){\
+    __cond__=1;                                                \
+  }\
+  else if (ru_ok){\
+     __cond__=2;                                     \
+  }\
+}
+
+#define TEST_AND_COPY_RDRU_LOG2(__cond__, __res_rd__, __yh_rd__, __yl_rd__, __res_ru__, __yh_ru__, __yl_ru__, __eps_rd__, __eps_ru__)  \
+{                                                                      \
+  db_number yh_rd, yl_rd, u53_rd, yh_ru, yl_ru, u53_ru;                    \
+  int yh_rd_neg, yl_rd_neg, yh_ru_neg, yl_ru_neg;                             \
+  int rd_ok, ru_ok;                                                        \
+  yh_rd.d = __yh_rd__;    yl_rd.d = __yl_rd__;                                     \
+  yh_rd_neg = (yh_rd.i[HI] & 0x80000000);                                    \
+  yl_rd_neg = (yl_rd.i[HI] & 0x80000000);                                    \
+  yh_rd.l = yh_rd.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl_rd.l = yl_rd.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53_rd.l     = (yh_rd.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  yh_ru.d = __yh_ru__;    yl_ru.d = __yl_ru__;                                     \
+  yh_ru_neg = (yh_ru.i[HI] & 0x80000000);                                    \
+  yl_ru_neg = (yl_ru.i[HI] & 0x80000000);                                    \
+  yh_ru.l = yh_ru.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  yl_ru.l = yl_ru.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ \
+  u53_ru.l     = (yh_ru.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); \
+  __cond__ = 0;                                                        \
+  rd_ok=(yl_rd.d > __eps_rd__ * u53_rd.d);                                  \
+  ru_ok=(yl_ru.d > __eps_ru__ * u53_ru.d);                                   \
+     if(yl_rd_neg) {  /* The case yl==0 is filtered by the above test*/    \
+      /* return next down */                                           \
+      yh_rd.d = __yh_rd__;                                                   \
+      if(yh_rd_neg) yh_rd.l++;  else yh_rd.l--; /* Beware: fails for zero */    \
+      __res_rd__ = yh_rd.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res_rd__ = __yh_rd__;                                                \
+    }                                                                  \
+    if(!yl_ru_neg) {  /* The case yl==0 is filtered by the above test*/   \
+      /* return next up */                                             \
+      yh_ru.d = __yh_ru__;                                                   \
+      if(yh_ru_neg) yh_ru.l--;  else yh_ru.l++; /* Beware: fails for zero */    \
+      __res_ru__ = yh_ru.d ;                                                 \
+    }                                                                  \
+    else {                                                             \
+      __res_ru__ = __yh_ru__;                                                \
+    }                                                                  \
+  if(rd_ok && ru_ok){\
+    interval _res;                                                     \
+    ASSIGN_LOW(_res,__res_rd__);                                       \
+    ASSIGN_UP(_res,__res_ru__);                                        \
+    return(_res);                                                      \
+  }                                                                    \
+  else if (rd_ok){\
+    __cond__=1;                                                \
+  }\
+  else if (ru_ok){\
+     __cond__=2;                                     \
+  }\
+}
+
+
+#define RETURN_EMPTY_INTERVAL                                               \
+{                                                                           \
+  interval res;                                                             \
+  ASSIGN_LOW(res,0.0/0.0);                                                  \
+  ASSIGN_UP(res,0.0/0.0);                                                   \
+  return res;                                                               \
+}
+
diff --git a/src/crlibm/log-de.c b/src/crlibm/log-de.c
new file mode 100644
index 0000000..1901d79
--- /dev/null
+++ b/src/crlibm/log-de.c
@@ -0,0 +1,480 @@
+/* 
+ *this function computes log, correctly rounded, 
+ using  double-extended arithmetic
+
+ THIS IS EXPERIMENTAL SOFTWARE
+
+In particular it changes rounding modes all the time without warning
+nor restoring.
+ 
+ *
+ * Author :  Florent de Dinechin
+ * Florent.de.Dinechin at ens-lyon.fr
+ *
+
+
+This function compiles both on IA32 and IA64 architectures. On IA64,
+it needs icc 8.1 or higher, with the following flags (which should be
+set up by the autoconf).
+
+icc -DHAVE_CONFIG_H  -Qoption,cpp,--extended_float_types \
+                    -IPF_fp_speculationsafe -c log-de.c;\
+ mv log-de.o log-td.o; make
+
+ 
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "double-extended.h"
+#include "log-de.h"
+
+
+static void log_accurate(double_ext* prh, double_ext* prl, double_ext z, int E, int index) {
+
+double_ext  eh,el,  t13, t12, t11, t10, t9, t8, 
+  p7h,p7l, t7h,t7l, t6h,t6l, t5h,t5l, t4h,t4l, 
+  t3h,t3l, t2h,t2l, t1h,t1l, t0h,t0l;
+/* Many temporary because single assignment form is nicer for Gappa */
+
+#if !(defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64))
+  double_ext c1h,c2h,c3h,c4h,c5h,c6h,c7h,c8h,c9h,c10h,c11h,c12h,c13h,c14h,c15h;
+  double_ext c1l,c2l,c3l,c4l,c5l,c6l,c7l,c8l;
+#endif
+
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+  
+  /* TODO check the conditions for the double-double ops */
+
+ 
+  PREFETCH_POLY_ACCURATE;
+  t13 = c13h + z*c14h;
+  t12 = c12h + z*t13;
+  t11 = c11h + z*t12;
+  t10 = c10h + z*t11;
+  t9 = c9h  + z*t10;
+  t8 = c8h  + z*t9;
+#if 1 /* This is faster on PIII. Your mileage may vary */
+  Mul12_ext(&p7h, &p7l,   z, t8);
+  Add22_ext(&t7h, &t7l,   p7h,p7l, c7h,c7l);
+#else
+  FMA22_ext(&t7h, &t7l,   z,0,   t8,0,    c7h,c7l);
+#endif
+  FMA22_ext(&t6h, &t6l,   z,0,   t7h,t7l,    c6h,c6l);
+  FMA22_ext(&t5h, &t5l,   z,0,   t6h,t6l,    c5h,c5l);
+  FMA22_ext(&t4h, &t4l,   z,0,   t5h,t5l,    c4h,c4l);
+  FMA22_ext(&t3h, &t3l,   z,0,   t4h,t4l,    c3h,c3l);
+  FMA22_ext(&t2h, &t2l,   z,0,   t3h,t3l,    c2h,c2l);
+  FMA22_ext(&t1h, &t1l,   z,0,   t2h,t2l,    c1h,c1l);
+  FMA22_ext(&t0h, &t0l,   z,0,   t1h,t1l,    argredtable[index].logirh, argredtable[index].logirl);
+  
+  Mul22_ext(&eh, &el,   log2H,log2L, E, 0);
+  Add22_ext(prh, prl,   eh,el,  t0h,t0l);
+}
+
+
+
+
+
+
+
+double log_rn(double x) {
+  double_ext logirh, r, y, z, th, tl, logde;
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+  db_number xdb;
+  int E, index, index0, roundtestmask;
+#else /* assuming Itanium here */
+  int64_t  E, i;
+  uint64_t index, roundtestmask;
+  double c2,c3,c4,c5,c6,c7;
+#endif
+
+
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+   xdb.d=x;
+
+   index0 = (xdb.i[HI] & 0x000fffff);
+   index = (index0 + (1<<(20-L-1))) >> (20-L); 
+   E = (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0)    return -1.0/0.0;  /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0)                              return (x-x)/0;   /* log(-x) = Nan    */
+     /* Else subnormal number */
+     xdb.d *= two64; 	  /* make x a normal number    */ 
+     E = -64 + (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+     index0 = (xdb.i[HI] & 0x000fffff);
+     index = (index0 + (1<<(20-L-1))) >> (20-L); 
+   }
+   if (xdb.i[HI] >= 0x7ff00000)                      return  x+x;      /* Inf or Nan       */
+   
+   DOUBLE_EXTENDED_MODE;  /* This one should be overlapped with following integer computation */
+
+   /* Extract exponent and mantissa */
+   xdb.i[HI] =  index0 | 0x3ff00000;	/* do exponent = 0 */
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to y>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     index = index & INDEXMASK;
+     E++;
+}
+   y = xdb.d;
+
+#else /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+  /*  Here come the code specific to Itanium processor */
+   E=0;
+   PREFETCH_POLY_QUICK; /* defined in log-de.h */
+   y=x;
+   i =  _Asm_getf(2/*_FR_D*/, y);  /* Cast y to a 64-bit integer */
+
+   /* Filter special cases */
+   if (i<(int64_t)ULL(0010000000000000)){   /* equivalent to : x < 2^(-1022)    */
+     if ((i & ULL(7fffffffffffffff))==0)  return -1.0/0.0;    /* log(+/-0) = -Inf */
+     if (i<0)                             return (x-x)/0;     /* log(-x) = Nan    */
+     /* Else subnormal number */
+     y *= two64; 	  /* make x a normal number    */ 
+     E = -64;
+     i =  _Asm_getf(2/*_FR_D*/, y); /* and update i */ 
+   }
+   if (i >= ULL(7ff0000000000000))        return  x+x;	      /* Inf or Nan       */
+
+   /* Extract exponent and mantissa */
+   E += (i>>52)-1023;
+   i = i & ULL(000fffffffffffff);  /* keep only mantissa */
+   index = (i + (ULL(1)<<(52-L-1))) >> (52-L);
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){    /* corresponds to y>sqrt(2)*/
+     y = _Asm_setf(2/*_FR_D*/, (i | ULL(3ff0000000000000)) - ULL(0010000000000000) ); /* exponent = -1 */
+     index = index & INDEXMASK;
+     E++;
+   }
+   else 
+     y = _Asm_setf(2/*_FR_D*/, i | ULL(3ff0000000000000) ); /* exponent = 0*/   
+#endif  /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+ 
+
+
+   /* All the previous argument reduction was exact */
+   /* now y holds 1+f, and E is the exponent */
+
+     r = (double_ext) (argredtable[index].r); /* approx to 1/y.d */
+     logirh = argredtable[index].logirh;
+     z = y*r - 1. ; /* even without an FMA, all exact */
+
+#if 0
+   if(E==0)
+     roundtestmask=ACCURATE_TO_61_BITS;
+    else
+      roundtestmask=ACCURATE_TO_61_BITS;
+#else
+      roundtestmask=ACCURATE_TO_62_BITS;
+#endif
+      
+#ifdef ESTRIN
+  /* Estrin polynomial evaluation  */
+  double_ext z2,z4, p01, p23, p45, p67, p03, p47,p07;
+    
+  z2  = z*z;      p67 = c6 + z*c7;     p45 = c4 + z*c5;   p23 = c2 + z*c3;    p01 = logirh + z;
+  z4  = z2*z2;    p47 = p45 + z2*p67;  p03 = p01 + z2*p23; 
+  p07 = p03 + z4*p47;
+  logde = p07 + E*log2H;
+#endif
+  
+#ifdef PATERSON
+  double_ext z4,z2,t0,t1,t2,t3,t4,t5,t6,t7,t8;
+  
+  z2 = z * z;        t1 = z + ps_alpha;   t2 = z + ps_beta;  t3 = c3 * z + c2;  t4 = z + logirh;
+  z4 = z2 * z2;      t5 = z2 + ps_c;      t6 = t3 * z2 + t4;    
+  t7 = t5 * t1 + t2; t0 = z4 * c7;        t8 = t7 * t0 + t6; 
+  logde = t8 + E*log2H;
+#endif
+  
+#if 0 /* to time the first step only */
+   BACK_TO_DOUBLE_MODE; return (double)t;
+#endif
+
+
+   /* To test the second step only, comment out the following line */
+   DE_TEST_AND_RETURN_RN(logde, roundtestmask);
+   
+
+   log_accurate(&th, &tl, z, E, index);
+   
+   BACK_TO_DOUBLE_MODE;
+   
+   return (double) (th+tl); /* The exact sum of these double-extended is rounded to the nearest */
+}
+
+
+
+
+
+
+
+
+
+
+double log_rd(double x) {
+  double_ext logirh, r, y, z, th, tl, logde;
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+  db_number xdb;
+  int E, index, roundtestmask;
+#else
+  int64_t  E, i;
+  uint64_t index, roundtestmask;
+  double_ext c1,c2,c3,c4,c5,c6,c7;
+#endif
+
+   E=0;
+
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0)    return -1.0/0.0;  /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0)                              return (x-x)/0;   /* log(-x) = Nan    */
+     /* Else subnormal number */
+     E = -64; 		
+     xdb.d *= two64; 	  /* make x a normal number    */ 
+   }
+   if (xdb.i[HI] >= 0x7ff00000)                      return  x+x;      /* Inf or Nan       */
+   
+   DOUBLE_EXTENDED_MODE;  /* This one should be overlapped with following integer computation */
+
+   /* Extract exponent and mantissa */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L); 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to y>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+
+#else /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+  /*  Here come the code specific to Itanium processor */
+   PREFETCH_POLY_QUICK; /* defined in log-de.h */
+   y=x;
+   i =  _Asm_getf(2/*_FR_D*/, y);  /* Cast y to a 64-bit integer */
+
+   /* Filter special cases */
+   if (i<(int64_t)ULL(0010000000000000)){   /* equivalent to : x < 2^(-1022)    */
+     if ((i & ULL(7fffffffffffffff))==0)  return -1.0/0.0;    /* log(+/-0) = -Inf */
+     if (i<0)                             return (x-x)/0;     /* log(-x) = Nan    */
+     /* Else subnormal number */
+     y *= two64; 	  /* make x a normal number    */ 
+     E = -64;
+     i =  _Asm_getf(2/*_FR_D*/, y); /* and update i */ 
+   }
+   if (i >= ULL(7ff0000000000000))        return  x+x;	      /* Inf or Nan       */
+
+   /* Extract exponent and mantissa */
+   E += (i>>52)-1023;
+   i = i & ULL(000fffffffffffff);  /* keep only mantissa */
+   index = (i + (ULL(1)<<(52-L-1))) >> (52-L);
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){    /* corresponds to y>sqrt(2)*/
+     y = _Asm_setf(2/*_FR_D*/, (i | ULL(3ff0000000000000)) - ULL(0010000000000000) ); /* exponent = -1 */
+     E++;
+   }
+   else 
+     y = _Asm_setf(2/*_FR_D*/, i | ULL(3ff0000000000000) ); /* exponent = 0*/   
+#endif  /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+ 
+   /* All the previous argument reduction was exact */
+   /* now y holds 1+f, and E is the exponent */
+   index = index & INDEXMASK;
+
+   logirh = argredtable[index].logirh;
+   r = (double_ext) (argredtable[index].r); /* approx to 1/y.d */
+   z = y*r - 1. ; /* even without an FMA, all exact */
+   
+   if(E==0)
+     roundtestmask=ACCURATE_TO_61_BITS;
+   else
+     roundtestmask=ACCURATE_TO_62_BITS;
+
+#ifdef ESTRIN
+  /* Estrin polynomial evaluation  */
+  double_ext z2,z4, p01, p23, p45, p67, p03, p47,p07;
+    
+  z2  = z*z;              p67 = c6 + z*c7;       p45 = c4 + z*c5;      p23 = c2 + z*c3;    p01 = logirh + z;
+  z4  = z2*z2;            p47 = p45 + z2*p67;    p03 = p01 + z2*p23; 
+  p07 = p03 + z4*p47;
+  logde = p07 + E*log2H;
+#endif
+  
+#ifdef PATERSON
+  double_ext z4,z2,t0,t1,t2,t3,t4,t5,t6,t7,t8;
+  
+  z2 = z * z;        t1 = z + ps_alpha;        t2 = z + ps_beta;        t3 = c3 * z + c2;        t4 = z + logirh;
+  z4 = z2 * z2;      t5 = z2 + ps_c;           t6 = t3 * z2 + t4;    
+  
+  t7 = t5 * t1 + t2; t0 = z4 * c7;             t8 = t7 * t0 + t6; 
+  
+  logde = t8 + E*log2H;
+#endif
+
+#if 0 /* to time the first step only */
+   BACK_TO_DOUBLE_MODE; return (double)t;
+#endif
+
+
+   /* To test the second step only, comment out the following line */
+   DE_TEST_AND_RETURN_RD(logde, roundtestmask);
+
+   log_accurate(&th, &tl, z, E, index);
+
+   RETURN_SUM_ROUNDED_DOWN(th, tl);
+
+}
+
+
+
+
+
+
+
+
+
+
+double log_ru(double x) {
+  double_ext logirh, r, y, z,  th, tl,  logde;
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+  db_number xdb;
+  int E, index, roundtestmask;
+#else
+  int64_t  E, i;
+  uint64_t index, roundtestmask;
+  double_ext c1,c2,c3,c4,c5,c6,c7;
+#endif
+
+   E=0;
+
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0)    return -1.0/0.0;  /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0)                              return (x-x)/0;   /* log(-x) = Nan    */
+     /* Else subnormal number */
+     E = -64; 		
+     xdb.d *= two64; 	  /* make x a normal number    */ 
+   }
+   if (xdb.i[HI] >= 0x7ff00000)                      return  x+x;      /* Inf or Nan       */
+   
+   DOUBLE_EXTENDED_MODE;  /* This one should be overlapped with following integer computation */
+
+   /* Extract exponent and mantissa */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L); 
+
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to y>sqrt(2)*/
+     index = index & INDEXMASK;
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+
+#else /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+  /*  Here come the code specific to Itanium processor */
+   PREFETCH_POLY_QUICK; /* defined in log-de.h */
+   y=x;
+   i =  _Asm_getf(2/*_FR_D*/, y);  /* Cast y to a 64-bit integer */
+
+   /* Filter special cases */
+   if (i<(int64_t)ULL(0010000000000000)){   /* equivalent to : x < 2^(-1022)    */
+     if ((i & ULL(7fffffffffffffff))==0)  return -1.0/0.0;    /* log(+/-0) = -Inf */
+     if (i<0)                             return (x-x)/0;     /* log(-x) = Nan    */
+     /* Else subnormal number */
+     y *= two64; 	  /* make x a normal number    */ 
+     E = -64;
+     i =  _Asm_getf(2/*_FR_D*/, y); /* and update i */ 
+   }
+   if (i >= ULL(7ff0000000000000))        return  x+x;	      /* Inf or Nan       */
+
+   /* Extract exponent and mantissa */
+   E += (i>>52)-1023;
+   i = i & ULL(000fffffffffffff);  /* keep only mantissa */
+   index = (i + (ULL(1)<<(52-L-1))) >> (52-L);
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){    /* corresponds to y>sqrt(2)*/
+     y = _Asm_setf(2/*_FR_D*/, (i | ULL(3ff0000000000000)) - ULL(0010000000000000) ); /* exponent = -1 */
+     index = index & INDEXMASK;
+     E++;
+   }
+   else 
+     y = _Asm_setf(2/*_FR_D*/, i | ULL(3ff0000000000000) ); /* exponent = 0*/   
+#endif  /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */
+ 
+   /* All the previous argument reduction was exact */
+   /* now y holds 1+f, and E is the exponent */
+   
+   logirh = argredtable[index].logirh;
+   r = (double_ext) (argredtable[index].r); /* approx to 1/y.d */
+   z = y*r - 1. ; /* even without an FMA, all exact */
+   
+   if(E==0)
+     roundtestmask=ACCURATE_TO_61_BITS;
+   else
+     roundtestmask=ACCURATE_TO_62_BITS;
+   
+#ifdef ESTRIN
+  /* Estrin polynomial evaluation  */
+  double_ext z2,z4, p01, p23, p45, p67, p03, p47,p07;
+    
+  z2  = z*z;              p67 = c6 + z*c7;       p45 = c4 + z*c5;      p23 = c2 + z*c3;    p01 = logirh + z;
+  z4  = z2*z2;            p47 = p45 + z2*p67;    p03 = p01 + z2*p23; 
+  p07 = p03 + z4*p47;
+  logde = p07 + E*log2H;
+#endif
+  
+#ifdef PATERSON
+  double_ext z4,z2,t0,t1,t2,t3,t4,t5,t6,t7,t8;
+  
+  z2 = z * z;        t1 = z + ps_alpha;        t2 = z + ps_beta;        t3 = c3 * z + c2;        t4 = z + logirh;
+  z4 = z2 * z2;      t5 = z2 + ps_c;           t6 = t3 * z2 + t4;    
+  
+  t7 = t5 * t1 + t2; t0 = z4 * c7;             t8 = t7 * t0 + t6; 
+  
+  logde = t8 + E*log2H;
+#endif
+
+
+#if 0 /* to time the first step only */
+   BACK_TO_DOUBLE_MODE; return (double)t;
+#endif
+
+   
+   /* To test the second step only, comment out the following line */
+   DE_TEST_AND_RETURN_RU(logde, roundtestmask);
+
+   log_accurate(&th, &tl, z, E, index);
+
+   RETURN_SUM_ROUNDED_UP(th, tl);
+
+}
+
+
+double log_rz(double x) {
+  if (x>1.0)
+    return log_rd(x);
+  else
+    return log_ru(x);
+}
+
+
diff --git a/src/crlibm/log-de.h b/src/crlibm/log-de.h
new file mode 100644
index 0000000..c5edd34
--- /dev/null
+++ b/src/crlibm/log-de.h
@@ -0,0 +1,747 @@
+/*File generated by maple/log-de.mpl*/
+
+#define L        7
+#define MAXINDEX 53
+#define INDEXMASK 127
+static const double two64 = 1.84467440737095516160000000000000000000000000000000e+19 ;
+#if 1
+#define ESTRIN
+#else
+#define PATERSON
+#endif
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+
+#ifdef PATERSON
+static const long double c7 = 1.42860987471441585385531838903183654565509641543031e-01;
+static const long double c3 = 3.33333333333333491175099611014687184251670259982347e-01;
+static const long double c2 = -5.00000000000000049710669608460378299241710919886827e-01;
+static const long double ps_alpha = -1.16665881748332273275172571436186785831523593515158e+00;
+static const long double ps_beta = -1.28333333319474127305875182925021249502606224268675e+00;
+static const long double ps_c = 3.99962323494931883068092062782916684682277264073491e-01;
+#endif/* PATERSON*/
+
+#ifdef ESTRIN
+  /* Coefficients are read directly from the array thanks to the following macros */ 
+#define c7  c[0]
+#define c6  c[1]
+#define c5  c[2]
+#define c4  c[3]
+#define c3  c[4]
+#define c2  c[5]
+static const double c[7] =  {
+   /* c7  = */ 1.42860563385550420889558154158294200897216796875000e-01L, 
+   /* c6  = */ -1.66669572609547372854521540830319281667470932006836e-01L, 
+   /* c5  = */ 1.99999999967484798357730824136524461209774017333984e-01L, 
+   /* c4  = */ -2.49999999984237081251947643067978788167238235473633e-01L, 
+   /* c3  = */ 3.33333333333333425851918718763045035302639007568359e-01L, 
+   /* c2  = */ -5.00000000000000000000000000000000000000000000000000e-01L, 
+}; 
+ 
+#endif/* ESTRIN */
+
+#define c14h  ch[0]
+#define c13h  ch[1]
+#define c12h  ch[2]
+#define c11h  ch[3]
+#define c10h  ch[4]
+#define c9h  ch[5]
+#define c8h  ch[6]
+#define c7h  ch[7]
+#define c6h  ch[8]
+#define c5h  ch[9]
+#define c4h  ch[10]
+#define c3h  ch[11]
+#define c2h  ch[12]
+#define c1h  ch[13]
+#define c7l  cl[0]
+#define c6l  cl[1]
+#define c5l  cl[2]
+#define c4l  cl[3]
+#define c3l  cl[4]
+#define c2l  cl[5]
+#define c1l  cl[6]
+#define PREFETCH_POLY_ACCURATE 
+
+#else /* not(defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)),
+   assuming Itanium, otherwise we shouldn't be there */ 
+
+#define PREFETCH_POLY_QUICK c7=c[0]; c6=c[1]; c5=c[2]; c4=c[3]; c3=c[4]; c2=c[5]; 
+#define PREFETCH_POLY_ACCURATE c14h=ch[0]; c13h=ch[1]; c12h=ch[2]; \
+        c11h=ch[3]; c10h=ch[4]; c9h=ch[5]; c8h=ch[6]; \
+        c7h=ch[7]; c6h=ch[8]; c5h=ch[9]; c4h=ch[10]; \
+        c3h=ch[11]; c2h=ch[12]; c1h=ch[13]; \
+        c7l=cl[0]; c6l=cl[1]; c5l=cl[2]; c4l=cl[3]; c3l=cl[4]; c2l=cl[5]; c1l=cl[6]; 
+#endif /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */ 
+
+static const long double log2H  = 6.93147180559945309428690474184975300886435434222221e-01L ;
+static const long double log2L  = -1.14583527267987328109462081210062935494878745868567e-20L ;
+static const long double ch[14] =  {
+   /* ch14  = */ -7.14324161786485507414918953716931326880512642674148e-02L, 
+   /* ch13  = */ 7.69266652810744782218957231456624157317492063157260e-02L, 
+   /* ch12  = */ -8.33333332381758034492348456712118576206194120459259e-02L, 
+   /* ch11  = */ 9.09090908332141065513009973997338164508619229309261e-02L, 
+   /* ch10  = */ -1.00000000000001207646721339272755102456358144991100e-01L, 
+   /* ch9  = */ 1.11111111111111906697159444623590474066077149473131e-01L, 
+   /* ch8  = */ -1.24999999999999999993223736421965597287453419994563e-01L, 
+   /* ch7  = */ 1.42857142857142857140921067549133027796415262855589e-01L, 
+   /* ch6  = */ -1.66666666666666666671184175718689601808364386670291e-01L, 
+   /* ch5  = */ 2.00000000000000000002710505431213761085018632002175e-01L, 
+   /* ch4  = */ -2.50000000000000000000000000000000000000000000000000e-01L, 
+   /* ch3  = */ 3.33333333333333333342368351437379203616728773340583e-01L, 
+   /* ch2  = */ -5.00000000000000000000000000000000000000000000000000e-01L, 
+   /* ch1  = */ 1.00000000000000000000000000000000000000000000000000e+00L, 
+}; 
+ 
+static const long double cl[8] =  {
+   /* cl7  = */ -2.34607301544056142329539178188626637856988425622953e-21L, 
+   /* cl6  = */ 4.51747965172264117284728817178707773935320194423540e-21L, 
+   /* cl5  = */ -2.71049445588233034921278017356112411600953390125340e-21L, 
+   /* cl4  = */ 4.66256664939948057471422101604617896775339795184375e-32L, 
+   /* cl3  = */ -9.03501810405641912072078793108404620486918713178584e-21L, 
+   /* cl2  = */ -2.17279608948233676401606923369245026501745724471211e-38L, 
+   /* cl1  = */ 1.65533283613483715658161425689915551329447733519200e-39L, 
+}; 
+ 
+typedef struct rri_tag {float r; long double logirh;  long double logirl; } rri ;  
+static const rri argredtable[128] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00L,   /* r[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00L, /* logirh[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00L, /* logirl[0] */ 
+  } , 
+  { 
+    9.92187500000000000000000000000000000000000000000000e-01L,   /* r[1] */ 
+    7.84317746102589287284596788335511163836599735077471e-03L, /* logirh[1] */ 
+    3.38074607588470016237165513745732472460993853200422e-22L, /* logirl[1] */ 
+  } , 
+  { 
+    9.84375000000000000000000000000000000000000000000000e-01L,   /* r[2] */ 
+    1.57483569681391686082786579570225171664787922054529e-02L, /* logirh[2] */ 
+    -7.29146496194247645559133241782926476205899642506092e-22L, /* logirl[2] */ 
+  } , 
+  { 
+    9.77050781250000000000000000000000000000000000000000e-01L,   /* r[3] */ 
+    2.32166515756649942034666594947722728647931944578886e-02L, /* logirh[3] */ 
+    8.16575450536547381330756941074595397347505963439697e-22L, /* logirl[3] */ 
+  } , 
+  { 
+    9.69726562500000000000000000000000000000000000000000e-01L,   /* r[4] */ 
+    3.07411415542805019917064427575903451383965148124844e-02L, /* logirh[4] */ 
+    7.52695325012824272079306803804945762930133964168774e-22L, /* logirl[4] */ 
+  } , 
+  { 
+    9.62402343750000000000000000000000000000000000000000e-01L,   /* r[5] */ 
+    3.83226790066782003103828830453680964751583815086633e-02L, /* logirh[5] */ 
+    1.32588478845446750814375495501523698113568837341268e-21L, /* logirl[5] */ 
+  } , 
+  { 
+    9.55078125000000000000000000000000000000000000000000e-01L,   /* r[6] */ 
+    4.59621355646357592953472545604931553953065304085612e-02L, /* logirh[6] */ 
+    -4.35764480179623995168944249774175041700203429439418e-22L, /* logirl[6] */ 
+  } , 
+  { 
+    9.48242187500000000000000000000000000000000000000000e-01L,   /* r[7] */ 
+    5.31453373081281829112658150054970818132460408378392e-02L, /* logirh[7] */ 
+    1.44205225309117178233184984742382173167310218612172e-21L, /* logirl[7] */ 
+  } , 
+  { 
+    9.41406250000000000000000000000000000000000000000000e-01L,   /* r[8] */ 
+    6.03805109889074798701694406916073987190429761540145e-02L, /* logirh[8] */ 
+    1.27621226298941086768118279123481924424995440912208e-21L, /* logirl[8] */ 
+  } , 
+  { 
+    9.34082031250000000000000000000000000000000000000000e-01L,   /* r[9] */ 
+    6.81910167191455281494459790547768562873898190446198e-02L, /* logirh[9] */ 
+    -1.70880559998991196112313542261373401163426418187142e-21L, /* logirl[9] */ 
+  } , 
+  { 
+    9.27734375000000000000000000000000000000000000000000e-01L,   /* r[10] */ 
+    7.50098210048665755422673054320092944635689491406083e-02L, /* logirh[10] */ 
+    2.27568935135100192738710607079520297834759644719280e-21L, /* logirl[10] */ 
+  } , 
+  { 
+    9.20898437500000000000000000000000000000000000000000e-01L,   /* r[11] */ 
+    8.24055229659955995008915365096502370079178945161402e-02L, /* logirh[11] */ 
+    -2.08652677548826307173863192982976527450361189636477e-21L, /* logirl[11] */ 
+  } , 
+  { 
+    9.14062500000000000000000000000000000000000000000000e-01L,   /* r[12] */ 
+    8.98563291218610470738304384086259091191095649264753e-02L, /* logirh[12] */ 
+    2.81649638824005330910700533403251014557157154610229e-21L, /* logirl[12] */ 
+  } , 
+  { 
+    9.07714843750000000000000000000000000000000000000000e-01L,   /* r[13] */ 
+    9.68249984379543874202667802508770478198130149394274e-02L, /* logirh[13] */ 
+    3.68094693298691578446114201021493215549389467689654e-22L, /* logirl[13] */ 
+  } , 
+  { 
+    9.01367187500000000000000000000000000000000000000000e-01L,   /* r[14] */ 
+    1.03842571096600936786835851777244243976383586414158e-01L, /* logirh[14] */ 
+    2.54338872616873521380798016729106577000795946658943e-21L, /* logirl[14] */ 
+  } , 
+  { 
+    8.95019531250000000000000000000000000000000000000000e-01L,   /* r[15] */ 
+    1.10909738319693389317513541186821512951610202435404e-01L, /* logirh[15] */ 
+    2.35644659310271753015106107980519412012017300780629e-21L, /* logirl[15] */ 
+  } , 
+  { 
+    8.88671875000000000000000000000000000000000000000000e-01L,   /* r[16] */ 
+    1.18027206088557368998193455866818624144798377528787e-01L, /* logirh[16] */ 
+    -2.70388097791548543320098495660860118836293912482208e-21L, /* logirl[16] */ 
+  } , 
+  { 
+    8.82812500000000000000000000000000000000000000000000e-01L,   /* r[17] */ 
+    1.24642445207276597340148149156702217510428454261273e-01L, /* logirh[17] */ 
+    -1.65479256548791301121285753303466491277640159570672e-21L, /* logirl[17] */ 
+  } , 
+  { 
+    8.76953125000000000000000000000000000000000000000000e-01L,   /* r[18] */ 
+    1.31301737297253491506014363987553394963470054790378e-01L, /* logirh[18] */ 
+    -4.44706169007428370264461881106553970898124442872790e-21L, /* logirl[18] */ 
+  } , 
+  { 
+    8.70605468750000000000000000000000000000000000000000e-01L,   /* r[19] */ 
+    1.38566368296257995358167561250617438872723141685128e-01L, /* logirh[19] */ 
+    -4.67634371291677236899800289793824808374204801868093e-22L, /* logirl[19] */ 
+  } , 
+  { 
+    8.64746093750000000000000000000000000000000000000000e-01L,   /* r[20] */ 
+    1.45319348376564863616804482160382860911340685561299e-01L, /* logirh[20] */ 
+    -1.30029933894575998199859720642569228712037418444249e-21L, /* logirl[20] */ 
+  } , 
+  { 
+    8.58886718750000000000000000000000000000000000000000e-01L,   /* r[21] */ 
+    1.52118241421840233982849116545210677031718660145998e-01L, /* logirh[21] */ 
+    3.64354833902581289681945250205165982842948711023632e-21L, /* logirl[21] */ 
+  } , 
+  { 
+    8.53515625000000000000000000000000000000000000000000e-01L,   /* r[22] */ 
+    1.58391429943917633934029505493601419630067539401352e-01L, /* logirh[22] */ 
+    5.27932393193803736951671071669282537406718712467109e-21L, /* logirl[22] */ 
+  } , 
+  { 
+    8.47656250000000000000000000000000000000000000000000e-01L,   /* r[23] */ 
+    1.65280090939102924306155009692709256796661065891385e-01L, /* logirh[23] */ 
+    -2.81510601283365227976423953518023725736246907863349e-21L, /* logirl[23] */ 
+  } , 
+  { 
+    8.42285156250000000000000000000000000000000000000000e-01L,   /* r[24] */ 
+    1.71636656693938272180742846129142264999245526269078e-01L, /* logirh[24] */ 
+    5.29375472570288169027310108578005956387644768823013e-21L, /* logirl[24] */ 
+  } , 
+  { 
+    8.36425781250000000000000000000000000000000000000000e-01L,   /* r[25] */ 
+    1.78617487835278495469731006861646704919621697627008e-01L, /* logirh[25] */ 
+    -5.38910368385932491449404580991668679267931166391590e-21L, /* logirl[25] */ 
+  } , 
+  { 
+    8.31054687500000000000000000000000000000000000000000e-01L,   /* r[26] */ 
+    1.85059677026078958999807423657646410219967947341502e-01L, /* logirh[26] */ 
+    -2.33471191752401180750814334631327570292249238444557e-21L, /* logirl[26] */ 
+  } , 
+  { 
+    8.25683593750000000000000000000000000000000000000000e-01L,   /* r[27] */ 
+    1.91543637260818105263310805186360852303550927899778e-01L, /* logirh[27] */ 
+    -6.00441704121360115108475562878860059804996577890616e-22L, /* logirl[27] */ 
+  } , 
+  { 
+    8.20312500000000000000000000000000000000000000000000e-01L,   /* r[28] */ 
+    1.98069913762093794816921549228894150473934132605791e-01L, /* logirh[28] */ 
+    2.34598738644875224435499574368287811489905562806854e-21L, /* logirl[28] */ 
+  } , 
+  { 
+    8.15429687500000000000000000000000000000000000000000e-01L,   /* r[29] */ 
+    2.04040080748597612311876631219220712409878615289927e-01L, /* logirh[29] */ 
+    -6.55266084220369778013064711105338848331692231543846e-23L, /* logirl[29] */ 
+  } , 
+  { 
+    8.10058593750000000000000000000000000000000000000000e-01L,   /* r[30] */ 
+    2.10648695968953912917276914684716615511206327937543e-01L, /* logirh[30] */ 
+    -1.26710049189072313882986012728331847015236776848568e-21L, /* logirl[30] */ 
+  } , 
+  { 
+    8.05175781250000000000000000000000000000000000000000e-01L,   /* r[31] */ 
+    2.16694663599799501227903542055486241224571131169796e-01L, /* logirh[31] */ 
+    -4.60644559263224179134698153089361151013881754428009e-21L, /* logirl[31] */ 
+  } , 
+  { 
+    7.99804687500000000000000000000000000000000000000000e-01L,   /* r[32] */ 
+    2.23387721746383670218673127283448565094658988527954e-01L, /* logirh[32] */ 
+    4.31742844476737192308069645283904795344591963380062e-21L, /* logirl[32] */ 
+  } , 
+  { 
+    7.94921875000000000000000000000000000000000000000000e-01L,   /* r[33] */ 
+    2.29511439596912796321610469862939396534784464165568e-01L, /* logirh[33] */ 
+    3.43937426407325242308884173752237970071183767432875e-21L, /* logirl[33] */ 
+  } , 
+  { 
+    7.90039062500000000000000000000000000000000000000000e-01L,   /* r[34] */ 
+    2.35672888540961404738862880470229299589846050366759e-01L, /* logirh[34] */ 
+    -1.79412857504879722290348395953977521127195555595173e-21L, /* logirl[34] */ 
+  } , 
+  { 
+    7.85156250000000000000000000000000000000000000000000e-01L,   /* r[35] */ 
+    2.41872536420486724268049359698462552614728338085115e-01L, /* logirh[35] */ 
+    4.49037868070153677475908787622962677106946524955373e-21L, /* logirl[35] */ 
+  } , 
+  { 
+    7.80273437500000000000000000000000000000000000000000e-01L,   /* r[36] */ 
+    2.48110859833178427105411859021621978627081261947751e-01L, /* logirh[36] */ 
+    -3.57593208515654235641923519987160957618932290654994e-21L, /* logirl[36] */ 
+  } , 
+  { 
+    7.75878906250000000000000000000000000000000000000000e-01L,   /* r[37] */ 
+    2.53758819622682423467613377354723525058943778276443e-01L, /* logirh[37] */ 
+    3.20563840854194897949310719402625620635813869593052e-21L, /* logirl[37] */ 
+  } , 
+  { 
+    7.70996093750000000000000000000000000000000000000000e-01L,   /* r[38] */ 
+    2.60071971903756312988632154459267553647805470973253e-01L, /* logirh[38] */ 
+    -5.41882056366019440034410441132485333532494541348922e-21L, /* logirl[38] */ 
+  } , 
+  { 
+    7.66601562500000000000000000000000000000000000000000e-01L,   /* r[39] */ 
+    2.65788087817044662143715211266581377458351198583841e-01L, /* logirh[39] */ 
+    3.40143368552141502891849732509800494117246716875116e-21L, /* logirl[39] */ 
+  } , 
+  { 
+    7.61718750000000000000000000000000000000000000000000e-01L,   /* r[40] */ 
+    2.72177885915815673289249593258531945139111485332251e-01L, /* logirh[40] */ 
+    -8.84633307151349513479527937859825353954577224837834e-22L, /* logirl[40] */ 
+  } , 
+  { 
+    7.57324218750000000000000000000000000000000000000000e-01L,   /* r[41] */ 
+    2.77963822982859581314958596909292509735678322613239e-01L, /* logirh[41] */ 
+    -3.54474552917897427055990528561562900487032834630297e-21L, /* logirl[41] */ 
+  } , 
+  { 
+    7.52929687500000000000000000000000000000000000000000e-01L,   /* r[42] */ 
+    2.83783432036123604418629065571089142849814379587770e-01L, /* logirh[42] */ 
+    6.65259732689538164307466344899173176872160839687638e-21L, /* logirl[42] */ 
+  } , 
+  { 
+    7.48535156250000000000000000000000000000000000000000e-01L,   /* r[43] */ 
+    2.89637107287584277988401471048973689903505146503448e-01L, /* logirh[43] */ 
+    8.44502718672055373787764268905081131551582182658017e-21L, /* logirl[43] */ 
+  } , 
+  { 
+    7.44140625000000000000000000000000000000000000000000e-01L,   /* r[44] */ 
+    2.95525249912806820310438860044399689286365173757076e-01L, /* logirh[44] */ 
+    1.96418844037132387179566864994176219064092063775800e-21L, /* logirl[44] */ 
+  } , 
+  { 
+    7.39746093750000000000000000000000000000000000000000e-01L,   /* r[45] */ 
+    3.01448268215928886712157847016513301241502631455660e-01L, /* logirh[45] */ 
+    -2.80734803827355347488954127622224279750224052590805e-21L, /* logirl[45] */ 
+  } , 
+  { 
+    7.35839843750000000000000000000000000000000000000000e-01L,   /* r[46] */ 
+    3.06742787532902944200221412307527657503669615834951e-01L, /* logirh[46] */ 
+    1.21982177874199009422425119496965659738938728771737e-20L, /* logirl[46] */ 
+  } , 
+  { 
+    7.31445312500000000000000000000000000000000000000000e-01L,   /* r[47] */ 
+    3.12732822082233615765050824264470463731413474306464e-01L, /* logirh[47] */ 
+    -2.48117014916151417666322195359345625530313936737052e-21L, /* logirl[47] */ 
+  } , 
+  { 
+    7.27050781250000000000000000000000000000000000000000e-01L,   /* r[48] */ 
+    3.18758953475389418655326981277831066563521744683385e-01L, /* logirh[48] */ 
+    6.18924657142483596407123884547314261312268979674812e-21L, /* logirl[48] */ 
+  } , 
+  { 
+    7.23144531250000000000000000000000000000000000000000e-01L,   /* r[49] */ 
+    3.24146171891599621094504773965994104401033837348223e-01L, /* logirh[49] */ 
+    -6.77810676502059511550248363328884520138042030679722e-21L, /* logirl[49] */ 
+  } , 
+  { 
+    7.19238281250000000000000000000000000000000000000000e-01L,   /* r[50] */ 
+    3.29562569696768133456748345322395721268549095839262e-01L, /* logirh[50] */ 
+    3.36942877993616991096538545261104308752103794630367e-21L, /* logirl[50] */ 
+  } , 
+  { 
+    7.14843750000000000000000000000000000000000000000000e-01L,   /* r[51] */ 
+    3.35691291638141535192156258982087990716536296531558e-01L, /* logirh[51] */ 
+    -9.33627664815897075676848962806562975738122262236195e-22L, /* logirl[51] */ 
+  } , 
+  { 
+    7.10937500000000000000000000000000000000000000000000e-01L,   /* r[52] */ 
+    3.41170757402767124748460894623214301191183039918542e-01L, /* logirh[52] */ 
+    1.33237705755233408947468410861546874819170412376378e-20L, /* logirl[52] */ 
+  } , 
+  { 
+    1.41406250000000000000000000000000000000000000000000e+00L,   /* r[53] */ 
+    -3.46466767346208580905441917763276649111503502354026e-01L, /* logirh[53] */ 
+    -1.30202706624963016000170912600455670740294985927040e-20L, /* logirl[53] */ 
+  } , 
+  { 
+    1.40625000000000000000000000000000000000000000000000e+00L,   /* r[54] */ 
+    -3.40926586970593210293607733252230218568001873791218e-01L, /* logirh[54] */ 
+    -1.14814665281259898750718236421526040752891815931201e-20L, /* logirl[54] */ 
+  } , 
+  { 
+    1.39843750000000000000000000000000000000000000000000e+00L,   /* r[55] */ 
+    -3.35355541921137830261656978536599638118786970153451e-01L, /* logirh[55] */ 
+    4.47739872243343904426499770912991919745896227107013e-21L, /* logirl[55] */ 
+  } , 
+  { 
+    1.39160156250000000000000000000000000000000000000000e+00L,   /* r[56] */ 
+    -3.30455287103297806430195551752326821315364213660359e-01L, /* logirh[56] */ 
+    -3.27456892866201886570311318311258813067527495773846e-21L, /* logirl[56] */ 
+  } , 
+  { 
+    1.38378906250000000000000000000000000000000000000000e+00L,   /* r[57] */ 
+    -3.24825434091227342270433858795186665702203754335642e-01L, /* logirh[57] */ 
+    1.19511796024320905916745808450236450294857297262032e-20L, /* logirl[57] */ 
+  } , 
+  { 
+    1.37597656250000000000000000000000000000000000000000e+00L,   /* r[58] */ 
+    -3.19163706299227122796481267985591045999171910807490e-01L, /* logirh[58] */ 
+    6.90202297465146164725318961579993617833444966789173e-21L, /* logirl[58] */ 
+  } , 
+  { 
+    1.36914062500000000000000000000000000000000000000000e+00L,   /* r[59] */ 
+    -3.14183261995082305749471540678996461792849004268646e-01L, /* logirh[59] */ 
+    4.21220977458500148787692752842598753888865534619897e-21L, /* logirl[59] */ 
+  } , 
+  { 
+    1.36132812500000000000000000000000000000000000000000e+00L,   /* r[60] */ 
+    -3.08460785721016099366091275935097826277342392131686e-01L, /* logirh[60] */ 
+    4.88237814815281499208804200664728929895975484184937e-21L, /* logirl[60] */ 
+  } , 
+  { 
+    1.35449218750000000000000000000000000000000000000000e+00L,   /* r[61] */ 
+    -3.03426614715378494924018226708284373671631328761578e-01L, /* logirh[61] */ 
+    -4.79684803634605371547569285269009577973457927997898e-21L, /* logirl[61] */ 
+  } , 
+  { 
+    1.34765625000000000000000000000000000000000000000000e+00L,   /* r[62] */ 
+    -2.98366972551797281470575134987299747990618925541639e-01L, /* logirh[62] */ 
+    5.67470469380282997916448622011708142111988647148768e-21L, /* logirl[62] */ 
+  } , 
+  { 
+    1.33984375000000000000000000000000000000000000000000e+00L,   /* r[63] */ 
+    -2.92553002686377439973833616826404124822147423401475e-01L, /* logirh[63] */ 
+    -4.36764183772251948513980052351746496236270975543032e-21L, /* logirl[63] */ 
+  } , 
+  { 
+    1.33300781250000000000000000000000000000000000000000e+00L,   /* r[64] */ 
+    -2.87437902019607012987821928473586297059227945283055e-01L, /* logirh[64] */ 
+    5.29838789814029919861828480804189667231634001130568e-21L, /* logirl[64] */ 
+  } , 
+  { 
+    1.32617187500000000000000000000000000000000000000000e+00L,   /* r[65] */ 
+    -2.82296502519188342454669118919419190660846652463078e-01L, /* logirh[65] */ 
+    -1.23161531041331401059141407104196718032007794736410e-20L, /* logirl[65] */ 
+  } , 
+  { 
+    1.31933593750000000000000000000000000000000000000000e+00L,   /* r[66] */ 
+    -2.77128532360745762785523768623185958404064876958728e-01L, /* logirh[66] */ 
+    -2.43881362128685466800250141549314299428343038574346e-21L, /* logirl[66] */ 
+  } , 
+  { 
+    1.31250000000000000000000000000000000000000000000000e+00L,   /* r[67] */ 
+    -2.71933715483641758834396431887547862515930319204926e-01L, /* logirh[67] */ 
+    2.72693735454870053343005187033588239526260949526707e-21L, /* logirl[67] */ 
+  } , 
+  { 
+    1.30566406250000000000000000000000000000000000000000e+00L,   /* r[68] */ 
+    -2.66711771502490083769927597945326169792679138481617e-01L, /* logirh[68] */ 
+    -1.30538831184550256981566412802003295683583076000542e-20L, /* logirl[68] */ 
+  } , 
+  { 
+    1.29980468750000000000000000000000000000000000000000e+00L,   /* r[69] */ 
+    -2.62214012795658537999981055333087454073393018916249e-01L, /* logirh[69] */ 
+    -1.35284639805347646364569630725426945939555870993862e-20L, /* logirl[69] */ 
+  } , 
+  { 
+    1.29296875000000000000000000000000000000000000000000e+00L,   /* r[70] */ 
+    -2.56940930897500425454356778875997235900285886600614e-01L, /* logirh[70] */ 
+    7.59691096477297380738769966672131808838423827917718e-21L, /* logirl[70] */ 
+  } , 
+  { 
+    1.28613281250000000000000000000000000000000000000000e+00L,   /* r[71] */ 
+    -2.51639896143827947226981334161166614649118855595589e-01L, /* logirh[71] */ 
+    1.08451820776528904003677301321556919497451301342926e-20L, /* logirl[71] */ 
+  } , 
+  { 
+    1.28027343750000000000000000000000000000000000000000e+00L,   /* r[72] */ 
+    -2.47073678164246748038433351690734696148865623399615e-01L, /* logirh[72] */ 
+    -2.70934348074983423389837544898983311835569196319188e-22L, /* logirl[72] */ 
+  } , 
+  { 
+    1.27343750000000000000000000000000000000000000000000e+00L,   /* r[73] */ 
+    -2.41719936887145168147327835284077224287102581001818e-01L, /* logirh[73] */ 
+    3.02031937056332418377432311426563822398827693734850e-21L, /* logirl[73] */ 
+  } , 
+  { 
+    1.26757812500000000000000000000000000000000000000000e+00L,   /* r[74] */ 
+    -2.37108091664582209921611002934049849955044919624925e-01L, /* logirh[74] */ 
+    -1.29385562718796125049667754614832437256004301349817e-21L, /* logirl[74] */ 
+  } , 
+  { 
+    1.26074218750000000000000000000000000000000000000000e+00L,   /* r[75] */ 
+    -2.31700585247189405499685169176338206398213515058160e-01L, /* logirh[75] */ 
+    6.62539371561050126516331629758628121599171156714272e-21L, /* logirl[75] */ 
+  } , 
+  { 
+    1.25488281250000000000000000000000000000000000000000e+00L,   /* r[76] */ 
+    -2.27042191729867078774313463029876913878979394212365e-01L, /* logirh[76] */ 
+    -5.91897037580049650648090820667969090523023685061856e-21L, /* logirl[76] */ 
+  } , 
+  { 
+    1.24902343750000000000000000000000000000000000000000e+00L,   /* r[77] */ 
+    -2.22361995979389595864202273933774023362275329418480e-01L, /* logirh[77] */ 
+    1.99231806901499648836052705402258881903978292639586e-21L, /* logirl[77] */ 
+  } , 
+  { 
+    1.24316406250000000000000000000000000000000000000000e+00L,   /* r[78] */ 
+    -2.17659792957953425506303912762007257697405293583870e-01L, /* logirh[78] */ 
+    -4.74300907803349351890305548951624396775339872866125e-22L, /* logirl[78] */ 
+  } , 
+  { 
+    1.23632812500000000000000000000000000000000000000000e+00L,   /* r[79] */ 
+    -2.12145797104668402385590705860884952471678843721747e-01L, /* logirh[79] */ 
+    3.47829660766824246239119087253730459399781610669550e-21L, /* logirl[79] */ 
+  } , 
+  { 
+    1.23046875000000000000000000000000000000000000000000e+00L,   /* r[80] */ 
+    -2.07395194346070587155541307955441965304999030195177e-01L, /* logirh[80] */ 
+    -3.20427089356426854873522351022491299412381577686272e-21L, /* logirl[80] */ 
+  } , 
+  { 
+    1.22460937500000000000000000000000000000000000000000e+00L,   /* r[81] */ 
+    -2.02621915593412910716630305485441709834049106575549e-01L, /* logirh[81] */ 
+    5.50315183352228080702347654662068966867864577851415e-21L, /* logirl[81] */ 
+  } , 
+  { 
+    1.21875000000000000000000000000000000000000000000000e+00L,   /* r[82] */ 
+    -1.97825743329919880362068387857910067850752966478467e-01L, /* logirh[82] */ 
+    -5.03683339051401224496307307364812285151080899609793e-22L, /* logirl[82] */ 
+  } , 
+  { 
+    1.21289062500000000000000000000000000000000000000000e+00L,   /* r[83] */ 
+    -1.93006456893970980236542936414601001615665154531598e-01L, /* logirh[83] */ 
+    -8.56513039583118089646992381309540829893520394889616e-22L, /* logirl[83] */ 
+  } , 
+  { 
+    1.20800781250000000000000000000000000000000000000000e+00L,   /* r[84] */ 
+    -1.88972566793034805259442719671536536907296977005899e-01L, /* logirh[84] */ 
+    -1.46116025447516430873070498908178881036913039739167e-21L, /* logirl[84] */ 
+  } , 
+  { 
+    1.20214843750000000000000000000000000000000000000000e+00L,   /* r[85] */ 
+    -1.84110320585000416173803057529045901219433289952576e-01L, /* logirh[85] */ 
+    -4.15395156136845605789354429056953059762833513205358e-21L, /* logirl[85] */ 
+  } , 
+  { 
+    1.19628906250000000000000000000000000000000000000000e+00L,   /* r[86] */ 
+    -1.79224317379374265237954554075283652991856797598302e-01L, /* logirh[86] */ 
+    -1.94838468168540457849663379542888863164719363528710e-21L, /* logirl[86] */ 
+  } , 
+  { 
+    1.19042968750000000000000000000000000000000000000000e+00L,   /* r[87] */ 
+    -1.74314323881818430785127331528183702857859316281974e-01L, /* logirh[87] */ 
+    6.22657527069549481059986868787317656634503241639655e-21L, /* logirl[87] */ 
+  } , 
+  { 
+    1.18554687500000000000000000000000000000000000000000e+00L,   /* r[88] */ 
+    -1.70204166019990477397598113706855826876562787219882e-01L, /* logirh[88] */ 
+    2.71497198375317303100785063981453318980131866492304e-21L, /* logirl[88] */ 
+  } , 
+  { 
+    1.17968750000000000000000000000000000000000000000000e+00L,   /* r[89] */ 
+    -1.65249572895307162873914340328607153196571744047105e-01L, /* logirh[89] */ 
+    -1.69710894863316053274660137780472619090744715377758e-21L, /* logirl[89] */ 
+  } , 
+  { 
+    1.17382812500000000000000000000000000000000000000000e+00L,   /* r[90] */ 
+    -1.60270309495699794511943195307601683907705591991544e-01L, /* logirh[90] */ 
+    -6.04821814795533552862893869629633677033284792785115e-21L, /* logirl[90] */ 
+  } , 
+  { 
+    1.16894531250000000000000000000000000000000000000000e+00L,   /* r[91] */ 
+    -1.56101899958520053736952051814945718888338888064027e-01L, /* logirh[91] */ 
+    4.40261722062672347380361273563329366574299418033041e-21L, /* logirl[91] */ 
+  } , 
+  { 
+    1.16406250000000000000000000000000000000000000000000e+00L,   /* r[92] */ 
+    -1.51916042025841975066048281095554273179004667326808e-01L, /* logirh[92] */ 
+    -5.75514380133023814872665374682664797890000868696983e-21L, /* logirl[92] */ 
+  } , 
+  { 
+    1.15820312500000000000000000000000000000000000000000e+00L,   /* r[93] */ 
+    -1.46869773958217667795276076270205578566674375906587e-01L, /* logirh[93] */ 
+    3.74542574364605198240110299363146340829881458953744e-21L, /* logirl[93] */ 
+  } , 
+  { 
+    1.15332031250000000000000000000000000000000000000000e+00L,   /* r[94] */ 
+    -1.42645010597909210864992976541820723923592595383525e-01L, /* logirh[94] */ 
+    -1.49668764603399746810002277800399641956108986115277e-21L, /* logirl[94] */ 
+  } , 
+  { 
+    1.14843750000000000000000000000000000000000000000000e+00L,   /* r[95] */ 
+    -1.38402322859119135682777479434690803827834315598011e-01L, /* logirh[95] */ 
+    -2.54839416695838356532650800861069791639429031347559e-21L, /* logirl[95] */ 
+  } , 
+  { 
+    1.14257812500000000000000000000000000000000000000000e+00L,   /* r[96] */ 
+    -1.33287222192348708683213263925804170639821677468717e-01L, /* logirh[96] */ 
+    -6.43489158716437030647791169560962525141739108779860e-21L, /* logirl[96] */ 
+  } , 
+  { 
+    1.13769531250000000000000000000000000000000000000000e+00L,   /* r[97] */ 
+    -1.29004560400347845734790423743998388772524776868522e-01L, /* logirh[97] */ 
+    4.12743043068895141295491814920903816740508819920186e-21L, /* logirl[97] */ 
+  } , 
+  { 
+    1.13281250000000000000000000000000000000000000000000e+00L,   /* r[98] */ 
+    -1.24703478500957235860374400920891346800090104807168e-01L, /* logirh[98] */ 
+    -3.03211445997192169150157656625233654585699365130551e-21L, /* logirl[98] */ 
+  } , 
+  { 
+    1.12792968750000000000000000000000000000000000000000e+00L,   /* r[99] */ 
+    -1.20383817356440820990376872751115300275159825105220e-01L, /* logirh[99] */ 
+    -6.02804224141392601725339572746961606433931174921632e-22L, /* logirl[99] */ 
+  } , 
+  { 
+    1.12304687500000000000000000000000000000000000000000e+00L,   /* r[100] */ 
+    -1.16045415757842655255155980137393711970617005135864e-01L, /* logirh[100] */ 
+    1.97357499841142715648611745206675471003368015857707e-21L, /* logirl[100] */ 
+  } , 
+  { 
+    1.11816406250000000000000000000000000000000000000000e+00L,   /* r[101] */ 
+    -1.11688110388886928867871375231635155955700611229986e-01L, /* logirh[101] */ 
+    -1.80234734539512005333983723608110499312624517402909e-21L, /* logirl[101] */ 
+  } , 
+  { 
+    1.11328125000000000000000000000000000000000000000000e+00L,   /* r[102] */ 
+    -1.07311735789088050666375585839862338843886391259730e-01L, /* logirh[102] */ 
+    -7.99444531291997962572940662749597218537387594367069e-22L, /* logirl[102] */ 
+  } , 
+  { 
+    1.10839843750000000000000000000000000000000000000000e+00L,   /* r[103] */ 
+    -1.02916124316049955441049277432563613388083467725664e-01L, /* logirh[103] */ 
+    -7.70418045355390537427085452827290090533981671198214e-22L, /* logirl[103] */ 
+  } , 
+  { 
+    1.10351562500000000000000000000000000000000000000000e+00L,   /* r[104] */ 
+    -9.85011061069331584304480803337966676735959481447935e-02L, /* logirh[104] */ 
+    2.64634661517646879820354995203947987149684385342190e-21L, /* logirl[104] */ 
+  } , 
+  { 
+    1.09863281250000000000000000000000000000000000000000e+00L,   /* r[105] */ 
+    -9.40665090390674124196622452043214934747084043920040e-02L, /* logirh[105] */ 
+    -7.85013737527153642092056782136336663408299656719499e-22L, /* logirl[105] */ 
+  } , 
+  { 
+    1.09375000000000000000000000000000000000000000000000e+00L,   /* r[106] */ 
+    -8.96121586896871326189772770376418264959283987991512e-02L, /* logirh[106] */ 
+    -9.74192340842702289248316897714444315823596817643550e-22L, /* logirl[106] */ 
+  } , 
+  { 
+    1.08984375000000000000000000000000000000000000000000e+00L,   /* r[107] */ 
+    -8.60343373418031533820279736779479407005055691115558e-02L, /* logirh[107] */ 
+    2.30146955951865559597249227413865587554269312860475e-22L, /* logirl[107] */ 
+  } , 
+  { 
+    1.08496093750000000000000000000000000000000000000000e+00L,   /* r[108] */ 
+    -8.15439840401769007739956988956020467185226152651012e-02L, /* logirh[108] */ 
+    1.75068599249270760931371736454488137316032510066418e-22L, /* logirl[108] */ 
+  } , 
+  { 
+    1.08007812500000000000000000000000000000000000000000e+00L,   /* r[109] */ 
+    -7.70333764828270145253981751598537641712027834728360e-02L, /* logirh[109] */ 
+    2.18898335885222504011340723675649479553611259830224e-21L, /* logirl[109] */ 
+  } , 
+  { 
+    1.07519531250000000000000000000000000000000000000000e+00L,   /* r[110] */ 
+    -7.25023311232268688402238278334355214838069514371455e-02L, /* logirh[110] */ 
+    -2.13213366575366793826831658963525268068913415683098e-21L, /* logirl[110] */ 
+  } , 
+  { 
+    1.07128906250000000000000000000000000000000000000000e+00L,   /* r[111] */ 
+    -6.88626546757771517366978307472802356414831592701375e-02L, /* logirh[111] */ 
+    -3.28324237603869825985548439776523090582575800369088e-22L, /* logirl[111] */ 
+  } , 
+  { 
+    1.06640625000000000000000000000000000000000000000000e+00L,   /* r[112] */ 
+    -6.42943507053972572172256989830874118752035428769886e-02L, /* logirh[112] */ 
+    9.97248717475917389385548315283734311163209646118044e-22L, /* logirl[112] */ 
+  } , 
+  { 
+    1.06250000000000000000000000000000000000000000000000e+00L,   /* r[113] */ 
+    -6.06246218164348425809463336011440048878284869715571e-02L, /* logirh[113] */ 
+    3.40201560723741601617729662632506532290642311489711e-22L, /* logirl[113] */ 
+  } , 
+  { 
+    1.05761718750000000000000000000000000000000000000000e+00L,   /* r[114] */ 
+    -5.60184414015375172410100661213316897146796691231430e-02L, /* logirh[114] */ 
+    3.11800048645913474307950146912226463632967430723724e-23L, /* logirl[114] */ 
+  } , 
+  { 
+    1.05371093750000000000000000000000000000000000000000e+00L,   /* r[115] */ 
+    -5.23181596586815653583246027436004510491329710930586e-02L, /* logirh[115] */ 
+    1.68615246867707396959723624602535685414462357313269e-21L, /* logirl[115] */ 
+  } , 
+  { 
+    1.04882812500000000000000000000000000000000000000000e+00L,   /* r[116] */ 
+    -4.76734694693569028189818886920292584363778587430716e-02L, /* logirh[116] */ 
+    1.02131487169049086541356584124809714333053944625270e-21L, /* logirl[116] */ 
+  } , 
+  { 
+    1.04492187500000000000000000000000000000000000000000e+00L,   /* r[117] */ 
+    -4.39421218564987631503880941008510774281603517010808e-02L, /* logirh[117] */ 
+    3.19036974975549018917247656911137538435844307015502e-22L, /* logirl[117] */ 
+  } , 
+  { 
+    1.04101562500000000000000000000000000000000000000000e+00L,   /* r[118] */ 
+    -4.01967991263367551645860776404761693925138388294727e-02L, /* logirh[118] */ 
+    -5.75643838660911109663810221439950742515738641098385e-22L, /* logirl[118] */ 
+  } , 
+  { 
+    1.03613281250000000000000000000000000000000000000000e+00L,   /* r[119] */ 
+    -3.54953330145300408896490932525447092871218046639115e-02L, /* logirh[119] */ 
+    9.92857944898394620246865383584341693120429858950945e-23L, /* logirl[119] */ 
+  } , 
+  { 
+    1.03222656250000000000000000000000000000000000000000e+00L,   /* r[120] */ 
+    -3.17181802707845397290716514537844972210223204456270e-02L, /* logirh[120] */ 
+    -1.96176892105841918795869133037686185923113451571873e-22L, /* logirl[120] */ 
+  } , 
+  { 
+    1.02832031250000000000000000000000000000000000000000e+00L,   /* r[121] */ 
+    -2.79267065345224074627335925091742296899610664695501e-02L, /* logirh[121] */ 
+    5.86417835518487049711934217680032678831410128853609e-22L, /* logirl[121] */ 
+  } , 
+  { 
+    1.02441406250000000000000000000000000000000000000000e+00L,   /* r[122] */ 
+    -2.41208027968440809158740456216718506254892417928204e-02L, /* logirh[122] */ 
+    3.02985243973796148231999463903827273031077578359612e-22L, /* logirl[122] */ 
+  } , 
+  { 
+    1.01953125000000000000000000000000000000000000000000e+00L,   /* r[123] */ 
+    -1.93429628431309346365065977152442044939562038052827e-02L, /* logirh[123] */ 
+    6.01063173693734308460897092397749141966269930081944e-22L, /* logirl[123] */ 
+  } , 
+  { 
+    1.01562500000000000000000000000000000000000000000000e+00L,   /* r[124] */ 
+    -1.55041865359652541508843977442755335260926585760899e-02L, /* logirh[124] */ 
+    3.03517018286976482243336130818153212447067590236466e-23L, /* logirl[124] */ 
+  } , 
+  { 
+    1.01171875000000000000000000000000000000000000000000e+00L,   /* r[125] */ 
+    -1.16506172199752741354571356803548898284361712285317e-02L, /* logirh[125] */ 
+    -1.34307128859459104723409399281441278120110731736138e-22L, /* logirl[125] */ 
+  } , 
+  { 
+    1.00781250000000000000000000000000000000000000000000e+00L,   /* r[126] */ 
+    -7.78214044205494894757658497566610300566480873385444e-03L, /* logirh[126] */ 
+    1.13684914529339327537355164185463042556838581909991e-22L, /* logirl[126] */ 
+  } , 
+  { 
+    1.00390625000000000000000000000000000000000000000000e+00L,   /* r[127] */ 
+    -3.89864041565732301388162890642963276377486181445420e-03L, /* logirh[127] */ 
+    -5.57141894132742469511718763808942289917039607877533e-23L, /* logirl[127] */ 
+  } }; 
+ 
diff --git a/src/crlibm/log-de2.c b/src/crlibm/log-de2.c
new file mode 100644
index 0000000..39d9381
--- /dev/null
+++ b/src/crlibm/log-de2.c
@@ -0,0 +1,280 @@
+/* 
+ *this function computes log, correctly rounded, 
+ using experimental techniques based on  double-extended arithmetic
+
+ THIS IS EXPERIMENTAL SOFTWARE
+
+In particular it changes rounding modes all the time without warning
+nor restoring.
+ 
+ *
+ * Author :  Florent de Dinechin
+ * Florent.de.Dinechin at ens-lyon.fr
+ *
+
+ To have it replace the crlibm log, do:
+
+on pentium, 
+ gcc -DHAVE_CONFIG_H -I.  -fPIC  -O2 -c log-de2.c;   mv log-de2.o log_fast.o; make 
+
+on itanium,
+icc  -I/users/fdedinex/local/IA64/include -mcpu=itanium2\
+ -Qoption,cpp,--extended_float_types -IPF_fp_speculationsafe -c log-de2.c;\
+ mv log-de2.o log_fast.o; make
+
+ 
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "double-extended.h"
+#include "log-de2.h"
+
+
+double log_rn(double x) {
+  double wi;
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+  db_number y;
+  int E, i, index, roundtestmask;
+  long double r, logirh, logirl, z, z2, z4, t,evenp,oddp, th, tl, eh,el,p1,p2,p3;
+#else
+  long int E, i;
+  unsigned long int index, roundtestmask;
+  __fpreg xe, ye, r, logirh, logirl, z, z2, z4, t,evenp,oddp, th, tl, eh,el, c1,c2,c3,c4,c5,c6,p1,p2,p3;
+#endif
+
+
+   E=0;
+
+
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+   /* Pentium has few registers, so load coefficients directly from memory */
+#define c6 c[0]
+#define c5 c[1]
+#define c4 c[2]
+#define c3 c[3]
+#define c2 c[4]
+#define c1 c[5]
+  /* Special case hadling on a x86  */
+   y.d=x;
+
+   /* Filter special cases */
+   if (y.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+
+     if (((y.i[HI] & 0x7fffffff)|y.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (y.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -64; 		
+     y.d *= two64; 	  /* make x a normal number    */ 
+   }
+    
+   if (y.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   DOUBLE_EXTENDED_MODE;  /* This one should be overlapped with integer computation */
+
+#define X_NEAR_1 (y.i[HI]>MINYFAST) && (y.i[HI]<MAXYFAST)
+
+
+#else
+   /* prefetch coefficients */
+   c6=c[0]; c5=c[1]; c4=c[2]; c3=c[3]; c2=c[4]; c1=c[5];
+   /* Special case handling on the Itanium */
+   xe=x;
+   i =  _Asm_getf(2/*_FR_D*/, xe);
+
+   /* Filter special cases */
+   //if (__builtin_expect( (i<0x0010000000000000ULL), (1+1==3))){        /* x < 2^(-1022)    */
+   if (i<0x0010000000000000LL){        /* x < 2^(-1022)    */
+     if ((i & 0x7fffffffffffffffULL)==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (i<0){
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     xe *= two64; 	  /* make x a normal number    */ 
+     E = -64;
+     i =  _Asm_getf(2/*_FR_D*/, xe); /* and update i */ 
+   }
+    
+   //if (__builtin_expect(  (i >= 0x7ff0000000000000ULL), (1+1==3) )){
+   if (i >= 0x7ff0000000000000ULL){
+     return  x+x;				 /* Inf or Nan       */
+   }
+#define X_NEAR_1 __builtin_expect((i>(((uint64_t) MINYFAST)<<32)) && (i<(((uint64_t) MAXYFAST)<<32)), (1+1==3))
+
+
+#endif
+
+
+   if(X_NEAR_1) {
+     roundtestmask=0x7fc;
+     z = x - 1 ; /* Sterbenz exact */
+     z2 = z*z;
+     evenp = c6;                  /* c6 */
+     oddp  = c5;                  /* c5 */
+     evenp = c4  +  z2 * evenp;   /* c4 */
+     oddp  = c3  +  z2 * oddp;    /* c3 */
+     evenp = c2  +  z2 * evenp;   /* c2 */
+
+     t  = c1 + (z * evenp + z2 * oddp);
+     t = z*t;
+
+     //printf("z= %1.20e,  t=%1.20e  \n  ", (double)z, (double)t);
+     
+   }    
+
+   else {
+
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+   /* Extract exponent and mantissa */
+     E += (y.i[HI]>>20)-1023;             /* extract the exponent */
+     index = (y.i[HI] & 0x000fffff);
+     y.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+     index = index  >> (20-L); 
+     /* now y.d holds 1+f, and E is the exponent */
+     
+     logirh = argredtable[index].h;
+     r = (long double) (argredtable[index].r); /* approx to 1/y.d */
+     z = r*(long double)y.d - 1. ; /* even without an FMA, all exact */
+
+     if(E>12 || E<-12) { /* faster and less accurate polynomial evaluation */
+       roundtestmask=0x7fe;
+       p1 = logirh + z*c1;   p2 = c2 + z*c3;   p3 = c4 + z*c5;   z2 = z*z;
+       p1 = p1 + z2*p2;      p3 = p3 + z2*c6;  z4=z2*z2;
+       t =  p1 + z4*p3;
+       t = t + E*ln2h;
+     }
+     else {
+       roundtestmask=0x7f0;
+       p1 = c5 + z*c6;         z2 = z*z;
+       p2 = c3 + z*c4;         p3 = c1+z*c2;
+       
+       t = p2 + z2*p1;     
+       t = p3 + z2*t;
+       t = logirh + z*t;
+       t = t + E*ln2h;
+     }
+
+#if 0
+     if(E>12 || E<-12)
+       roundtestmask=0x7fe;
+     else
+       roundtestmask=0x7f0;
+     
+     p1 = c5 + z*c6;         z2 = z*z;
+     p2 = c3 + z*c4;         p3 = c1+z*c2;
+     
+     t = p2 + z2*p1;     
+     t = p3 + z2*t;
+     t = logirh + z*t;
+#endif
+
+#else /* Itanium here*/
+   /* Extract exponent and mantissa */
+     E += (i>>52)-1023;
+     //printf("\nE    = %llx\n", E);
+     i = i & 0x000fffffffffffffULL;  /* keep only mantissa */
+     ye = _Asm_setf(2/*_FR_D*/, i | 0x3ff0000000000000ULL ); /* exponent = 0*/
+     index = i >> (52-L);
+     //printf("\nindex= %lld\n", index);
+     //printf("\n  ye = %1.20Le\n",(long double)ye);
+     /* now ye holds 1+f, and E is the exponent */
+     
+     logirh = argredtable[index].h;
+
+     _Asm_frcpa(&r, 1.0L, ye, 1/*_SF1*/);
+     z = r*ye - 1. ; /* even without an FMA, all exact */
+
+     if(E>12 || E<-12) { /* faster and less accurate polynomial evaluation */
+       roundtestmask=0x7fe;
+       p1 = logirh + z*c1;   p2 = c2 + z*c3;   p3 = c4 + z*c5;   z2 = z*z;
+       p1 = p1 + z2*p2;      p3 = p3 + z2*c6;  z4=z2*z2;
+       t =  p1 + z4*p3;
+       t = t + E*ln2h;
+     }
+     else {
+       roundtestmask=0x7f0;
+       p1 = c5 + z*c6;         z2 = z*z;
+       p2 = c3 + z*c4;         p3 = c1+z*c2;
+       
+       t = p2 + z2*p1;     
+       t = p3 + z2*t;
+       t = logirh + z*t;
+       t = t + E*ln2h;
+     }
+
+
+#endif
+
+     //printf("  x=%1.20Le\n  r=%1.20Le\n z=%1.20Le\n  logirh=%1.20Le\n  ",(long double)xe, (long double)r,(long double)z, (long double)logirh);
+     /* Polynomial evaluation, unrolled to go through Gappa */
+
+     //printf("t=%1.20e  \n  ", (double)t);
+     
+     
+   }
+
+
+
+
+
+#if 0 /* to time the first step only */
+   BACK_TO_DOUBLE_MODE; return (double)t;
+#endif
+
+
+   /* To test the second step only, comment out the following line */
+   DE_TEST_AND_RETURN_RN(t, roundtestmask);
+
+
+   /* Accurate phase */ 
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+   
+   t = c13h;
+   t = c12h + z*t;
+   t = c11h + z*t;
+   t = c10h + z*t;
+   t = c9h  + z*t;
+   t = c8h  + z*t;
+
+   //printf("\n t = %1.20Le\n", (long double)t);
+
+   Mul12_ext(&th, &tl,   z,   t);
+   Add22_ext(&th, &tl,   c7h,c7l,  th,tl);
+   FMA22_ext(&th, &tl,    z,0, th,tl,  c6h,c6l);
+   FMA22_ext(&th, &tl,    z,0, th,tl,  c5h,c5l);
+   FMA22_ext(&th, &tl,    z,0, th,tl,  c4h,c4l);
+   FMA22_ext(&th, &tl,    z,0, th,tl,  c3h,c3l);
+   FMA22_ext(&th, &tl,    z,0, th,tl,  c2h,c2l);
+   FMA22_ext(&th, &tl,    z,0, th,tl,  c1h,c1l);
+
+   if((X_NEAR_1)) {
+     Mul22_ext(&th, &tl,  z,0,  th,tl);
+   }
+   else{
+   FMA22_ext(&th, &tl,    z,0, th,tl,  logirh, argredtable[index].l);
+
+     /* the following is not a FMA22 (Eln2 > th+tl) */
+     Mul22_ext(&eh, &el,   ln2h,ln2l, E, 0);
+     Add22_ext(&th, &tl,   eh,el,  th,tl);
+   }
+   BACK_TO_DOUBLE_MODE;
+   return (double) (th+tl); /* The exact sum of these double-extended is rounded to the nearest */
+}
+
+
+double log_ru(double x) { return x;};
+double log_rd(double x) { return x;};
+double log_rz(double x) { return x;};
diff --git a/src/crlibm/log-de2.h b/src/crlibm/log-de2.h
new file mode 100644
index 0000000..7ce6959
--- /dev/null
+++ b/src/crlibm/log-de2.h
@@ -0,0 +1,2352 @@
+/*File generated by maple/log-de2.mpl*/
+
+#define L        8
+static const long double ln2h  = 6.93147180559945309428690474184975300886435434222221e-01L ;
+static const long double ln2l  = -1.14583527267987328109462081210062935494878745868567e-20L ;
+static const long double two64 = 1.84467440737095516160000000000000000000000000000000e+19L ;
+#define MINYFAST 0x3FEFEEB0
+#define MAXYFAST 0x3FF008A7
+static const long double c[6] =  {
+   /* c[6]  = */ -1.66667783633217541361935289112583546966561698354781e-01L, 
+   /* c[5]  = */ 2.00000957392221395404448627819427031226950930431485e-01L, 
+   /* c[4]  = */ -2.49999999997036924197484769605281940130225848406553e-01L, 
+   /* c[3]  = */ 3.33333333331729287913984538516132261065649800002575e-01L, 
+   /* c[2]  = */ -5.00000000000000002114194236346733646314532961696386e-01L, 
+   /* c[1]  = */ 1.00000000000000000043368086899420177360298112034798e+00L, 
+}; 
+ 
+static const long double c13h =    7.69241938979196395573712137505584252039625425823033e-02L ;
+static const long double c12h =    -8.33343705120907994983925001775126872871624073013663e-02L ;
+static const long double c11h =    9.09090909016883407279554195346005229794172919355333e-02L ;
+static const long double c10h =    -9.99999999942075855948863533084747245993639808148146e-02L ;
+static const long double c9h =    1.11111111111111135639679427244974618815831490792334e-01L ;
+static const long double c8h =    -1.25000000000000015531196120854851017156761372461915e-01L ;
+static const long double c7h =    1.42857142857142857140921067549133027796415262855589e-01L ;
+static const long double c7l =    1.89394491613490450765953343598431722998093167933610e-21L ;
+static const long double c6h =    -1.66666666666666666671184175718689601808364386670291e-01L ;
+static const long double c6l =    4.53774335692433045416162310802604791782942772621503e-21L ;
+static const long double c5h =    2.00000000000000000002710505431213761085018632002175e-01L ;
+static const long double c5l =    -2.71050539632600296252449828915022593909471492362218e-21L ;
+static const long double c4h =    -2.50000000000000000000000000000000000000000000000000e-01L ;
+static const long double c4l =    -1.13003886444388561404802588393278356484666475997380e-29L ;
+static const long double c3h =    3.33333333333333333342368351437379203616728773340583e-01L ;
+static const long double c3l =    -9.03501810404588128773682629880975813170990626700199e-21L ;
+static const long double c2h =    -5.00000000000000000000000000000000000000000000000000e-01L ;
+static const long double c2l =    1.80314378774106365306416798960563441651801284052754e-36L ;
+static const long double c1h =    1.00000000000000000000000000000000000000000000000000e+00L ;
+static const long double c1l =    5.78412878802419461281633493409583711449139811025168e-43L ;
+#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)
+typedef struct dde_tag {long double h; float r; long double l; } dde ;  
+static const dde argredtable[256] = {
+  { 
+    1.95503483580335055758484246596351496805255010258406e-03L, /* logirh[0] */ 
+    .9980468750,   /* frcpa[0] */ 
+    4.26497759032971696118474291411612806946615310742445e-23L, /* logirl[0] */ 
+  } , 
+  { 
+    5.87660848898504192008808086344906485010142205283046e-03L, /* logirh[1] */ 
+    .9941406250,   /* frcpa[1] */ 
+    1.37156200381399302871157777585220592575158205768131e-22L, /* logirl[1] */ 
+  } , 
+  { 
+    9.81362144832462125256124620478748177276884234743193e-03L, /* logirh[2] */ 
+    .9902343750,   /* frcpa[2] */ 
+    3.07726865638716648710074387700961122683722826913929e-22L, /* logirl[2] */ 
+  } , 
+  { 
+    1.37661957641479592703297901191972218981618425459601e-02L, /* logirh[3] */ 
+    .9863281250,   /* frcpa[3] */ 
+    -1.98297134784905635140870220079309409760230880892056e-22L, /* logirl[3] */ 
+  } , 
+  { 
+    1.72375605196069193814697052130613386111690488178283e-02L, /* logirh[4] */ 
+    .9829101563,   /* frcpa[4] */ 
+    -4.94287486388840565529812024596830454645571429961607e-22L, /* logirl[4] */ 
+  } , 
+  { 
+    2.12196464187288431375985262028471822759456699714065e-02L, /* logirh[5] */ 
+    .9790039063,   /* frcpa[5] */ 
+    5.16389261557696151000206838577628415000632847634295e-22L, /* logirl[5] */ 
+  } , 
+  { 
+    2.52176527435831877698167767867798438885529321851209e-02L, /* logirh[6] */ 
+    .9750976563,   /* frcpa[6] */ 
+    -5.88370153281068503292270445713080556561303301841144e-22L, /* logirl[6] */ 
+  } , 
+  { 
+    2.87290684408603241616140654829392175884095195215195e-02L, /* logirh[7] */ 
+    .9716796875,   /* frcpa[7] */ 
+    -1.73475995898378250110858253089819431684975627555638e-22L, /* logirl[7] */ 
+  } , 
+  { 
+    3.27572712694651043228305248994347564917006820905954e-02L, /* logirh[8] */ 
+    .9677734375,   /* frcpa[8] */ 
+    1.04044091162415222941106067538146188822878967483250e-21L, /* logirl[8] */ 
+  } , 
+  { 
+    3.62953088241761602138690193802839090153611323330551e-02L, /* logirh[9] */ 
+    .9643554688,   /* frcpa[9] */ 
+    1.22010872587213859039144846596851206648600477022497e-21L, /* logirl[9] */ 
+  } , 
+  { 
+    4.03541677703393333770148961037182999689321150071919e-02L, /* logirh[10] */ 
+    .9604492188,   /* frcpa[10] */ 
+    5.47371799872278404585523355882269167105391307255747e-22L, /* logirl[10] */ 
+  } , 
+  { 
+    4.39192339348354905258654118371808294796210248023272e-02L, /* logirh[11] */ 
+    .9570312500,   /* frcpa[11] */ 
+    5.26739715684616324587620976855106674710664957099042e-22L, /* logirl[11] */ 
+  } , 
+  { 
+    4.74970552827194697662028469858919166313171444926411e-02L, /* logirh[12] */ 
+    .9536132813,   /* frcpa[12] */ 
+    -1.65705277653801718279418515265615566433700654766169e-21L, /* logirl[12] */ 
+  } , 
+  { 
+    5.16017301068517361398093213492588304802666243631393e-02L, /* logirh[13] */ 
+    .9497070313,   /* frcpa[13] */ 
+    3.64447832323127705842810790836917844429050748104855e-22L, /* logirl[13] */ 
+  } , 
+  { 
+    5.52071937086868625198861782604753400960362341720611e-02L, /* logirh[14] */ 
+    .9462890625,   /* frcpa[14] */ 
+    -1.37225036221543681414424623055166322809445309674122e-21L, /* logirl[14] */ 
+  } , 
+  { 
+    5.88257037308839618356705574581111406473610259126872e-02L, /* logirh[15] */ 
+    .9428710938,   /* frcpa[15] */ 
+    -4.39800093887498980427107404671736592431574853874786e-22L, /* logirl[15] */ 
+  } , 
+  { 
+    6.24573549337466043343298095075200038195362139958888e-02L, /* logirh[16] */ 
+    .9394531250,   /* frcpa[16] */ 
+    -8.23828980696659845387403889844465565154590358193941e-22L, /* logirl[16] */ 
+  } , 
+  { 
+    6.61022431137539080757761777995540342089952901005745e-02L, /* logirh[17] */ 
+    .9360351563,   /* frcpa[17] */ 
+    -1.41308504022299608057769025420706808988134001026863e-21L, /* logirl[17] */ 
+  } , 
+  { 
+    6.97604651187228467229951671402243817965427297167480e-02L, /* logirh[18] */ 
+    .9326171875,   /* frcpa[18] */ 
+    -1.38323798701348717556121553783765299441359867812815e-21L, /* logirl[18] */ 
+  } , 
+  { 
+    7.34321188632489125927647194425063048583979252725840e-02L, /* logirh[19] */ 
+    .9291992188,   /* frcpa[19] */ 
+    1.34465019131517496452701890834591900102723464814978e-21L, /* logirl[19] */ 
+  } , 
+  { 
+    7.71173033444312897724342258098939595356569043360651e-02L, /* logirh[20] */ 
+    .9257812500,   /* frcpa[20] */ 
+    -2.76803254841804175261988025377387385490660077224303e-21L, /* logirl[20] */ 
+  } , 
+  { 
+    8.08161186578888513811196742109288493338681291788816e-02L, /* logirh[21] */ 
+    .9223632813,   /* frcpa[21] */ 
+    2.93744399967660616702546631311566500630612645057592e-21L, /* logirl[21] */ 
+  } , 
+  { 
+    8.39974575022459922670056350901823805088497465476394e-02L, /* logirh[22] */ 
+    .9194335938,   /* frcpa[22] */ 
+    -2.75822298865697918651295806251552828734188048975836e-21L, /* logirl[22] */ 
+  } , 
+  { 
+    8.77218565932284199769932223067492316204152302816510e-02L, /* logirh[23] */ 
+    .9160156250,   /* frcpa[23] */ 
+    2.67113100993740085512946635363884214822116089153997e-21L, /* logirl[23] */ 
+  } , 
+  { 
+    9.14601787038355687741450830707812258424382889643312e-02L, /* logirh[24] */ 
+    .9125976563,   /* frcpa[24] */ 
+    -3.00526806639363070117892291419618462383136721841578e-21L, /* logirl[24] */ 
+  } , 
+  { 
+    9.52125283223860239512309315557114786088277469389141e-02L, /* logirh[25] */ 
+    .9091796875,   /* frcpa[25] */ 
+    1.35736425184120563462579496535517324394637087277742e-21L, /* logirl[25] */ 
+  } , 
+  { 
+    9.84400728132525199034455649915731356713877175934613e-02L, /* logirh[26] */ 
+    .9062500000,   /* frcpa[26] */ 
+    -5.56990062601900788417321793968341239499135058919372e-22L, /* logirl[26] */ 
+  } , 
+  { 
+    1.02218754772273556643104926860976533475877658929676e-01L, /* logirh[27] */ 
+    .9028320313,   /* frcpa[27] */ 
+    7.63382487271644236333136443364119627751055377943666e-22L, /* logirl[27] */ 
+  } , 
+  { 
+    1.05469028489575121463619165884662010057581937871873e-01L, /* logirh[28] */ 
+    .8999023438,   /* frcpa[28] */ 
+    1.85116563464987726627623524285080128419577821992918e-22L, /* logirl[28] */ 
+  } , 
+  { 
+    1.09274414978962630318388461747591833272963413037360e-01L, /* logirh[29] */ 
+    .8964843750,   /* frcpa[29] */ 
+    1.43030273529362987587188893575634710205316211093836e-21L, /* logirl[29] */ 
+  } , 
+  { 
+    1.12547740323931779421560029491589105532511894125491e-01L, /* logirh[30] */ 
+    .8935546875,   /* frcpa[30] */ 
+    3.36751151584848473373955852226758180853512318689242e-21L, /* logirl[30] */ 
+  } , 
+  { 
+    1.15831815525121705097444380072602143627591431140900e-01L, /* logirh[31] */ 
+    .8906250000,   /* frcpa[31] */ 
+    1.67567986607802294055723185761339369360049976900432e-21L, /* logirl[31] */ 
+  } , 
+  { 
+    1.19676917763227218609019351230893235538133012596518e-01L, /* logirh[32] */ 
+    .8872070313,   /* frcpa[32] */ 
+    8.35611517441972676431434101463549037120144125394240e-22L, /* logirl[32] */ 
+  } , 
+  { 
+    1.22984528275985021608521837593874792560200148727745e-01L, /* logirh[33] */ 
+    .8842773438,   /* frcpa[33] */ 
+    -1.14267076111199552134812668592042704746068833133061e-21L, /* logirl[33] */ 
+  } , 
+  { 
+    1.26303115392417108974409088728574346305322251282632e-01L, /* logirh[34] */ 
+    .8813476563,   /* frcpa[34] */ 
+    -3.66994969052681147535088868653684417772797430455504e-21L, /* logirl[34] */ 
+  } , 
+  { 
+    1.29632752208865300127572928179375821855501271784306e-01L, /* logirh[35] */ 
+    .8784179688,   /* frcpa[35] */ 
+    4.83334965613124572307769994176898229963307387098066e-21L, /* logirl[35] */ 
+  } , 
+  { 
+    1.33531392624522623151618952452857058688096003606915e-01L, /* logirh[36] */ 
+    .8750000000,   /* frcpa[36] */ 
+    -5.27533152150708409857288888663059788853678472480168e-21L, /* logirl[36] */ 
+  } , 
+  { 
+    1.36885224722954047341127482850797747460092068649828e-01L, /* logirh[37] */ 
+    .8720703125,   /* frcpa[37] */ 
+    1.21563007094068716150945210722808645658904368873783e-21L, /* logirl[37] */ 
+  } , 
+  { 
+    1.40250342873267571831169021889795800461797625757754e-01L, /* logirh[38] */ 
+    .8691406250,   /* frcpa[38] */ 
+    5.34519733775645328726217720982122225003034400597528e-21L, /* logirl[38] */ 
+  } , 
+  { 
+    1.43626823289873603765680852573094483659588149748743e-01L, /* logirh[39] */ 
+    .8662109375,   /* frcpa[39] */ 
+    3.59170919594244028724220274969813502658750088315098e-21L, /* logirl[39] */ 
+  } , 
+  { 
+    1.47014742961809659029448135725282043040351709350944e-01L, /* logirh[40] */ 
+    .8632812500,   /* frcpa[40] */ 
+    5.38677650168536117007388836493849853882234650385544e-21L, /* logirl[40] */ 
+  } , 
+  { 
+    1.50414179663273585806342741433283549667976330965757e-01L, /* logirh[41] */ 
+    .8603515625,   /* frcpa[41] */ 
+    1.72564246416369909726215866729178930082312495242932e-21L, /* logirl[41] */ 
+  } , 
+  { 
+    1.53825211964336434759034050179238306554907467216253e-01L, /* logirh[42] */ 
+    .8574218750,   /* frcpa[42] */ 
+    2.84291320159710576836478937518921166594573591422384e-21L, /* logirl[42] */ 
+  } , 
+  { 
+    1.56676653873546552566981687748537410698190797120333e-01L, /* logirh[43] */ 
+    .8549804688,   /* frcpa[43] */ 
+    4.43471536483748191570747062604139622410792329989357e-21L, /* logirl[43] */ 
+  } , 
+  { 
+    1.60109151522870865795122700958597050657772342674434e-01L, /* logirh[44] */ 
+    .8520507813,   /* frcpa[44] */ 
+    -5.81022064348215050161714415533519321872077063187762e-21L, /* logirl[44] */ 
+  } , 
+  { 
+    1.63553471805115372406905401014842738049992476589978e-01L, /* logirh[45] */ 
+    .8491210938,   /* frcpa[45] */ 
+    -6.39840577852136201560723745193600583196069336234932e-21L, /* logirl[45] */ 
+  } , 
+  { 
+    1.67009696443792323653637632574486815428826957941055e-01L, /* logirh[46] */ 
+    .8461914063,   /* frcpa[46] */ 
+    6.92191186869741625944379810478235880715811002219858e-22L, /* logirl[46] */ 
+  } , 
+  { 
+    1.70477908012719802107013018777070811893281643278897e-01L, /* logirh[47] */ 
+    .8432617188,   /* frcpa[47] */ 
+    -3.84849710573311162685375196487995319911393770927909e-21L, /* logirl[47] */ 
+  } , 
+  { 
+    1.73377301171722293809149099963473616980991209857166e-01L, /* logirh[48] */ 
+    .8408203125,   /* frcpa[48] */ 
+    -4.18923878482095888690809066241864157021606624827420e-21L, /* logirl[48] */ 
+  } , 
+  { 
+    1.76867706111490813238994873612952574148948770016432e-01L, /* logirh[49] */ 
+    .8378906250,   /* frcpa[49] */ 
+    5.41796305766292925593321827919447911014134106410241e-21L, /* logirl[49] */ 
+  } , 
+  { 
+    1.79785712267204925789132984037532736465436755679548e-01L, /* logirh[50] */ 
+    .8354492188,   /* frcpa[50] */ 
+    1.09794592080028280721225372439216971505383750155787e-21L, /* logirl[50] */ 
+  } , 
+  { 
+    1.83298596441781238991779352798250357636788976378739e-01L, /* logirh[51] */ 
+    .8325195313,   /* frcpa[51] */ 
+    5.90674750801774139656717989843661717212913795636144e-21L, /* logirl[51] */ 
+  } , 
+  { 
+    1.86823864487466379972558164213047859902872005477548e-01L, /* logirh[52] */ 
+    .8295898438,   /* frcpa[52] */ 
+    -3.04217531149578964457668800577591481904667556936207e-22L, /* logirl[52] */ 
+  } , 
+  { 
+    1.89771110947398700938607528365675847226157202385366e-01L, /* logirh[53] */ 
+    .8271484375,   /* frcpa[53] */ 
+    4.47378684265150424850655238125197190495389833236133e-21L, /* logirl[53] */ 
+  } , 
+  { 
+    1.92727069351598330189216656815887063203263096511364e-01L, /* logirh[54] */ 
+    .8247070313,   /* frcpa[54] */ 
+    4.25445368378849844793522570228782328665573787173242e-21L, /* logirl[54] */ 
+  } , 
+  { 
+    1.96285791968592396490329160529952901015349198132753e-01L, /* logirh[55] */ 
+    .8217773438,   /* frcpa[55] */ 
+    -2.74449417331789688975664262836082841822814364159104e-21L, /* logirl[55] */ 
+  } , 
+  { 
+    1.99261099132246916960020319264934585135051747784019e-01L, /* logirh[56] */ 
+    .8193359375,   /* frcpa[56] */ 
+    6.47208691720606613197768957447376978812352107535377e-21L, /* logirl[56] */ 
+  } , 
+  { 
+    2.02843192514751471269385078854963211369977216236293e-01L, /* logirh[57] */ 
+    .8164062500,   /* frcpa[57] */ 
+    -2.49911704253350382497946421034579061512074844155459e-21L, /* logirl[57] */ 
+  } , 
+  { 
+    2.05838103408604401595963402649136497757353936322033e-01L, /* logirh[58] */ 
+    .8139648438,   /* frcpa[58] */ 
+    3.44547120579970794151735860178311194999554929496034e-21L, /* logirl[58] */ 
+  } , 
+  { 
+    2.08842010744004902909995609328053234321487252600491e-01L, /* logirh[59] */ 
+    .8115234375,   /* frcpa[59] */ 
+    -2.31718119342409737696864118031023889824430589122232e-21L, /* logirl[59] */ 
+  } , 
+  { 
+    2.11854968732835491690620101368214278636514791287482e-01L, /* logirh[60] */ 
+    .8090820313,   /* frcpa[60] */ 
+    -5.59178221480029447097470536961685192149874416053190e-21L, /* logirl[60] */ 
+  } , 
+  { 
+    2.15482542239270394491710766682324162957229418680072e-01L, /* logirh[61] */ 
+    .8061523438,   /* frcpa[61] */ 
+    -3.08567992399291380594398304266569953574118919907360e-21L, /* logirl[61] */ 
+  } , 
+  { 
+    2.18515604922383282264996239019350099397343001328409e-01L, /* logirh[62] */ 
+    .8037109375,   /* frcpa[62] */ 
+    -2.54798988296256277081585163171791801881177620828164e-21L, /* logirl[62] */ 
+  } , 
+  { 
+    2.21557895069307506555442328910476845749144558794796e-01L, /* logirh[63] */ 
+    .8012695313,   /* frcpa[63] */ 
+    6.13314860927894564393358817562097659422742835665000e-21L, /* logirl[63] */ 
+  } , 
+  { 
+    2.24609468996706039046508396328505341443815268576145e-01L, /* logirh[64] */ 
+    .7988281250,   /* frcpa[64] */ 
+    -4.94151233330231607699074826625823143609255820481925e-21L, /* logirl[64] */ 
+  } , 
+  { 
+    2.27670383538384533180648494621323152387049049139023e-01L, /* logirh[65] */ 
+    .7963867188,   /* frcpa[65] */ 
+    1.32722330655188821742036628678343997944613329580108e-21L, /* logirl[65] */ 
+  } , 
+  { 
+    2.30740696051642502680673052495308184006717056035995e-01L, /* logirh[66] */ 
+    .7939453125,   /* frcpa[66] */ 
+    -4.67148041930246804736964870794777368798100308802424e-22L, /* logirl[66] */ 
+  } , 
+  { 
+    2.33820464423722301015970588544679031883788411505520e-01L, /* logirh[67] */ 
+    .7915039063,   /* frcpa[67] */ 
+    4.09731183066161080755265939560882683473100997189963e-21L, /* logirl[67] */ 
+  } , 
+  { 
+    2.36909747078357715033302723084407404030571342445910e-01L, /* logirh[68] */ 
+    .7890625000,   /* frcpa[68] */ 
+    3.12386020983941560709206311202257016876406966228076e-21L, /* logirl[68] */ 
+  } , 
+  { 
+    2.40008602982424024623693201152541121246031252667308e-01L, /* logirh[69] */ 
+    .7866210938,   /* frcpa[69] */ 
+    -2.43476897905245731343786602663372491079788337856472e-21L, /* logirl[69] */ 
+  } , 
+  { 
+    2.43117091652691421022275744534546504382888088002801e-01L, /* logirh[70] */ 
+    .7841796875,   /* frcpa[70] */ 
+    -4.00696535645269435436299549546802892061102236811804e-21L, /* logirl[70] */ 
+  } , 
+  { 
+    2.46235273162683717456332942175034617093842825852334e-01L, /* logirh[71] */ 
+    .7817382813,   /* frcpa[71] */ 
+    4.07437573318827322756457884828210179798439304619411e-21L, /* logirl[71] */ 
+  } , 
+  { 
+    2.49363208149644328249063332525459202315687434747815e-01L, /* logirh[72] */ 
+    .7792968750,   /* frcpa[72] */ 
+    -3.59965165542906115819932802133318661805640003973833e-21L, /* logirl[72] */ 
+  } , 
+  { 
+    2.52500957821611535746280513548001067647419404238462e-01L, /* logirh[73] */ 
+    .7768554688,   /* frcpa[73] */ 
+    2.33463811464698172389714383182373125448753269899859e-21L, /* logirl[73] */ 
+  } , 
+  { 
+    2.55648583964605109373428165620012464387400541454554e-01L, /* logirh[74] */ 
+    .7744140625,   /* frcpa[74] */ 
+    -5.98349602918013475350833615157201591368028964103828e-21L, /* logirl[74] */ 
+  } , 
+  { 
+    2.58173837831799220471438310875456068060884717851877e-01L, /* logirh[75] */ 
+    .7724609375,   /* frcpa[75] */ 
+    1.33986666471082110277621581004881530763601545750211e-20L, /* logirl[75] */ 
+  } , 
+  { 
+    2.61339399196360020101188165186911760429211426526308e-01L, /* logirh[76] */ 
+    .7700195313,   /* frcpa[76] */ 
+    3.86551567380649813446710441868758040977608915780583e-21L, /* logirl[76] */ 
+  } , 
+  { 
+    2.64515013170246549202438771097867231674172217026353e-01L, /* logirh[77] */ 
+    .7675781250,   /* frcpa[77] */ 
+    7.98107393367028325011146300178634322183923091601985e-21L, /* logirl[77] */ 
+  } , 
+  { 
+    2.67700743803377575602683510758161844478308921679854e-01L, /* logirh[78] */ 
+    .7651367188,   /* frcpa[78] */ 
+    -1.91017444378219323517258229660185956541609986586656e-21L, /* logirl[78] */ 
+  } , 
+  { 
+    2.70256655737921794101881120542252290306350914761424e-01L, /* logirh[79] */ 
+    .7631835938,   /* frcpa[79] */ 
+    3.53127205732779035544673231633056564481395911692583e-21L, /* logirl[79] */ 
+  } , 
+  { 
+    2.73460759728704830284762294922984438017010688781738e-01L, /* logirh[80] */ 
+    .7607421875,   /* frcpa[80] */ 
+    1.17681147335201171244391876920889368097526851011919e-20L, /* logirl[80] */ 
+  } , 
+  { 
+    2.76675163010711334108434472645043911143147852271795e-01L, /* logirh[81] */ 
+    .7583007813,   /* frcpa[81] */ 
+    1.06699065144355902967885100961053554661859396947057e-20L, /* logirl[81] */ 
+  } , 
+  { 
+    2.79254145742529772484998712434034473517385777086020e-01L, /* logirh[82] */ 
+    .7563476563,   /* frcpa[82] */ 
+    9.18144271840156782536821462802027993141168527210699e-22L, /* logirl[82] */ 
+  } , 
+  { 
+    2.82487255574676923491547753108932283794274553656578e-01L, /* logirh[83] */ 
+    .7539062500,   /* frcpa[83] */ 
+    -8.62183482657850338055949164218482107835463533173941e-21L, /* logirl[83] */ 
+  } , 
+  { 
+    2.85081290751723560975309720855186412791226757690310e-01L, /* logirh[84] */ 
+    .7519531250,   /* frcpa[84] */ 
+    1.17237176339060309039114596865979651990000730425096e-20L, /* logirl[84] */ 
+  } , 
+  { 
+    2.88333326138100875385417154461720201652497053146362e-01L, /* logirh[85] */ 
+    .7495117188,   /* frcpa[85] */ 
+    4.91428106954212380686140911029428249306740479245873e-21L, /* logirl[85] */ 
+  } , 
+  { 
+    2.90942590501714649404855009273695998217590386047959e-01L, /* logirh[86] */ 
+    .7475585938,   /* frcpa[86] */ 
+    -1.75340148127812535361388147355237410486083146456705e-21L, /* logirl[86] */ 
+  } , 
+  { 
+    2.94213774314996088685928571360150840519054327160120e-01L, /* logirh[87] */ 
+    .7451171875,   /* frcpa[87] */ 
+    3.72344756923345953865473190171804616041154553422343e-21L, /* logirl[87] */ 
+  } , 
+  { 
+    2.96838447737767257807650275736044420682446798309684e-01L, /* logirh[88] */ 
+    .7431640625,   /* frcpa[88] */ 
+    9.29219098895164091290778342787327520629305647347598e-21L, /* logirl[88] */ 
+  } , 
+  { 
+    3.00129006810866155350540213087029428606911096721888e-01L, /* logirh[89] */ 
+    .7407226563,   /* frcpa[89] */ 
+    4.15407888405806794704699164445087088652277542419333e-21L, /* logirl[89] */ 
+  } , 
+  { 
+    3.02769272371042485027595181357185083470540121197701e-01L, /* logirh[90] */ 
+    .7387695313,   /* frcpa[90] */ 
+    -5.39200386021858963294532737382056488102330563120789e-21L, /* logirl[90] */ 
+  } , 
+  { 
+    3.05416527391549505774737474639302092782600084319711e-01L, /* logirh[91] */ 
+    .7368164063,   /* frcpa[91] */ 
+    8.09508842504419574684087285543596001167284855903610e-22L, /* logirl[91] */ 
+  } , 
+  { 
+    3.08735481649613269672805665466697178089816588908434e-01L, /* logirh[92] */ 
+    .7343750000,   /* frcpa[92] */ 
+    9.63639351018852146719394839260714210168238671991609e-21L, /* logirl[92] */ 
+  } , 
+  { 
+    3.11398599069096969566353139136083427729317918419838e-01L, /* logirh[93] */ 
+    .7324218750,   /* frcpa[93] */ 
+    -8.78728261358293827391132654678683452408757879284726e-21L, /* logirl[93] */ 
+  } , 
+  { 
+    3.14068827624975851033669455025787442536966409534216e-01L, /* logirh[94] */ 
+    .7304687500,   /* frcpa[94] */ 
+    -7.29067919863073334281631602128749543633905749487187e-21L, /* logirl[94] */ 
+  } , 
+  { 
+    3.16746205395692243423234196741944401765067595988512e-01L, /* logirh[95] */ 
+    .7285156250,   /* frcpa[95] */ 
+    -3.87970872001942700455671881391065519856896238099562e-21L, /* logirl[95] */ 
+  } , 
+  { 
+    3.20103039699243330251134109776245395551086403429508e-01L, /* logirh[96] */ 
+    .7260742188,   /* frcpa[96] */ 
+    9.74190129969570988905249611640634240349398962781767e-21L, /* logirl[96] */ 
+  } , 
+  { 
+    3.22796644021466308337566311625899118098459439352155e-01L, /* logirh[97] */ 
+    .7241210938,   /* frcpa[97] */ 
+    -1.24774498383778898467895756041215733560057419893395e-21L, /* logirl[97] */ 
+  } , 
+  { 
+    3.25497523448598604771950584813033913178514922037721e-01L, /* logirh[98] */ 
+    .7221679688,   /* frcpa[98] */ 
+    -1.04491359306555100779220975161808188230678757588356e-20L, /* logirl[98] */ 
+  } , 
+  { 
+    3.28205717385478203779961697827971534024982247501612e-01L, /* logirh[99] */ 
+    .7202148438,   /* frcpa[99] */ 
+    -7.97740196010218830935182187448759796325974533751889e-21L, /* logirl[99] */ 
+  } , 
+  { 
+    3.30921265557960885537493178620849221260868944227695e-01L, /* logirh[100] */ 
+    .7182617188,   /* frcpa[100] */ 
+    8.64134723319418452779496730832996023729416105456812e-21L, /* logirl[100] */ 
+  } , 
+  { 
+    3.33644208016416686724469817248994729652622481808066e-01L, /* logirh[101] */ 
+    .7163085938,   /* frcpa[101] */ 
+    9.66067882514623325134829038169224793167381199665462e-21L, /* logirl[101] */ 
+  } , 
+  { 
+    3.37058345849674590458339498710849113649601349607110e-01L, /* logirh[102] */ 
+    .7138671875,   /* frcpa[102] */ 
+    -8.39541534805700404182434293467016145944324738626105e-21L, /* logirl[102] */ 
+  } , 
+  { 
+    3.39798073590794945798669590697471676321583800017834e-01L, /* logirh[103] */ 
+    .7119140625,   /* frcpa[103] */ 
+    2.18020234913977654841648305008968992796498205692680e-21L, /* logirl[103] */ 
+  } , 
+  { 
+    3.42545328065933728256022006153358461233437992632389e-01L, /* logirh[104] */ 
+    .7099609375,   /* frcpa[104] */ 
+    3.84623958513933049310518070448063856087605206176412e-21L, /* logirl[104] */ 
+  } , 
+  { 
+    3.45300150744778317797719843773585068902320927008986e-01L, /* logirh[105] */ 
+    .7080078125,   /* frcpa[105] */ 
+    -1.01893280061062726927558707137105116763914501631221e-20L, /* logirl[105] */ 
+  } , 
+  { 
+    3.48062583440688407302680135169126174332632217556238e-01L, /* logirh[106] */ 
+    .7060546875,   /* frcpa[106] */ 
+    7.98452377929806675746594993919271831161811571911368e-21L, /* logirl[106] */ 
+  } , 
+  { 
+    3.50832668314504018285994446646469668849022127687931e-01L, /* logirh[107] */ 
+    .7041015625,   /* frcpa[107] */ 
+    1.23717094386754616403804233472575851672026180336760e-20L, /* logirl[107] */ 
+  } , 
+  { 
+    3.53610447878406405658891636933915947338391561061144e-01L, /* logirh[108] */ 
+    .7021484375,   /* frcpa[108] */ 
+    -1.30564842388437679910379256931334342564847448923293e-20L, /* logirl[108] */ 
+  } , 
+  { 
+    3.56395964999832735826479704344116328229574719443917e-01L, /* logirh[109] */ 
+    .7001953125,   /* frcpa[109] */ 
+    -1.25673209467854485601417465225681194056028338689638e-20L, /* logirl[109] */ 
+  } , 
+  { 
+    3.58490206602947495263637722739957780504482798278332e-01L, /* logirh[110] */ 
+    .6987304688,   /* frcpa[110] */ 
+    -4.28923649665041597642981589160186406861873075678703e-21L, /* logirl[110] */ 
+  } , 
+  { 
+    3.61289368682561986699693090674401219075662083923817e-01L, /* logirh[111] */ 
+    .6967773438,   /* frcpa[111] */ 
+    -1.25473402274048087652641573695951161425274151232398e-20L, /* logirl[111] */ 
+  } , 
+  { 
+    3.64096388069546034432343722953007159048866014927626e-01L, /* logirh[112] */ 
+    .6948242188,   /* frcpa[112] */ 
+    1.30462756592416210783264533797496700709053049115538e-20L, /* logirl[112] */ 
+  } , 
+  { 
+    3.66911308999355744667886236598519644758198410272598e-01L, /* logirh[113] */ 
+    .6928710938,   /* frcpa[113] */ 
+    -8.36422879207943595633235500504614573436448299389604e-21L, /* logirl[113] */ 
+  } , 
+  { 
+    3.69734176082060404339114587091152941411564825102687e-01L, /* logirh[114] */ 
+    .6909179688,   /* frcpa[114] */ 
+    3.69226892746146309305101640958791161030722272698924e-21L, /* logirl[114] */ 
+  } , 
+  { 
+    3.72565034306584399851920014201667186171107459813356e-01L, /* logirh[115] */ 
+    .6889648438,   /* frcpa[115] */ 
+    1.26264806737780740417234126186201469813800457294886e-20L, /* logirl[115] */ 
+  } , 
+  { 
+    3.75403929045009347406115784995250805877731181681156e-01L, /* logirh[116] */ 
+    .6870117188,   /* frcpa[116] */ 
+    1.27675743152632581009120170158413354291147159818701e-20L, /* logirl[116] */ 
+  } , 
+  { 
+    3.77538401573641974523281791831230691514065256342292e-01L, /* logirh[117] */ 
+    .6855468750,   /* frcpa[117] */ 
+    -7.41585104053729758201550005081247397028781146530367e-21L, /* logirl[117] */ 
+  } , 
+  { 
+    3.80391470556048421025564440500765783781389473006129e-01L, /* logirh[118] */ 
+    .6835937500,   /* frcpa[118] */ 
+    5.42112126909175213422320698106968710022398212765792e-21L, /* logirl[118] */ 
+  } , 
+  { 
+    3.83252702837080621558942666871061533129250165075064e-01L, /* logirh[119] */ 
+    .6816406250,   /* frcpa[119] */ 
+    -3.33509624611212959857880713113019351814294081047672e-21L, /* logirl[119] */ 
+  } , 
+  { 
+    3.85404012379592703080441115637277960104256635531783e-01L, /* logirh[120] */ 
+    .6801757813,   /* frcpa[120] */ 
+    -6.36181490905264280193017955525373436929450412995273e-21L, /* logirl[120] */ 
+  } , 
+  { 
+    3.88279643405054638124378543762027504726574989035726e-01L, /* logirh[121] */ 
+    .6782226563,   /* frcpa[121] */ 
+    -9.91762590332090210822469068841385419105462380573398e-21L, /* logirl[121] */ 
+  } , 
+  { 
+    3.91163567537959529132191027755993673054035753011703e-01L, /* logirh[122] */ 
+    .6762695313,   /* frcpa[122] */ 
+    -1.27945744668499029121935899537977013057416450166329e-20L, /* logirl[122] */ 
+  } , 
+  { 
+    3.93331981831783197563028042775812309628236107528210e-01L, /* logirh[123] */ 
+    .6748046875,   /* frcpa[123] */ 
+    1.53510198299819511369584982102574259233257823450716e-21L, /* logirl[123] */ 
+  } , 
+  { 
+    3.96230534585794523961144869561579184846777934581041e-01L, /* logirh[124] */ 
+    .6728515625,   /* frcpa[124] */ 
+    1.32197644258101207427735080522965675494126617191596e-20L, /* logirl[124] */ 
+  } , 
+  { 
+    3.99137513377103754345399944103434108910732902586460e-01L, /* logirh[125] */ 
+    .6708984375,   /* frcpa[125] */ 
+    -9.55957037680245004179134758135305425464802853191611e-21L, /* logirl[125] */ 
+  } , 
+  { 
+    4.01323306597084012993211302178231392190355109050870e-01L, /* logirh[126] */ 
+    .6694335938,   /* frcpa[126] */ 
+    7.96541578570161757432662120891552932782435964821583e-21L, /* logirl[126] */ 
+  } , 
+  { 
+    4.04245149435448843149238165595171778932126471772790e-01L, /* logirh[127] */ 
+    .6674804688,   /* frcpa[127] */ 
+    -8.26101129620667799302841738321318860761977552259631e-21L, /* logirl[127] */ 
+  } , 
+  { 
+    4.06442147755990994755599318710714840108266798779368e-01L, /* logirh[128] */ 
+    .6660156250,   /* frcpa[128] */ 
+    8.38187190538776229960551692264161687270696777776234e-21L, /* logirl[128] */ 
+  } , 
+  { 
+    4.09379007429300711056819120359229202676942804828286e-01L, /* logirh[129] */ 
+    .6640625000,   /* frcpa[129] */ 
+    1.35117787486925987380490932795647340967696130081584e-20L, /* logirl[129] */ 
+  } , 
+  { 
+    4.11587326324529262171723897889563659191480837762356e-01L, /* logirh[130] */ 
+    .6625976563,   /* frcpa[130] */ 
+    -4.97376737951515286685487524395801072129992449215865e-21L, /* logirl[130] */ 
+  } , 
+  { 
+    4.14539357988610364272145936137548005717690102756023e-01L, /* logirh[131] */ 
+    .6606445313,   /* frcpa[131] */ 
+    -6.54478802266834973263149421547105883296889501687837e-21L, /* logirl[131] */ 
+  } , 
+  { 
+    4.16759114726923270773280283396644563254085369408131e-01L, /* logirh[132] */ 
+    .6591796875,   /* frcpa[132] */ 
+    1.17865539651687245072798438812191035874234305068345e-20L, /* logirl[132] */ 
+  } , 
+  { 
+    4.19726475954725289596548495896222163992206333205104e-01L, /* logirh[133] */ 
+    .6572265625,   /* frcpa[133] */ 
+    -3.13844567079468870611431966996843559602701061715652e-21L, /* logirl[133] */ 
+  } , 
+  { 
+    4.21957789636160829170727012971120473139308160170913e-01L, /* logirh[134] */ 
+    .6557617188,   /* frcpa[134] */ 
+    -3.65383628571568207059626458690769872734430618127779e-21L, /* logirl[134] */ 
+  } , 
+  { 
+    4.24940640468225896758322490676107463514199480414391e-01L, /* logirh[135] */ 
+    .6538085938,   /* frcpa[135] */ 
+    9.14108874507535988282140615418885533302915780668105e-21L, /* logirl[135] */ 
+  } , 
+  { 
+    4.27183632062807368089249124287754000306449597701430e-01L, /* logirh[136] */ 
+    .6523437500,   /* frcpa[136] */ 
+    -1.11429293671208215000857181981747836059777488816797e-20L, /* logirl[136] */ 
+  } , 
+  { 
+    4.30182135059063957605897388081217513899900950491428e-01L, /* logirh[137] */ 
+    .6503906250,   /* frcpa[137] */ 
+    -9.39443983412697441559456056174850307219777519084123e-21L, /* logirl[137] */ 
+  } , 
+  { 
+    4.32436927446153074100412133651261115119268652051687e-01L, /* logirh[138] */ 
+    .6489257813,   /* frcpa[138] */ 
+    7.88870762087972589406884437345717904736714146607698e-21L, /* logirl[138] */ 
+  } , 
+  { 
+    4.34696815413590586472123225569852422722760820761323e-01L, /* logirh[139] */ 
+    .6474609375,   /* frcpa[139] */ 
+    1.93069265094241299131429199321466769625398122100851e-21L, /* logirl[139] */ 
+  } , 
+  { 
+    4.37717965747766808330210600019860578413499752059579e-01L, /* logirh[140] */ 
+    .6455078125,   /* frcpa[140] */ 
+    1.42102608319782592423454192434347516972070983180682e-21L, /* logirl[140] */ 
+  } , 
+  { 
+    4.39989833442083805027352297334353181668120669201016e-01L, /* logirh[141] */ 
+    .6440429688,   /* frcpa[141] */ 
+    -1.20015769356213632548957467075032647879504224252139e-20L, /* logirl[141] */ 
+  } , 
+  { 
+    4.42266874274135892824424617919554236777912592515349e-01L, /* logirh[142] */ 
+    .6425781250,   /* frcpa[142] */ 
+    4.36106198868143736862105950597654421314560199511441e-21L, /* logirl[142] */ 
+  } , 
+  { 
+    4.45311016655364052629993004694952674071828369051218e-01L, /* logirh[143] */ 
+    .6406250000,   /* frcpa[143] */ 
+    6.63635101669914600475501747811974742734358988145874e-21L, /* logirl[143] */ 
+  } , 
+  { 
+    4.47600220249498474185288407478644501225062413141131e-01L, /* logirh[144] */ 
+    .6391601563,   /* frcpa[144] */ 
+    -1.25660107201378174413892049079180933248758422196735e-20L, /* logirl[144] */ 
+  } , 
+  { 
+    4.49894676323022032766573569118051523219037335366011e-01L, /* logirh[145] */ 
+    .6376953125,   /* frcpa[145] */ 
+    -7.20342573451092426836769665486326672600023249811669e-21L, /* logirl[145] */ 
+  } , 
+  { 
+    4.52194409034553285788591084348730930742021882906556e-01L, /* logirh[146] */ 
+    .6362304688,   /* frcpa[146] */ 
+    -8.47945847451460005436054189483125659211770365332896e-22L, /* logirl[146] */ 
+  } , 
+  { 
+    4.55268969488798865469280155449105507159401895478368e-01L, /* logirh[147] */ 
+    .6342773438,   /* frcpa[147] */ 
+    4.74336969576706749657589421782240547135428193892528e-21L, /* logirl[147] */ 
+  } , 
+  { 
+    4.57581109247178400342009885193306217843201011419296e-01L, /* logirh[148] */ 
+    .6328125000,   /* frcpa[148] */ 
+    -2.36598267617305990464319034283697709014593179635402e-21L, /* logirl[148] */ 
+  } , 
+  { 
+    4.59898607387540924438563971765603355379425920546055e-01L, /* logirh[149] */ 
+    .6313476563,   /* frcpa[149] */ 
+    8.07732102676293501119166223720103331713077340297627e-21L, /* logirl[149] */ 
+  } , 
+  { 
+    4.62221488803680604691035901931961404898174805566669e-01L, /* logirh[150] */ 
+    .6298828125,   /* frcpa[150] */ 
+    1.24382291552438961245330542958060837987441875091342e-20L, /* logirl[150] */ 
+  } , 
+  { 
+    4.64549778563271740681669963457522953831357881426811e-01L, /* logirh[151] */ 
+    .6284179688,   /* frcpa[151] */ 
+    1.96187920691998107717362190747064826757297578125547e-21L, /* logirl[151] */ 
+  } , 
+  { 
+    4.67662621543761975796173191444182748455205000936985e-01L, /* logirh[152] */ 
+    .6264648438,   /* frcpa[152] */ 
+    -1.00610749233134715635949292420774215513040092431792e-20L, /* logirl[152] */ 
+  } , 
+  { 
+    4.70003629245735553651317981116442012989864451810718e-01L, /* logirh[153] */ 
+    .6250000000,   /* frcpa[153] */ 
+    -3.80949968099948288960261756455515265913481939735419e-22L, /* logirl[153] */ 
+  } , 
+  { 
+    4.72350130126859112485648503620971894179092487320304e-01L, /* logirh[154] */ 
+    .6235351563,   /* frcpa[154] */ 
+    -9.08504177179036249027023970290925346168448739123201e-21L, /* logirl[154] */ 
+  } , 
+  { 
+    4.74702150027289747900079847076071359879279043525457e-01L, /* logirh[155] */ 
+    .6220703125,   /* frcpa[155] */ 
+    8.04843905401625679617395219952408959338025651283616e-21L, /* logirl[155] */ 
+  } , 
+  { 
+    4.77059714969944353784529061934804872180393431335688e-01L, /* logirh[156] */ 
+    .6206054688,   /* frcpa[156] */ 
+    9.09657652537257782393100881420207290475813569550887e-21L, /* logirl[156] */ 
+  } , 
+  { 
+    4.79422851162227170543914459011070050564740085974336e-01L, /* logirh[157] */ 
+    .6191406250,   /* frcpa[157] */ 
+    1.14124648139077527373251153641337763160500443812559e-20L, /* logirl[157] */ 
+  } , 
+  { 
+    4.81791584997777794116503510823967815213109133765101e-01L, /* logirh[158] */ 
+    .6176757813,   /* frcpa[158] */ 
+    3.59408221446137582759107104970989253261291421513114e-21L, /* logirl[158] */ 
+  } , 
+  { 
+    4.84165943058239936892892668618415541459398809820414e-01L, /* logirh[159] */ 
+    .6162109375,   /* frcpa[159] */ 
+    6.90512297756055515870014314442836697397537526874820e-22L, /* logirl[159] */ 
+  } , 
+  { 
+    4.86545952115051237119123378471741148132423404604197e-01L, /* logirh[160] */ 
+    .6147460938,   /* frcpa[160] */ 
+    2.87746285587177870212465072536291591811028257755262e-22L, /* logirl[160] */ 
+  } , 
+  { 
+    4.88931639131254417921087704335114665354922180995345e-01L, /* logirh[161] */ 
+    .6132812500,   /* frcpa[161] */ 
+    -7.67596907317736949350366764620323159731219880272990e-21L, /* logirl[161] */ 
+  } , 
+  { 
+    4.91323031263330102318652448101232721455744467675686e-01L, /* logirh[162] */ 
+    .6118164063,   /* frcpa[162] */ 
+    -1.22562855258723778652540992985069722405656970405882e-20L, /* logirl[162] */ 
+  } , 
+  { 
+    4.93720155863051595774996030407955061036773258820176e-01L, /* logirh[163] */ 
+    .6103515625,   /* frcpa[163] */ 
+    -5.71214873093993838422678630171600796188276737719886e-21L, /* logirl[163] */ 
+  } , 
+  { 
+    4.96123040479361952922402606569463046071177814155817e-01L, /* logirh[164] */ 
+    .6088867188,   /* frcpa[164] */ 
+    1.10361837627205617056885101288824066464403161388594e-20L, /* logirl[164] */ 
+  } , 
+  { 
+    4.98531712860273650553873808766169872797036077827215e-01L, /* logirh[165] */ 
+    .6074218750,   /* frcpa[165] */ 
+    5.21971892473696376244792745349121825258505877961581e-21L, /* logirl[165] */ 
+  } , 
+  { 
+    5.00946200954791194255404096491446352956700138747692e-01L, /* logirh[166] */ 
+    .6059570313,   /* frcpa[166] */ 
+    -7.49423576317321061879825078913185791137826712727096e-21L, /* logirl[166] */ 
+  } , 
+  { 
+    5.03366532914856991962667537299225273272895719856024e-01L, /* logirh[167] */ 
+    .6044921875,   /* frcpa[167] */ 
+    -1.83817128671833223948820461377340219380509767768120e-20L, /* logirl[167] */ 
+  } , 
+  { 
+    5.05792737097320832930034267826968630288320127874613e-01L, /* logirh[168] */ 
+    .6030273438,   /* frcpa[168] */ 
+    -3.75513846638616302607380496933108989002504885108483e-21L, /* logirl[168] */ 
+  } , 
+  { 
+    5.08224842065933316752682213923719700687797740101814e-01L, /* logirh[169] */ 
+    .6015625000,   /* frcpa[169] */ 
+    6.46314875207246381902554448007689112535666009895769e-22L, /* logirl[169] */ 
+  } , 
+  { 
+    5.10662876593363582503580511140484077259316109120846e-01L, /* logirh[170] */ 
+    .6000976563,   /* frcpa[170] */ 
+    1.31546915527971199814755811920912966696871823382403e-20L, /* logirl[170] */ 
+  } , 
+  { 
+    5.13106869663241694742069481938173680646286811679602e-01L, /* logirh[171] */ 
+    .5986328125,   /* frcpa[171] */ 
+    -9.48086093245893657857465915239236058691645484958719e-21L, /* logirl[171] */ 
+  } , 
+  { 
+    5.14739523087127012290851318931927949051896575838327e-01L, /* logirh[172] */ 
+    .5976562500,   /* frcpa[172] */ 
+    6.98056101530665066905394368582212942263609105784010e-21L, /* logirl[172] */ 
+  } , 
+  { 
+    5.17193512048693723737180505395372165367007255554199e-01L, /* logirh[173] */ 
+    .5961914063,   /* frcpa[173] */ 
+    2.70883447254679150939645524105991443744276583896589e-20L, /* logirl[173] */ 
+  } , 
+  { 
+    5.19653537889556070463858289398828560479159932583570e-01L, /* logirh[174] */ 
+    .5947265625,   /* frcpa[174] */ 
+    2.45929124553200804969371752267839129056713502249468e-20L, /* logirl[174] */ 
+  } , 
+  { 
+    5.22119630384749572034417536281480920479225460439920e-01L, /* logirh[175] */ 
+    .5932617188,   /* frcpa[175] */ 
+    -2.18497180803548344111669417650081141798741623577199e-20L, /* logirl[175] */ 
+  } , 
+  { 
+    5.24591819530138642462425285772908978287887293845415e-01L, /* logirh[176] */ 
+    .5917968750,   /* frcpa[176] */ 
+    1.32203035151652728530582847665410458727777398365519e-20L, /* logirl[176] */ 
+  } , 
+  { 
+    5.27070135544605730194053089254779820294061210006475e-01L, /* logirh[177] */ 
+    .5903320313,   /* frcpa[177] */ 
+    1.76032437549609086335524539448277975821798914097017e-20L, /* logirl[177] */ 
+  } , 
+  { 
+    5.28725765061866902010632995878580686621717177331448e-01L, /* logirh[178] */ 
+    .5893554688,   /* frcpa[178] */ 
+    -6.88102247990701389925516342020564246262797072332030e-23L, /* logirl[178] */ 
+  } , 
+  { 
+    5.31214360290632056150247203296643760950246360152960e-01L, /* logirh[179] */ 
+    .5878906250,   /* frcpa[179] */ 
+    2.66466330379185865323002458390306405768155182617574e-20L, /* logirl[179] */ 
+  } , 
+  { 
+    5.33709164079414862609691827532998331662383861839771e-01L, /* logirh[180] */ 
+    .5864257813,   /* frcpa[180] */ 
+    -1.29762017107818188869410259485124080678804176241434e-20L, /* logirl[180] */ 
+  } , 
+  { 
+    5.36210207484003745345615271622463637868349906057119e-01L, /* logirh[181] */ 
+    .5849609375,   /* frcpa[181] */ 
+    1.65067700778453559631881994813258268290230772692962e-20L, /* logirl[181] */ 
+  } , 
+  { 
+    5.37881051648821357916759738904133314463251736015081e-01L, /* logirh[182] */ 
+    .5839843750,   /* frcpa[182] */ 
+    -2.19109191560589250321272095571138928163548790076226e-20L, /* logirl[182] */ 
+  } , 
+  { 
+    5.40392564061482290446898624214355777439777739346027e-01L, /* logirh[183] */ 
+    .5825195313,   /* frcpa[183] */ 
+    2.08228396513876900118497171678012888475888240965144e-20L, /* logirl[183] */ 
+  } , 
+  { 
+    5.42910400053823334208438072812086261365038808435202e-01L, /* logirh[184] */ 
+    .5810546875,   /* frcpa[184] */ 
+    8.23644722718551463874152042367020651575236794759280e-21L, /* logirl[184] */ 
+  } , 
+  { 
+    5.44592486236808166527503111131736091010679956525564e-01L, /* logirh[185] */ 
+    .5800781250,   /* frcpa[185] */ 
+    -2.00933067408533920949057044370384679454492154640310e-20L, /* logirl[185] */ 
+  } , 
+  { 
+    5.47120932590166843430528470504370375238067936152220e-01L, /* logirh[186] */ 
+    .5786132813,   /* frcpa[186] */ 
+    -9.92524609455239275442518737817999625480140253588253e-21L, /* logirl[186] */ 
+  } , 
+  { 
+    5.49655788193354895971275142496637045042007230222225e-01L, /* logirh[187] */ 
+    .5771484375,   /* frcpa[187] */ 
+    2.60035059997719560566631655963598297729287367007908e-20L, /* logirl[187] */ 
+  } , 
+  { 
+    5.51349268699687959530229136584367211071366909891367e-01L, /* logirh[188] */ 
+    .5761718750,   /* frcpa[188] */ 
+    8.05024959333663801951435912985560282262081044464591e-21L, /* logirl[188] */ 
+  } , 
+  { 
+    5.53894878899121686241600187594613657893205527216196e-01L, /* logirh[189] */ 
+    .5747070313,   /* frcpa[189] */ 
+    -1.83892465430777104472961145252041624877581186770337e-20L, /* logirl[189] */ 
+  } , 
+  { 
+    5.56446985771356645851352940024270310459542088210583e-01L, /* logirh[190] */ 
+    .5732421875,   /* frcpa[190] */ 
+    2.06677769878226925286245270139777726439942087527370e-20L, /* logirl[190] */ 
+  } , 
+  { 
+    5.58152016022440478841114969155157155000779312103987e-01L, /* logirh[191] */ 
+    .5722656250,   /* frcpa[191] */ 
+    -2.58661388440662325511611588814692565587161510028965e-20L, /* logirl[191] */ 
+  } , 
+  { 
+    5.60715024687329991240868076740611058994545601308346e-01L, /* logirh[192] */ 
+    .5708007813,   /* frcpa[192] */ 
+    -1.64182608886279055979239231155414518020340732707175e-20L, /* logirl[192] */ 
+  } , 
+  { 
+    5.63284619248960715992471243174222195193578954786062e-01L, /* logirh[193] */ 
+    .5693359375,   /* frcpa[193] */ 
+    -2.65627455866435846195683323864140395189128131938038e-20L, /* logirl[193] */ 
+  } , 
+  { 
+    5.65001357868015271265077492657269431219901889562607e-01L, /* logirh[194] */ 
+    .5683593750,   /* frcpa[194] */ 
+    -2.19552581601677369964960433395712510373598893667200e-20L, /* logirl[194] */ 
+  } , 
+  { 
+    5.67582004461506905925068100504660151273128576576710e-01L, /* logirh[195] */ 
+    .5668945313,   /* frcpa[195] */ 
+    5.90701142185794805590524668669544397085089572669788e-21L, /* logirl[195] */ 
+  } , 
+  { 
+    5.69306142819646694805835879238387065015558619052172e-01L, /* logirh[196] */ 
+    .5659179688,   /* frcpa[196] */ 
+    2.33009214880869002611805100582067855813554770257529e-20L, /* logirl[196] */ 
+  } , 
+  { 
+    5.71897936927075624239692752670549680260592140257359e-01L, /* logirh[197] */ 
+    .5644531250,   /* frcpa[197] */ 
+    1.63271047067863612422000647375332886660577686602113e-20L, /* logirl[197] */ 
+  } , 
+  { 
+    5.73629539091353532682168031575642430652806069701910e-01L, /* logirh[198] */ 
+    .5634765625,   /* frcpa[198] */ 
+    1.35778757354348431006030977215550960808915473679493e-20L, /* logirl[198] */ 
+  } , 
+  { 
+    5.76232577437515759667327475135323311405954882502556e-01L, /* logirh[199] */ 
+    .5620117188,   /* frcpa[199] */ 
+    1.28136064828063593458439031297239582536217112855437e-20L, /* logirl[199] */ 
+  } , 
+  { 
+    5.78842409279886675808717011459947343610110692679882e-01L, /* logirh[200] */ 
+    .5605468750,   /* frcpa[200] */ 
+    -2.57440348169455489440041914302593932468377260933429e-20L, /* logirl[200] */ 
+  } , 
+  { 
+    5.80586088884713529922713959319224841237883083522320e-01L, /* logirh[201] */ 
+    .5595703125,   /* frcpa[201] */ 
+    4.41206613764798826108043412776466913688688358898484e-21L, /* logirl[201] */ 
+  } , 
+  { 
+    5.83207322364587747753113949888970068968774285167456e-01L, /* logirh[202] */ 
+    .5581054688,   /* frcpa[202] */ 
+    -1.49189541037162430714759871409805107504755972902992e-21L, /* logirl[202] */ 
+  } , 
+  { 
+    5.84958636297322764419429064197686329862335696816444e-01L, /* logirh[203] */ 
+    .5571289063,   /* frcpa[203] */ 
+    -1.60837721673687300800846563753717539999210255011878e-22L, /* logirl[203] */ 
+  } , 
+  { 
+    5.86713022712216263673118410437723468930926173925400e-01L, /* logirh[204] */ 
+    .5561523438,   /* frcpa[204] */ 
+    -3.17168863463050625558020547002535137465925788804006e-21L, /* logirl[204] */ 
+  } , 
+  { 
+    5.89350386878301744605131856635793496934638824313879e-01L, /* logirh[205] */ 
+    .5546875000,   /* frcpa[205] */ 
+    -1.39615389415916171660994818848901714495919357934706e-20L, /* logirl[205] */ 
+  } , 
+  { 
+    5.91112501871701023466523783334025665681110695004463e-01L, /* logirh[206] */ 
+    .5537109375,   /* frcpa[206] */ 
+    1.94637401144574668475212537692289150763221599806672e-20L, /* logirl[206] */ 
+  } , 
+  { 
+    5.93761510043277948936186333428466355144337285310030e-01L, /* logirh[207] */ 
+    .5522460938,   /* frcpa[207] */ 
+    2.13622917617199787393781580337151830714978899979519e-20L, /* logirl[207] */ 
+  } , 
+  { 
+    5.95531422009736386346742675890197915578028187155724e-01L, /* logirh[208] */ 
+    .5512695313,   /* frcpa[208] */ 
+    -5.57259316426018508787411112338297856432265995386872e-21L, /* logirl[208] */ 
+  } , 
+  { 
+    5.98192177459762712175232041156291984407289419323206e-01L, /* logirh[209] */ 
+    .5498046875,   /* frcpa[209] */ 
+    -3.74781519226728618443505703931062184338388651621827e-21L, /* logirl[209] */ 
+  } , 
+  { 
+    5.99969955705762019674415208569939750304911285638809e-01L, /* logirh[210] */ 
+    .5488281250,   /* frcpa[210] */ 
+    -2.59644401395225784451061116582518643426188955954025e-20L, /* logirl[210] */ 
+  } , 
+  { 
+    6.02642563087238492989475974193069873763306532055140e-01L, /* logirh[211] */ 
+    .5473632813,   /* frcpa[211] */ 
+    -2.50004437606787862337772976338569519653395217249839e-20L, /* logirl[211] */ 
+  } , 
+  { 
+    6.04428277847473170865909286586514781447476707398891e-01L, /* logirh[212] */ 
+    .5463867188,   /* frcpa[212] */ 
+    -7.33579257076237518313264419331850361801721257990158e-21L, /* logirl[212] */ 
+  } , 
+  { 
+    6.06217187090197695033266800379578853608109056949615e-01L, /* logirh[213] */ 
+    .5454101563,   /* frcpa[213] */ 
+    -2.17953080850264628478128768590230893044079856673130e-20L, /* logirl[213] */ 
+  } , 
+  { 
+    6.08906565672169072236594167257806020643329247832298e-01L, /* logirh[214] */ 
+    .5439453125,   /* frcpa[214] */ 
+    2.43001104791778958605091541205840292926934335038990e-20L, /* logirl[214] */ 
+  } , 
+  { 
+    6.10703511348870718168906773781756669450260233134031e-01L, /* logirh[215] */ 
+    .5429687500,   /* frcpa[215] */ 
+    -1.98347209918879072887544491214489475082169187478903e-20L, /* logirl[215] */ 
+  } , 
+  { 
+    6.12503691853018583787435225040951536357169970870018e-01L, /* logirh[216] */ 
+    .5419921875,   /* frcpa[216] */ 
+    2.07857483606536363253783256589667608143722579784530e-20L, /* logirl[216] */ 
+  } , 
+  { 
+    6.15210053450761525529327800043688512232620269060135e-01L, /* logirh[217] */ 
+    .5405273438,   /* frcpa[217] */ 
+    7.72645219126903427887142350700660117976602336795165e-21L, /* logirl[217] */ 
+  } , 
+  { 
+    6.17018372207545212680766116841724056030216161161661e-01L, /* logirh[218] */ 
+    .5395507813,   /* frcpa[218] */ 
+    5.00582653358541288118250323060147668157890772059789e-21L, /* logirl[218] */ 
+  } , 
+  { 
+    6.18829966905895933007054898755683325362042523920536e-01L, /* logirh[219] */ 
+    .5385742188,   /* frcpa[219] */ 
+    2.60431023001686460777788589129926677065962205227216e-20L, /* logirl[219] */ 
+  } , 
+  { 
+    6.21553527372936491502113803830908977943181525915861e-01L, /* logirh[220] */ 
+    .5371093750,   /* frcpa[220] */ 
+    -1.04869551248244441365933565828570015553511122659463e-20L, /* logirl[220] */ 
+  } , 
+  { 
+    6.23373364089922462607726294514520759548759087920189e-01L, /* logirh[221] */ 
+    .5361328125,   /* frcpa[221] */ 
+    2.27153427965787655960253811756921226020182163308283e-20L, /* logirl[221] */ 
+  } , 
+  { 
+    6.25196518651437560000743570709502705540216993540525e-01L, /* logirh[222] */ 
+    .5351562500,   /* frcpa[222] */ 
+    2.19232729760444485003184142946155941222776472408409e-20L, /* logirl[222] */ 
+  } , 
+  { 
+    6.27937497982859842897505192604867829686554614454508e-01L, /* logirh[223] */ 
+    .5336914063,   /* frcpa[223] */ 
+    2.59352328668902836446166306553362343068377561588123e-20L, /* logirl[223] */ 
+  } , 
+  { 
+    6.29769000326327585089804250717548939064727164804935e-01L, /* logirh[224] */ 
+    .5327148438,   /* frcpa[224] */ 
+    -1.21467317879907709324733285927127135284313624485272e-20L, /* logirl[224] */ 
+  } , 
+  { 
+    6.31603863226437932658786228445890742477786261588335e-01L, /* logirh[225] */ 
+    .5317382813,   /* frcpa[225] */ 
+    1.63894778187414974146534085353091795011762181164691e-20L, /* logirl[225] */ 
+  } , 
+  { 
+    6.33442099038188960458128917707654181867837905883789e-01L, /* logirh[226] */ 
+    .5307617188,   /* frcpa[226] */ 
+    -1.06695930136737880114178623385061897940403293765931e-20L, /* logirl[226] */ 
+  } , 
+  { 
+    6.36205804159806884666688436835713105210743378847837e-01L, /* logirh[227] */ 
+    .5292968750,   /* frcpa[227] */ 
+    -8.46941691798603143710724761239322249883772469675312e-21L, /* logirl[227] */ 
+  } , 
+  { 
+    6.38052526752971572575768438584375985556107480078936e-01L, /* logirh[228] */ 
+    .5283203125,   /* frcpa[228] */ 
+    2.63671634127395583915856588351301065321489867148089e-20L, /* logirl[228] */ 
+  } , 
+  { 
+    6.39902666041133026577757830777315462000842671841383e-01L, /* logirh[229] */ 
+    .5273437500,   /* frcpa[229] */ 
+    -2.63959031056676708649612991271987108904655365467646e-20L, /* logirl[229] */ 
+  } , 
+  { 
+    6.41756234690455939877196112064439148525707423686981e-01L, /* logirh[230] */ 
+    .5263671875,   /* frcpa[230] */ 
+    2.24760376658377731327353838657827087113829234283449e-20L, /* logirl[230] */ 
+  } , 
+  { 
+    6.44543045597635230899678793203833038205630145967007e-01L, /* logirh[231] */ 
+    .5249023438,   /* frcpa[231] */ 
+    1.55133630378868960145849365255088752071892290926646e-20L, /* logirl[231] */ 
+  } , 
+  { 
+    6.46405243528699932045906983990590788380359299480915e-01L, /* logirh[232] */ 
+    .5239257813,   /* frcpa[232] */ 
+    -7.72135134400730894438722249896938881605660497758570e-21L, /* logirl[232] */ 
+  } , 
+  { 
+    6.48270915711649635469575325696922618590178899466991e-01L, /* logirh[233] */ 
+    .5229492188,   /* frcpa[233] */ 
+    -2.53998248183380442804399491918209409440256852527255e-20L, /* logirl[233] */ 
+  } , 
+  { 
+    6.50140075134353178113941207350023887556744739413261e-01L, /* logirh[234] */ 
+    .5219726563,   /* frcpa[234] */ 
+    1.59816070187659374889917583730577235865801271336652e-20L, /* logirl[234] */ 
+  } , 
+  { 
+    6.52012734857645037396360609971424082687008194625378e-01L, /* logirh[235] */ 
+    .5209960938,   /* frcpa[235] */ 
+    1.45275263994271525130630696327763964092655442137801e-20L, /* logirl[235] */ 
+  } , 
+  { 
+    6.53888908015872916243329399099692977870290633291006e-01L, /* logirh[236] */ 
+    .5200195313,   /* frcpa[236] */ 
+    2.07648342785018300271983937594878297626085508933405e-20L, /* logirl[236] */ 
+  } , 
+  { 
+    6.56709784357514260791366389469203568296507000923157e-01L, /* logirh[237] */ 
+    .5185546875,   /* frcpa[237] */ 
+    -2.55860224521869209004017944548994743296377030914363e-20L, /* logirl[237] */ 
+  } , 
+  { 
+    6.58594799053285575988515854195526344483369030058384e-01L, /* logirh[238] */ 
+    .5175781250,   /* frcpa[238] */ 
+    2.13447666728173583107487129669228031073599282234625e-20L, /* logirl[238] */ 
+  } , 
+  { 
+    6.60483373741153712585625484843276922219956759363413e-01L, /* logirh[239] */ 
+    .5166015625,   /* frcpa[239] */ 
+    -2.68099338819034783490518710777734114173674267685964e-20L, /* logirl[239] */ 
+  } , 
+  { 
+    6.62375521893191621070843405627570632532297167927027e-01L, /* logirh[240] */ 
+    .5156250000,   /* frcpa[240] */ 
+    -2.46394917661662285487000617992290646560405896530757e-20L, /* logirl[240] */ 
+  } , 
+  { 
+    6.64271257058090767988727670667614688682078849524260e-01L, /* logirh[241] */ 
+    .5146484375,   /* frcpa[241] */ 
+    4.89460149866724603480291964434582303569949285072746e-21L, /* logirl[241] */ 
+  } , 
+  { 
+    6.66170592861743233678312875456484221103892195969820e-01L, /* logirh[242] */ 
+    .5136718750,   /* frcpa[242] */ 
+    -9.15004653796719880999098719384862468581948479370138e-21L, /* logirl[242] */ 
+  } , 
+  { 
+    6.68073543007829348495344584657473774313984904438257e-01L, /* logirh[243] */ 
+    .5126953125,   /* frcpa[243] */ 
+    -2.51400168937888068945390384200867041048687993212480e-20L, /* logirl[243] */ 
+  } , 
+  { 
+    6.69980121278410931161349101126134542028012219816446e-01L, /* logirh[244] */ 
+    .5117187500,   /* frcpa[244] */ 
+    2.70838593697521094682948422665684057236843679459511e-20L, /* logirl[244] */ 
+  } , 
+  { 
+    6.72846821760487024907150532815336418934748508036137e-01L, /* logirh[245] */ 
+    .5102539063,   /* frcpa[245] */ 
+    1.06724601454353533112223106661914589204580784001879e-20L, /* logirl[245] */ 
+  } , 
+  { 
+    6.74762531158625957514261145542278086395526770502329e-01L, /* logirh[246] */ 
+    .5092773438,   /* frcpa[246] */ 
+    -2.24888280496360550575110667851996097244442076628643e-20L, /* logirl[246] */ 
+  } , 
+  { 
+    6.76681917544429519819054047458095624278939794749022e-01L, /* logirh[247] */ 
+    .5083007813,   /* frcpa[247] */ 
+    2.15772052734613853105883485574187537438001210159785e-20L, /* logirl[247] */ 
+  } , 
+  { 
+    6.78604995060171010815616016165208179700130131095648e-01L, /* logirh[248] */ 
+    .5073242188,   /* frcpa[248] */ 
+    -1.30586072834413655346920811356096828938860230682704e-20L, /* logirl[248] */ 
+  } , 
+  { 
+    6.80531777929871074610777836877417712457827292382717e-01L, /* logirh[249] */ 
+    .5063476563,   /* frcpa[249] */ 
+    -2.21482221362167455319358217853577334183296289025644e-20L, /* logirl[249] */ 
+  } , 
+  { 
+    6.82462280459928955400790429042245932578225620090961e-01L, /* logirh[250] */ 
+    .5053710938,   /* frcpa[250] */ 
+    -9.23973188373885101035764728029706054781623831427493e-21L, /* logirl[250] */ 
+  } , 
+  { 
+    6.84396517039759856994123043971711695121484808623791e-01L, /* logirh[251] */ 
+    .5043945313,   /* frcpa[251] */ 
+    -1.15340975708897387680916809613678008557527533421693e-20L, /* logirl[251] */ 
+  } , 
+  { 
+    6.86334502142438478275096591652015831641620025038719e-01L, /* logirh[252] */ 
+    .5034179688,   /* frcpa[252] */ 
+    1.00516389437240083809638080859061807916651987536657e-20L, /* logirl[252] */ 
+  } , 
+  { 
+    6.88276250325348796870426892891003944896510802209377e-01L, /* logirh[253] */ 
+    .5024414063,   /* frcpa[253] */ 
+    7.82297589687341037552438599781693585434569670880706e-21L, /* logirl[253] */ 
+  } , 
+  { 
+    6.90221776230840173389172870210828136805503163486719e-01L, /* logirh[254] */ 
+    .5014648438,   /* frcpa[254] */ 
+    -2.60525172176154149544033330497727120965480632602542e-20L, /* logirl[254] */ 
+  } , 
+  { 
+    6.92171094586889850503938492742861399165121838450432e-01L, /* logirh[255] */ 
+    .5004882813,   /* frcpa[255] */ 
+    1.73328038072979822371837713611880675698641265660364e-20L, /* logirl[255] */ 
+  } }; 
+ 
+#else /* not(defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)),
+   assuming Itanium, otherwise we shouldn't be there */ 
+typedef struct dde_tag {long double h;  long double l; } dde ;  
+
+static const dde argredtable[256] = {
+  { 
+    1.95503483580335055758484246596351496805255010258406e-03L, /* logirh[0] */ 
+    4.26497759032971696118474291411612806946615310742445e-23L, /* logirl[0] */ 
+  } , 
+  { 
+    5.87660848898504192008808086344906485010142205283046e-03L, /* logirh[1] */ 
+    1.37156200381399302871157777585220592575158205768131e-22L, /* logirl[1] */ 
+  } , 
+  { 
+    9.81362144832462125256124620478748177276884234743193e-03L, /* logirh[2] */ 
+    3.07726865638716648710074387700961122683722826913929e-22L, /* logirl[2] */ 
+  } , 
+  { 
+    1.37661957641479592703297901191972218981618425459601e-02L, /* logirh[3] */ 
+    -1.98297134784905635140870220079309409760230880892056e-22L, /* logirl[3] */ 
+  } , 
+  { 
+    1.72375605196069193814697052130613386111690488178283e-02L, /* logirh[4] */ 
+    -4.94287486388840565529812024596830454645571429961607e-22L, /* logirl[4] */ 
+  } , 
+  { 
+    2.12196464187288431375985262028471822759456699714065e-02L, /* logirh[5] */ 
+    5.16389261557696151000206838577628415000632847634295e-22L, /* logirl[5] */ 
+  } , 
+  { 
+    2.52176527435831877698167767867798438885529321851209e-02L, /* logirh[6] */ 
+    -5.88370153281068503292270445713080556561303301841144e-22L, /* logirl[6] */ 
+  } , 
+  { 
+    2.87290684408603241616140654829392175884095195215195e-02L, /* logirh[7] */ 
+    -1.73475995898378250110858253089819431684975627555638e-22L, /* logirl[7] */ 
+  } , 
+  { 
+    3.27572712694651043228305248994347564917006820905954e-02L, /* logirh[8] */ 
+    1.04044091162415222941106067538146188822878967483250e-21L, /* logirl[8] */ 
+  } , 
+  { 
+    3.62953088241761602138690193802839090153611323330551e-02L, /* logirh[9] */ 
+    1.22010872587213859039144846596851206648600477022497e-21L, /* logirl[9] */ 
+  } , 
+  { 
+    4.03541677703393333770148961037182999689321150071919e-02L, /* logirh[10] */ 
+    5.47371799872278404585523355882269167105391307255747e-22L, /* logirl[10] */ 
+  } , 
+  { 
+    4.39192339348354905258654118371808294796210248023272e-02L, /* logirh[11] */ 
+    5.26739715684616324587620976855106674710664957099042e-22L, /* logirl[11] */ 
+  } , 
+  { 
+    4.74970552827194697662028469858919166313171444926411e-02L, /* logirh[12] */ 
+    -1.65705277653801718279418515265615566433700654766169e-21L, /* logirl[12] */ 
+  } , 
+  { 
+    5.16017301068517361398093213492588304802666243631393e-02L, /* logirh[13] */ 
+    3.64447832323127705842810790836917844429050748104855e-22L, /* logirl[13] */ 
+  } , 
+  { 
+    5.52071937086868625198861782604753400960362341720611e-02L, /* logirh[14] */ 
+    -1.37225036221543681414424623055166322809445309674122e-21L, /* logirl[14] */ 
+  } , 
+  { 
+    5.88257037308839618356705574581111406473610259126872e-02L, /* logirh[15] */ 
+    -4.39800093887498980427107404671736592431574853874786e-22L, /* logirl[15] */ 
+  } , 
+  { 
+    6.24573549337466043343298095075200038195362139958888e-02L, /* logirh[16] */ 
+    -8.23828980696659845387403889844465565154590358193941e-22L, /* logirl[16] */ 
+  } , 
+  { 
+    6.61022431137539080757761777995540342089952901005745e-02L, /* logirh[17] */ 
+    -1.41308504022299608057769025420706808988134001026863e-21L, /* logirl[17] */ 
+  } , 
+  { 
+    6.97604651187228467229951671402243817965427297167480e-02L, /* logirh[18] */ 
+    -1.38323798701348717556121553783765299441359867812815e-21L, /* logirl[18] */ 
+  } , 
+  { 
+    7.34321188632489125927647194425063048583979252725840e-02L, /* logirh[19] */ 
+    1.34465019131517496452701890834591900102723464814978e-21L, /* logirl[19] */ 
+  } , 
+  { 
+    7.71173033444312897724342258098939595356569043360651e-02L, /* logirh[20] */ 
+    -2.76803254841804175261988025377387385490660077224303e-21L, /* logirl[20] */ 
+  } , 
+  { 
+    8.08161186578888513811196742109288493338681291788816e-02L, /* logirh[21] */ 
+    2.93744399967660616702546631311566500630612645057592e-21L, /* logirl[21] */ 
+  } , 
+  { 
+    8.39974575022459922670056350901823805088497465476394e-02L, /* logirh[22] */ 
+    -2.75822298865697918651295806251552828734188048975836e-21L, /* logirl[22] */ 
+  } , 
+  { 
+    8.77218565932284199769932223067492316204152302816510e-02L, /* logirh[23] */ 
+    2.67113100993740085512946635363884214822116089153997e-21L, /* logirl[23] */ 
+  } , 
+  { 
+    9.14601787038355687741450830707812258424382889643312e-02L, /* logirh[24] */ 
+    -3.00526806639363070117892291419618462383136721841578e-21L, /* logirl[24] */ 
+  } , 
+  { 
+    9.52125283223860239512309315557114786088277469389141e-02L, /* logirh[25] */ 
+    1.35736425184120563462579496535517324394637087277742e-21L, /* logirl[25] */ 
+  } , 
+  { 
+    9.84400728132525199034455649915731356713877175934613e-02L, /* logirh[26] */ 
+    -5.56990062601900788417321793968341239499135058919372e-22L, /* logirl[26] */ 
+  } , 
+  { 
+    1.02218754772273556643104926860976533475877658929676e-01L, /* logirh[27] */ 
+    7.63382487271644236333136443364119627751055377943666e-22L, /* logirl[27] */ 
+  } , 
+  { 
+    1.05469028489575121463619165884662010057581937871873e-01L, /* logirh[28] */ 
+    1.85116563464987726627623524285080128419577821992918e-22L, /* logirl[28] */ 
+  } , 
+  { 
+    1.09274414978962630318388461747591833272963413037360e-01L, /* logirh[29] */ 
+    1.43030273529362987587188893575634710205316211093836e-21L, /* logirl[29] */ 
+  } , 
+  { 
+    1.12547740323931779421560029491589105532511894125491e-01L, /* logirh[30] */ 
+    3.36751151584848473373955852226758180853512318689242e-21L, /* logirl[30] */ 
+  } , 
+  { 
+    1.15831815525121705097444380072602143627591431140900e-01L, /* logirh[31] */ 
+    1.67567986607802294055723185761339369360049976900432e-21L, /* logirl[31] */ 
+  } , 
+  { 
+    1.19676917763227218609019351230893235538133012596518e-01L, /* logirh[32] */ 
+    8.35611517441972676431434101463549037120144125394240e-22L, /* logirl[32] */ 
+  } , 
+  { 
+    1.22984528275985021608521837593874792560200148727745e-01L, /* logirh[33] */ 
+    -1.14267076111199552134812668592042704746068833133061e-21L, /* logirl[33] */ 
+  } , 
+  { 
+    1.26303115392417108974409088728574346305322251282632e-01L, /* logirh[34] */ 
+    -3.66994969052681147535088868653684417772797430455504e-21L, /* logirl[34] */ 
+  } , 
+  { 
+    1.29632752208865300127572928179375821855501271784306e-01L, /* logirh[35] */ 
+    4.83334965613124572307769994176898229963307387098066e-21L, /* logirl[35] */ 
+  } , 
+  { 
+    1.33531392624522623151618952452857058688096003606915e-01L, /* logirh[36] */ 
+    -5.27533152150708409857288888663059788853678472480168e-21L, /* logirl[36] */ 
+  } , 
+  { 
+    1.36885224722954047341127482850797747460092068649828e-01L, /* logirh[37] */ 
+    1.21563007094068716150945210722808645658904368873783e-21L, /* logirl[37] */ 
+  } , 
+  { 
+    1.40250342873267571831169021889795800461797625757754e-01L, /* logirh[38] */ 
+    5.34519733775645328726217720982122225003034400597528e-21L, /* logirl[38] */ 
+  } , 
+  { 
+    1.43626823289873603765680852573094483659588149748743e-01L, /* logirh[39] */ 
+    3.59170919594244028724220274969813502658750088315098e-21L, /* logirl[39] */ 
+  } , 
+  { 
+    1.47014742961809659029448135725282043040351709350944e-01L, /* logirh[40] */ 
+    5.38677650168536117007388836493849853882234650385544e-21L, /* logirl[40] */ 
+  } , 
+  { 
+    1.50414179663273585806342741433283549667976330965757e-01L, /* logirh[41] */ 
+    1.72564246416369909726215866729178930082312495242932e-21L, /* logirl[41] */ 
+  } , 
+  { 
+    1.53825211964336434759034050179238306554907467216253e-01L, /* logirh[42] */ 
+    2.84291320159710576836478937518921166594573591422384e-21L, /* logirl[42] */ 
+  } , 
+  { 
+    1.56676653873546552566981687748537410698190797120333e-01L, /* logirh[43] */ 
+    4.43471536483748191570747062604139622410792329989357e-21L, /* logirl[43] */ 
+  } , 
+  { 
+    1.60109151522870865795122700958597050657772342674434e-01L, /* logirh[44] */ 
+    -5.81022064348215050161714415533519321872077063187762e-21L, /* logirl[44] */ 
+  } , 
+  { 
+    1.63553471805115372406905401014842738049992476589978e-01L, /* logirh[45] */ 
+    -6.39840577852136201560723745193600583196069336234932e-21L, /* logirl[45] */ 
+  } , 
+  { 
+    1.67009696443792323653637632574486815428826957941055e-01L, /* logirh[46] */ 
+    6.92191186869741625944379810478235880715811002219858e-22L, /* logirl[46] */ 
+  } , 
+  { 
+    1.70477908012719802107013018777070811893281643278897e-01L, /* logirh[47] */ 
+    -3.84849710573311162685375196487995319911393770927909e-21L, /* logirl[47] */ 
+  } , 
+  { 
+    1.73377301171722293809149099963473616980991209857166e-01L, /* logirh[48] */ 
+    -4.18923878482095888690809066241864157021606624827420e-21L, /* logirl[48] */ 
+  } , 
+  { 
+    1.76867706111490813238994873612952574148948770016432e-01L, /* logirh[49] */ 
+    5.41796305766292925593321827919447911014134106410241e-21L, /* logirl[49] */ 
+  } , 
+  { 
+    1.79785712267204925789132984037532736465436755679548e-01L, /* logirh[50] */ 
+    1.09794592080028280721225372439216971505383750155787e-21L, /* logirl[50] */ 
+  } , 
+  { 
+    1.83298596441781238991779352798250357636788976378739e-01L, /* logirh[51] */ 
+    5.90674750801774139656717989843661717212913795636144e-21L, /* logirl[51] */ 
+  } , 
+  { 
+    1.86823864487466379972558164213047859902872005477548e-01L, /* logirh[52] */ 
+    -3.04217531149578964457668800577591481904667556936207e-22L, /* logirl[52] */ 
+  } , 
+  { 
+    1.89771110947398700938607528365675847226157202385366e-01L, /* logirh[53] */ 
+    4.47378684265150424850655238125197190495389833236133e-21L, /* logirl[53] */ 
+  } , 
+  { 
+    1.92727069351598330189216656815887063203263096511364e-01L, /* logirh[54] */ 
+    4.25445368378849844793522570228782328665573787173242e-21L, /* logirl[54] */ 
+  } , 
+  { 
+    1.96285791968592396490329160529952901015349198132753e-01L, /* logirh[55] */ 
+    -2.74449417331789688975664262836082841822814364159104e-21L, /* logirl[55] */ 
+  } , 
+  { 
+    1.99261099132246916960020319264934585135051747784019e-01L, /* logirh[56] */ 
+    6.47208691720606613197768957447376978812352107535377e-21L, /* logirl[56] */ 
+  } , 
+  { 
+    2.02843192514751471269385078854963211369977216236293e-01L, /* logirh[57] */ 
+    -2.49911704253350382497946421034579061512074844155459e-21L, /* logirl[57] */ 
+  } , 
+  { 
+    2.05838103408604401595963402649136497757353936322033e-01L, /* logirh[58] */ 
+    3.44547120579970794151735860178311194999554929496034e-21L, /* logirl[58] */ 
+  } , 
+  { 
+    2.08842010744004902909995609328053234321487252600491e-01L, /* logirh[59] */ 
+    -2.31718119342409737696864118031023889824430589122232e-21L, /* logirl[59] */ 
+  } , 
+  { 
+    2.11854968732835491690620101368214278636514791287482e-01L, /* logirh[60] */ 
+    -5.59178221480029447097470536961685192149874416053190e-21L, /* logirl[60] */ 
+  } , 
+  { 
+    2.15482542239270394491710766682324162957229418680072e-01L, /* logirh[61] */ 
+    -3.08567992399291380594398304266569953574118919907360e-21L, /* logirl[61] */ 
+  } , 
+  { 
+    2.18515604922383282264996239019350099397343001328409e-01L, /* logirh[62] */ 
+    -2.54798988296256277081585163171791801881177620828164e-21L, /* logirl[62] */ 
+  } , 
+  { 
+    2.21557895069307506555442328910476845749144558794796e-01L, /* logirh[63] */ 
+    6.13314860927894564393358817562097659422742835665000e-21L, /* logirl[63] */ 
+  } , 
+  { 
+    2.24609468996706039046508396328505341443815268576145e-01L, /* logirh[64] */ 
+    -4.94151233330231607699074826625823143609255820481925e-21L, /* logirl[64] */ 
+  } , 
+  { 
+    2.27670383538384533180648494621323152387049049139023e-01L, /* logirh[65] */ 
+    1.32722330655188821742036628678343997944613329580108e-21L, /* logirl[65] */ 
+  } , 
+  { 
+    2.30740696051642502680673052495308184006717056035995e-01L, /* logirh[66] */ 
+    -4.67148041930246804736964870794777368798100308802424e-22L, /* logirl[66] */ 
+  } , 
+  { 
+    2.33820464423722301015970588544679031883788411505520e-01L, /* logirh[67] */ 
+    4.09731183066161080755265939560882683473100997189963e-21L, /* logirl[67] */ 
+  } , 
+  { 
+    2.36909747078357715033302723084407404030571342445910e-01L, /* logirh[68] */ 
+    3.12386020983941560709206311202257016876406966228076e-21L, /* logirl[68] */ 
+  } , 
+  { 
+    2.40008602982424024623693201152541121246031252667308e-01L, /* logirh[69] */ 
+    -2.43476897905245731343786602663372491079788337856472e-21L, /* logirl[69] */ 
+  } , 
+  { 
+    2.43117091652691421022275744534546504382888088002801e-01L, /* logirh[70] */ 
+    -4.00696535645269435436299549546802892061102236811804e-21L, /* logirl[70] */ 
+  } , 
+  { 
+    2.46235273162683717456332942175034617093842825852334e-01L, /* logirh[71] */ 
+    4.07437573318827322756457884828210179798439304619411e-21L, /* logirl[71] */ 
+  } , 
+  { 
+    2.49363208149644328249063332525459202315687434747815e-01L, /* logirh[72] */ 
+    -3.59965165542906115819932802133318661805640003973833e-21L, /* logirl[72] */ 
+  } , 
+  { 
+    2.52500957821611535746280513548001067647419404238462e-01L, /* logirh[73] */ 
+    2.33463811464698172389714383182373125448753269899859e-21L, /* logirl[73] */ 
+  } , 
+  { 
+    2.55648583964605109373428165620012464387400541454554e-01L, /* logirh[74] */ 
+    -5.98349602918013475350833615157201591368028964103828e-21L, /* logirl[74] */ 
+  } , 
+  { 
+    2.58173837831799220471438310875456068060884717851877e-01L, /* logirh[75] */ 
+    1.33986666471082110277621581004881530763601545750211e-20L, /* logirl[75] */ 
+  } , 
+  { 
+    2.61339399196360020101188165186911760429211426526308e-01L, /* logirh[76] */ 
+    3.86551567380649813446710441868758040977608915780583e-21L, /* logirl[76] */ 
+  } , 
+  { 
+    2.64515013170246549202438771097867231674172217026353e-01L, /* logirh[77] */ 
+    7.98107393367028325011146300178634322183923091601985e-21L, /* logirl[77] */ 
+  } , 
+  { 
+    2.67700743803377575602683510758161844478308921679854e-01L, /* logirh[78] */ 
+    -1.91017444378219323517258229660185956541609986586656e-21L, /* logirl[78] */ 
+  } , 
+  { 
+    2.70256655737921794101881120542252290306350914761424e-01L, /* logirh[79] */ 
+    3.53127205732779035544673231633056564481395911692583e-21L, /* logirl[79] */ 
+  } , 
+  { 
+    2.73460759728704830284762294922984438017010688781738e-01L, /* logirh[80] */ 
+    1.17681147335201171244391876920889368097526851011919e-20L, /* logirl[80] */ 
+  } , 
+  { 
+    2.76675163010711334108434472645043911143147852271795e-01L, /* logirh[81] */ 
+    1.06699065144355902967885100961053554661859396947057e-20L, /* logirl[81] */ 
+  } , 
+  { 
+    2.79254145742529772484998712434034473517385777086020e-01L, /* logirh[82] */ 
+    9.18144271840156782536821462802027993141168527210699e-22L, /* logirl[82] */ 
+  } , 
+  { 
+    2.82487255574676923491547753108932283794274553656578e-01L, /* logirh[83] */ 
+    -8.62183482657850338055949164218482107835463533173941e-21L, /* logirl[83] */ 
+  } , 
+  { 
+    2.85081290751723560975309720855186412791226757690310e-01L, /* logirh[84] */ 
+    1.17237176339060309039114596865979651990000730425096e-20L, /* logirl[84] */ 
+  } , 
+  { 
+    2.88333326138100875385417154461720201652497053146362e-01L, /* logirh[85] */ 
+    4.91428106954212380686140911029428249306740479245873e-21L, /* logirl[85] */ 
+  } , 
+  { 
+    2.90942590501714649404855009273695998217590386047959e-01L, /* logirh[86] */ 
+    -1.75340148127812535361388147355237410486083146456705e-21L, /* logirl[86] */ 
+  } , 
+  { 
+    2.94213774314996088685928571360150840519054327160120e-01L, /* logirh[87] */ 
+    3.72344756923345953865473190171804616041154553422343e-21L, /* logirl[87] */ 
+  } , 
+  { 
+    2.96838447737767257807650275736044420682446798309684e-01L, /* logirh[88] */ 
+    9.29219098895164091290778342787327520629305647347598e-21L, /* logirl[88] */ 
+  } , 
+  { 
+    3.00129006810866155350540213087029428606911096721888e-01L, /* logirh[89] */ 
+    4.15407888405806794704699164445087088652277542419333e-21L, /* logirl[89] */ 
+  } , 
+  { 
+    3.02769272371042485027595181357185083470540121197701e-01L, /* logirh[90] */ 
+    -5.39200386021858963294532737382056488102330563120789e-21L, /* logirl[90] */ 
+  } , 
+  { 
+    3.05416527391549505774737474639302092782600084319711e-01L, /* logirh[91] */ 
+    8.09508842504419574684087285543596001167284855903610e-22L, /* logirl[91] */ 
+  } , 
+  { 
+    3.08735481649613269672805665466697178089816588908434e-01L, /* logirh[92] */ 
+    9.63639351018852146719394839260714210168238671991609e-21L, /* logirl[92] */ 
+  } , 
+  { 
+    3.11398599069096969566353139136083427729317918419838e-01L, /* logirh[93] */ 
+    -8.78728261358293827391132654678683452408757879284726e-21L, /* logirl[93] */ 
+  } , 
+  { 
+    3.14068827624975851033669455025787442536966409534216e-01L, /* logirh[94] */ 
+    -7.29067919863073334281631602128749543633905749487187e-21L, /* logirl[94] */ 
+  } , 
+  { 
+    3.16746205395692243423234196741944401765067595988512e-01L, /* logirh[95] */ 
+    -3.87970872001942700455671881391065519856896238099562e-21L, /* logirl[95] */ 
+  } , 
+  { 
+    3.20103039699243330251134109776245395551086403429508e-01L, /* logirh[96] */ 
+    9.74190129969570988905249611640634240349398962781767e-21L, /* logirl[96] */ 
+  } , 
+  { 
+    3.22796644021466308337566311625899118098459439352155e-01L, /* logirh[97] */ 
+    -1.24774498383778898467895756041215733560057419893395e-21L, /* logirl[97] */ 
+  } , 
+  { 
+    3.25497523448598604771950584813033913178514922037721e-01L, /* logirh[98] */ 
+    -1.04491359306555100779220975161808188230678757588356e-20L, /* logirl[98] */ 
+  } , 
+  { 
+    3.28205717385478203779961697827971534024982247501612e-01L, /* logirh[99] */ 
+    -7.97740196010218830935182187448759796325974533751889e-21L, /* logirl[99] */ 
+  } , 
+  { 
+    3.30921265557960885537493178620849221260868944227695e-01L, /* logirh[100] */ 
+    8.64134723319418452779496730832996023729416105456812e-21L, /* logirl[100] */ 
+  } , 
+  { 
+    3.33644208016416686724469817248994729652622481808066e-01L, /* logirh[101] */ 
+    9.66067882514623325134829038169224793167381199665462e-21L, /* logirl[101] */ 
+  } , 
+  { 
+    3.37058345849674590458339498710849113649601349607110e-01L, /* logirh[102] */ 
+    -8.39541534805700404182434293467016145944324738626105e-21L, /* logirl[102] */ 
+  } , 
+  { 
+    3.39798073590794945798669590697471676321583800017834e-01L, /* logirh[103] */ 
+    2.18020234913977654841648305008968992796498205692680e-21L, /* logirl[103] */ 
+  } , 
+  { 
+    3.42545328065933728256022006153358461233437992632389e-01L, /* logirh[104] */ 
+    3.84623958513933049310518070448063856087605206176412e-21L, /* logirl[104] */ 
+  } , 
+  { 
+    3.45300150744778317797719843773585068902320927008986e-01L, /* logirh[105] */ 
+    -1.01893280061062726927558707137105116763914501631221e-20L, /* logirl[105] */ 
+  } , 
+  { 
+    3.48062583440688407302680135169126174332632217556238e-01L, /* logirh[106] */ 
+    7.98452377929806675746594993919271831161811571911368e-21L, /* logirl[106] */ 
+  } , 
+  { 
+    3.50832668314504018285994446646469668849022127687931e-01L, /* logirh[107] */ 
+    1.23717094386754616403804233472575851672026180336760e-20L, /* logirl[107] */ 
+  } , 
+  { 
+    3.53610447878406405658891636933915947338391561061144e-01L, /* logirh[108] */ 
+    -1.30564842388437679910379256931334342564847448923293e-20L, /* logirl[108] */ 
+  } , 
+  { 
+    3.56395964999832735826479704344116328229574719443917e-01L, /* logirh[109] */ 
+    -1.25673209467854485601417465225681194056028338689638e-20L, /* logirl[109] */ 
+  } , 
+  { 
+    3.58490206602947495263637722739957780504482798278332e-01L, /* logirh[110] */ 
+    -4.28923649665041597642981589160186406861873075678703e-21L, /* logirl[110] */ 
+  } , 
+  { 
+    3.61289368682561986699693090674401219075662083923817e-01L, /* logirh[111] */ 
+    -1.25473402274048087652641573695951161425274151232398e-20L, /* logirl[111] */ 
+  } , 
+  { 
+    3.64096388069546034432343722953007159048866014927626e-01L, /* logirh[112] */ 
+    1.30462756592416210783264533797496700709053049115538e-20L, /* logirl[112] */ 
+  } , 
+  { 
+    3.66911308999355744667886236598519644758198410272598e-01L, /* logirh[113] */ 
+    -8.36422879207943595633235500504614573436448299389604e-21L, /* logirl[113] */ 
+  } , 
+  { 
+    3.69734176082060404339114587091152941411564825102687e-01L, /* logirh[114] */ 
+    3.69226892746146309305101640958791161030722272698924e-21L, /* logirl[114] */ 
+  } , 
+  { 
+    3.72565034306584399851920014201667186171107459813356e-01L, /* logirh[115] */ 
+    1.26264806737780740417234126186201469813800457294886e-20L, /* logirl[115] */ 
+  } , 
+  { 
+    3.75403929045009347406115784995250805877731181681156e-01L, /* logirh[116] */ 
+    1.27675743152632581009120170158413354291147159818701e-20L, /* logirl[116] */ 
+  } , 
+  { 
+    3.77538401573641974523281791831230691514065256342292e-01L, /* logirh[117] */ 
+    -7.41585104053729758201550005081247397028781146530367e-21L, /* logirl[117] */ 
+  } , 
+  { 
+    3.80391470556048421025564440500765783781389473006129e-01L, /* logirh[118] */ 
+    5.42112126909175213422320698106968710022398212765792e-21L, /* logirl[118] */ 
+  } , 
+  { 
+    3.83252702837080621558942666871061533129250165075064e-01L, /* logirh[119] */ 
+    -3.33509624611212959857880713113019351814294081047672e-21L, /* logirl[119] */ 
+  } , 
+  { 
+    3.85404012379592703080441115637277960104256635531783e-01L, /* logirh[120] */ 
+    -6.36181490905264280193017955525373436929450412995273e-21L, /* logirl[120] */ 
+  } , 
+  { 
+    3.88279643405054638124378543762027504726574989035726e-01L, /* logirh[121] */ 
+    -9.91762590332090210822469068841385419105462380573398e-21L, /* logirl[121] */ 
+  } , 
+  { 
+    3.91163567537959529132191027755993673054035753011703e-01L, /* logirh[122] */ 
+    -1.27945744668499029121935899537977013057416450166329e-20L, /* logirl[122] */ 
+  } , 
+  { 
+    3.93331981831783197563028042775812309628236107528210e-01L, /* logirh[123] */ 
+    1.53510198299819511369584982102574259233257823450716e-21L, /* logirl[123] */ 
+  } , 
+  { 
+    3.96230534585794523961144869561579184846777934581041e-01L, /* logirh[124] */ 
+    1.32197644258101207427735080522965675494126617191596e-20L, /* logirl[124] */ 
+  } , 
+  { 
+    3.99137513377103754345399944103434108910732902586460e-01L, /* logirh[125] */ 
+    -9.55957037680245004179134758135305425464802853191611e-21L, /* logirl[125] */ 
+  } , 
+  { 
+    4.01323306597084012993211302178231392190355109050870e-01L, /* logirh[126] */ 
+    7.96541578570161757432662120891552932782435964821583e-21L, /* logirl[126] */ 
+  } , 
+  { 
+    4.04245149435448843149238165595171778932126471772790e-01L, /* logirh[127] */ 
+    -8.26101129620667799302841738321318860761977552259631e-21L, /* logirl[127] */ 
+  } , 
+  { 
+    4.06442147755990994755599318710714840108266798779368e-01L, /* logirh[128] */ 
+    8.38187190538776229960551692264161687270696777776234e-21L, /* logirl[128] */ 
+  } , 
+  { 
+    4.09379007429300711056819120359229202676942804828286e-01L, /* logirh[129] */ 
+    1.35117787486925987380490932795647340967696130081584e-20L, /* logirl[129] */ 
+  } , 
+  { 
+    4.11587326324529262171723897889563659191480837762356e-01L, /* logirh[130] */ 
+    -4.97376737951515286685487524395801072129992449215865e-21L, /* logirl[130] */ 
+  } , 
+  { 
+    4.14539357988610364272145936137548005717690102756023e-01L, /* logirh[131] */ 
+    -6.54478802266834973263149421547105883296889501687837e-21L, /* logirl[131] */ 
+  } , 
+  { 
+    4.16759114726923270773280283396644563254085369408131e-01L, /* logirh[132] */ 
+    1.17865539651687245072798438812191035874234305068345e-20L, /* logirl[132] */ 
+  } , 
+  { 
+    4.19726475954725289596548495896222163992206333205104e-01L, /* logirh[133] */ 
+    -3.13844567079468870611431966996843559602701061715652e-21L, /* logirl[133] */ 
+  } , 
+  { 
+    4.21957789636160829170727012971120473139308160170913e-01L, /* logirh[134] */ 
+    -3.65383628571568207059626458690769872734430618127779e-21L, /* logirl[134] */ 
+  } , 
+  { 
+    4.24940640468225896758322490676107463514199480414391e-01L, /* logirh[135] */ 
+    9.14108874507535988282140615418885533302915780668105e-21L, /* logirl[135] */ 
+  } , 
+  { 
+    4.27183632062807368089249124287754000306449597701430e-01L, /* logirh[136] */ 
+    -1.11429293671208215000857181981747836059777488816797e-20L, /* logirl[136] */ 
+  } , 
+  { 
+    4.30182135059063957605897388081217513899900950491428e-01L, /* logirh[137] */ 
+    -9.39443983412697441559456056174850307219777519084123e-21L, /* logirl[137] */ 
+  } , 
+  { 
+    4.32436927446153074100412133651261115119268652051687e-01L, /* logirh[138] */ 
+    7.88870762087972589406884437345717904736714146607698e-21L, /* logirl[138] */ 
+  } , 
+  { 
+    4.34696815413590586472123225569852422722760820761323e-01L, /* logirh[139] */ 
+    1.93069265094241299131429199321466769625398122100851e-21L, /* logirl[139] */ 
+  } , 
+  { 
+    4.37717965747766808330210600019860578413499752059579e-01L, /* logirh[140] */ 
+    1.42102608319782592423454192434347516972070983180682e-21L, /* logirl[140] */ 
+  } , 
+  { 
+    4.39989833442083805027352297334353181668120669201016e-01L, /* logirh[141] */ 
+    -1.20015769356213632548957467075032647879504224252139e-20L, /* logirl[141] */ 
+  } , 
+  { 
+    4.42266874274135892824424617919554236777912592515349e-01L, /* logirh[142] */ 
+    4.36106198868143736862105950597654421314560199511441e-21L, /* logirl[142] */ 
+  } , 
+  { 
+    4.45311016655364052629993004694952674071828369051218e-01L, /* logirh[143] */ 
+    6.63635101669914600475501747811974742734358988145874e-21L, /* logirl[143] */ 
+  } , 
+  { 
+    4.47600220249498474185288407478644501225062413141131e-01L, /* logirh[144] */ 
+    -1.25660107201378174413892049079180933248758422196735e-20L, /* logirl[144] */ 
+  } , 
+  { 
+    4.49894676323022032766573569118051523219037335366011e-01L, /* logirh[145] */ 
+    -7.20342573451092426836769665486326672600023249811669e-21L, /* logirl[145] */ 
+  } , 
+  { 
+    4.52194409034553285788591084348730930742021882906556e-01L, /* logirh[146] */ 
+    -8.47945847451460005436054189483125659211770365332896e-22L, /* logirl[146] */ 
+  } , 
+  { 
+    4.55268969488798865469280155449105507159401895478368e-01L, /* logirh[147] */ 
+    4.74336969576706749657589421782240547135428193892528e-21L, /* logirl[147] */ 
+  } , 
+  { 
+    4.57581109247178400342009885193306217843201011419296e-01L, /* logirh[148] */ 
+    -2.36598267617305990464319034283697709014593179635402e-21L, /* logirl[148] */ 
+  } , 
+  { 
+    4.59898607387540924438563971765603355379425920546055e-01L, /* logirh[149] */ 
+    8.07732102676293501119166223720103331713077340297627e-21L, /* logirl[149] */ 
+  } , 
+  { 
+    4.62221488803680604691035901931961404898174805566669e-01L, /* logirh[150] */ 
+    1.24382291552438961245330542958060837987441875091342e-20L, /* logirl[150] */ 
+  } , 
+  { 
+    4.64549778563271740681669963457522953831357881426811e-01L, /* logirh[151] */ 
+    1.96187920691998107717362190747064826757297578125547e-21L, /* logirl[151] */ 
+  } , 
+  { 
+    4.67662621543761975796173191444182748455205000936985e-01L, /* logirh[152] */ 
+    -1.00610749233134715635949292420774215513040092431792e-20L, /* logirl[152] */ 
+  } , 
+  { 
+    4.70003629245735553651317981116442012989864451810718e-01L, /* logirh[153] */ 
+    -3.80949968099948288960261756455515265913481939735419e-22L, /* logirl[153] */ 
+  } , 
+  { 
+    4.72350130126859112485648503620971894179092487320304e-01L, /* logirh[154] */ 
+    -9.08504177179036249027023970290925346168448739123201e-21L, /* logirl[154] */ 
+  } , 
+  { 
+    4.74702150027289747900079847076071359879279043525457e-01L, /* logirh[155] */ 
+    8.04843905401625679617395219952408959338025651283616e-21L, /* logirl[155] */ 
+  } , 
+  { 
+    4.77059714969944353784529061934804872180393431335688e-01L, /* logirh[156] */ 
+    9.09657652537257782393100881420207290475813569550887e-21L, /* logirl[156] */ 
+  } , 
+  { 
+    4.79422851162227170543914459011070050564740085974336e-01L, /* logirh[157] */ 
+    1.14124648139077527373251153641337763160500443812559e-20L, /* logirl[157] */ 
+  } , 
+  { 
+    4.81791584997777794116503510823967815213109133765101e-01L, /* logirh[158] */ 
+    3.59408221446137582759107104970989253261291421513114e-21L, /* logirl[158] */ 
+  } , 
+  { 
+    4.84165943058239936892892668618415541459398809820414e-01L, /* logirh[159] */ 
+    6.90512297756055515870014314442836697397537526874820e-22L, /* logirl[159] */ 
+  } , 
+  { 
+    4.86545952115051237119123378471741148132423404604197e-01L, /* logirh[160] */ 
+    2.87746285587177870212465072536291591811028257755262e-22L, /* logirl[160] */ 
+  } , 
+  { 
+    4.88931639131254417921087704335114665354922180995345e-01L, /* logirh[161] */ 
+    -7.67596907317736949350366764620323159731219880272990e-21L, /* logirl[161] */ 
+  } , 
+  { 
+    4.91323031263330102318652448101232721455744467675686e-01L, /* logirh[162] */ 
+    -1.22562855258723778652540992985069722405656970405882e-20L, /* logirl[162] */ 
+  } , 
+  { 
+    4.93720155863051595774996030407955061036773258820176e-01L, /* logirh[163] */ 
+    -5.71214873093993838422678630171600796188276737719886e-21L, /* logirl[163] */ 
+  } , 
+  { 
+    4.96123040479361952922402606569463046071177814155817e-01L, /* logirh[164] */ 
+    1.10361837627205617056885101288824066464403161388594e-20L, /* logirl[164] */ 
+  } , 
+  { 
+    4.98531712860273650553873808766169872797036077827215e-01L, /* logirh[165] */ 
+    5.21971892473696376244792745349121825258505877961581e-21L, /* logirl[165] */ 
+  } , 
+  { 
+    5.00946200954791194255404096491446352956700138747692e-01L, /* logirh[166] */ 
+    -7.49423576317321061879825078913185791137826712727096e-21L, /* logirl[166] */ 
+  } , 
+  { 
+    5.03366532914856991962667537299225273272895719856024e-01L, /* logirh[167] */ 
+    -1.83817128671833223948820461377340219380509767768120e-20L, /* logirl[167] */ 
+  } , 
+  { 
+    5.05792737097320832930034267826968630288320127874613e-01L, /* logirh[168] */ 
+    -3.75513846638616302607380496933108989002504885108483e-21L, /* logirl[168] */ 
+  } , 
+  { 
+    5.08224842065933316752682213923719700687797740101814e-01L, /* logirh[169] */ 
+    6.46314875207246381902554448007689112535666009895769e-22L, /* logirl[169] */ 
+  } , 
+  { 
+    5.10662876593363582503580511140484077259316109120846e-01L, /* logirh[170] */ 
+    1.31546915527971199814755811920912966696871823382403e-20L, /* logirl[170] */ 
+  } , 
+  { 
+    5.13106869663241694742069481938173680646286811679602e-01L, /* logirh[171] */ 
+    -9.48086093245893657857465915239236058691645484958719e-21L, /* logirl[171] */ 
+  } , 
+  { 
+    5.14739523087127012290851318931927949051896575838327e-01L, /* logirh[172] */ 
+    6.98056101530665066905394368582212942263609105784010e-21L, /* logirl[172] */ 
+  } , 
+  { 
+    5.17193512048693723737180505395372165367007255554199e-01L, /* logirh[173] */ 
+    2.70883447254679150939645524105991443744276583896589e-20L, /* logirl[173] */ 
+  } , 
+  { 
+    5.19653537889556070463858289398828560479159932583570e-01L, /* logirh[174] */ 
+    2.45929124553200804969371752267839129056713502249468e-20L, /* logirl[174] */ 
+  } , 
+  { 
+    5.22119630384749572034417536281480920479225460439920e-01L, /* logirh[175] */ 
+    -2.18497180803548344111669417650081141798741623577199e-20L, /* logirl[175] */ 
+  } , 
+  { 
+    5.24591819530138642462425285772908978287887293845415e-01L, /* logirh[176] */ 
+    1.32203035151652728530582847665410458727777398365519e-20L, /* logirl[176] */ 
+  } , 
+  { 
+    5.27070135544605730194053089254779820294061210006475e-01L, /* logirh[177] */ 
+    1.76032437549609086335524539448277975821798914097017e-20L, /* logirl[177] */ 
+  } , 
+  { 
+    5.28725765061866902010632995878580686621717177331448e-01L, /* logirh[178] */ 
+    -6.88102247990701389925516342020564246262797072332030e-23L, /* logirl[178] */ 
+  } , 
+  { 
+    5.31214360290632056150247203296643760950246360152960e-01L, /* logirh[179] */ 
+    2.66466330379185865323002458390306405768155182617574e-20L, /* logirl[179] */ 
+  } , 
+  { 
+    5.33709164079414862609691827532998331662383861839771e-01L, /* logirh[180] */ 
+    -1.29762017107818188869410259485124080678804176241434e-20L, /* logirl[180] */ 
+  } , 
+  { 
+    5.36210207484003745345615271622463637868349906057119e-01L, /* logirh[181] */ 
+    1.65067700778453559631881994813258268290230772692962e-20L, /* logirl[181] */ 
+  } , 
+  { 
+    5.37881051648821357916759738904133314463251736015081e-01L, /* logirh[182] */ 
+    -2.19109191560589250321272095571138928163548790076226e-20L, /* logirl[182] */ 
+  } , 
+  { 
+    5.40392564061482290446898624214355777439777739346027e-01L, /* logirh[183] */ 
+    2.08228396513876900118497171678012888475888240965144e-20L, /* logirl[183] */ 
+  } , 
+  { 
+    5.42910400053823334208438072812086261365038808435202e-01L, /* logirh[184] */ 
+    8.23644722718551463874152042367020651575236794759280e-21L, /* logirl[184] */ 
+  } , 
+  { 
+    5.44592486236808166527503111131736091010679956525564e-01L, /* logirh[185] */ 
+    -2.00933067408533920949057044370384679454492154640310e-20L, /* logirl[185] */ 
+  } , 
+  { 
+    5.47120932590166843430528470504370375238067936152220e-01L, /* logirh[186] */ 
+    -9.92524609455239275442518737817999625480140253588253e-21L, /* logirl[186] */ 
+  } , 
+  { 
+    5.49655788193354895971275142496637045042007230222225e-01L, /* logirh[187] */ 
+    2.60035059997719560566631655963598297729287367007908e-20L, /* logirl[187] */ 
+  } , 
+  { 
+    5.51349268699687959530229136584367211071366909891367e-01L, /* logirh[188] */ 
+    8.05024959333663801951435912985560282262081044464591e-21L, /* logirl[188] */ 
+  } , 
+  { 
+    5.53894878899121686241600187594613657893205527216196e-01L, /* logirh[189] */ 
+    -1.83892465430777104472961145252041624877581186770337e-20L, /* logirl[189] */ 
+  } , 
+  { 
+    5.56446985771356645851352940024270310459542088210583e-01L, /* logirh[190] */ 
+    2.06677769878226925286245270139777726439942087527370e-20L, /* logirl[190] */ 
+  } , 
+  { 
+    5.58152016022440478841114969155157155000779312103987e-01L, /* logirh[191] */ 
+    -2.58661388440662325511611588814692565587161510028965e-20L, /* logirl[191] */ 
+  } , 
+  { 
+    5.60715024687329991240868076740611058994545601308346e-01L, /* logirh[192] */ 
+    -1.64182608886279055979239231155414518020340732707175e-20L, /* logirl[192] */ 
+  } , 
+  { 
+    5.63284619248960715992471243174222195193578954786062e-01L, /* logirh[193] */ 
+    -2.65627455866435846195683323864140395189128131938038e-20L, /* logirl[193] */ 
+  } , 
+  { 
+    5.65001357868015271265077492657269431219901889562607e-01L, /* logirh[194] */ 
+    -2.19552581601677369964960433395712510373598893667200e-20L, /* logirl[194] */ 
+  } , 
+  { 
+    5.67582004461506905925068100504660151273128576576710e-01L, /* logirh[195] */ 
+    5.90701142185794805590524668669544397085089572669788e-21L, /* logirl[195] */ 
+  } , 
+  { 
+    5.69306142819646694805835879238387065015558619052172e-01L, /* logirh[196] */ 
+    2.33009214880869002611805100582067855813554770257529e-20L, /* logirl[196] */ 
+  } , 
+  { 
+    5.71897936927075624239692752670549680260592140257359e-01L, /* logirh[197] */ 
+    1.63271047067863612422000647375332886660577686602113e-20L, /* logirl[197] */ 
+  } , 
+  { 
+    5.73629539091353532682168031575642430652806069701910e-01L, /* logirh[198] */ 
+    1.35778757354348431006030977215550960808915473679493e-20L, /* logirl[198] */ 
+  } , 
+  { 
+    5.76232577437515759667327475135323311405954882502556e-01L, /* logirh[199] */ 
+    1.28136064828063593458439031297239582536217112855437e-20L, /* logirl[199] */ 
+  } , 
+  { 
+    5.78842409279886675808717011459947343610110692679882e-01L, /* logirh[200] */ 
+    -2.57440348169455489440041914302593932468377260933429e-20L, /* logirl[200] */ 
+  } , 
+  { 
+    5.80586088884713529922713959319224841237883083522320e-01L, /* logirh[201] */ 
+    4.41206613764798826108043412776466913688688358898484e-21L, /* logirl[201] */ 
+  } , 
+  { 
+    5.83207322364587747753113949888970068968774285167456e-01L, /* logirh[202] */ 
+    -1.49189541037162430714759871409805107504755972902992e-21L, /* logirl[202] */ 
+  } , 
+  { 
+    5.84958636297322764419429064197686329862335696816444e-01L, /* logirh[203] */ 
+    -1.60837721673687300800846563753717539999210255011878e-22L, /* logirl[203] */ 
+  } , 
+  { 
+    5.86713022712216263673118410437723468930926173925400e-01L, /* logirh[204] */ 
+    -3.17168863463050625558020547002535137465925788804006e-21L, /* logirl[204] */ 
+  } , 
+  { 
+    5.89350386878301744605131856635793496934638824313879e-01L, /* logirh[205] */ 
+    -1.39615389415916171660994818848901714495919357934706e-20L, /* logirl[205] */ 
+  } , 
+  { 
+    5.91112501871701023466523783334025665681110695004463e-01L, /* logirh[206] */ 
+    1.94637401144574668475212537692289150763221599806672e-20L, /* logirl[206] */ 
+  } , 
+  { 
+    5.93761510043277948936186333428466355144337285310030e-01L, /* logirh[207] */ 
+    2.13622917617199787393781580337151830714978899979519e-20L, /* logirl[207] */ 
+  } , 
+  { 
+    5.95531422009736386346742675890197915578028187155724e-01L, /* logirh[208] */ 
+    -5.57259316426018508787411112338297856432265995386872e-21L, /* logirl[208] */ 
+  } , 
+  { 
+    5.98192177459762712175232041156291984407289419323206e-01L, /* logirh[209] */ 
+    -3.74781519226728618443505703931062184338388651621827e-21L, /* logirl[209] */ 
+  } , 
+  { 
+    5.99969955705762019674415208569939750304911285638809e-01L, /* logirh[210] */ 
+    -2.59644401395225784451061116582518643426188955954025e-20L, /* logirl[210] */ 
+  } , 
+  { 
+    6.02642563087238492989475974193069873763306532055140e-01L, /* logirh[211] */ 
+    -2.50004437606787862337772976338569519653395217249839e-20L, /* logirl[211] */ 
+  } , 
+  { 
+    6.04428277847473170865909286586514781447476707398891e-01L, /* logirh[212] */ 
+    -7.33579257076237518313264419331850361801721257990158e-21L, /* logirl[212] */ 
+  } , 
+  { 
+    6.06217187090197695033266800379578853608109056949615e-01L, /* logirh[213] */ 
+    -2.17953080850264628478128768590230893044079856673130e-20L, /* logirl[213] */ 
+  } , 
+  { 
+    6.08906565672169072236594167257806020643329247832298e-01L, /* logirh[214] */ 
+    2.43001104791778958605091541205840292926934335038990e-20L, /* logirl[214] */ 
+  } , 
+  { 
+    6.10703511348870718168906773781756669450260233134031e-01L, /* logirh[215] */ 
+    -1.98347209918879072887544491214489475082169187478903e-20L, /* logirl[215] */ 
+  } , 
+  { 
+    6.12503691853018583787435225040951536357169970870018e-01L, /* logirh[216] */ 
+    2.07857483606536363253783256589667608143722579784530e-20L, /* logirl[216] */ 
+  } , 
+  { 
+    6.15210053450761525529327800043688512232620269060135e-01L, /* logirh[217] */ 
+    7.72645219126903427887142350700660117976602336795165e-21L, /* logirl[217] */ 
+  } , 
+  { 
+    6.17018372207545212680766116841724056030216161161661e-01L, /* logirh[218] */ 
+    5.00582653358541288118250323060147668157890772059789e-21L, /* logirl[218] */ 
+  } , 
+  { 
+    6.18829966905895933007054898755683325362042523920536e-01L, /* logirh[219] */ 
+    2.60431023001686460777788589129926677065962205227216e-20L, /* logirl[219] */ 
+  } , 
+  { 
+    6.21553527372936491502113803830908977943181525915861e-01L, /* logirh[220] */ 
+    -1.04869551248244441365933565828570015553511122659463e-20L, /* logirl[220] */ 
+  } , 
+  { 
+    6.23373364089922462607726294514520759548759087920189e-01L, /* logirh[221] */ 
+    2.27153427965787655960253811756921226020182163308283e-20L, /* logirl[221] */ 
+  } , 
+  { 
+    6.25196518651437560000743570709502705540216993540525e-01L, /* logirh[222] */ 
+    2.19232729760444485003184142946155941222776472408409e-20L, /* logirl[222] */ 
+  } , 
+  { 
+    6.27937497982859842897505192604867829686554614454508e-01L, /* logirh[223] */ 
+    2.59352328668902836446166306553362343068377561588123e-20L, /* logirl[223] */ 
+  } , 
+  { 
+    6.29769000326327585089804250717548939064727164804935e-01L, /* logirh[224] */ 
+    -1.21467317879907709324733285927127135284313624485272e-20L, /* logirl[224] */ 
+  } , 
+  { 
+    6.31603863226437932658786228445890742477786261588335e-01L, /* logirh[225] */ 
+    1.63894778187414974146534085353091795011762181164691e-20L, /* logirl[225] */ 
+  } , 
+  { 
+    6.33442099038188960458128917707654181867837905883789e-01L, /* logirh[226] */ 
+    -1.06695930136737880114178623385061897940403293765931e-20L, /* logirl[226] */ 
+  } , 
+  { 
+    6.36205804159806884666688436835713105210743378847837e-01L, /* logirh[227] */ 
+    -8.46941691798603143710724761239322249883772469675312e-21L, /* logirl[227] */ 
+  } , 
+  { 
+    6.38052526752971572575768438584375985556107480078936e-01L, /* logirh[228] */ 
+    2.63671634127395583915856588351301065321489867148089e-20L, /* logirl[228] */ 
+  } , 
+  { 
+    6.39902666041133026577757830777315462000842671841383e-01L, /* logirh[229] */ 
+    -2.63959031056676708649612991271987108904655365467646e-20L, /* logirl[229] */ 
+  } , 
+  { 
+    6.41756234690455939877196112064439148525707423686981e-01L, /* logirh[230] */ 
+    2.24760376658377731327353838657827087113829234283449e-20L, /* logirl[230] */ 
+  } , 
+  { 
+    6.44543045597635230899678793203833038205630145967007e-01L, /* logirh[231] */ 
+    1.55133630378868960145849365255088752071892290926646e-20L, /* logirl[231] */ 
+  } , 
+  { 
+    6.46405243528699932045906983990590788380359299480915e-01L, /* logirh[232] */ 
+    -7.72135134400730894438722249896938881605660497758570e-21L, /* logirl[232] */ 
+  } , 
+  { 
+    6.48270915711649635469575325696922618590178899466991e-01L, /* logirh[233] */ 
+    -2.53998248183380442804399491918209409440256852527255e-20L, /* logirl[233] */ 
+  } , 
+  { 
+    6.50140075134353178113941207350023887556744739413261e-01L, /* logirh[234] */ 
+    1.59816070187659374889917583730577235865801271336652e-20L, /* logirl[234] */ 
+  } , 
+  { 
+    6.52012734857645037396360609971424082687008194625378e-01L, /* logirh[235] */ 
+    1.45275263994271525130630696327763964092655442137801e-20L, /* logirl[235] */ 
+  } , 
+  { 
+    6.53888908015872916243329399099692977870290633291006e-01L, /* logirh[236] */ 
+    2.07648342785018300271983937594878297626085508933405e-20L, /* logirl[236] */ 
+  } , 
+  { 
+    6.56709784357514260791366389469203568296507000923157e-01L, /* logirh[237] */ 
+    -2.55860224521869209004017944548994743296377030914363e-20L, /* logirl[237] */ 
+  } , 
+  { 
+    6.58594799053285575988515854195526344483369030058384e-01L, /* logirh[238] */ 
+    2.13447666728173583107487129669228031073599282234625e-20L, /* logirl[238] */ 
+  } , 
+  { 
+    6.60483373741153712585625484843276922219956759363413e-01L, /* logirh[239] */ 
+    -2.68099338819034783490518710777734114173674267685964e-20L, /* logirl[239] */ 
+  } , 
+  { 
+    6.62375521893191621070843405627570632532297167927027e-01L, /* logirh[240] */ 
+    -2.46394917661662285487000617992290646560405896530757e-20L, /* logirl[240] */ 
+  } , 
+  { 
+    6.64271257058090767988727670667614688682078849524260e-01L, /* logirh[241] */ 
+    4.89460149866724603480291964434582303569949285072746e-21L, /* logirl[241] */ 
+  } , 
+  { 
+    6.66170592861743233678312875456484221103892195969820e-01L, /* logirh[242] */ 
+    -9.15004653796719880999098719384862468581948479370138e-21L, /* logirl[242] */ 
+  } , 
+  { 
+    6.68073543007829348495344584657473774313984904438257e-01L, /* logirh[243] */ 
+    -2.51400168937888068945390384200867041048687993212480e-20L, /* logirl[243] */ 
+  } , 
+  { 
+    6.69980121278410931161349101126134542028012219816446e-01L, /* logirh[244] */ 
+    2.70838593697521094682948422665684057236843679459511e-20L, /* logirl[244] */ 
+  } , 
+  { 
+    6.72846821760487024907150532815336418934748508036137e-01L, /* logirh[245] */ 
+    1.06724601454353533112223106661914589204580784001879e-20L, /* logirl[245] */ 
+  } , 
+  { 
+    6.74762531158625957514261145542278086395526770502329e-01L, /* logirh[246] */ 
+    -2.24888280496360550575110667851996097244442076628643e-20L, /* logirl[246] */ 
+  } , 
+  { 
+    6.76681917544429519819054047458095624278939794749022e-01L, /* logirh[247] */ 
+    2.15772052734613853105883485574187537438001210159785e-20L, /* logirl[247] */ 
+  } , 
+  { 
+    6.78604995060171010815616016165208179700130131095648e-01L, /* logirh[248] */ 
+    -1.30586072834413655346920811356096828938860230682704e-20L, /* logirl[248] */ 
+  } , 
+  { 
+    6.80531777929871074610777836877417712457827292382717e-01L, /* logirh[249] */ 
+    -2.21482221362167455319358217853577334183296289025644e-20L, /* logirl[249] */ 
+  } , 
+  { 
+    6.82462280459928955400790429042245932578225620090961e-01L, /* logirh[250] */ 
+    -9.23973188373885101035764728029706054781623831427493e-21L, /* logirl[250] */ 
+  } , 
+  { 
+    6.84396517039759856994123043971711695121484808623791e-01L, /* logirh[251] */ 
+    -1.15340975708897387680916809613678008557527533421693e-20L, /* logirl[251] */ 
+  } , 
+  { 
+    6.86334502142438478275096591652015831641620025038719e-01L, /* logirh[252] */ 
+    1.00516389437240083809638080859061807916651987536657e-20L, /* logirl[252] */ 
+  } , 
+  { 
+    6.88276250325348796870426892891003944896510802209377e-01L, /* logirh[253] */ 
+    7.82297589687341037552438599781693585434569670880706e-21L, /* logirl[253] */ 
+  } , 
+  { 
+    6.90221776230840173389172870210828136805503163486719e-01L, /* logirh[254] */ 
+    -2.60525172176154149544033330497727120965480632602542e-20L, /* logirl[254] */ 
+  } , 
+  { 
+    6.92171094586889850503938492742861399165121838450432e-01L, /* logirh[255] */ 
+    1.73328038072979822371837713611880675698641265660364e-20L, /* logirl[255] */ 
+  } }; 
+ 
+#endif /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */ 
diff --git a/src/crlibm/log-td.c b/src/crlibm/log-td.c
new file mode 100644
index 0000000..8dd087b
--- /dev/null
+++ b/src/crlibm/log-td.c
@@ -0,0 +1,1158 @@
+/* 
+ * This function computes log, correctly rounded, 
+ * using triple double arithmetics
+
+ *
+ * Author :  Christoph Lauter
+ * christoph.lauter at ens-lyon.fr
+ *
+
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "log-td.h"
+#ifdef BUILD_INTERVAL_FUNCTIONS
+#include "interval.h"
+#endif
+
+
+#define AVOID_FMA 0
+
+
+
+void log_td_accurate(double *logh, double *logm, double *logl, int E, double ed, int index, double zh, double zl, double logih, double logim) {
+  double highPoly, t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l, t8h, t8l, t9h, t9l, t10h, t10l, t11h, t11l;
+  double t12h, t12l, t13h, t13l, t14h, t14l, zSquareh, zSquarem, zSquarel, zCubeh, zCubem, zCubel, higherPolyMultZh, higherPolyMultZm;
+  double higherPolyMultZl, zSquareHalfh, zSquareHalfm, zSquareHalfl, polyWithSquareh, polyWithSquarem, polyWithSquarel;
+  double polyh, polym, polyl, logil, logyh, logym, logyl, loghover, logmover, loglover, log2edhover, log2edmover, log2edlover;
+  double log2edh, log2edm, log2edl;
+
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+
+  /* Accurate phase:
+
+     Argument reduction is already done. 
+     We must return logh, logm and logl representing the intermediate result in 118 bits precision.
+
+     We use a 14 degree polynomial, computing the first 3 (the first is 0) coefficients in triple double,
+     calculating the next 7 coefficients in double double arithmetics and the last in double.
+
+     We must account for zl starting with the monome of degree 4 (7^3 + 53 - 7 >> 118); so 
+     double double calculations won't account for it.
+
+  */
+
+  /* Start of the horner scheme */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(accPolyC14,zh,accPolyC13),zh,accPolyC12),zh,accPolyC11),zh,accPolyC10);
+#else
+  highPoly = accPolyC10 + zh * (accPolyC11 + zh * (accPolyC12 + zh * (accPolyC13 + zh * accPolyC14)));
+#endif
+  
+  /* We want to write 
+
+     accPolyC3 + zh * (accPoly4 + zh * (accPoly5 + zh * (accPoly6 + zh * (accPoly7 + zh * (accPoly8 + zh * (accPoly9 + zh * highPoly))))));
+     (        t14  t13         t12  t11         t10   t9          t8   t7          t6   t5          t4   t3          t2   t1  )
+
+     with all additions and multiplications in double double arithmetics
+     but we will produce intermediate results labelled t1h/t1l thru t14h/t14l
+  */
+
+  Mul12(&t1h, &t1l, zh, highPoly);
+  Add22(&t2h, &t2l, accPolyC9h, accPolyC9l, t1h, t1l);
+  Mul22(&t3h, &t3l, zh, zl, t2h, t2l);
+  Add22(&t4h, &t4l, accPolyC8h, accPolyC8l, t3h, t3l);
+  Mul22(&t5h, &t5l, zh, zl, t4h, t4l);
+  Add22(&t6h, &t6l, accPolyC7h, accPolyC7l, t5h, t5l);
+  Mul22(&t7h, &t7l, zh, zl, t6h, t6l);
+  Add22(&t8h, &t8l, accPolyC6h, accPolyC6l, t7h, t7l);
+  Mul22(&t9h, &t9l, zh, zl, t8h, t8l);
+  Add22(&t10h, &t10l, accPolyC5h, accPolyC5l, t9h, t9l);
+  Mul22(&t11h, &t11l, zh, zl, t10h, t10l);
+  Add22(&t12h, &t12l, accPolyC4h, accPolyC4l, t11h, t11l);
+  Mul22(&t13h, &t13l, zh, zl, t12h, t12l);
+  Add22(&t14h, &t14l, accPolyC3h, accPolyC3l, t13h, t13l);
+
+  /* We must now prepare (zh + zl)^2 and (zh + zl)^3 as triple doubles */
+
+  Mul23(&zSquareh, &zSquarem, &zSquarel, zh, zl, zh, zl); 
+  Mul233(&zCubeh, &zCubem, &zCubel, zh, zl, zSquareh, zSquarem, zSquarel); 
+  
+  /* We can now multiplicate the middle and higher polynomial by z^3 */
+
+  Mul233(&higherPolyMultZh, &higherPolyMultZm, &higherPolyMultZl, t14h, t14l, zCubeh, zCubem, zCubel);
+  
+  /* Multiply now z^2 by -1/2 (exact op) and add to middle and higher polynomial */
+  
+  zSquareHalfh = zSquareh * -0.5;
+  zSquareHalfm = zSquarem * -0.5;
+  zSquareHalfl = zSquarel * -0.5;
+
+  Add33(&polyWithSquareh, &polyWithSquarem, &polyWithSquarel, 
+	zSquareHalfh, zSquareHalfm, zSquareHalfl, 
+	higherPolyMultZh, higherPolyMultZm, higherPolyMultZl);
+
+  /* Add now zh and zl to obtain the polynomial evaluation result */
+
+  Add233(&polyh, &polym, &polyl, zh, zl, polyWithSquareh, polyWithSquarem, polyWithSquarel);
+
+  /* Reconstruct now log(y) = log(1 + z) - log(ri) by adding logih, logim, logil
+     logil has not been read to the time, do this first 
+  */
+
+  logil =  argredtable[index].logil;
+
+  Add33(&logyh, &logym, &logyl, logih, logim, logil, polyh, polym, polyl);
+
+  /* Multiply log2 with E, i.e. log2h, log2m, log2l by ed 
+     ed is always less than 2^(12) and log2h and log2m are stored with at least 12 trailing zeros 
+     So multiplying naively is correct (up to 134 bits at least)
+
+     The final result is thus obtained by adding log2 * E to log(y)
+  */
+
+  log2edhover = log2h * ed;
+  log2edmover = log2m * ed;
+  log2edlover = log2l * ed;
+
+  /* It may be necessary to renormalize the tabulated value (multiplied by ed) before adding
+     the to the log(y)-result 
+
+     If needed, uncomment the following Renormalize3-Statement and comment out the copies 
+     following it.
+  */
+
+  /* Renormalize3(&log2edh, &log2edm, &log2edl, log2edhover, log2edmover, log2edlover); */
+
+  log2edh = log2edhover;
+  log2edm = log2edmover;
+  log2edl = log2edlover;
+
+  Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyh, logym, logyl);
+
+  /* Since we can not guarantee in each addition and multiplication procedure that 
+     the results are not overlapping, we must renormalize the result before handing
+     it over to the final rounding
+  */
+
+  Renormalize3(logh,logm,logl,loghover,logmover,loglover);
+
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+ double log_rn(double x){ 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, logl, roundcst;
+   int E, index;
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = ROUNDCST1;
+   else
+      roundcst = ROUNDCST2;
+
+
+   if(logh == (logh + (logm * roundcst)))
+     return logh;
+   else 
+     {
+       
+#if DEBUG
+       printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+       log_td_accurate(&logh, &logm, &logl, E, ed, index, zh, zl, logih, logim); 
+       
+       ReturnRoundToNearest3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+ }
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  UPWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log_ru(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, logl, roundcst;
+   int E, index;
+
+   if (x == 1.0) return 0.0; /* This the only case in which the image under log of a double is a double. */
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RU(logh, logm, roundcst);
+
+#if DEBUG
+  printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log_td_accurate(&logh, &logm, &logl, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundUpwards3(logh, logm, logl);
+
+ } 
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  DOWNWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log_rd(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, logl, roundcst;
+   int E, index;
+
+   if (x == 1.0) return 0.0; /* This the only case in which the image under log of a double is a double. */
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RD(logh, logm, roundcst);
+
+#if DEBUG
+  printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log_td_accurate(&logh, &logm, &logl, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundDownwards3(logh, logm, logl);
+ } 
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARDS ZERO			     *
+ *************************************************************
+ *************************************************************/
+ double log_rz(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, logl, roundcst;
+   int E, index;
+
+   if (x == 1.0) return 0.0; /* This the only case in which the image under log of a double is a double. */
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RZ(logh, logm, roundcst);
+
+#if DEBUG
+  printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log_td_accurate(&logh, &logm, &logl, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundTowardsZero3(logh, logm, logl);
+ } 
+
+#ifdef BUILD_INTERVAL_FUNCTIONS
+ interval j_log(interval x)
+ {
+   interval res;
+   int roundable;
+   int cs_inf=0; int cs_sup=0;
+   double x_inf,x_sup;
+   x_inf=LOW(x);
+   x_sup=UP(x);
+   double res_inf, res_sup, res_simple_inf, res_simple_sup;
+
+   db_number xdb_sup;
+   double y_sup, ed_sup, ri_sup, logih_sup, logim_sup, yrih_sup, yril_sup, th_sup, zh_sup, zl_sup;
+   double polyHorner_sup, zhSquareh_sup, zhSquarel_sup, polyUpper_sup, zhSquareHalfh_sup, zhSquareHalfl_sup;
+   double t1h_sup, t1l_sup, t2h_sup, t2l_sup, ph_sup, pl_sup, log2edh_sup, log2edl_sup, logTabPolyh_sup, logTabPolyl_sup, logh_sup, logm_sup, logl_sup, roundcst;
+   int E_sup, index_sup;
+   
+
+   db_number xdb_inf;
+   double y_inf, ed_inf, ri_inf, logih_inf, logim_inf, yrih_inf, yril_inf, th_inf, zh_inf, zl_inf;
+   double polyHorner_inf, zhSquareh_inf, zhSquarel_inf, polyUpper_inf, zhSquareHalfh_inf, zhSquareHalfl_inf;
+   double t1h_inf, t1l_inf, t2h_inf, t2l_inf, ph_inf, pl_inf, log2edh_inf, log2edl_inf, logTabPolyh_inf, logTabPolyl_inf, logh_inf, logm_inf, logl_inf;
+   int E_inf, index_inf;
+
+   E_inf=0;
+   xdb_inf.d=x_inf;
+   E_sup=0;
+   xdb_sup.d=x_sup;
+
+   if (__builtin_expect(
+      (x_inf == 1.0) || (!(x_inf<=x_sup)) || (xdb_sup.i[HI] < 0) 
+   || (xdb_inf.i[HI] < 0x00100000) || (((xdb_inf.i[HI] & 0x7fffffff)|xdb_inf.i[LO])==0) 
+   || (xdb_inf.i[HI] < 0)
+   || (xdb_inf.i[HI] >= 0x7ff00000)
+   || (x_sup == 1.0)
+   || (xdb_sup.i[HI] < 0x00100000)
+   || (((xdb_sup.i[HI] & 0x7fffffff)|xdb_sup.i[LO])==0)
+   || (xdb_sup.i[HI] < 0)
+   || (xdb_sup.i[HI] >= 0x7ff00000)
+   || ((xdb_inf.d<00) && (xdb_sup.d>0) )
+   ,FALSE))
+   {
+     if (!(x_inf<=x_sup)) RETURN_EMPTY_INTERVAL;
+     if (xdb_sup.i[HI] < 0) RETURN_EMPTY_INTERVAL;
+     if ((xdb_inf.d<00) && (xdb_sup.d>0) )
+     {
+       ASSIGN_LOW(res,-1.0/0.0);
+       ASSIGN_UP(res,log_ru(UP(x)));
+       return res;
+     }
+     ASSIGN_LOW(res,log_rd(LOW(x)));
+     ASSIGN_UP(res,log_ru(UP(x)));
+     return res;
+   }
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E_inf += (xdb_inf.i[HI]>>20)-1023;             /* extract the exponent */
+   E_sup += (xdb_sup.i[HI]>>20)-1023;             /* extract the exponent */
+   index_inf = (xdb_inf.i[HI] & 0x000fffff);
+   index_sup = (xdb_sup.i[HI] & 0x000fffff);
+   xdb_inf.i[HI] =  index_inf | 0x3ff00000;	/* do exponent = 0 */
+   xdb_sup.i[HI] =  index_sup | 0x3ff00000;	/* do exponent = 0 */
+   index_inf = (index_inf + (1<<(20-L-1))) >> (20-L);
+   index_sup = (index_sup + (1<<(20-L-1))) >> (20-L);
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index_inf >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb_inf.i[HI] -= 0x00100000; 
+     E_inf++;
+   }
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index_sup >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb_sup.i[HI] -= 0x00100000; 
+     E_sup++;
+   }
+   y_inf = xdb_inf.d;
+   y_sup = xdb_sup.d;
+   index_inf = index_inf & INDEXMASK;
+   index_sup = index_sup & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed_inf = (double) E_inf;
+   ed_sup = (double) E_sup;
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+      Organization of the table:
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   ri_inf = argredtable[index_inf].ri;
+   ri_sup = argredtable[index_sup].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih_inf = argredtable[index_inf].logih;
+   logih_sup = argredtable[index_sup].logih;
+   logim_inf = argredtable[index_inf].logim;
+   logim_sup = argredtable[index_sup].logim;
+   /* Do range reduction:
+      zh + zl = y * ri - 1.0 correctly
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih_inf, &yril_inf, y_inf, ri_inf);
+   Mul12(&yrih_sup, &yril_sup, y_sup, ri_sup);
+   th_inf = yrih_inf - 1.0; 
+   th_sup = yrih_sup - 1.0; 
+   /* Do range reduction:
+      zh + zl = y * ri - 1.0 correctly
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+      Discard zl for higher monome degrees
+   */
+
+
+   Add12Cond(zh_inf, zl_inf, th_inf, yril_inf); 
+   Add12Cond(zh_sup, zl_sup, th_sup, yril_sup); 
+   /* 
+      Polynomial evaluation
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner_inf = FMA(FMA(FMA(FMA(c7,zh_inf,c6),zh_inf,c5),zh_inf,c4),zh_inf,c3);
+   polyHorner_sup = FMA(FMA(FMA(FMA(c7,zh_sup,c6),zh_sup,c5),zh_sup,c4),zh_sup,c3);
+#else
+   polyHorner_inf = c3 + zh_inf * (c4 + zh_inf * (c5 + zh_inf * (c6 + zh_inf * c7)));
+   polyHorner_sup = c3 + zh_sup * (c4 + zh_sup * (c5 + zh_sup * (c6 + zh_sup * c7)));
+#endif
+
+   Mul12(&zhSquareh_inf, &zhSquarel_inf, zh_inf, zh_inf);
+   Mul12(&zhSquareh_sup, &zhSquarel_sup, zh_sup, zh_sup);
+   polyUpper_inf = polyHorner_inf * (zh_inf * zhSquareh_inf);
+   polyUpper_sup = polyHorner_sup * (zh_sup * zhSquareh_sup);
+   zhSquareHalfh_inf = zhSquareh_inf * -0.5;
+   zhSquareHalfh_sup = zhSquareh_sup * -0.5;
+   zhSquareHalfl_inf = zhSquarel_inf * -0.5;
+   zhSquareHalfl_sup = zhSquarel_sup * -0.5;
+   Add12(t1h_inf, t1l_inf, polyUpper_inf, -1 * (zh_inf * zl_inf));
+   Add12(t1h_sup, t1l_sup, polyUpper_sup, -1 * (zh_sup * zl_sup));
+   Add22(&t2h_inf, &t2l_inf, zh_inf, zl_inf, zhSquareHalfh_inf, zhSquareHalfl_inf);
+   Add22(&t2h_sup, &t2l_sup, zh_sup, zl_sup, zhSquareHalfh_sup, zhSquareHalfl_sup);
+   Add22(&ph_inf, &pl_inf, t2h_inf, t2l_inf, t1h_inf, t1l_inf);
+   Add22(&ph_sup, &pl_sup, t2h_sup, t2l_sup, t1h_sup, t1l_sup);
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+     
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh_inf, log2edl_inf, log2h * ed_inf, log2m * ed_inf);
+
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh_sup, log2edl_sup, log2h * ed_sup, log2m * ed_sup);
+
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh_inf, &logTabPolyl_inf, logih_inf, logim_inf, ph_inf, pl_inf);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+  
+   Add22Cond(&logh_inf, &logm_inf, log2edh_inf, log2edl_inf, logTabPolyh_inf, logTabPolyl_inf);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh_sup, &logTabPolyl_sup, logih_sup, logim_sup, ph_sup, pl_sup);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh_sup, &logm_sup, log2edh_sup, log2edl_sup, logTabPolyh_sup, logTabPolyl_sup);
+
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   roundcst = RDROUNDCST1;
+
+   if(cs_inf) { res_inf=res_simple_inf; }
+   if(cs_sup) { res_sup=res_simple_sup; }
+   //TEST_AND_COPY_RDRU_LOG(roundable,res_inf,logh_inf,logm_inf,res_sup,logh_sup,logm_sup,roundcst);
+
+//#define TEST_AND_COPY_RDRU_LOG(__cond__, __res_inf__, __yh_inf__, __yl_inf__, __res_sup__, __yh_sup__, __yl_sup__, __eps__)  
+                                                                      
+  db_number yh_inf, yl_inf, u53_inf, yh_sup, yl_sup, u53_sup;                    
+  int yh_inf_neg, yl_inf_neg, yh_sup_neg, yl_sup_neg;                             
+  int rd_ok, ru_ok;                                                        
+  double save_res_inf=res_inf;                                              
+  yh_inf.d = logh_inf;    yl_inf.d = logm_inf;
+  yh_inf_neg = (yh_inf.i[HI] & 0x80000000);                                    
+  yl_inf_neg = (yl_inf.i[HI] & 0x80000000);                                    
+  yh_inf.l = yh_inf.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ 
+  yl_inf.l = yl_inf.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ 
+  u53_inf.l     = (yh_inf.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); 
+  yh_sup.d = logh_sup;    yl_sup.d = logm_sup;
+  yh_sup_neg = (yh_sup.i[HI] & 0x80000000);                                    
+  yl_sup_neg = (yl_sup.i[HI] & 0x80000000);                                    
+  yh_sup.l = yh_sup.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ 
+  yl_sup.l = yl_sup.l & 0x7fffffffffffffffLL;  /* compute the absolute value*/ 
+  u53_sup.l     = (yh_sup.l & ULL(7ff0000000000000)) +  ULL(0010000000000000); 
+  roundable = 0;
+  rd_ok=(yl_inf.d > roundcst * u53_inf.d);
+  ru_ok=(yl_sup.d > roundcst * u53_sup.d);
+     if(yl_inf_neg) {  /* The case yl==0 is filtered by the above test*/    
+      /* return next down */                                           
+      yh_inf.d = logh_inf;                                                   
+      if(yh_inf_neg) yh_inf.l++;  else yh_inf.l--; /* Beware: fails for zero */
+      res_inf = yh_inf.d ;
+    }
+    else {
+      res_inf = logh_inf;
+    }
+    if(!yl_sup_neg) {  /* The case yl==0 is filtered by the above test*/
+      /* return next up */
+      yh_sup.d = logh_sup;
+      if(yh_sup_neg) yh_sup.l--;  else yh_sup.l++; /* Beware: fails for zero */    
+      res_sup = yh_sup.d ;                                                 
+    }                                                                  
+    else {
+      res_sup = logh_sup;
+    }
+  if(save_res_inf==-1.0/0.0) res_inf=-1.0/0.0;
+  if(rd_ok && ru_ok){
+    ASSIGN_LOW(res,res_inf);
+    ASSIGN_UP(res,res_sup);
+    return(res);
+  }
+  else if (rd_ok){
+    roundable=1;
+  }
+  else if (ru_ok){
+     roundable=2;
+  }
+
+
+#if DEBUG
+   printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+   if (roundable==1)
+   {
+     log_td_accurate(&logh_sup, &logm_sup, &logl_sup, E_sup, ed_sup, index_sup, zh_sup, zl_sup, logih_sup, logim_sup); 
+     RoundUpwards3(&res_sup, logh_sup, logm_sup, logl_sup);
+   }
+
+   if (roundable==2)
+   {
+     log_td_accurate(&logh_inf, &logm_inf, &logl_inf, E_inf, ed_inf, index_inf, zh_inf, zl_inf, logih_inf, logim_inf); 
+     RoundDownwards3(&res_inf, logh_inf, logm_inf, logl_inf);
+   }
+   if (roundable==0)
+   {
+     log_td_accurate(&logh_inf, &logm_inf, &logl_inf, E_inf, ed_inf, index_inf, zh_inf, zl_inf, logih_inf, logim_inf); 
+     RoundDownwards3(&res_inf, logh_inf, logm_inf, logl_inf);
+     log_td_accurate(&logh_sup, &logm_sup, &logl_sup, E_sup, ed_sup, index_sup, zh_sup, zl_sup, logih_sup, logim_sup); 
+     RoundUpwards3(&res_sup, logh_sup, logm_sup, logl_sup);
+   }
+   ASSIGN_LOW(res,res_inf);
+   ASSIGN_UP(res,res_sup);
+   return res;
+ }
+#endif
+
diff --git a/src/crlibm/log-td.h b/src/crlibm/log-td.h
new file mode 100644
index 0000000..d0fd7df
--- /dev/null
+++ b/src/crlibm/log-td.h
@@ -0,0 +1,819 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/*File generated by maple/log-td.mpl*/
+
+#define L 7
+
+#define MAXINDEX 53
+
+#define INDEXMASK 127
+#define two52 4.50359962737049600000000000000000000000000000000000e+15
+#define log2h 6.93147180559890330187045037746429443359375000000000e-01
+#define log2m 5.49792301870850242169664946507035702127907939029683e-14
+#define log2l -1.31246984177852556920995753667322295879593697972250e-27
+#define ROUNDCST1 1.00277296776935912123020172797003775857085744686284e+00
+#define ROUNDCST2 1.00277296776935912123020172797003775857085744686284e+00
+#define RDROUNDCST1 1.53329341668337408143884997262066747209318683475599e-19
+#define RDROUNDCST2 1.53329341668337408143884997262066747209318683475599e-19
+
+
+#define c3 3.33333333333333370340767487505218014121055603027344e-01
+#define c4 -2.49999999990904886448817023847368545830249786376953e-01
+#define c5 1.99999999978980019799124079327157232910394668579102e-01
+#define c6 -1.66669050883027802800739891608827747404575347900391e-01
+#define c7 1.42860109897981618631845890377007890492677688598633e-01
+
+
+#define accPolyC3h 3.33333333333333314829616256247390992939472198486328e-01
+#define accPolyC3l 1.85037170770859413132312241283212169118117639547054e-17
+#define accPolyC4h -2.50000000000000000000000000000000000000000000000000e-01
+#define accPolyC4l 4.62199018306924685334006418421322154174127637249391e-33
+#define accPolyC5h 2.00000000000000011102230246251565404236316680908203e-01
+#define accPolyC5l -1.11022302443127785678379338452126964515833173338601e-17
+#define accPolyC6h -1.66666666666666657414808128123695496469736099243164e-01
+#define accPolyC6l -9.25185854591372488017120157358742564605503054108327e-18
+#define accPolyC7h 1.42857142857142849212692681248881854116916656494141e-01
+#define accPolyC7l 7.92868209382438390589949095717120486682310988838960e-18
+#define accPolyC8h -1.25000000000000000000000000000000000000000000000000e-01
+#define accPolyC8l 3.42769668947376590645174407718339199260639267364101e-21
+#define accPolyC9h 1.11111111111111521276839653182832989841699600219727e-01
+#define accPolyC9l 4.33331955380787609416227741118274520376899199903317e-18
+#define accPolyC10 -1.00000000000000699440505513848620466887950897216797e-01
+#define accPolyC11 9.09090908567022348840680479042930528521537780761719e-02
+#define accPolyC12 -8.33333332642126056732934102910803630948066711425781e-02
+#define accPolyC13 7.69261287585959879775643344146374147385358810424805e-02
+#define accPolyC14 -7.14319092953022982683819464000407606363296508789062e-02
+
+
+typedef struct rri_tag {float ri; double logih; double logim; double logil;} rri;  
+static const rri argredtable[128] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00,   /* r[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logih[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logim[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logil[0] */ 
+  } , 
+  { 
+    9.92248058319091796875000000000000000000000000000000e-01,   /* r[1] */ 
+    7.78214416734525436109004559170898573938757181167603e-03, /* logih[1] */ 
+    -1.28191618904143681948935996668824218266800862156024e-20, /* logim[1] */ 
+    1.17655068600225378123891861200215069271455859581641e-37, /* logil[1] */ 
+  } , 
+  { 
+    9.84615325927734375000000000000000000000000000000000e-01,   /* r[2] */ 
+    1.55042461406118062261505485821544425562024116516113e-02, /* logih[2] */ 
+    -3.27761516207149627029928635703400435929630184221293e-19, /* logim[2] */ 
+    2.95200020707030964072253388818190769795416371257942e-37, /* logil[2] */ 
+  } , 
+  { 
+    9.77099180221557617187500000000000000000000000000000e-01,   /* r[3] */ 
+    2.31671170235356708999585606534310500137507915496826e-02, /* logih[3] */ 
+    5.57833156048330069504471566938468802334954100224869e-19, /* logim[3] */ 
+    4.08416064054113313191746248503653555682943539201798e-35, /* logil[3] */ 
+  } , 
+  { 
+    9.69696998596191406250000000000000000000000000000000e-01,   /* r[4] */ 
+    3.07716288644317437217523547587916254997253417968750e-02, /* logih[4] */ 
+    1.04316437964092669923942103072089812062131860035492e-18, /* logim[4] */ 
+    -8.26837774892530079043982861155759865584698067912967e-36, /* logil[4] */ 
+  } , 
+  { 
+    9.62406039237976074218750000000000000000000000000000e-01,   /* r[5] */ 
+    3.83188391564273991840572364253603154793381690979004e-02, /* logih[5] */ 
+    1.54512636366303706650320890230224472259662656606095e-18, /* logim[5] */ 
+    8.30977110244055528389241824578843983429633068152463e-35, /* logil[5] */ 
+  } , 
+  { 
+    9.55223917961120605468750000000000000000000000000000e-01,   /* r[6] */ 
+    4.58094969157468376308450785927561810240149497985840e-02, /* logih[6] */ 
+    -3.30123051072550842868548428055668582607719074881820e-18, /* logim[6] */ 
+    1.64164772626574162996727598513545022472742050176492e-34, /* logil[6] */ 
+  } , 
+  { 
+    9.48148131370544433593750000000000000000000000000000e-01,   /* r[7] */ 
+    5.32445322139413548812036935942160198464989662170410e-02, /* logih[7] */ 
+    2.23755385085953619415254057336256700540433618368589e-18, /* logim[7] */ 
+    -9.41330315099866735037984721876103977945647219756033e-35, /* logil[7] */ 
+  } , 
+  { 
+    9.41176414489746093750000000000000000000000000000000e-01,   /* r[8] */ 
+    6.06246814210813916856679384181916248053312301635742e-02, /* logih[8] */ 
+    2.64247317995478646334926909653435556549332769494295e-18, /* logim[8] */ 
+    1.55075207452234839722600788456166299408429635417895e-34, /* logil[8] */ 
+  } , 
+  { 
+    9.34306621551513671875000000000000000000000000000000e-01,   /* r[9] */ 
+    6.79506060291548280583029395529592875391244888305664e-02, /* logih[9] */ 
+    5.65862161871167282533541105359923619273100535513035e-18, /* logim[9] */ 
+    -3.57889357320249912090032102867532919048871786355064e-34, /* logil[9] */ 
+  } , 
+  { 
+    9.27536249160766601562500000000000000000000000000000e-01,   /* r[10] */ 
+    7.52234026111362058530929175503842998296022415161133e-02, /* logih[10] */ 
+    1.00828755349783911736541446332784521904773238841865e-18, /* logim[10] */ 
+    7.77966415828014771486738038255868010153689429282538e-36, /* logil[10] */ 
+  } , 
+  { 
+    9.20863270759582519531250000000000000000000000000000e-01,   /* r[11] */ 
+    8.24437111205913314426751981045526918023824691772461e-02, /* logih[11] */ 
+    -4.27419767632228646217014766651675738804062364961374e-18, /* logim[11] */ 
+    3.58539257549786746072726449331073277906948658046759e-34, /* logil[11] */ 
+  } , 
+  { 
+    9.14285659790039062500000000000000000000000000000000e-01,   /* r[12] */ 
+    8.96122182943336897942288032936630770564079284667969e-02, /* logih[12] */ 
+    -5.42674234758262048883730612286095846547194397615989e-18, /* logim[12] */ 
+    -7.94903110897686868047461590865098481976776339992810e-35, /* logil[12] */ 
+  } , 
+  { 
+    9.07801389694213867187500000000000000000000000000000e-01,   /* r[13] */ 
+    9.67296581235191493819414176869031507521867752075195e-02, /* logih[13] */ 
+    1.17499431052084706890372286741885325822732164697539e-18, /* logim[13] */ 
+    -7.47188021694240554877009439429630012902672969107896e-35, /* logil[13] */ 
+  } , 
+  { 
+    9.01408433914184570312500000000000000000000000000000e-01,   /* r[14] */ 
+    1.03796812308095232069149460585322231054306030273438e-01, /* logih[14] */ 
+    -1.46116759252442942691327623497388991415382979093093e-18, /* logim[14] */ 
+    -5.84766064918572844473631496354606243606272630720064e-35, /* logil[14] */ 
+  } , 
+  { 
+    8.95104885101318359375000000000000000000000000000000e-01,   /* r[15] */ 
+    1.10814377516161077785739053069846704602241516113281e-01, /* logih[15] */ 
+    -5.75514509579248124656596649605847554012818793702281e-18, /* logim[15] */ 
+    3.29977719536339952907783192540462408052319847426319e-34, /* logil[15] */ 
+  } , 
+  { 
+    8.88888835906982421875000000000000000000000000000000e-01,   /* r[16] */ 
+    1.17783095261030007483427084480354096740484237670898e-01, /* logih[16] */ 
+    -1.19709798867727449215060005668653850880775796697715e-18, /* logim[16] */ 
+    8.04222018353684236067064017226062133396406008492921e-35, /* logil[16] */ 
+  } , 
+  { 
+    8.82758617401123046875000000000000000000000000000000e-01,   /* r[17] */ 
+    1.24703482226247538977581541530526010319590568542480e-01, /* logih[17] */ 
+    2.28663295749049514726834658528273231115811065734312e-18, /* logim[17] */ 
+    -3.51123005875932392272239647660221882537057244586168e-35, /* logil[17] */ 
+  } , 
+  { 
+    8.76712322235107421875000000000000000000000000000000e-01,   /* r[18] */ 
+    1.31576365239299886145118989588809199631214141845703e-01, /* logih[18] */ 
+    1.11230010175930229418362785876222391520299564865730e-17, /* logim[18] */ 
+    7.27451645836749926637643602480531900716806359121297e-34, /* logil[18] */ 
+  } , 
+  { 
+    8.70748281478881835937500000000000000000000000000000e-01,   /* r[19] */ 
+    1.38402343348215994822680841025430709123611450195312e-01, /* logih[19] */ 
+    -7.69528416335144553864151614176326744245393995127969e-18, /* logim[19] */ 
+    1.14202629230472885861778260955781649682548331183808e-34, /* logil[19] */ 
+  } , 
+  { 
+    8.64864826202392578125000000000000000000000000000000e-01,   /* r[20] */ 
+    1.45182054547982469783207193358975928276777267456055e-01, /* logih[20] */ 
+    8.24244856152552570070228105635897158979868211170798e-18, /* logim[20] */ 
+    -6.13072808770694892835379995250538817854995507648779e-34, /* logil[20] */ 
+  } , 
+  { 
+    8.59060406684875488281250000000000000000000000000000e-01,   /* r[21] */ 
+    1.51916037369229123266123337998578790575265884399414e-01, /* logih[21] */ 
+    -1.04296908000297145574171199957656893307239877379000e-17, /* logim[21] */ 
+    -5.53636436435840586444373230094200986769217138540854e-34, /* logil[21] */ 
+  } , 
+  { 
+    8.53333353996276855468750000000000000000000000000000e-01,   /* r[22] */ 
+    1.58605005962251938145257668111298698931932449340820e-01, /* logih[22] */ 
+    -8.86065192248216377790637508171938194510660992474042e-19, /* logim[22] */ 
+    -5.87995214834401673695486864800931832452468264932844e-35, /* logil[22] */ 
+  } , 
+  { 
+    8.47682118415832519531250000000000000000000000000000e-01,   /* r[23] */ 
+    1.65249573826629747586025587224867194890975952148438e-01, /* logih[23] */ 
+    -9.66125475305916070790888958698289394696700966750453e-18, /* logim[23] */ 
+    1.22853647999759344001960461047755491313341721869856e-34, /* logil[23] */ 
+  } , 
+  { 
+    8.42105269432067871093750000000000000000000000000000e-01,   /* r[24] */ 
+    1.71850249476078659194300257695431355386972427368164e-01, /* logih[24] */ 
+    -6.02245395887480538795512923412250309472746231920746e-18, /* logim[24] */ 
+    1.52961687917434402329553899350235008490821862631877e-34, /* logil[24] */ 
+  } , 
+  { 
+    8.36601257324218750000000000000000000000000000000000e-01,   /* r[25] */ 
+    1.78407717077464861299418430462537799030542373657227e-01, /* logih[25] */ 
+    -1.24324832026190372515095573175819374097319572461178e-17, /* logim[25] */ 
+    -5.99222696564577786410580709003476847421843326905428e-34, /* logil[25] */ 
+  } , 
+  { 
+    8.31168889999389648437500000000000000000000000000000e-01,   /* r[26] */ 
+    1.84922267713498816865680396404059138149023056030273e-01, /* logih[26] */ 
+    9.96243711860796179875713739627414673019270693540839e-18, /* logim[26] */ 
+    -1.99546782893888540832510298706525540082513642365204e-34, /* logil[26] */ 
+  } , 
+  { 
+    8.25806498527526855468750000000000000000000000000000e-01,   /* r[27] */ 
+    1.91394796188954025017991966706176754087209701538086e-01, /* logih[27] */ 
+    -8.22643020277300444045205706293674132131812201700538e-18, /* logim[27] */ 
+    5.69056030867564774930537188285078930441778787828211e-34, /* logil[27] */ 
+  } , 
+  { 
+    8.20512771606445312500000000000000000000000000000000e-01,   /* r[28] */ 
+    1.97825802934566419288842098467284813523292541503906e-01, /* logih[28] */ 
+    1.28212649590622342007825921152819823725126964367518e-17, /* logim[28] */ 
+    4.34712978477783827374998481132430084872238812357849e-34, /* logil[28] */ 
+  } , 
+  { 
+    8.15286636352539062500000000000000000000000000000000e-01,   /* r[29] */ 
+    2.04215526527529805944638496839615982025861740112305e-01, /* logih[29] */ 
+    2.73382699896480606605004885268461286375739934002155e-18, /* logim[29] */ 
+    1.88415596219599490517606146615135776386751947516623e-34, /* logil[29] */ 
+  } , 
+  { 
+    8.10126543045043945312500000000000000000000000000000e-01,   /* r[30] */ 
+    2.10564817536124687658016796376614365726709365844727e-01, /* logih[30] */ 
+    2.68952644992466202072392146799884466396384136175691e-18, /* logim[30] */ 
+    -1.58883120037037559046153789501260274259127656480088e-34, /* logil[30] */ 
+  } , 
+  { 
+    8.05031418800354003906250000000000000000000000000000e-01,   /* r[31] */ 
+    2.16873972759550226463431954471161589026451110839844e-01, /* logih[31] */ 
+    -1.23625140584833845652640860288020787431726668393088e-17, /* logim[31] */ 
+    -1.28369360755661214950804825668450767372141502246786e-34, /* logil[31] */ 
+  } , 
+  { 
+    7.99999952316284179687500000000000000000000000000000e-01,   /* r[32] */ 
+    2.23143610918856316605030087885097600519657135009766e-01, /* logih[32] */ 
+    -9.09120001124270523314725361445863555491966823753373e-18, /* logim[32] */ 
+    1.15945802868784933647836819275496182741822080543604e-34, /* logil[32] */ 
+  } , 
+  { 
+    7.95031070709228515625000000000000000000000000000000e-01,   /* r[33] */ 
+    2.29374082438394522043267897970508784055709838867188e-01, /* logih[33] */ 
+    -1.08890120418598083770448590672876580941469212582837e-17, /* logim[33] */ 
+    4.74877924128943438272197143958394008126523960202900e-34, /* logil[33] */ 
+  } , 
+  { 
+    7.90123462677001953125000000000000000000000000000000e-01,   /* r[34] */ 
+    2.35566063862186342303672859088692348450422286987305e-01, /* logih[34] */ 
+    -2.39433728738216998660812173360881116827035967139939e-18, /* logim[34] */ 
+    -9.62471867414270770251397101906428335828045927610883e-35, /* logil[34] */ 
+  } , 
+  { 
+    7.85276055335998535156250000000000000000000000000000e-01,   /* r[35] */ 
+    2.41719960170209802186036540661007165908813476562500e-01, /* logih[35] */ 
+    2.39578119451184969695376143676233310543075971208880e-18, /* logim[35] */ 
+    1.86231935097448741662637615288316997021879162207127e-34, /* logil[35] */ 
+  } , 
+  { 
+    7.80487775802612304687500000000000000000000000000000e-01,   /* r[36] */ 
+    2.47836201157484947721343360171886160969734191894531e-01, /* logih[36] */ 
+    -1.24321923457726137680465119406863072977770725701004e-17, /* logim[36] */ 
+    -2.09577513970149680056365167860895085898294691979404e-34, /* logil[36] */ 
+  } , 
+  { 
+    7.75757551193237304687500000000000000000000000000000e-01,   /* r[37] */ 
+    2.53915241645931488712051304901251569390296936035156e-01, /* logih[37] */ 
+    -6.31336333527435824035156315376733999545148217960567e-18, /* logim[37] */ 
+    4.63496313971202069379055986715253908538961883067566e-35, /* logil[37] */ 
+  } , 
+  { 
+    7.71084308624267578125000000000000000000000000000000e-01,   /* r[38] */ 
+    2.59957561689829752538116736104711890220642089843750e-01, /* logih[38] */ 
+    -7.05748899290965383754297836711168798219001736647281e-18, /* logim[38] */ 
+    4.27245447011230141916526741370315150982259792796987e-34, /* logil[38] */ 
+  } , 
+  { 
+    7.66467094421386718750000000000000000000000000000000e-01,   /* r[39] */ 
+    2.65963511244235673025571031757863238453865051269531e-01, /* logih[39] */ 
+    -2.24162125724264292804912034054420308588570407662844e-17, /* logim[39] */ 
+    4.90471140265143981765909599584287898945638617268867e-34, /* logil[39] */ 
+  } , 
+  { 
+    7.61904716491699218750000000000000000000000000000000e-01,   /* r[40] */ 
+    2.71933775088288309795814257086021825671195983886719e-01, /* logih[40] */ 
+    7.83390223779535346513505580003968001040971161798700e-19, /* logim[40] */ 
+    -3.02585215101390470982866376614279464778757620082138e-35, /* logil[40] */ 
+  } , 
+  { 
+    7.57396459579467773437500000000000000000000000000000e-01,   /* r[41] */ 
+    2.77868437964940373507971571598318405449390411376953e-01, /* logih[41] */ 
+    -2.69368711734232128278453248569958166651302969280381e-17, /* logim[41] */ 
+    1.27334496810554064003001771076892864921428144153570e-33, /* logil[41] */ 
+  } , 
+  { 
+    7.52941131591796875000000000000000000000000000000000e-01,   /* r[42] */ 
+    2.83768232735291170421021433867281302809715270996094e-01, /* logih[42] */ 
+    -2.03265852251844689554711830689719609838328388091381e-17, /* logim[42] */ 
+    3.99265876662456660849597520210659365811534845502505e-34, /* logil[42] */ 
+  } , 
+  { 
+    7.48538017272949218750000000000000000000000000000000e-01,   /* r[43] */ 
+    2.89633285132462114930262941925320774316787719726562e-01, /* logih[43] */ 
+    -7.21962253363417273270454867455071277489833577725373e-18, /* logim[43] */ 
+    -2.16150227221931053192432009592422674631830770048369e-34, /* logil[43] */ 
+  } , 
+  { 
+    7.44186043739318847656250000000000000000000000000000e-01,   /* r[44] */ 
+    2.95464216619126196494704572614864446222782135009766e-01, /* logih[44] */ 
+    -1.47072146829197428851717511710908602721304319475328e-17, /* logim[44] */ 
+    4.88114627787723832872543510409367916590649903129304e-34, /* logil[44] */ 
+  } , 
+  { 
+    7.39884376525878906250000000000000000000000000000000e-01,   /* r[45] */ 
+    3.01261352929903802877475982313626445829868316650391e-01, /* logih[45] */ 
+    1.87070681938931680167624656750430985298856099421569e-17, /* logim[45] */ 
+    1.51413799416501325421897094776870076323182009328971e-33, /* logil[45] */ 
+  } , 
+  { 
+    7.35632181167602539062500000000000000000000000000000e-01,   /* r[46] */ 
+    3.07025039020202172856954803137341514229774475097656e-01, /* logih[46] */ 
+    -5.38102227896180596526923200171118043417676846319102e-18, /* logim[46] */ 
+    2.06712483430759996475892191286335029882052180959917e-34, /* logil[46] */ 
+  } , 
+  { 
+    7.31428623199462890625000000000000000000000000000000e-01,   /* r[47] */ 
+    3.12755639223383730129768309780047275125980377197266e-01, /* logih[47] */ 
+    -7.57930782773895721056011815787401170737920404028723e-18, /* logim[47] */ 
+    8.39475110593319988799512618628582752750846924050440e-35, /* logil[47] */ 
+  } , 
+  { 
+    7.27272748947143554687500000000000000000000000000000e-01,   /* r[48] */ 
+    3.18453701316212645089365196326980367302894592285156e-01, /* logih[48] */ 
+    2.71147705440665649189983820006370647423267349507715e-17, /* logim[48] */ 
+    4.61673001741568050305139864943649666789926072891368e-34, /* logil[48] */ 
+  } , 
+  { 
+    7.23163843154907226562500000000000000000000000000000e-01,   /* r[49] */ 
+    3.24119466791566834817928111078799702227115631103516e-01, /* logih[49] */ 
+    -6.22349090807112113628215383245238541760656175683922e-18, /* logim[49] */ 
+    -2.94864944946984528585289533414905600786096792764282e-34, /* logil[49] */ 
+  } , 
+  { 
+    7.19101071357727050781250000000000000000000000000000e-01,   /* r[50] */ 
+    3.29753359015631464234985514849540777504444122314453e-01, /* logih[50] */ 
+    -2.38987037434306035496609341036867889075145964580121e-17, /* logim[50] */ 
+    -1.22161021411351376080765213758661026982900357467596e-33, /* logil[50] */ 
+  } , 
+  { 
+    7.15083837509155273437500000000000000000000000000000e-01,   /* r[51] */ 
+    3.35355487904429983014864546930766664445400238037109e-01, /* logih[51] */ 
+    -2.15530481136091842439480783176785939188081961777809e-17, /* logim[51] */ 
+    5.65377778536716902900522531845470344712374772157319e-34, /* logil[51] */ 
+  } , 
+  { 
+    7.11111068725585937500000000000000000000000000000000e-01,   /* r[52] */ 
+    3.40926646575239744585417156486073508858680725097656e-01, /* logih[52] */ 
+    1.74672070296268393919501631375949801326271042364782e-17, /* logim[52] */ 
+    1.28757784323920807504216254145051967795248381758825e-33, /* logil[52] */ 
+  } , 
+  { 
+    1.41436457633972167968750000000000000000000000000000e+00,   /* r[53] */ 
+    -3.46680367578929504723816990008344873785972595214844e-01, /* logih[53] */ 
+    -2.63487075436177288054440686474043695042741778901884e-17, /* logim[53] */ 
+    -1.38972774108545698123375234719775474495262622652200e-33, /* logil[53] */ 
+  } , 
+  { 
+    1.40659332275390625000000000000000000000000000000000e+00,   /* r[54] */ 
+    -3.41170697798120592381110327551141381263732910156250e-01, /* logih[54] */ 
+    1.93668606486849623510457675345565515553170548397263e-17, /* logim[54] */ 
+    -6.31924577586791945681481090971933602378723267089765e-34, /* logil[54] */ 
+  } , 
+  { 
+    1.39890718460083007812500000000000000000000000000000e+00,   /* r[55] */ 
+    -3.35691349380139503200126682713744230568408966064453e-01, /* logih[55] */ 
+    8.91843232308579533655667936963342665384096382048557e-18, /* logim[55] */ 
+    -7.43852632990846244963757376301756885994340719135686e-34, /* logil[55] */ 
+  } , 
+  { 
+    1.39130425453186035156250000000000000000000000000000e+00,   /* r[56] */ 
+    -3.30241619815349218836075806393637321889400482177734e-01, /* logih[56] */ 
+    -1.69271534756955752333877800530082817995576241189249e-17, /* logim[56] */ 
+    -2.05124125474152062675126703058085713735683777118919e-34, /* logil[56] */ 
+  } , 
+  { 
+    1.38378381729125976562500000000000000000000000000000e+00,   /* r[57] */ 
+    -3.24821643615624322531942880232236348092555999755859e-01, /* logih[57] */ 
+    1.93287622140617006961244731990086787828970688523722e-17, /* logim[57] */ 
+    -1.40211415833516824405184666805315188814704601258065e-33, /* logil[57] */ 
+  } , 
+  { 
+    1.37634420394897460937500000000000000000000000000000e+00,   /* r[58] */ 
+    -3.19430856448034428130000605960958637297153472900391e-01, /* logih[58] */ 
+    5.58442737360353866559969930374464901851229137435661e-18, /* logim[58] */ 
+    -2.25313306148742433454599602113064828727792769150620e-34, /* logil[58] */ 
+  } , 
+  { 
+    1.36898398399353027343750000000000000000000000000000e+00,   /* r[59] */ 
+    -3.14068847182749744106899925100151449441909790039062e-01, /* logih[59] */ 
+    1.74087330539322720259314067705480812845274240645592e-17, /* logim[59] */ 
+    2.87763442397890459672608687761118393908121210479900e-34, /* logil[59] */ 
+  } , 
+  { 
+    1.36170220375061035156250000000000000000000000000000e+00,   /* r[60] */ 
+    -3.08735537528966208498104606405831873416900634765625e-01, /* logih[60] */ 
+    2.31380218279209479391607966489385619371870731511261e-17, /* logim[60] */ 
+    5.75649697670342883220331709767832654878804183961435e-34, /* logil[60] */ 
+  } , 
+  { 
+    1.35449743270874023437500000000000000000000000000000e+00,   /* r[61] */ 
+    -3.03430487161918061023158088573836721479892730712891e-01, /* logih[61] */ 
+    5.88591784280850309549180895879864991445414905765635e-18, /* logim[61] */ 
+    3.80740105286783019924475997846877792541810370319751e-34, /* logil[61] */ 
+  } , 
+  { 
+    1.34736847877502441406250000000000000000000000000000e+00,   /* r[62] */ 
+    -2.98153415159913837140237546918797306716442108154297e-01, /* logih[62] */ 
+    -8.81391967432414632609646763074561636922040597203571e-18, /* logim[62] */ 
+    -2.02736910549706342663167850737697734462522018249963e-34, /* logil[62] */ 
+  } , 
+  { 
+    1.34031414985656738281250000000000000000000000000000e+00,   /* r[63] */ 
+    -2.92904026677480888718463347686338238418102264404297e-01, /* logih[63] */ 
+    1.79356774462556308958502912313675336181211584010969e-17, /* logim[63] */ 
+    1.02350086185905899058999882149766002774623879978153e-34, /* logil[63] */ 
+  } , 
+  { 
+    1.33333325386047363281250000000000000000000000000000e+00,   /* r[64] */ 
+    -2.87682012847134349620148441317724063992500305175781e-01, /* logih[64] */ 
+    -2.60715355783435444041951693925565689223533295668838e-17, /* logim[64] */ 
+    -9.83372234709377378449141028490939682198507140512540e-34, /* logil[64] */ 
+  } , 
+  { 
+    1.32642483711242675781250000000000000000000000000000e+00,   /* r[65] */ 
+    -2.82487230428967117656924301627441309392452239990234e-01, /* logih[65] */ 
+    2.49452771019268745755792758464310261659699707675018e-17, /* logim[65] */ 
+    -1.40230272425562150522506576584140991296902734870694e-33, /* logil[65] */ 
+  } , 
+  { 
+    1.31958770751953125000000000000000000000000000000000e+00,   /* r[66] */ 
+    -2.77319345020877350282972884087939746677875518798828e-01, /* logih[66] */ 
+    7.44521346975934828880026635948320543669274837358637e-18, /* logim[66] */ 
+    -5.41922476182319969711469733445405189836277342215443e-34, /* logil[66] */ 
+  } , 
+  { 
+    1.31282043457031250000000000000000000000000000000000e+00,   /* r[67] */ 
+    -2.72177826311169102080356196893262676894664764404297e-01, /* logih[67] */ 
+    -1.94604737767255604321061638736698666324990178271015e-17, /* logim[67] */ 
+    4.93318792723831633917605655356651628446409622108869e-34, /* logil[67] */ 
+  } , 
+  { 
+    1.30612254142761230468750000000000000000000000000000e+00,   /* r[68] */ 
+    -2.67062856029558426396164350080653093755245208740234e-01, /* logih[68] */ 
+    1.42676910305707233200559864526771082234384991613068e-17, /* logim[68] */ 
+    9.40874014190123375853921812584677628111272401841540e-34, /* logil[68] */ 
+  } , 
+  { 
+    1.29949235916137695312500000000000000000000000000000e+00,   /* r[69] */ 
+    -2.61973695252477101202970288795768283307552337646484e-01, /* logih[69] */ 
+    -1.59130185496344773949627658712806321021374170989957e-17, /* logim[69] */ 
+    2.05966526658843352548575822504612882857523370085076e-34, /* logil[69] */ 
+  } , 
+  { 
+    1.29292941093444824218750000000000000000000000000000e+00,   /* r[70] */ 
+    -2.56910505054635363020310023784986697137355804443359e-01, /* logih[70] */ 
+    -2.32939629151451727444770801596466641031683815428509e-17, /* logim[70] */ 
+    -1.43942742464573220634874496721239465737503205324375e-33, /* logil[70] */ 
+  } , 
+  { 
+    1.28643226623535156250000000000000000000000000000000e+00,   /* r[71] */ 
+    -2.51872701711453261808060233306605368852615356445312e-01, /* logih[71] */ 
+    -2.58573188266130078596915247890597291360969537163785e-17, /* logim[71] */ 
+    3.36064630885731507350249551263037246653963144676932e-34, /* logil[71] */ 
+  } , 
+  { 
+    1.27999997138977050781250000000000000000000000000000e+00,   /* r[72] */ 
+    -2.46860055579783743695543307694606482982635498046875e-01, /* logih[72] */ 
+    -1.36174299951708605118822966558244798958741114531493e-17, /* logim[72] */ 
+    -8.23883896198784591738914635896001757021238114385808e-35, /* logil[72] */ 
+  } , 
+  { 
+    1.27363181114196777343750000000000000000000000000000e+00,   /* r[73] */ 
+    -2.41872513137422084916750009142560884356498718261719e-01, /* logih[73] */ 
+    -2.91827950997726014268071786281330008614392694540440e-18, /* logim[73] */ 
+    8.66387628958027677722140876839269007945711340420961e-35, /* logil[73] */ 
+  } , 
+  { 
+    1.26732683181762695312500000000000000000000000000000e+00,   /* r[74] */ 
+    -2.36909825309450927655063878773944452404975891113281e-01, /* logih[74] */ 
+    4.97049401191734143236484721843489954792294974449682e-18, /* logim[74] */ 
+    2.12212094628219632031384179435720857347529888567725e-34, /* logil[74] */ 
+  } , 
+  { 
+    1.26108384132385253906250000000000000000000000000000e+00,   /* r[75] */ 
+    -2.31971542737545860513037609962339047342538833618164e-01, /* logih[75] */ 
+    1.20064411563385414488688519726171456939870706105353e-17, /* logim[75] */ 
+    -5.20241965000144345106493348505238495111737026311766e-34, /* logil[75] */ 
+  } , 
+  { 
+    1.25490188598632812500000000000000000000000000000000e+00,   /* r[76] */ 
+    -2.27057391030699523559732710964453872293233871459961e-01, /* logih[76] */ 
+    -9.55134517665639461592830714479938653876650013848813e-18, /* logim[76] */ 
+    -7.00052160915705629865262646818211330004502638341784e-34, /* logil[76] */ 
+  } , 
+  { 
+    1.24878048896789550781250000000000000000000000000000e+00,   /* r[77] */ 
+    -2.22167466272476882283015697794326115399599075317383e-01, /* logih[77] */ 
+    1.12308837854924459441805420173945034636561801020789e-17, /* logim[77] */ 
+    1.05992689326800868505291338111574353445179905470698e-34, /* logil[77] */ 
+  } , 
+  { 
+    1.24271845817565917968750000000000000000000000000000e+00,   /* r[78] */ 
+    -2.17301285003207084178811214769666548818349838256836e-01, /* logih[78] */ 
+    -1.37599098464784711367545798871014398359913153389606e-17, /* logim[78] */ 
+    -5.44676947016522950876420214713413739910691265570885e-34, /* logil[78] */ 
+  } , 
+  { 
+    1.23671507835388183593750000000000000000000000000000e+00,   /* r[79] */ 
+    -2.12458734101899110457978281374380458146333694458008e-01, /* logih[79] */ 
+    3.12575020468223244847667531342710056704202576314513e-18, /* logim[79] */ 
+    1.27082738610098894087384580413567050181540844264548e-35, /* logil[79] */ 
+  } , 
+  { 
+    1.23076915740966796875000000000000000000000000000000e+00,   /* r[80] */ 
+    -2.07639305173597937814733427330793347209692001342773e-01, /* logih[80] */ 
+    -1.20531726306040366742269494142059745690218464556184e-17, /* logim[80] */ 
+    3.33883514126655983920316543317695602289579500921493e-34, /* logil[80] */ 
+  } , 
+  { 
+    1.22488045692443847656250000000000000000000000000000e+00,   /* r[81] */ 
+    -2.02843253050716987306856253781006671488285064697266e-01, /* logih[81] */ 
+    -1.66453566992001313940518505696243672056063400746100e-18, /* logim[81] */ 
+    2.78446239404510241881587234176263335863162887428131e-35, /* logil[81] */ 
+  } , 
+  { 
+    1.21904754638671875000000000000000000000000000000000e+00,   /* r[82] */ 
+    -1.98069854157447239328959653903439175337553024291992e-01, /* logih[82] */ 
+    -3.74277289637934596837745314540095849706853736054736e-18, /* logim[82] */ 
+    2.20940287174632344749918330821286328950105212564345e-34, /* logil[82] */ 
+  } , 
+  { 
+    1.21327018737792968750000000000000000000000000000000e+00,   /* r[83] */ 
+    -1.93319348256398265695210625381150748580694198608398e-01, /* logih[83] */ 
+    -4.63045754803609100012916107813305239709411987466506e-18, /* logim[83] */ 
+    3.81311992624323390610440652445847060246376140730432e-34, /* logil[83] */ 
+  } , 
+  { 
+    1.20754718780517578125000000000000000000000000000000e+00,   /* r[84] */ 
+    -1.88591184708711112616441596401273272931575775146484e-01, /* logih[84] */ 
+    7.43216311628945500204739783937941202296964434266492e-18, /* logim[84] */ 
+    -4.02931080995428730719681936637527024502063366412999e-34, /* logil[84] */ 
+  } , 
+  { 
+    1.20187783241271972656250000000000000000000000000000e+00,   /* r[85] */ 
+    -1.83885194019779485419263664880418218672275543212891e-01, /* logih[85] */ 
+    4.12613043545869607985270580107985887836449099592842e-18, /* logim[85] */ 
+    -1.13080344207561908198013613253456946184091830340475e-34, /* logil[85] */ 
+  } , 
+  { 
+    1.19626164436340332031250000000000000000000000000000e+00,   /* r[86] */ 
+    -1.79201397792742966874612875471939332783222198486328e-01, /* logih[86] */ 
+    1.25197515140082668570664893296659406065442168045883e-17, /* logim[86] */ 
+    2.08673445558311131685127966451011169090072111640797e-34, /* logil[86] */ 
+  } , 
+  { 
+    1.19069766998291015625000000000000000000000000000000e+00,   /* r[87] */ 
+    -1.74539412626609380385644954003510065376758575439453e-01, /* logih[87] */ 
+    8.52219781255028950312107624449830634785785378861392e-18, /* logim[87] */ 
+    5.46720442033771639415150684633589460164820712880324e-34, /* logil[87] */ 
+  } , 
+  { 
+    1.18518519401550292968750000000000000000000000000000e+00,   /* r[88] */ 
+    -1.69899044245978042555478282338299322873353958129883e-01, /* logih[88] */ 
+    4.86800738580472456380134000450154397097303177737598e-19, /* logim[88] */ 
+    -4.48365665383134519709151659261825733866549119396251e-36, /* logil[88] */ 
+  } , 
+  { 
+    1.17972350120544433593750000000000000000000000000000e+00,   /* r[89] */ 
+    -1.65280090007780350314092743246874306350946426391602e-01, /* logih[89] */ 
+    1.05991222445546499578510819426998369466676418510398e-18, /* logim[89] */ 
+    2.15535973016890499002202117947684925307171077322261e-36, /* logil[89] */ 
+  } , 
+  { 
+    1.17431187629699707031250000000000000000000000000000e+00,   /* r[90] */ 
+    -1.60682338849634120947484916541725397109985351562500e-01, /* logih[90] */ 
+    5.38493323815703006679696841052856196024573538758454e-18, /* logim[90] */ 
+    1.60200163876329179080224417109933041789065267300895e-34, /* logil[90] */ 
+  } , 
+  { 
+    1.16894984245300292968750000000000000000000000000000e+00,   /* r[91] */ 
+    -1.56105775199027185795586092353914864361286163330078e-01, /* logih[91] */ 
+    1.32405772531609804709122583998125231935523184710352e-17, /* logim[91] */ 
+    4.88933388697666736600942679327919927438390701656817e-35, /* logil[91] */ 
+  } , 
+  { 
+    1.16363644599914550781250000000000000000000000000000e+00,   /* r[92] */ 
+    -1.51549968907714105448292229993967339396476745605469e-01, /* logih[92] */ 
+    1.77181633478899593214922561799512844823326841018122e-18, /* logim[92] */ 
+    5.44951453107128861626798538797020344311568819287008e-35, /* logil[92] */ 
+  } , 
+  { 
+    1.15837097167968750000000000000000000000000000000000e+00,   /* r[93] */ 
+    -1.47014683357163111754317696977523155510425567626953e-01, /* logih[93] */ 
+    4.46701777108311388441189058844554903695616000674812e-18, /* logim[93] */ 
+    -1.53168389834566630100313932781112142055948393405761e-34, /* logil[93] */ 
+  } , 
+  { 
+    1.15315318107604980468750000000000000000000000000000e+00,   /* r[94] */ 
+    -1.42500086821669674774781810810964088886976242065430e-01, /* logih[94] */ 
+    -2.21668083020505832726646787146199970227457581911830e-18, /* logim[94] */ 
+    -4.73140768447350921077611938776759805597533720242102e-36, /* logil[94] */ 
+  } , 
+  { 
+    1.14798212051391601562500000000000000000000000000000e+00,   /* r[95] */ 
+    -1.38005723310861472263866289722500368952751159667969e-01, /* logih[95] */ 
+    -9.06035372834454229539393713977175584764482079542462e-18, /* logim[95] */ 
+    -6.58482110068426815722709702700082916058774211791842e-34, /* logil[95] */ 
+  } , 
+  { 
+    1.14285707473754882812500000000000000000000000000000e+00,   /* r[96] */ 
+    -1.33531333019876075063336884340969845652580261230469e-01, /* logih[96] */ 
+    3.66452824974217778950176131406293356640863401093569e-18, /* logim[96] */ 
+    6.15050085774566840615703784135477182311292227710416e-35, /* logil[96] */ 
+  } , 
+  { 
+    1.13777780532836914062500000000000000000000000000000e+00,   /* r[97] */ 
+    -1.29077066489528990977930789085803553462028503417969e-01, /* logih[97] */ 
+    7.97904258955058431558707127373439732289437010877585e-19, /* logim[97] */ 
+    -4.72584148771245137732808879600361038781792271619664e-35, /* logil[97] */ 
+  } , 
+  { 
+    1.13274335861206054687500000000000000000000000000000e+00,   /* r[98] */ 
+    -1.24642441481986290807704165217728586867451667785645e-01, /* logih[98] */ 
+    -1.12998120773332791412288663337308123303520797473827e-18, /* logim[98] */ 
+    5.04751909879024305911295754405025108738663901055449e-35, /* logil[98] */ 
+  } , 
+  { 
+    1.12775325775146484375000000000000000000000000000000e+00,   /* r[99] */ 
+    -1.20227386019965673535914163494453532621264457702637e-01, /* logih[99] */ 
+    -4.10132123403305460439841682733159064509468253505934e-18, /* logim[99] */ 
+    1.89802934268459828223199224893946334512039168636632e-34, /* logil[99] */ 
+  } , 
+  { 
+    1.12280702590942382812500000000000000000000000000000e+00,   /* r[100] */ 
+    -1.15831822975702269928888199501670897006988525390625e-01, /* logih[100] */ 
+    -4.33848450767153009712329850176816190393287866962401e-18, /* logim[100] */ 
+    -3.16979691573058896647113947407157157214490081484725e-34, /* logil[100] */ 
+  } , 
+  { 
+    1.11790394783020019531250000000000000000000000000000e+00,   /* r[101] */ 
+    -1.11455456757806464773707944004854653030633926391602e-01, /* logih[101] */ 
+    -5.25227837292521929481451677551514755953859335394548e-18, /* logim[101] */ 
+    -1.35455162271740897316919848287529722248286557667632e-34, /* logil[101] */ 
+  } , 
+  { 
+    1.11304354667663574218750000000000000000000000000000e+00,   /* r[102] */ 
+    -1.07098197023655139492603893813793547451496124267578e-01, /* logih[102] */ 
+    3.47169710366632825350486634041554320998659998614468e-18, /* logim[102] */ 
+    4.16291803858237783591365989446195611338780307382474e-35, /* logil[102] */ 
+  } , 
+  { 
+    1.10822510719299316406250000000000000000000000000000e+00,   /* r[103] */ 
+    -1.02759733026446364867467764270259067416191101074219e-01, /* logih[103] */ 
+    5.14131173582414775653668171432178439238499706689565e-18, /* logim[103] */ 
+    -2.03511710633920722432014459953905354472733979743122e-34, /* logil[103] */ 
+  } , 
+  { 
+    1.10344839096069335937500000000000000000000000000000e+00,   /* r[104] */ 
+    -9.84401771213754411826712953370588365942239761352539e-02, /* logih[104] */ 
+    4.43863133643792238822177111529042861410430977956950e-18, /* logim[104] */ 
+    3.12055863098469149547827014037274497005231280699218e-34, /* logil[104] */ 
+  } , 
+  { 
+    1.09871244430541992187500000000000000000000000000000e+00,   /* r[105] */ 
+    -9.41389890512167593072945237508974969387054443359375e-02, /* logih[105] */ 
+    2.37342936135295683496202513568031672884920488134173e-19, /* logim[105] */ 
+    2.33721773003055253003147894270712826153088420940698e-35, /* logil[105] */ 
+  } , 
+  { 
+    1.09401702880859375000000000000000000000000000000000e+00,   /* r[106] */ 
+    -8.98562695172144959565585509153606835752725601196289e-02, /* logih[106] */ 
+    6.27446602451052736319026996501069657057280086335290e-19, /* logim[106] */ 
+    -3.52284010127094716016693656249620808330731317587528e-35, /* logil[106] */ 
+  } , 
+  { 
+    1.08936166763305664062500000000000000000000000000000e+00,   /* r[107] */ 
+    -8.55918986704354706196440361054555978626012802124023e-02, /* logih[107] */ 
+    -5.03513826084130895904008327416965851388338774947593e-18, /* logim[107] */ 
+    6.86424026896698901114373288904478288437409959196820e-35, /* logil[107] */ 
+  } , 
+  { 
+    1.08474564552307128906250000000000000000000000000000e+00,   /* r[108] */ 
+    -8.13455314205279167438789045263547450304031372070312e-02, /* logih[108] */ 
+    1.86223784192593707654359268192644483006930996779864e-18, /* logim[108] */ 
+    -9.08215611660981343459991418247070342987317386688394e-35, /* logil[108] */ 
+  } , 
+  { 
+    1.08016872406005859375000000000000000000000000000000e+00,   /* r[109] */ 
+    -7.71172549156562414651716608204878866672515869140625e-02, /* logih[109] */ 
+    4.37349590112793692636976332290601524356283649435490e-18, /* logim[109] */ 
+    -2.43638510650083687411626047741666976256819270953612e-34, /* logil[109] */ 
+  } , 
+  { 
+    1.07563018798828125000000000000000000000000000000000e+00,   /* r[110] */ 
+    -7.29067112034412351251333461732428986579179763793945e-02, /* logih[110] */ 
+    6.30693084361487082247322771068486204374546343933133e-18, /* logim[110] */ 
+    3.44825082371128400572272238979928316738696119124015e-34, /* logil[110] */ 
+  } , 
+  { 
+    1.07112979888916015625000000000000000000000000000000e+00,   /* r[111] */ 
+    -6.87139782297249979148290321973036043345928192138672e-02, /* logih[111] */ 
+    -4.40922228882126717948257852084234011599535648658716e-18, /* logim[111] */ 
+    2.00071285755297414487130516445636815235532199087333e-34, /* logil[111] */ 
+  } , 
+  { 
+    1.06666660308837890625000000000000000000000000000000e+00,   /* r[112] */ 
+    -6.45384615329246263959461771264614071696996688842773e-02, /* logih[112] */ 
+    6.47055724777502681297997296903095954212491541204973e-18, /* logim[112] */ 
+    -3.53995576621708408093066388957026321212073337996708e-34, /* logil[112] */ 
+  } , 
+  { 
+    1.06224060058593750000000000000000000000000000000000e+00,   /* r[113] */ 
+    -6.03804513842609302809449900450999848544597625732422e-02, /* logih[113] */ 
+    2.15703432342306119511642925211564389619524247753812e-18, /* logim[113] */ 
+    -3.99051054966201464148223117427430962485432571249835e-35, /* logil[113] */ 
+  } , 
+  { 
+    1.05785131454467773437500000000000000000000000000000e+00,   /* r[114] */ 
+    -5.62397891033892469159205518280941760167479515075684e-02, /* logih[114] */ 
+    3.28339677990388790029372693220459728960401288179580e-18, /* logim[114] */ 
+    1.51915205677141595589208947882243470550543557886170e-35, /* logil[114] */ 
+  } , 
+  { 
+    1.05349802970886230468750000000000000000000000000000e+00,   /* r[115] */ 
+    -5.21160840267197236763685452842764789238572120666504e-02, /* logih[115] */ 
+    -2.76876652450490527514912306264172616345243137067863e-19, /* logim[115] */ 
+    4.97747635693761803951848478678221385327287067714555e-36, /* logil[115] */ 
+  } , 
+  { 
+    1.04918026924133300781250000000000000000000000000000e+00,   /* r[116] */ 
+    -4.80091633070045681330739739678392652422189712524414e-02, /* logih[116] */ 
+    -1.43903217358996287866324353045636173989420593009940e-18, /* logim[116] */ 
+    9.24533961563047616614044310774847027299245259235749e-35, /* logil[116] */ 
+  } , 
+  { 
+    1.04489803314208984375000000000000000000000000000000e+00,   /* r[117] */ 
+    -4.39193047153486545997047585387917933985590934753418e-02, /* logih[117] */ 
+    -1.76247347066130256555880115492006953917590179181782e-18, /* logim[117] */ 
+    2.95067167680037492936848210009098107643918346324819e-35, /* logil[117] */ 
+  } , 
+  { 
+    1.04065036773681640625000000000000000000000000000000e+00,   /* r[118] */ 
+    -3.98458712942959952796329048396728467196226119995117e-02, /* logih[118] */ 
+    3.12956491324511750770873688790894657687633404551217e-18, /* logim[118] */ 
+    9.08530842942513514982993220469010912494881545842223e-35, /* logil[118] */ 
+  } , 
+  { 
+    1.03643727302551269531250000000000000000000000000000e+00,   /* r[119] */ 
+    -3.57891329972944774451271143789199413731694221496582e-02, /* logih[119] */ 
+    -2.94786708868720304892365707065135221787713948130908e-19, /* logim[119] */ 
+    1.84384763058385810856389175018656477977822636794864e-35, /* logil[119] */ 
+  } , 
+  { 
+    1.03225803375244140625000000000000000000000000000000e+00,   /* r[120] */ 
+    -3.17486685122574663342476242178236134350299835205078e-02, /* logih[120] */ 
+    -3.03821748520802146852642560679641488082417537178322e-18, /* logim[120] */ 
+    6.90127669441551609256721347857289051065660383455449e-35, /* logil[120] */ 
+  } , 
+  { 
+    1.02811241149902343750000000000000000000000000000000e+00,   /* r[121] */ 
+    -2.77245107619511835239656249996187398210167884826660e-02, /* logih[121] */ 
+    1.56537436220084983093655029081028016172956628311065e-18, /* logim[121] */ 
+    -4.26959324792631463690822650182944301609062827136870e-35, /* logil[121] */ 
+  } , 
+  { 
+    1.02399992942810058593750000000000000000000000000000e+00,   /* r[122] */ 
+    -2.37164576994431455791989549197751330211758613586426e-02, /* logih[122] */ 
+    -1.57190014657555079881764699090245893269914973184857e-19, /* logim[122] */ 
+    4.62721637019171363059082221740445258999073602747011e-36, /* logil[122] */ 
+  } , 
+  { 
+    1.01992034912109375000000000000000000000000000000000e+00,   /* r[123] */ 
+    -1.97245351501005340699723689112943247891962528228760e-02, /* logih[123] */ 
+    1.34458916305708123412045028332259969564528051018263e-18, /* logim[123] */ 
+    -6.02768376061644464555810636396264987280148524662430e-35, /* logil[123] */ 
+  } , 
+  { 
+    1.01587295532226562500000000000000000000000000000000e+00,   /* r[124] */ 
+    -1.57482973634926158579272481574662378989160060882568e-02, /* logih[124] */ 
+    -1.00208727697080412925749596659626020152032796409604e-18, /* logim[124] */ 
+    7.75790823155383991507800579878754988160969197338737e-35, /* logil[124] */ 
+  } , 
+  { 
+    1.01185774803161621093750000000000000000000000000000e+00,   /* r[125] */ 
+    -1.17879957989121472716753658005472971126437187194824e-02, /* logih[125] */ 
+    2.12843993900806841444093729096134188145078357457959e-19, /* logim[125] */ 
+    -7.36236149534638490756917054603187520349493909791838e-36, /* logil[125] */ 
+  } , 
+  { 
+    1.00787401199340820312500000000000000000000000000000e+00,   /* r[126] */ 
+    -7.84317373573558719590526067122482345439493656158447e-03, /* logih[126] */ 
+    -2.76470798179560918828283984091643257584228907545928e-19, /* logim[126] */ 
+    1.46121103426200283031313413564673422143931331178612e-35, /* logil[126] */ 
+  } , 
+  { 
+    1.00392150878906250000000000000000000000000000000000e+00,   /* r[127] */ 
+    -3.91383971648977691676352108629544090945273637771606e-03, /* logih[127] */ 
+    -4.28019276224719221462393891683495367484578724177817e-19, /* logim[127] */ 
+    -2.25272542183557712010826889962617244762256960750126e-35, /* logil[127] */ 
+  } }; 
+ 
diff --git a/src/crlibm/log.c b/src/crlibm/log.c
new file mode 100644
index 0000000..dd2e469
--- /dev/null
+++ b/src/crlibm/log.c
@@ -0,0 +1,2244 @@
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "log.h"
+
+
+
+void p_accu(double *p_resh, double *p_resm, double *p_resl, double xh, double xm) {
+
+
+
+
+double p_t_1_0h;
+double p_t_2_0h;
+double p_t_3_0h;
+double p_t_4_0h;
+double p_t_5_0h;
+double p_t_6_0h;
+double p_t_7_0h;
+double p_t_8_0h;
+double p_t_9_0h, p_t_9_0m;
+double p_t_10_0h, p_t_10_0m;
+double p_t_11_0h, p_t_11_0m;
+double p_t_12_0h, p_t_12_0m;
+double p_t_13_0h, p_t_13_0m;
+double p_t_14_0h, p_t_14_0m;
+double p_t_15_0h, p_t_15_0m;
+double p_t_16_0h, p_t_16_0m, p_t_16_0l;
+double p_t_17_0h, p_t_17_0m, p_t_17_0l;
+double p_t_18_0h, p_t_18_0m, p_t_18_0l;
+double p_t_19_0h, p_t_19_0m, p_t_19_0l;
+double p_t_20_0h, p_t_20_0m, p_t_20_0l;
+double p_t_21_0h, p_t_21_0m, p_t_21_0l;
+ 
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+
+
+p_t_1_0h = p_coeff_accu_12h;
+p_t_2_0h = p_t_1_0h * xh;
+p_t_3_0h = p_coeff_accu_11h + p_t_2_0h;
+p_t_4_0h = p_t_3_0h * xh;
+p_t_5_0h = p_coeff_accu_10h + p_t_4_0h;
+p_t_6_0h = p_t_5_0h * xh;
+p_t_7_0h = p_coeff_accu_9h + p_t_6_0h;
+p_t_8_0h = p_t_7_0h * xh;
+Add12(p_t_9_0h,p_t_9_0m,p_coeff_accu_8h,p_t_8_0h);
+MulAdd22(&p_t_10_0h,&p_t_10_0m,p_coeff_accu_7h,p_coeff_accu_7m,xh,xm,p_t_9_0h,p_t_9_0m);
+MulAdd22(&p_t_11_0h,&p_t_11_0m,p_coeff_accu_6h,p_coeff_accu_6m,xh,xm,p_t_10_0h,p_t_10_0m);
+MulAdd22(&p_t_12_0h,&p_t_12_0m,p_coeff_accu_5h,p_coeff_accu_5m,xh,xm,p_t_11_0h,p_t_11_0m);
+Mul22(&p_t_13_0h,&p_t_13_0m,p_t_12_0h,p_t_12_0m,xh,xm);
+Add122(&p_t_14_0h,&p_t_14_0m,p_coeff_accu_4h,p_t_13_0h,p_t_13_0m);
+Mul22(&p_t_15_0h,&p_t_15_0m,p_t_14_0h,p_t_14_0m,xh,xm);
+Add23(&p_t_16_0h,&p_t_16_0m,&p_t_16_0l,p_coeff_accu_3h,p_coeff_accu_3m,p_t_15_0h,p_t_15_0m);
+Mul233(&p_t_17_0h,&p_t_17_0m,&p_t_17_0l,xh,xm,p_t_16_0h,p_t_16_0m,p_t_16_0l);
+Add133(&p_t_18_0h,&p_t_18_0m,&p_t_18_0l,p_coeff_accu_2h,p_t_17_0h,p_t_17_0m,p_t_17_0l);
+Mul233(&p_t_19_0h,&p_t_19_0m,&p_t_19_0l,xh,xm,p_t_18_0h,p_t_18_0m,p_t_18_0l);
+Add133(&p_t_20_0h,&p_t_20_0m,&p_t_20_0l,p_coeff_accu_1h,p_t_19_0h,p_t_19_0m,p_t_19_0l);
+Mul233(&p_t_21_0h,&p_t_21_0m,&p_t_21_0l,xh,xm,p_t_20_0h,p_t_20_0m,p_t_20_0l);
+Renormalize3(p_resh,p_resm,p_resl,p_t_21_0h,p_t_21_0m,p_t_21_0l);
+
+
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+ double log_rn(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, log2edh, log2edl, log2edm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus exact
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+   if(logh == (logh + (logm * RNROUNDCST)))
+     return logh;
+   else 
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       log2edh = log2h * ed;
+       log2edm = log2m * ed;
+       log2edl = log2l * ed;
+
+       Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyh, logym, logyl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundToNearest3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED UPWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log_ru(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, log2edh, log2edl, log2edm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+
+   if (x == 1.0) return 0.0; /* This the only case in which the image under log of a double is a double. */
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus exact
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+   TEST_AND_RETURN_RU(logh, logm, RDROUNDCST);
+
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       log2edh = log2h * ed;
+       log2edm = log2m * ed;
+       log2edl = log2l * ed;
+
+       Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyh, logym, logyl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundUpwards3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED DOWNWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log_rd(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, log2edh, log2edl, log2edm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+
+   if (x == 1.0) return 0.0; /* This the only case in which the image under log of a double is a double. */
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus exact
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+   TEST_AND_RETURN_RD(logh, logm, RDROUNDCST);
+
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       log2edh = log2h * ed;
+       log2edm = log2m * ed;
+       log2edl = log2l * ed;
+
+       Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyh, logym, logyl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundDownwards3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED TOWARDS ZERO			     *
+ *************************************************************
+ *************************************************************/
+ double log_rz(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, log2edh, log2edl, log2edm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+
+   if (x == 1.0) return 0.0; /* This the only case in which the image under log of a double is a double. */
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus exact
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+   TEST_AND_RETURN_RZ(logh, logm, RDROUNDCST);
+
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       log2edh = log2h * ed;
+       log2edm = log2m * ed;
+       log2edl = log2l * ed;
+
+       Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyh, logym, logyl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundTowardsZero3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+ double log2_rn(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+   double log2TabPolyh, log2TabPolyl, log2yh, log2ym, log2yl;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log2(x) = E + 1/log(2) * (log(1+z) - log(ri))
+
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Multiply by 1/log(2) */
+
+   Mul22(&log2TabPolyh,&log2TabPolyl, RECPRLOG2H, RECPRLOG2L, logTabPolyh, logTabPolyl);
+
+   /* Add E */
+   
+   Add122(&logh, &logm, ed, log2TabPolyh, log2TabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+   if(logh == (logh + (logm * RNROUNDCST)))
+     return logh;
+   else 
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       Mul233(&log2yh,&log2ym,&log2yl,RECPRLOG2H,RECPRLOG2L,logyh,logym,logyl);
+       
+       Add133(&loghover,&logmover,&loglover,ed,log2yh,log2ym,log2yl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundToNearest3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  UPWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log2_ru(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+   double log2TabPolyh, log2TabPolyl, log2yh, log2ym, log2yl;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+
+   /* Test now if the argument is an exact power of 2
+      i.e. if the mantissa is exactly 1 (0x0..0 with the implicit bit) 
+      This test is necessary for filtering out the cases where the final 
+      rounding test cannot distinguish between an exact algebraic 
+      number and a hard case to round 
+   */
+
+   if ((index | xdb.i[LO]) == 0) {
+     /* Handle the "trivial" case for log2: 
+	The argument is an exact power of 2, return thus
+	just the exponant of the number 
+     */
+
+     return (double) E;
+
+   }
+
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log2(x) = E + 1/log(2) * (log(1+z) - log(ri))
+
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Multiply by 1/log(2) */
+
+   Mul22(&log2TabPolyh,&log2TabPolyl, RECPRLOG2H, RECPRLOG2L, logTabPolyh, logTabPolyl);
+
+   /* Add E */
+   
+   Add122(&logh, &logm, ed, log2TabPolyh, log2TabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   TEST_AND_RETURN_RU(logh, logm, RDROUNDCST);
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       Mul233(&log2yh,&log2ym,&log2yl,RECPRLOG2H,RECPRLOG2L,logyh,logym,logyl);
+       
+       Add133(&loghover,&logmover,&loglover,ed,log2yh,log2ym,log2yl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundUpwards3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED DOWNWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log2_rd(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+   double log2TabPolyh, log2TabPolyl, log2yh, log2ym, log2yl;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+
+   /* Test now if the argument is an exact power of 2
+      i.e. if the mantissa is exactly 1 (0x0..0 with the implicit bit) 
+      This test is necessary for filtering out the cases where the final 
+      rounding test cannot distinguish between an exact algebraic 
+      number and a hard case to round 
+   */
+
+   if ((index | xdb.i[LO]) == 0) {
+     /* Handle the "trivial" case for log2: 
+	The argument is an exact power of 2, return thus
+	just the exponant of the number 
+     */
+
+     return (double) E;
+
+   }
+
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log2(x) = E + 1/log(2) * (log(1+z) - log(ri))
+
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Multiply by 1/log(2) */
+
+   Mul22(&log2TabPolyh,&log2TabPolyl, RECPRLOG2H, RECPRLOG2L, logTabPolyh, logTabPolyl);
+
+   /* Add E */
+   
+   Add122(&logh, &logm, ed, log2TabPolyh, log2TabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   TEST_AND_RETURN_RD(logh, logm, RDROUNDCST);
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       Mul233(&log2yh,&log2ym,&log2yl,RECPRLOG2H,RECPRLOG2L,logyh,logym,logyl);
+       
+       Add133(&loghover,&logmover,&loglover,ed,log2yh,log2ym,log2yl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundDownwards3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED TOWARDS ZERO			     *
+ *************************************************************
+ *************************************************************/
+ double log2_rz(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+   double log2TabPolyh, log2TabPolyl, log2yh, log2ym, log2yl;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+
+   /* Test now if the argument is an exact power of 2
+      i.e. if the mantissa is exactly 1 (0x0..0 with the implicit bit) 
+      This test is necessary for filtering out the cases where the final 
+      rounding test cannot distinguish between an exact algebraic 
+      number and a hard case to round 
+   */
+
+   if ((index | xdb.i[LO]) == 0) {
+     /* Handle the "trivial" case for log2: 
+	The argument is an exact power of 2, return thus
+	just the exponant of the number 
+     */
+
+     return (double) E;
+
+   }
+
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log2(x) = E + 1/log(2) * (log(1+z) - log(ri))
+
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Multiply by 1/log(2) */
+
+   Mul22(&log2TabPolyh,&log2TabPolyl, RECPRLOG2H, RECPRLOG2L, logTabPolyh, logTabPolyl);
+
+   /* Add E */
+   
+   Add122(&logh, &logm, ed, log2TabPolyh, log2TabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+   TEST_AND_RETURN_RZ(logh, logm, RDROUNDCST);
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       Mul233(&log2yh,&log2ym,&log2yl,RECPRLOG2H,RECPRLOG2L,logyh,logym,logyl);
+       
+       Add133(&loghover,&logmover,&loglover,ed,log2yh,log2ym,log2yl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundTowardsZero3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+ double log10_rn(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, log2edh, log2edl, log2edm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+   double log10TabPolyh, log10TabPolyl;
+   double log10yh, log10ym, log10yl;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log_10(2) as log210h + log210m + log210l where log210h and log210m have 10 trailing zeros
+      Multiplication of ed (double E) and log210h and m is thus exact
+      The overall accuracy of log10h + log10m + log10l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log210m is smaller than log210h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log210h * ed, log210m * ed);
+
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Multiply by 1/log(10) */
+
+   Mul22(&log10TabPolyh,&log10TabPolyl,RECPRLOG10H,RECPRLOG10M,logTabPolyh,logTabPolyl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22(&logh, &logm, log2edh, log2edl, log10TabPolyh, log10TabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+   if(logh == (logh + (logm * RNROUNDCST)))
+     return logh;
+   else 
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       Mul33(&log10yh,&log10ym,&log10yl,RECPRLOG10H,RECPRLOG10M,RECPRLOG10L,logyh,logym,logyl);
+
+       log2edh = log210h * ed;
+       log2edm = log210m * ed;
+       log2edl = log210l * ed;
+
+       Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, log10yh, log10ym, log10yl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+                     
+       ReturnRoundToNearest3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+}
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED UPWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log10_ru(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, log2edh, log2edl, log2edm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+   double log10TabPolyh, log10TabPolyl;
+   double log10yh, log10ym, log10yl;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log_10(2) as log210h + log210m + log210l where log210h and log210m have 10 trailing zeros
+      Multiplication of ed (double E) and log210h and m is thus exact
+      The overall accuracy of log10h + log10m + log10l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log210m is smaller than log210h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log210h * ed, log210m * ed);
+
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Multiply by 1/log(10) */
+
+   Mul22(&log10TabPolyh,&log10TabPolyl,RECPRLOG10H,RECPRLOG10M,logTabPolyh,logTabPolyl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22(&logh, &logm, log2edh, log2edl, log10TabPolyh, log10TabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+
+   TEST_AND_RETURN_RU(logh, logm, RDROUNDCST);
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       Mul33(&log10yh,&log10ym,&log10yl,RECPRLOG10H,RECPRLOG10M,RECPRLOG10L,logyh,logym,logyl);
+
+       log2edh = log210h * ed;
+       log2edm = log210m * ed;
+       log2edl = log210l * ed;
+
+       Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, log10yh, log10ym, log10yl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+
+       ReturnRoundUpwards3Unfiltered(logh, logm, logl, WORSTCASEACCURACY);                     
+
+     } /* Accurate phase launched */
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED DOWNWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log10_rd(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, log2edh, log2edl, log2edm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+   double log10TabPolyh, log10TabPolyl;
+   double log10yh, log10ym, log10yl;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log_10(2) as log210h + log210m + log210l where log210h and log210m have 10 trailing zeros
+      Multiplication of ed (double E) and log210h and m is thus exact
+      The overall accuracy of log10h + log10m + log10l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log210m is smaller than log210h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log210h * ed, log210m * ed);
+
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Multiply by 1/log(10) */
+
+   Mul22(&log10TabPolyh,&log10TabPolyl,RECPRLOG10H,RECPRLOG10M,logTabPolyh,logTabPolyl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22(&logh, &logm, log2edh, log2edl, log10TabPolyh, log10TabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+
+   TEST_AND_RETURN_RD(logh, logm, RDROUNDCST);
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       Mul33(&log10yh,&log10ym,&log10yl,RECPRLOG10H,RECPRLOG10M,RECPRLOG10L,logyh,logym,logyl);
+
+       log2edh = log210h * ed;
+       log2edm = log210m * ed;
+       log2edl = log210l * ed;
+
+       Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, log10yh, log10ym, log10yl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+
+       ReturnRoundDownwards3Unfiltered(logh, logm, logl, WORSTCASEACCURACY);                     
+
+     } /* Accurate phase launched */
+}
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED TOWARDS ZERO			     *
+ *************************************************************
+ *************************************************************/
+ double log10_rz(double x){ 
+   db_number xdb, yhdb;
+   double yh, yl, ed, ri, logih, logim, logil, yrih, yril, th, zh, zl;
+   double ph, pl, pm, log2edh, log2edl, log2edm, logTabPolyh, logTabPolyl, logh, logm, logl;
+   int E, index;
+   double zhSquare, zhCube, zhSquareHalf;
+   double p35, p46, p36;
+   double pUpper;
+   double zhSquareHalfPlusZl;
+   double zhFour;
+   double logyh, logym, logyl;
+   double loghover, logmover, loglover;
+   double log10TabPolyh, log10TabPolyl;
+   double log10yh, log10ym, log10yl;
+
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+
+   yhdb.i[HI] = xdb.i[HI];
+   yhdb.i[LO] = 0;
+   yh = yhdb.d;
+   yl = xdb.d - yh;
+
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 exactly
+
+      Exactness is assured by use of two part yh + yl and 21 bit ri and Add12
+
+      Discard zl for higher monome degrees
+   */
+
+   yrih = yh * ri;
+   yril = yl * ri;
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* Polynomial approximation */
+
+  zhSquare = zh * zh; /* 1 */
+
+  p35 = p_coeff_3h + zhSquare * p_coeff_5h; /* 3 */
+  p46 = p_coeff_4h + zhSquare * p_coeff_6h; /* 3 */
+  zhCube = zhSquare * zh;   /* 2 */
+  zhSquareHalf = p_coeff_2h * zhSquare; /* 2 */
+  zhFour = zhSquare * zhSquare; /* 2 */
+
+  p36 = zhCube * p35 + zhFour * p46; /* 4 */
+  zhSquareHalfPlusZl = zhSquareHalf + zl; /* 3 */
+
+  pUpper = zhSquareHalfPlusZl + p36; /* 5 */
+  
+  Add12(ph,pl,zh,pUpper); /* 8 */
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log_10(2) as log210h + log210m + log210l where log210h and log210m have 10 trailing zeros
+      Multiplication of ed (double E) and log210h and m is thus exact
+      The overall accuracy of log10h + log10m + log10l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log210m is smaller than log210h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log210h * ed, log210m * ed);
+
+   /* Add logih and logim to ph and pl */
+
+   Add22(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Multiply by 1/log(10) */
+
+   Mul22(&log10TabPolyh,&log10TabPolyl,RECPRLOG10H,RECPRLOG10M,logTabPolyh,logTabPolyl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22(&logh, &logm, log2edh, log2edl, log10TabPolyh, log10TabPolyl);
+
+   /* Rounding test and possible return or call to the accurate function */
+
+
+   TEST_AND_RETURN_RZ(logh, logm, RDROUNDCST);
+     {
+
+       logil = argredtable[index].logil;
+
+       p_accu(&ph, &pm, &pl, zh, zl);
+
+       Add33(&logyh, &logym, &logyl, logih, logim, logil, ph, pm, pl);
+
+       Mul33(&log10yh,&log10ym,&log10yl,RECPRLOG10H,RECPRLOG10M,RECPRLOG10L,logyh,logym,logyl);
+
+       log2edh = log210h * ed;
+       log2edm = log210m * ed;
+       log2edl = log210l * ed;
+
+       Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, log10yh, log10ym, log10yl);
+
+       Renormalize3(&logh,&logm,&logl,loghover,logmover,loglover);
+
+       ReturnRoundTowardsZero3Unfiltered(logh, logm, logl, WORSTCASEACCURACY);                     
+
+     } /* Accurate phase launched */
+}
diff --git a/src/crlibm/log.h b/src/crlibm/log.h
new file mode 100644
index 0000000..e766595
--- /dev/null
+++ b/src/crlibm/log.h
@@ -0,0 +1,1592 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+#define L 8
+
+#define MAXINDEX 106
+
+#define INDEXMASK 255
+#define two52 4.50359962737049600000000000000000000000000000000000e+15
+#define log2h 6.93147180559890330187045037746429443359375000000000e-01
+#define log2m 5.49792301870850242169664946507035702127907939029683e-14
+#define log2l -1.31246984177852556920995753667322295879593697972250e-27
+#define log210h 0.3010299956639528318191878497600555419921875
+#define log210m 0.28363394551042263094578877949012915560267344972089631482958793640137e-13
+#define log210l 0.27013429058980534315374921000428327002971066904842912935671669760243e-26
+
+#define RNROUNDCST 1.01587301587301598581442042834326647273327977070694e+00
+#define RDROUNDCST 8.67361737988403547205962240695953369140625000000000e-19
+
+#define RECPRLOG2H 0.1442695040888963387004650940070860087871551513671875e1
+#define RECPRLOG2L 0.203552737409310331110210900522069120325603861485809498166e-16
+
+#define RECPRLOG10H 0.43429448190325181666793241674895398318767547607421875
+#define RECPRLOG10M 0.109831965021676507273885982186335434116483395815071742729340797950499108992516994476318359375e-16
+#define RECPRLOG10L 0.3717181233110958966699817676973599714051656514224857273631510154667658260758842841533296404155084502463068929500877857208251953125e-33
+
+#define WORSTCASEACCURACY 0.5316911983139663491615228241121378304e37
+
+#define p_coeff_accu_1h 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+#define p_coeff_accu_2h -5.00000000000000000000000000000000000000000000000000000000000000000000000000000000e-01
+#define p_coeff_accu_3h 3.33333333333333314829616256247390992939472198486328125000000000000000000000000000e-01
+#define p_coeff_accu_3m 1.85037170770874789756988228974262968046011237606765509333683894510613754391670227e-17
+#define p_coeff_accu_4h -2.50000000000000000000000000000000000000000000000000000000000000000000000000000000e-01
+#define p_coeff_accu_5h 2.00000000000000011102230246251565404236316680908203125000000000000000000000000000e-01
+#define p_coeff_accu_5m -1.11022359498086234952280980357986354308310664976318371532926221334491856396198273e-17
+#define p_coeff_accu_6h -1.66666666666666657414808128123695496469736099243164062500000000000000000000000000e-01
+#define p_coeff_accu_6m -9.25186011742975917381555124745579318634206911138887982626322070700553013011813164e-18
+#define p_coeff_accu_7h 1.42857142857142876968268296877795364707708358764648437500000000000000000000000000e-01
+#define p_coeff_accu_7m -1.29473592850074078984540189203202170950776491657307348814853753538045566529035568e-17
+#define p_coeff_accu_8h -1.25000000000000000000000000000000000000000000000000000000000000000000000000000000e-01
+#define p_coeff_accu_9h 1.11111111107490570515388128569611581042408943176269531250000000000000000000000000e-01
+#define p_coeff_accu_10h -9.99999999987549875735126647668948862701654434204101562500000000000000000000000000e-02
+#define p_coeff_accu_11h 9.09099561261329930372809826621960382908582687377929687500000000000000000000000000e-02
+#define p_coeff_accu_12h -8.33339031627361587206692661311535630375146865844726562500000000000000000000000000e-02
+
+#define p_coeff_1h 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+#define p_coeff_2h -5.00000000000000000000000000000000000000000000000000000000000000000000000000000000e-01
+#define p_coeff_3h 3.33333333332438030982558530013193376362323760986328125000000000000000000000000000e-01
+#define p_coeff_4h -2.49999999998981758952965037678950466215610504150390625000000000000000000000000000e-01
+#define p_coeff_5h 2.00000758681036727715252254711231216788291931152343750000000000000000000000000000e-01
+#define p_coeff_6h -1.66667399943076749435633132634393405169248580932617187500000000000000000000000000e-01
+
+
+typedef struct rri_tag {float ri; double logih; double logim; double logil;} rri;  
+static const rri argredtable[256] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00,   /* r[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logih[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logim[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logil[0] */ 
+  } , 
+  { 
+    9.96109008789062500000000000000000000000000000000000e-01,   /* r[1] */ 
+    3.89858081101432385473515296325786039233207702636719e-03, /* logih[1] */ 
+    1.25346004307267304894640684851581512787262559024016e-19, /* logim[1] */ 
+    4.64325168845438317713718561737934247375332721265836e-36, /* logil[1] */ 
+  } , 
+  { 
+    9.92248535156250000000000000000000000000000000000000e-01,   /* r[2] */ 
+    7.78166360501043267300369521421998797450214624404907e-03, /* logih[2] */ 
+    -4.89592386148351837006945254137918249482580247924126e-20, /* logim[2] */ 
+    -1.08409213368413141614035817819969540383455164545947e-36, /* logil[2] */ 
+  } , 
+  { 
+    9.88416671752929687500000000000000000000000000000000e-01,   /* r[3] */ 
+    1.16509375949922621557020008253857668023556470870972e-02, /* logih[3] */ 
+    -2.25226774360965572201294117569374162214377850269541e-19, /* logim[3] */ 
+    -5.11945341084299010662466108636073292979157772198876e-36, /* logil[3] */ 
+  } , 
+  { 
+    9.84615325927734375000000000000000000000000000000000e-01,   /* r[4] */ 
+    1.55042461406118062261505485821544425562024116516113e-02, /* logih[4] */ 
+    -3.27761516207149627029928635703400435929630184221293e-19, /* logim[4] */ 
+    2.95200020707030964072253388818190769795416371257942e-37, /* logil[4] */ 
+  } , 
+  { 
+    9.80842590332031250000000000000000000000000000000000e-01,   /* r[5] */ 
+    1.93432906687309343063407851559531991370022296905518e-02, /* logih[5] */ 
+    -2.15862131267131143148684267329697650453139578671228e-19, /* logim[5] */ 
+    -1.15271369538876060199548423508281675592171686662266e-35, /* logil[5] */ 
+  } , 
+  { 
+    9.77099418640136718750000000000000000000000000000000e-01,   /* r[6] */ 
+    2.31668730170368035448102972395645338110625743865967e-02, /* logih[6] */ 
+    -1.17910860908392752354910733048566386347187195159043e-18, /* logim[6] */ 
+    2.49612518164524848780028044162189727076238619175360e-35, /* logil[6] */ 
+  } , 
+  { 
+    9.73383903503417968750000000000000000000000000000000e-01,   /* r[7] */ 
+    2.69767180833710221166121812075289199128746986389160e-02, /* logih[7] */ 
+    -5.57795528916207151895634361214250967547427159484621e-20, /* logim[7] */ 
+    -3.62294468430332561712587522351589910764493467585522e-36, /* logil[7] */ 
+  } , 
+  { 
+    9.69696998596191406250000000000000000000000000000000e-01,   /* r[8] */ 
+    3.07716288644317437217523547587916254997253417968750e-02, /* logih[8] */ 
+    1.04316437964092669923942103072089812062131860035492e-18, /* logim[8] */ 
+    -8.26837774892530079043982861155759865584698067912967e-36, /* logil[8] */ 
+  } , 
+  { 
+    9.66037750244140625000000000000000000000000000000000e-01,   /* r[9] */ 
+    3.45523666054986522411240912333596497774124145507812e-02, /* logih[9] */ 
+    -1.65910748103534385407065291371523592570431641990885e-18, /* logim[9] */ 
+    3.38525826535166864039714297442413583169978770990777e-35, /* logil[9] */ 
+  } , 
+  { 
+    9.62406158447265625000000000000000000000000000000000e-01,   /* r[10] */ 
+    3.83187152905357653054352340404875576496124267578125e-02, /* logih[10] */ 
+    -2.35909906471143038057626284336250570775789572626881e-18, /* logim[10] */ 
+    -1.85563428635831615187251482536612501452930840707165e-34, /* logil[10] */ 
+  } , 
+  { 
+    9.58801269531250000000000000000000000000000000000000e-01,   /* r[11] */ 
+    4.20714523392945807800380464414047310128808021545410e-02, /* logih[11] */ 
+    -3.12838632664719081818569863425510803330088438244181e-18, /* logim[11] */ 
+    -3.22458892012633541790068267080237442991762885883976e-35, /* logil[11] */ 
+  } , 
+  { 
+    9.55224037170410156250000000000000000000000000000000e-01,   /* r[12] */ 
+    4.58093721185345026380986155345453880727291107177734e-02, /* logih[12] */ 
+    1.90149189679431067655792024548961427427986403667162e-18, /* logim[12] */ 
+    -1.35330568979098264467186032289860101304045776545335e-34, /* logil[12] */ 
+  } , 
+  { 
+    9.51672554016113281250000000000000000000000000000000e-01,   /* r[13] */ 
+    4.95342592225851141574111125009949319064617156982422e-02, /* logih[13] */ 
+    3.41051514612607272315747347640360336610752192297493e-18, /* logim[13] */ 
+    -1.62776077654054345674690342025587161986806134248965e-34, /* logil[13] */ 
+  } , 
+  { 
+    9.48147773742675781250000000000000000000000000000000e-01,   /* r[14] */ 
+    5.32449093996618869062409373782429611310362815856934e-02, /* logih[14] */ 
+    -1.64505111621921275224226259698905780842959106366420e-18, /* logim[14] */ 
+    4.14442397515940112138679619536747848472625603933844e-35, /* logil[14] */ 
+  } , 
+  { 
+    9.44649696350097656250000000000000000000000000000000e-01,   /* r[15] */ 
+    5.69411119045622124423822185690369224175810813903809e-02, /* logih[15] */ 
+    4.78734188028619786114736923282640611331114908534069e-19, /* logim[15] */ 
+    -3.93713999997785260153004737038398583853656485310521e-35, /* logil[15] */ 
+  } , 
+  { 
+    9.41176414489746093750000000000000000000000000000000e-01,   /* r[16] */ 
+    6.06246814210813916856679384181916248053312301635742e-02, /* logih[16] */ 
+    2.64247317995478646334926909653435556549332769494295e-18, /* logim[16] */ 
+    1.55075207452234839722600788456166299408429635417895e-34, /* logil[16] */ 
+  } , 
+  { 
+    9.37728881835937500000000000000000000000000000000000e-01,   /* r[17] */ 
+    6.42944103100438063558286216903070453554391860961914e-02, /* logih[17] */ 
+    2.60793481490786257498313263319157616690600921511114e-18, /* logim[17] */ 
+    -1.45909124358216952997721245377778825212735363222186e-34, /* logil[17] */ 
+  } , 
+  { 
+    9.34306144714355468750000000000000000000000000000000e-01,   /* r[18] */ 
+    6.79511163940274415251607820209756027907133102416992e-02, /* logih[18] */ 
+    -1.24892173295840496632514736205386405076267738428183e-18, /* logim[18] */ 
+    -5.86027190792146940250174345622545434589551590207709e-35, /* logil[18] */ 
+  } , 
+  { 
+    9.30909156799316406250000000000000000000000000000000e-01,   /* r[19] */ 
+    7.15935824064956455314856498262088280171155929565430e-02, /* logih[19] */ 
+    6.55833354527865440910555403220649032260269042308564e-18, /* logim[19] */ 
+    -8.65001743565124847036366836203555319976499748416219e-35, /* logil[19] */ 
+  } , 
+  { 
+    9.27536010742187500000000000000000000000000000000000e-01,   /* r[20] */ 
+    7.52236596561950549011399402843380812555551528930664e-02, /* logih[20] */ 
+    -5.92608668643342447178482655547063763942218784624419e-18, /* logim[20] */ 
+    3.06299284565641653395923152025230697760630110042913e-34, /* logil[20] */ 
+  } , 
+  { 
+    9.24187660217285156250000000000000000000000000000000e-01,   /* r[21] */ 
+    7.88401324882942039495858921327453572303056716918945e-02, /* logih[21] */ 
+    -3.70086061559488005172131811140468915784794102784056e-18, /* logim[21] */ 
+    -9.85152871853396304228341002410386896660946235409677e-36, /* logil[21] */ 
+  } , 
+  { 
+    9.20863151550292968750000000000000000000000000000000e-01,   /* r[22] */ 
+    8.24438405744429975152698375495674554258584976196289e-02, /* logih[22] */ 
+    5.70211515844839148682574255471016004503183577701328e-18, /* logim[22] */ 
+    -2.25007518842967334560085413287805841472581599706844e-34, /* logil[22] */ 
+  } , 
+  { 
+    9.17562484741210937500000000000000000000000000000000e-01,   /* r[23] */ 
+    8.60345981121580505313062303685001097619533538818359e-02, /* logih[23] */ 
+    -4.22948398727754542981422162560881574021096207871627e-18, /* logim[23] */ 
+    6.94601543497627089738149551411013780692459600238783e-35, /* logil[23] */ 
+  } , 
+  { 
+    9.14285659790039062500000000000000000000000000000000e-01,   /* r[24] */ 
+    8.96122182943336897942288032936630770564079284667969e-02, /* logih[24] */ 
+    -5.42674234758262048883730612286095846547194397615989e-18, /* logim[24] */ 
+    -7.94903110897686868047461590865098481976776339992810e-35, /* logil[24] */ 
+  } , 
+  { 
+    9.11031723022460937500000000000000000000000000000000e-01,   /* r[25] */ 
+    9.31775601303663630892160085750219877809286117553711e-02, /* logih[25] */ 
+    -6.69498457328524671915466867735988222404310795846756e-18, /* logim[25] */ 
+    -3.79652072557870206332532254269355336020140715029263e-34, /* logil[25] */ 
+  } , 
+  { 
+    9.07801628112792968750000000000000000000000000000000e-01,   /* r[26] */ 
+    9.67293954905792813248055495023436378687620162963867e-02, /* logih[26] */ 
+    -5.63846837522303146603627132880140909669766724948486e-19, /* logim[26] */ 
+    -1.66000291590412401400936599792255612972352892524385e-35, /* logil[26] */ 
+  } , 
+  { 
+    9.04593467712402343750000000000000000000000000000000e-01,   /* r[27] */ 
+    1.00269643153498413945534650792978936806321144104004e-01, /* logih[27] */ 
+    4.98554274018507013478029967753506544988890129859642e-18, /* logim[27] */ 
+    5.59670179615967929691409415615538777735120155881527e-35, /* logil[27] */ 
+  } , 
+  { 
+    9.01408195495605468750000000000000000000000000000000e-01,   /* r[28] */ 
+    1.03797076803746321504995364648493705317378044128418e-01, /* logih[28] */ 
+    5.48528900130158927281223188042337652391677694528930e-18, /* logim[28] */ 
+    4.14171393686520487202261794304840175447148562557926e-37, /* logil[28] */ 
+  } , 
+  { 
+    8.98245811462402343750000000000000000000000000000000e-01,   /* r[29] */ 
+    1.07311515996984602194785907158802729099988937377930e-01, /* logih[29] */ 
+    -6.49440034445526829025678761855551439585344802732716e-18, /* logim[29] */ 
+    2.57958632702602934657456152939453502266815184956115e-34, /* logil[29] */ 
+  } , 
+  { 
+    8.95105361938476562500000000000000000000000000000000e-01,   /* r[30] */ 
+    1.10813844799784330663605658173764823004603385925293e-01, /* logih[30] */ 
+    1.13646120297132443922718632465223191456150489503195e-18, /* logim[30] */ 
+    -5.28316759830006376644472821184088330546878296734027e-35, /* logil[30] */ 
+  } , 
+  { 
+    8.91985893249511718750000000000000000000000000000000e-01,   /* r[31] */ 
+    1.14304961269881905083778406151395756751298904418945e-01, /* logih[31] */ 
+    -1.82657204548789933700890276210347276483341044028754e-18, /* logim[31] */ 
+    -1.78975695662999910835938906470926846720934095410310e-34, /* logil[31] */ 
+  } , 
+  { 
+    8.88889312744140625000000000000000000000000000000000e-01,   /* r[32] */ 
+    1.17782558819338939448684300259628798812627792358398e-01, /* logih[32] */ 
+    -1.23330863425085901895045843903611194329827297821512e-18, /* logim[32] */ 
+    -3.52820989557939438405682761152717048907334161666144e-35, /* logil[32] */ 
+  } , 
+  { 
+    8.85812759399414062500000000000000000000000000000000e-01,   /* r[33] */ 
+    1.21249683217221515540984455583384260535240173339844e-01, /* logih[33] */ 
+    5.31311945158451973155842240649445065131843549390499e-18, /* logim[33] */ 
+    2.54343506313921505744140357189546013839546072665324e-34, /* logil[33] */ 
+  } , 
+  { 
+    8.82759094238281250000000000000000000000000000000000e-01,   /* r[34] */ 
+    1.24702942059298146904033899318164912983775138854980e-01, /* logih[34] */ 
+    -4.70371819449250479521866847789744043656802774985674e-18, /* logim[34] */ 
+    1.97104582593396093851604773181347759433213428836825e-35, /* logil[34] */ 
+  } , 
+  { 
+    8.79725456237792968750000000000000000000000000000000e-01,   /* r[35] */ 
+    1.28145401734214903211039882080513052642345428466797e-01, /* logih[35] */ 
+    1.14781745994570133838663940952936924060234053388495e-17, /* logim[35] */ 
+    5.58511031530272548588108480038230630258110787014421e-34, /* logil[35] */ 
+  } , 
+  { 
+    8.76712799072265625000000000000000000000000000000000e-01,   /* r[36] */ 
+    1.31575821347060167854081669247534591704607009887695e-01, /* logih[36] */ 
+    1.10715436488867456364710847828940395046896276123492e-17, /* logim[36] */ 
+    -1.96739988161444008557083655799953663793248304761174e-34, /* logil[36] */ 
+  } , 
+  { 
+    8.73720169067382812500000000000000000000000000000000e-01,   /* r[37] */ 
+    1.34995127284602528527912568279134575277566909790039e-01, /* logih[37] */ 
+    1.13443032556618420511047729873477099334314080223232e-17, /* logim[37] */ 
+    7.84084139347542359388184229855467642926900448087157e-35, /* logil[37] */ 
+  } , 
+  { 
+    8.70748519897460937500000000000000000000000000000000e-01,   /* r[38] */ 
+    1.38402069539410921272803989268140867352485656738281e-01, /* logih[38] */ 
+    4.44235871792103837022419240194760193308637586385155e-18, /* logim[38] */ 
+    -2.41881295582206144619569746427861787915591569677161e-34, /* logil[38] */ 
+  } , 
+  { 
+    8.67796897888183593750000000000000000000000000000000e-01,   /* r[39] */ 
+    1.41797580309475756976667071285191923379898071289062e-01, /* logih[39] */ 
+    -7.24160172735387143794870117732197886365507642151672e-18, /* logim[39] */ 
+    -5.22451781240386018101218933838001385853101358775197e-34, /* logil[39] */ 
+  } , 
+  { 
+    8.64865303039550781250000000000000000000000000000000e-01,   /* r[40] */ 
+    1.45181503205145640000850448814162518829107284545898e-01, /* logih[40] */ 
+    8.19907012376636936299584542046629720669747968826019e-18, /* logim[40] */ 
+    -6.12684085112129298490441309408007876014850876364407e-34, /* logil[40] */ 
+  } , 
+  { 
+    8.61952781677246093750000000000000000000000000000000e-01,   /* r[41] */ 
+    1.48554787455398934481465289536572527140378952026367e-01, /* logih[41] */ 
+    6.78516779658958104936774808506523119026706496843219e-18, /* logim[41] */ 
+    -3.27826043728243463792408633436129695451318517711142e-34, /* logil[41] */ 
+  } , 
+  { 
+    8.59060287475585937500000000000000000000000000000000e-01,   /* r[42] */ 
+    1.51916176136301706023346014262642711400985717773438e-01, /* logih[42] */ 
+    6.48466714403849150058443502305577974475027830695770e-18, /* logim[42] */ 
+    -1.48928080867016213912478822372262107645375280995355e-34, /* logil[42] */ 
+  } , 
+  { 
+    8.56186866760253906250000000000000000000000000000000e-01,   /* r[43] */ 
+    1.55266624374856387902354981633834540843963623046875e-01, /* logih[43] */ 
+    1.18940768999581165815608386146027685954807862619905e-18, /* logim[43] */ 
+    -2.19216119241235749930116667974585541598333050913847e-35, /* logil[43] */ 
+  } , 
+  { 
+    8.53333473205566406250000000000000000000000000000000e-01,   /* r[44] */ 
+    1.58604866263878874210746516837389208376407623291016e-01, /* logih[44] */ 
+    1.12555359025026447024891292897564756165016667291108e-17, /* logim[44] */ 
+    2.51566303827199528440805207088944780959353108097571e-34, /* logil[44] */ 
+  } , 
+  { 
+    8.50498199462890625000000000000000000000000000000000e-01,   /* r[45] */ 
+    1.61932984182099809489230324288655538111925125122070e-01, /* logih[45] */ 
+    9.77539264526997233823717660784682214608240520802842e-18, /* logim[45] */ 
+    5.24985245146816572034425662478272808361990734810588e-34, /* logil[45] */ 
+  } , 
+  { 
+    8.47681999206542968750000000000000000000000000000000e-01,   /* r[46] */ 
+    1.65249714456348534286078688637644518166780471801758e-01, /* logih[46] */ 
+    -1.00939900169186480779679825710639265028332267691135e-17, /* logim[46] */ 
+    3.90825918506438654133771548917512854530368619051813e-34, /* logil[46] */ 
+  } , 
+  { 
+    8.44884872436523437500000000000000000000000000000000e-01,   /* r[47] */ 
+    1.68554906544493537934314986159733962267637252807617e-01, /* logih[47] */ 
+    -4.88067069357233088835045523845127031889038644659894e-18, /* logim[47] */ 
+    -2.74436628602599193485144954170980402729323560852447e-34, /* logil[47] */ 
+  } , 
+  { 
+    8.42104911804199218750000000000000000000000000000000e-01,   /* r[48] */ 
+    1.71850674159259697582058379339287057518959045410156e-01, /* logih[48] */ 
+    -5.99824278835946286993892764844703773122678476390412e-18, /* logim[48] */ 
+    3.70682933452027240591056472269948014540566701592829e-34, /* logil[48] */ 
+  } , 
+  { 
+    8.39344024658203125000000000000000000000000000000000e-01,   /* r[49] */ 
+    1.75134615249951913762416211284289602190256118774414e-01, /* logih[49] */ 
+    -3.58390218411179180194443037963547505253027562280581e-18, /* logim[49] */ 
+    3.31228661881018068740534361547868152976577021044761e-34, /* logil[49] */ 
+  } , 
+  { 
+    8.36601257324218750000000000000000000000000000000000e-01,   /* r[50] */ 
+    1.78407717077464861299418430462537799030542373657227e-01, /* logih[50] */ 
+    -1.24324832026190372515095573175819374097319572461178e-17, /* logim[50] */ 
+    -5.99222696564577786410580709003476847421843326905428e-34, /* logil[50] */ 
+  } , 
+  { 
+    8.33876609802246093750000000000000000000000000000000e-01,   /* r[51] */ 
+    1.81669837446455789686794446424755733460187911987305e-01, /* logih[51] */ 
+    1.01814383360123408182300498809467596332645378664897e-18, /* logim[51] */ 
+    -3.86254258528557102676238695420952114271137939703806e-35, /* logil[51] */ 
+  } , 
+  { 
+    8.31169128417968750000000000000000000000000000000000e-01,   /* r[52] */ 
+    1.84921980866207286142710586318571586161851882934570e-01, /* logih[52] */ 
+    3.00841482639628279758161917890436573438957544374876e-18, /* logim[52] */ 
+    -4.99319538644221397164613342913055299248197716579930e-36, /* logil[52] */ 
+  } , 
+  { 
+    8.28478813171386718750000000000000000000000000000000e-01,   /* r[53] */ 
+    1.88164014957424269303132291497604455798864364624023e-01, /* logih[53] */ 
+    2.44293806976014644991303628324646254244852750452761e-18, /* logim[53] */ 
+    -1.81631690797919082130114101842168376499919500191654e-34, /* logil[53] */ 
+  } , 
+  { 
+    8.25806617736816406250000000000000000000000000000000e-01,   /* r[54] */ 
+    1.91394651833973583610060131832142360508441925048828e-01, /* logih[54] */ 
+    -1.21322104713829577894210219067304263334028383887345e-17, /* logim[54] */ 
+    5.04102454790153462302483289986561437522938374164401e-34, /* logil[54] */ 
+  } , 
+  { 
+    8.23151588439941406250000000000000000000000000000000e-01,   /* r[55] */ 
+    1.94614905180994807176730887476878706365823745727539e-01, /* logih[55] */ 
+    -2.40704484907151006187800247197019539577410611794596e-18, /* logim[55] */ 
+    1.66766736549683531224402325253460134456943558772782e-34, /* logil[55] */ 
+  } , 
+  { 
+    8.20512771606445312500000000000000000000000000000000e-01,   /* r[56] */ 
+    1.97825802934566419288842098467284813523292541503906e-01, /* logih[56] */ 
+    1.28212649590622342007825921152819823725126964367518e-17, /* logim[56] */ 
+    4.34712978477783827374998481132430084872238812357849e-34, /* logil[56] */ 
+  } , 
+  { 
+    8.17891120910644531250000000000000000000000000000000e-01,   /* r[57] */ 
+    2.01026055259733327229554333825944922864437103271484e-01, /* logih[57] */ 
+    -1.14998212245338630994656980851947792972358234996197e-17, /* logim[57] */ 
+    5.79624076358083101943179592654253175121330546055049e-34, /* logil[57] */ 
+  } , 
+  { 
+    8.15286636352539062500000000000000000000000000000000e-01,   /* r[58] */ 
+    2.04215526527529805944638496839615982025861740112305e-01, /* logih[58] */ 
+    2.73382699896480606605004885268461286375739934002155e-18, /* logim[58] */ 
+    1.88415596219599490517606146615135776386751947516623e-34, /* logil[58] */ 
+  } , 
+  { 
+    8.12698364257812500000000000000000000000000000000000e-01,   /* r[59] */ 
+    2.07395253950717145530191487523552495986223220825195e-01, /* logih[59] */ 
+    -6.62391092234198860395870331818350936803399446817708e-18, /* logim[59] */ 
+    3.21769751525760188204600268636020811532764524000701e-34, /* logil[59] */ 
+  } , 
+  { 
+    8.10126304626464843750000000000000000000000000000000e-01,   /* r[60] */ 
+    2.10565111834115831213054548243235331028699874877930e-01, /* logih[60] */ 
+    -4.23598623593001075035023138647901308953697217452223e-18, /* logim[60] */ 
+    -1.60116079297919794843846440200207561215761229589523e-34, /* logil[60] */ 
+  } , 
+  { 
+    8.07571411132812500000000000000000000000000000000000e-01,   /* r[61] */ 
+    2.13723792956059033265603375184582546353340148925781e-01, /* logih[61] */ 
+    1.19332110118934137902010996837627215742078591974979e-17, /* logim[61] */ 
+    -7.02796906150255788492393691981023760796809185404715e-34, /* logil[61] */ 
+  } , 
+  { 
+    8.05031776428222656250000000000000000000000000000000e-01,   /* r[62] */ 
+    2.16873528518765484873753734973433893173933029174805e-01, /* logih[62] */ 
+    4.52808917121474736889640990984402645764765520737700e-18, /* logim[62] */ 
+    2.11628056886638280859096959251776961524147228058240e-34, /* logil[62] */ 
+  } , 
+  { 
+    8.02507400512695312500000000000000000000000000000000e-01,   /* r[63] */ 
+    2.20014202197813590888841872583725489675998687744141e-01, /* logih[63] */ 
+    -1.00259431805058570834488582628193862678340769016279e-17, /* logim[63] */ 
+    2.36589934049562797440015684747135353020590849639512e-35, /* logil[63] */ 
+  } , 
+  { 
+    8.00000190734863281250000000000000000000000000000000e-01,   /* r[64] */ 
+    2.23143312895659085004496091642067767679691314697266e-01, /* logih[64] */ 
+    -9.09578810556902738974378981655445966403155329846157e-18, /* logim[64] */ 
+    -5.51860343858009857142907585246296630664802326325794e-34, /* logil[64] */ 
+  } , 
+  { 
+    7.97508239746093750000000000000000000000000000000000e-01,   /* r[65] */ 
+    2.26263112406488331451726025989046320319175720214844e-01, /* logih[65] */ 
+    7.84336071516770930915783866759877344054363308944707e-18, /* logim[65] */ 
+    -7.43454080890818906474334427543025223771612621973504e-34, /* logil[65] */ 
+  } , 
+  { 
+    7.95030593872070312500000000000000000000000000000000e-01,   /* r[66] */ 
+    2.29374682210301245044448137377912644296884536743164e-01, /* logih[66] */ 
+    9.99309522150144532067602885659542180850459285940861e-18, /* logim[66] */ 
+    -4.39495185580213541392726686857289780092191688844937e-34, /* logil[66] */ 
+  } , 
+  { 
+    7.92570114135742187500000000000000000000000000000000e-01,   /* r[67] */ 
+    2.32474305048552654096027936247992329299449920654297e-01, /* logih[67] */ 
+    1.04347973999915730650942527525177991072062294027967e-17, /* logim[67] */ 
+    -1.80285268643432323262428865765338414917111027539735e-34, /* logil[67] */ 
+  } , 
+  { 
+    7.90122985839843750000000000000000000000000000000000e-01,   /* r[68] */ 
+    2.35566667359392301062115393506246618926525115966797e-01, /* logih[68] */ 
+    -2.32375103902642573879242169796960376755737712824341e-18, /* logim[68] */ 
+    -7.21655842491838760103086913983188439028934238517299e-35, /* logil[68] */ 
+  } , 
+  { 
+    7.87692070007324218750000000000000000000000000000000e-01,   /* r[69] */ 
+    2.38648039598734706956406625977251678705215454101562e-01, /* logih[69] */ 
+    4.46784339552128548812794219055404768324811281554067e-18, /* logim[69] */ 
+    3.43429150836221389256015518963937864776602443392546e-34, /* logil[69] */ 
+  } , 
+  { 
+    7.85276412963867187500000000000000000000000000000000e-01,   /* r[70] */ 
+    2.41719504753563907417657219411921687424182891845703e-01, /* logih[70] */ 
+    8.87409122027180881908249517818731600449617581699438e-18, /* logim[70] */ 
+    3.56004039882748459631384958577457237860217830111311e-34, /* logil[70] */ 
+  } , 
+  { 
+    7.82875061035156250000000000000000000000000000000000e-01,   /* r[71] */ 
+    2.44782160173725865659477562985557597130537033081055e-01, /* logih[71] */ 
+    7.08526813357121959967478591264305016478056070347997e-19, /* logim[71] */ 
+    -2.15778795199788554090353514030659386443684641384067e-35, /* logil[71] */ 
+  } , 
+  { 
+    7.80488014221191406250000000000000000000000000000000e-01,   /* r[72] */ 
+    2.47835895683715751180997699520958121865987777709961e-01, /* logih[72] */ 
+    -1.24386417338518064252295447791954905943026800534449e-17, /* logim[72] */ 
+    -7.44029524146381752722089691180123292021312364800709e-34, /* logil[72] */ 
+  } , 
+  { 
+    7.78115272521972656250000000000000000000000000000000e-01,   /* r[73] */ 
+    2.50880600583786306234657104141660965979099273681641e-01, /* logih[73] */ 
+    -5.50964893191169223547312201897322976952633356221949e-18, /* logim[73] */ 
+    1.08676143776419160887508248412493151436373152102143e-34, /* logil[73] */ 
+  } , 
+  { 
+    7.75757789611816406250000000000000000000000000000000e-01,   /* r[74] */ 
+    2.53914934309519335631222247684490866959095001220703e-01, /* logih[74] */ 
+    1.97004950260539049796252522941686709480407437591843e-17, /* logim[74] */ 
+    -4.67670757123999808225422970015919189294430827275674e-34, /* logil[74] */ 
+  } , 
+  { 
+    7.73413658142089843750000000000000000000000000000000e-01,   /* r[75] */ 
+    2.56941240096642986578956424636999145150184631347656e-01, /* logih[75] */ 
+    1.32566282149745092578207739537715284043427717085946e-17, /* logim[75] */ 
+    4.53175814618419018222032309863239909606680701492128e-34, /* logil[75] */ 
+  } , 
+  { 
+    7.71084785461425781250000000000000000000000000000000e-01,   /* r[76] */ 
+    2.59956943291808351137461841062759049236774444580078e-01, /* logih[76] */ 
+    2.06326460492966557658914107366598455972739008175724e-17, /* logim[76] */ 
+    -7.60856026131926782522027611178961885575241901312259e-34, /* logil[76] */ 
+  } , 
+  { 
+    7.68768310546875000000000000000000000000000000000000e-01,   /* r[77] */ 
+    2.62965641547506734365668989994446747004985809326172e-01, /* logih[77] */ 
+    7.11583631875541699557981308503843876478401404595290e-18, /* logim[77] */ 
+    -3.16162183522749672668805346311289437550800994700732e-34, /* logil[77] */ 
+  } , 
+  { 
+    7.66467094421386718750000000000000000000000000000000e-01,   /* r[78] */ 
+    2.65963511244235673025571031757863238453865051269531e-01, /* logih[78] */ 
+    -2.24162125724264292804912034054420308588570407662844e-17, /* logim[78] */ 
+    4.90471140265143981765909599584287898945638617268867e-34, /* logil[78] */ 
+  } , 
+  { 
+    7.64179229736328125000000000000000000000000000000000e-01,   /* r[79] */ 
+    2.68952923432744239740088687540264800190925598144531e-01, /* logih[79] */ 
+    2.05657969150984247532516778784947182213125204986197e-17, /* logim[79] */ 
+    8.79232077986017876500084195761038723390008355613575e-34, /* logil[79] */ 
+  } , 
+  { 
+    7.61904716491699218750000000000000000000000000000000e-01,   /* r[80] */ 
+    2.71933775088288309795814257086021825671195983886719e-01, /* logih[80] */ 
+    7.83390223779535346513505580003968001040971161798700e-19, /* logim[80] */ 
+    -3.02585215101390470982866376614279464778757620082138e-35, /* logil[80] */ 
+  } , 
+  { 
+    7.59643554687500000000000000000000000000000000000000e-01,   /* r[81] */ 
+    2.74905962710071116728016704655601643025875091552734e-01, /* logih[81] */ 
+    2.24378545796980422658699919057279901542517325778057e-17, /* logim[81] */ 
+    -3.78062443833687207202366076315857540989955154523774e-34, /* logil[81] */ 
+  } , 
+  { 
+    7.57396697998046875000000000000000000000000000000000e-01,   /* r[82] */ 
+    2.77868123177963777248322685409220866858959197998047e-01, /* logih[82] */ 
+    -9.27762050905122039629311187603838349834122732550062e-19, /* logim[82] */ 
+    9.57930007453583023320781825922648925161484087998588e-35, /* logil[82] */ 
+  } , 
+  { 
+    7.55162239074707031250000000000000000000000000000000e-01,   /* r[83] */ 
+    2.80822666626178107929234784023719839751720428466797e-01, /* logih[83] */ 
+    -1.78889070415104263420345604636729594822616937899043e-17, /* logim[83] */ 
+    -8.11660316854587609717942096562096327563941648142083e-34, /* logil[83] */ 
+  } , 
+  { 
+    7.52941131591796875000000000000000000000000000000000e-01,   /* r[84] */ 
+    2.83768232735291170421021433867281302809715270996094e-01, /* logih[84] */ 
+    -2.03265852251844689554711830689719609838328388091381e-17, /* logim[84] */ 
+    3.99265876662456660849597520210659365811534845502505e-34, /* logil[84] */ 
+  } , 
+  { 
+    7.50733375549316406250000000000000000000000000000000e-01,   /* r[85] */ 
+    2.86704716154329075639140000930638052523136138916016e-01, /* logih[85] */ 
+    3.24928817686474637809609763405716794874549598154899e-18, /* logim[85] */ 
+    7.05436161547905729808903355104769078626665732260995e-35, /* logil[85] */ 
+  } , 
+  { 
+    7.48538017272949218750000000000000000000000000000000e-01,   /* r[86] */ 
+    2.89633285132462114930262941925320774316787719726562e-01, /* logih[86] */ 
+    -7.21962253363417273270454867455071277489833577725373e-18, /* logim[86] */ 
+    -2.16150227221931053192432009592422674631830770048369e-34, /* logil[86] */ 
+  } , 
+  { 
+    7.46356010437011718750000000000000000000000000000000e-01,   /* r[87] */ 
+    2.92552566827507520841322730120737105607986450195312e-01, /* logih[87] */ 
+    -1.44160166726851833613115205797213493080706067439112e-17, /* logim[87] */ 
+    1.50883511667334677559761930721175960406498771143078e-33, /* logil[87] */ 
+  } , 
+  { 
+    7.44186401367187500000000000000000000000000000000000e-01,   /* r[88] */ 
+    2.95463736056791381745512126144603826105594635009766e-01, /* logih[88] */ 
+    -2.16822486635513901824879610162201037763987226540717e-17, /* logim[88] */ 
+    -1.40892440842074578649628629534891601913263524738738e-33, /* logil[88] */ 
+  } , 
+  { 
+    7.42029190063476562500000000000000000000000000000000e-01,   /* r[89] */ 
+    2.98366696880353166054788971450761891901493072509766e-01, /* logih[89] */ 
+    2.66045054346745240447394933749591251388042727860864e-17, /* logim[89] */ 
+    -3.07182222949536546434743015167904826317676758257458e-34, /* logil[89] */ 
+  } , 
+  { 
+    7.39884376525878906250000000000000000000000000000000e-01,   /* r[90] */ 
+    3.01261352929903802877475982313626445829868316650391e-01, /* logih[90] */ 
+    1.87070681938931680167624656750430985298856099421569e-17, /* logim[90] */ 
+    1.51413799416501325421897094776870076323182009328971e-33, /* logil[90] */ 
+  } , 
+  { 
+    7.37751960754394531250000000000000000000000000000000e-01,   /* r[91] */ 
+    3.04147607413525478126103962495108135044574737548828e-01, /* logih[91] */ 
+    3.98176030022005428666814320744852118370551740170454e-18, /* logim[91] */ 
+    3.59055661804361869634622461801260435821255127014094e-34, /* logil[91] */ 
+  } , 
+  { 
+    7.35631942749023437500000000000000000000000000000000e-01,   /* r[92] */ 
+    3.07025363120511873837870098213898018002510070800781e-01, /* logih[92] */ 
+    -1.23081724383312479171164681702153119269476305242331e-17, /* logim[92] */ 
+    -6.24921351181214466368980458020870680109978000216335e-34, /* logil[92] */ 
+  } , 
+  { 
+    7.33524322509765625000000000000000000000000000000000e-01,   /* r[93] */ 
+    3.09894522426349294796921185479732230305671691894531e-01, /* logih[93] */ 
+    -2.61915759435025688106872344425103515717035435880289e-17, /* logim[93] */ 
+    4.37310119650947955282720454157502418725525261502025e-34, /* logil[93] */ 
+  } , 
+  { 
+    7.31428146362304687500000000000000000000000000000000e-01,   /* r[94] */ 
+    3.12756291149352327884969326987629756331443786621094e-01, /* logih[94] */ 
+    -1.44526601334660927537554677783431908198308471431891e-17, /* logim[94] */ 
+    -3.16489425801456252779886240767137743149201554486977e-34, /* logil[94] */ 
+  } , 
+  { 
+    7.29344367980957031250000000000000000000000000000000e-01,   /* r[95] */ 
+    3.15609274450035781622858621631166897714138031005859e-01, /* logih[95] */ 
+    -9.15211307104414041770693082901206817295591874336170e-18, /* logim[95] */ 
+    6.92571319717017620584068946677928779786499453239802e-34, /* logil[95] */ 
+  } , 
+  { 
+    7.27272987365722656250000000000000000000000000000000e-01,   /* r[96] */ 
+    3.18453373490729885197936255281092599034309387207031e-01, /* logih[96] */ 
+    2.70995327783651104083044967572356846238550856314185e-17, /* logim[96] */ 
+    1.34600088520445299315193549306530996100489980654781e-33, /* logil[96] */ 
+  } , 
+  { 
+    7.25212097167968750000000000000000000000000000000000e-01,   /* r[97] */ 
+    3.21291119093343235935122947921627201139926910400391e-01, /* logih[97] */ 
+    -1.12319519421036650171892375714176815116984091579206e-17, /* logim[97] */ 
+    1.04447652287031956508644916042846488744189014580391e-34, /* logil[97] */ 
+  } , 
+  { 
+    7.23163604736328125000000000000000000000000000000000e-01,   /* r[98] */ 
+    3.24119796479811983491714499905356205999851226806641e-01, /* logih[98] */ 
+    -7.94647062012309773892598593677083791992627350537440e-18, /* logim[98] */ 
+    4.59384159170382657706167409359736689725722940359763e-34, /* logil[98] */ 
+  } , 
+  { 
+    7.21126556396484375000000000000000000000000000000000e-01,   /* r[99] */ 
+    3.26940628117956100240348860097583383321762084960938e-01, /* logih[99] */ 
+    -1.74837694038376657608222314076357694142138010418063e-17, /* logim[99] */ 
+    -1.40581148273538852383687808274899460858762058571376e-34, /* logil[99] */ 
+  } , 
+  { 
+    7.19100952148437500000000000000000000000000000000000e-01,   /* r[100] */ 
+    3.29753524791075502964332599731278605759143829345703e-01, /* logih[100] */ 
+    2.12653812605676265381615743640534834022512048496019e-18, /* logim[100] */ 
+    5.25095014117827902230536920855568345417341287940175e-35, /* logil[100] */ 
+  } , 
+  { 
+    7.17086791992187500000000000000000000000000000000000e-01,   /* r[101] */ 
+    3.32558396904723163611805603068205527961254119873047e-01, /* logih[101] */ 
+    -1.04519949901622285684034183132329427334699936682984e-17, /* logim[101] */ 
+    4.45654546722256244026954176794662799321355430560371e-34, /* logil[101] */ 
+  } , 
+  { 
+    7.15084075927734375000000000000000000000000000000000e-01,   /* r[102] */ 
+    3.35355154491021822948937369801569730043411254882812e-01, /* logih[102] */ 
+    1.83262596742990833823701524552706571217123614816200e-17, /* logim[102] */ 
+    -1.29569615760463452723681409704842983753419687255982e-33, /* logil[102] */ 
+  } , 
+  { 
+    7.13091850280761718750000000000000000000000000000000e-01,   /* r[103] */ 
+    3.38145044591559529312263521205750294029712677001953e-01, /* logih[103] */ 
+    -1.46763527756214729603846930349999949900828274067634e-17, /* logim[103] */ 
+    3.85996984621058858499977696727737728999708408076829e-34, /* logil[103] */ 
+  } , 
+  { 
+    7.11111068725585937500000000000000000000000000000000e-01,   /* r[104] */ 
+    3.40926646575239744585417156486073508858680725097656e-01, /* logih[104] */ 
+    1.74672070296268393919501631375949801326271042364782e-17, /* logim[104] */ 
+    1.28757784323920807504216254145051967795248381758825e-33, /* logil[104] */ 
+  } , 
+  { 
+    7.09141731262207031250000000000000000000000000000000e-01,   /* r[105] */ 
+    3.43699869378304490030728857163921929895877838134766e-01, /* logih[105] */ 
+    -5.19524092664710997838651465181771916951448804942375e-18, /* logim[105] */ 
+    2.01852276300632912138205204757451068299686003381730e-34, /* logil[105] */ 
+  } , 
+  { 
+    1.41436386108398437500000000000000000000000000000000e+00,   /* r[106] */ 
+    -3.46679861870620553698785215601674281060695648193359e-01, /* logih[106] */ 
+    -1.28487666876426526117753107153366705047319625953434e-17, /* logim[106] */ 
+    1.35559275452957780052106182147355087625385646501787e-37, /* logil[106] */ 
+  } , 
+  { 
+    1.41046905517578125000000000000000000000000000000000e+00,   /* r[107] */ 
+    -3.43922312315162792550893300358438864350318908691406e-01, /* logih[107] */ 
+    4.92019729190951095471164720202037831908390366509329e-18, /* logim[107] */ 
+    3.82551714632527355673617639808721263761194697351796e-34, /* logil[107] */ 
+  } , 
+  { 
+    1.40659332275390625000000000000000000000000000000000e+00,   /* r[108] */ 
+    -3.41170697798120592381110327551141381263732910156250e-01, /* logih[108] */ 
+    1.93668606486849623510457675345565515553170548397263e-17, /* logim[108] */ 
+    -6.31924577586791945681481090971933602378723267089765e-34, /* logil[108] */ 
+  } , 
+  { 
+    1.40274047851562500000000000000000000000000000000000e+00,   /* r[109] */ 
+    -3.38427807898675381270692241741926409304141998291016e-01, /* logih[109] */ 
+    6.54538052872786451417312049621269831217791334849587e-18, /* logim[109] */ 
+    -1.38134173915396180632358800838166951094785757798298e-34, /* logil[109] */ 
+  } , 
+  { 
+    1.39890670776367187500000000000000000000000000000000e+00,   /* r[110] */ 
+    -3.35691008516038780218337933547445572912693023681641e-01, /* logih[110] */ 
+    7.19133786441628176722646778964275817014488601387322e-18, /* logim[110] */ 
+    2.28260205775013127550656696784879220819429866829588e-36, /* logil[110] */ 
+  } , 
+  { 
+    1.39509582519531250000000000000000000000000000000000e+00,   /* r[111] */ 
+    -3.32963104810430066127224790761829353868961334228516e-01, /* logih[111] */ 
+    2.31257782383773679965596591934497042170211009414751e-17, /* logim[111] */ 
+    -8.99899918826696456699888760884182179403739540341569e-34, /* logil[111] */ 
+  } , 
+  { 
+    1.39130401611328125000000000000000000000000000000000e+00,   /* r[112] */ 
+    -3.30241448451969343835799008957110345363616943359375e-01, /* logih[112] */ 
+    1.08328391473436749190918194684471671377932692613855e-17, /* logim[112] */ 
+    2.05469820214513767177005852735365876929387324182847e-34, /* logil[112] */ 
+  } , 
+  { 
+    1.38753318786621093750000000000000000000000000000000e+00,   /* r[113] */ 
+    -3.27527485535248186199197562018525786697864532470703e-01, /* logih[113] */ 
+    2.56707416856969394221064681139222300535027158809986e-17, /* logim[113] */ 
+    2.48018075170015936943477306695127673525907564478115e-34, /* logil[113] */ 
+  } , 
+  { 
+    1.38378334045410156250000000000000000000000000000000e+00,   /* r[114] */ 
+    -3.24821299026220644545759341781376861035823822021484e-01, /* logih[114] */ 
+    -2.40283588419711964440744928607170649222918319264531e-17, /* logim[114] */ 
+    1.40448044142609986920740213180800276002578003774456e-33, /* logil[114] */ 
+  } , 
+  { 
+    1.38005447387695312500000000000000000000000000000000e+00,   /* r[115] */ 
+    -3.22122972213921499040623075416078791022300720214844e-01, /* logih[115] */ 
+    -1.66818907547914379914312063731519121720479863896485e-17, /* logim[115] */ 
+    -8.55009499177937534961617974327717063975398325813083e-34, /* logil[115] */ 
+  } , 
+  { 
+    1.37634468078613281250000000000000000000000000000000e+00,   /* r[116] */ 
+    -3.19431202899942479067618705812492407858371734619141e-01, /* logih[116] */ 
+    -1.38115565915964367886690142912485000070964727867745e-18, /* logim[116] */ 
+    -1.22984664179014233019202567735778158211873499167925e-35, /* logil[116] */ 
+  } , 
+  { 
+    1.37265396118164062500000000000000000000000000000000e+00,   /* r[117] */ 
+    -3.16746063834650870560949442733544856309890747070312e-01, /* logih[117] */ 
+    -1.15419278228466239427477637425076471306644591952148e-17, /* logim[117] */ 
+    3.41592451858080777739018945315482424309486529068749e-34, /* logil[117] */ 
+  } , 
+  { 
+    1.36898422241210937500000000000000000000000000000000e+00,   /* r[118] */ 
+    -3.14069021340052600965719875603099353611469268798828e-01, /* logih[118] */ 
+    -7.31349707246752102101544908905981332227259572261770e-18, /* logim[118] */ 
+    -3.93910979025310412654744290737242169075928226381889e-34, /* logil[118] */ 
+  } , 
+  { 
+    1.36533355712890625000000000000000000000000000000000e+00,   /* r[119] */ 
+    -3.11398762981856647158451778523158282041549682617188e-01, /* logih[119] */ 
+    -2.10262028332851499303996266991953733885100475347425e-17, /* logim[119] */ 
+    3.10172118073247334983412381313166324533523917848591e-34, /* logil[119] */ 
+  } , 
+  { 
+    1.36170196533203125000000000000000000000000000000000e+00,   /* r[120] */ 
+    -3.08735362440316629673020543123129755258560180664062e-01, /* logih[120] */ 
+    1.61997507738300932313233656106715605269821143050038e-17, /* logim[120] */ 
+    -4.94737397643073988821957091336118905427415985059196e-34, /* logil[120] */ 
+  } , 
+  { 
+    1.35808944702148437500000000000000000000000000000000e+00,   /* r[121] */ 
+    -3.06078893698965515124399416890810243785381317138672e-01, /* logih[121] */ 
+    -2.14383901488893084851347644248966504652364110743417e-17, /* logim[121] */ 
+    -1.04285659471621119336484757092986113762774232464117e-34, /* logil[121] */ 
+  } , 
+  { 
+    1.35449790954589843750000000000000000000000000000000e+00,   /* r[122] */ 
+    -3.03430839201768942636761039466364309191703796386719e-01, /* logih[122] */ 
+    -2.36272540975444581798067226838922324791286981755800e-17, /* logim[122] */ 
+    7.63193414263891924102062717951976678650366075861562e-34, /* logil[122] */ 
+  } , 
+  { 
+    1.35092353820800781250000000000000000000000000000000e+00,   /* r[123] */ 
+    -3.00788460935273893603891792736249044537544250488281e-01, /* logih[123] */ 
+    1.31911240315125569456750230823426654574574756805059e-17, /* logim[123] */ 
+    6.09798153293836260383095031169419558002984888039367e-34, /* logil[123] */ 
+  } , 
+  { 
+    1.34736824035644531250000000000000000000000000000000e+00,   /* r[124] */ 
+    -2.98153238208616611082391045783879235386848449707031e-01, /* logih[124] */ 
+    1.72077626940949324831538094445960560173054776887669e-17, /* logim[124] */ 
+    1.50419727472329867273356373006418522570851500586450e-33, /* logil[124] */ 
+  } , 
+  { 
+    1.34383201599121093750000000000000000000000000000000e+00,   /* r[125] */ 
+    -2.95525246187516521523264145798748359084129333496094e-01, /* logih[125] */ 
+    6.61166908095413536634982853435304018965741335429843e-18, /* logim[125] */ 
+    -1.66439777489787908751728074566359602553422366675323e-34, /* logil[125] */ 
+  } , 
+  { 
+    1.34031486511230468750000000000000000000000000000000e+00,   /* r[126] */ 
+    -2.92904560325168261680772729960153810679912567138672e-01, /* logih[126] */ 
+    -6.83776292620451776752481870270640194860145197512462e-18, /* logim[126] */ 
+    1.55562105120034357822530615049801316732267321042243e-34, /* logil[126] */ 
+  } , 
+  { 
+    1.33681488037109375000000000000000000000000000000000e+00,   /* r[127] */ 
+    -2.90289829573938562568002907937625423073768615722656e-01, /* logih[127] */ 
+    1.05531301797230420241902730814804872346105655886287e-17, /* logim[127] */ 
+    4.79041533288401481752223531420283794797478252934091e-34, /* logil[127] */ 
+  } , 
+  { 
+    1.33333396911621093750000000000000000000000000000000e+00,   /* r[128] */ 
+    -2.87682549288825417654891225538449361920356750488281e-01, /* logih[128] */ 
+    -2.61077462239171302791459888459712394960284043875709e-17, /* logim[128] */ 
+    2.49074425570525367279357114033805399391008799131216e-34, /* logil[128] */ 
+  } , 
+  { 
+    1.32987022399902343750000000000000000000000000000000e+00,   /* r[129] */ 
+    -2.85081361532236732259093514585401862859725952148438e-01, /* logih[129] */ 
+    5.43627399844908067645917310959280553768099267155506e-18, /* logim[129] */ 
+    -1.40940968647840734289903124482303996508342832614184e-34, /* logil[129] */ 
+  } , 
+  { 
+    1.32642555236816406250000000000000000000000000000000e+00,   /* r[130] */ 
+    -2.82487769664605981034810611163266003131866455078125e-01, /* logih[130] */ 
+    1.40579607152920466183148026056253132184915242828454e-17, /* logim[130] */ 
+    8.55245308058326661171909652892008079386885810342353e-35, /* logil[130] */ 
+  } , 
+  { 
+    1.32299804687500000000000000000000000000000000000000e+00,   /* r[131] */ 
+    -2.79900408846770476500864788249600678682327270507812e-01, /* logih[131] */ 
+    -1.83143097611448426823122105710887862843742634907885e-17, /* logim[131] */ 
+    7.32680743617844937675707357797053020869120027100328e-34, /* logil[131] */ 
+  } , 
+  { 
+    1.31958770751953125000000000000000000000000000000000e+00,   /* r[132] */ 
+    -2.77319345020877350282972884087939746677875518798828e-01, /* logih[132] */ 
+    7.44521346975934828880026635948320543669274837358637e-18, /* logim[132] */ 
+    -5.41922476182319969711469733445405189836277342215443e-34, /* logil[132] */ 
+  } , 
+  { 
+    1.31619453430175781250000000000000000000000000000000e+00,   /* r[133] */ 
+    -2.74744644396217541082449997702497057616710662841797e-01, /* logih[133] */ 
+    -1.35539016985663678510001485327198622349128587937948e-17, /* logim[133] */ 
+    -2.47605212552478755864671758320404239244847510600429e-34, /* logil[133] */ 
+  } , 
+  { 
+    1.31282043457031250000000000000000000000000000000000e+00,   /* r[134] */ 
+    -2.72177826311169102080356196893262676894664764404297e-01, /* logih[134] */ 
+    -1.94604737767255604321061638736698666324990178271015e-17, /* logim[134] */ 
+    4.93318792723831633917605655356651628446409622108869e-34, /* logil[134] */ 
+  } , 
+  { 
+    1.30946350097656250000000000000000000000000000000000e+00,   /* r[135] */ 
+    -2.69617512088877908649209302893723361194133758544922e-01, /* logih[135] */ 
+    -4.36842068525796679795304490876810534098425489515634e-19, /* logim[135] */ 
+    -2.59640519936698818691794834943491001573704557192093e-35, /* logil[135] */ 
+  } , 
+  { 
+    1.30612182617187500000000000000000000000000000000000e+00,   /* r[136] */ 
+    -2.67062308411773363658880953153129667043685913085938e-01, /* logih[136] */ 
+    7.36505541266105414954508218919326623562242166589177e-18, /* logim[136] */ 
+    4.30859840846165501987206211849479522591226050316009e-34, /* logil[136] */ 
+  } , 
+  { 
+    1.30279922485351562500000000000000000000000000000000e+00,   /* r[137] */ 
+    -2.64515199434744108231143400189466774463653564453125e-01, /* logih[137] */ 
+    -1.68423739176487233694295158507739753610875825604997e-17, /* logim[137] */ 
+    -2.52387133235317228793067248082680461143877917377527e-34, /* logil[137] */ 
+  } , 
+  { 
+    1.29949188232421875000000000000000000000000000000000e+00,   /* r[138] */ 
+    -2.61973328311307873672575396994943730533123016357422e-01, /* logih[138] */ 
+    -3.75057237736452977469227410853090805509462799202680e-18, /* logim[138] */ 
+    -2.50001621249400187276643559364982462572917581991553e-34, /* logil[138] */ 
+  } , 
+  { 
+    1.29620170593261718750000000000000000000000000000000e+00,   /* r[139] */ 
+    -2.59438223113541976960760848669451661407947540283203e-01, /* logih[139] */ 
+    -1.75050620652398740735421575793594666738296743072718e-18, /* logim[139] */ 
+    -1.76879556289338598533013427354560697647411264656770e-34, /* logil[139] */ 
+  } , 
+  { 
+    1.29292869567871093750000000000000000000000000000000e+00,   /* r[140] */ 
+    -2.56909951848923512329747609328478574752807617187500e-01, /* logih[140] */ 
+    -2.49955762333036735703890989320152300242733956262258e-17, /* logim[140] */ 
+    6.46984311731974220303858069024859972656679564537485e-34, /* logil[140] */ 
+  } , 
+  { 
+    1.28967285156250000000000000000000000000000000000000e+00,   /* r[141] */ 
+    -2.54388582770868065807690072688274085521697998046875e-01, /* logih[141] */ 
+    1.42784459055047481334238305742929320333571952363668e-17, /* logim[141] */ 
+    1.44560161052022205741731365640574141772476641472904e-33, /* logil[141] */ 
+  } , 
+  { 
+    1.28643226623535156250000000000000000000000000000000e+00,   /* r[142] */ 
+    -2.51872701711453261808060233306605368852615356445312e-01, /* logih[142] */ 
+    -2.58573188266130078596915247890597291360969537163785e-17, /* logim[142] */ 
+    3.36064630885731507350249551263037246653963144676932e-34, /* logil[142] */ 
+  } , 
+  { 
+    1.28320884704589843750000000000000000000000000000000e+00,   /* r[143] */ 
+    -2.49363852624658294265813651691132690757513046264648e-01, /* logih[143] */ 
+    6.17564000922762053278709883095158100872225794241962e-18, /* logim[143] */ 
+    -3.59696250405991778286139521640842821567504780771091e-34, /* logil[143] */ 
+  } , 
+  { 
+    1.28000068664550781250000000000000000000000000000000e+00,   /* r[144] */ 
+    -2.46860614373184877878841803067189175635576248168945e-01, /* logih[144] */ 
+    -1.36688909483265210237069537981338704526084198528804e-17, /* logim[144] */ 
+    -4.92999816324333714793093560012211883282871708512667e-34, /* logil[144] */ 
+  } , 
+  { 
+    1.27680778503417968750000000000000000000000000000000e+00,   /* r[145] */ 
+    -2.44363044996024708632731403668003622442483901977539e-01, /* logih[145] */ 
+    1.09486381393098425629951474169192910961933895685875e-17, /* logim[145] */ 
+    1.13614657049426843838447103108579796261058240882279e-34, /* logil[145] */ 
+  } , 
+  { 
+    1.27363204956054687500000000000000000000000000000000e+00,   /* r[146] */ 
+    -2.41872700333246426485089841662556864321231842041016e-01, /* logih[146] */ 
+    3.58546134799758558220376210039678485387885916926961e-18, /* logim[146] */ 
+    -2.20085959592144414214775971267831972426029128230714e-34, /* logil[146] */ 
+  } , 
+  { 
+    1.27047157287597656250000000000000000000000000000000e+00,   /* r[147] */ 
+    -2.39388148774497988569009976345114409923553466796875e-01, /* logih[147] */ 
+    -8.15278529428586557427891691038658199587387144643622e-18, /* logim[147] */ 
+    -4.48801512822497796294159745847501737318770920712608e-34, /* logil[147] */ 
+  } , 
+  { 
+    1.26732635498046875000000000000000000000000000000000e+00,   /* r[148] */ 
+    -2.36909449055089427194076279192813672125339508056641e-01, /* logih[148] */ 
+    -1.95941703600043116666763494344574061919652321991003e-18, /* logim[148] */ 
+    -7.12890529228103914163560488030577203415481759502335e-36, /* logil[148] */ 
+  } , 
+  { 
+    1.26419830322265625000000000000000000000000000000000e+00,   /* r[149] */ 
+    -2.34438168880390956916315303715236950665712356567383e-01, /* logih[149] */ 
+    -6.99651372151112997059366610960978925151468620541361e-18, /* logim[149] */ 
+    2.72198075748279584311862548086147097324308430232999e-34, /* logil[149] */ 
+  } , 
+  { 
+    1.26108360290527343750000000000000000000000000000000e+00,   /* r[150] */ 
+    -2.31971353679059938412976293875544797629117965698242e-01, /* logih[150] */ 
+    -5.77385522134567574535417063256881508583112235194305e-18, /* logim[150] */ 
+    3.79366854190657220850283401392416116381504642214271e-34, /* logil[150] */ 
+  } , 
+  { 
+    1.25798606872558593750000000000000000000000000000000e+00,   /* r[151] */ 
+    -2.29512084071926747430580917352926917374134063720703e-01, /* logih[151] */ 
+    -8.73917888836756753861059666333090512067547544675485e-18, /* logim[151] */ 
+    -5.69482104001851921922283043288492925754991621288172e-34, /* logil[151] */ 
+  } , 
+  { 
+    1.25490188598632812500000000000000000000000000000000e+00,   /* r[152] */ 
+    -2.27057391030699523559732710964453872293233871459961e-01, /* logih[152] */ 
+    -9.55134517665639461592830714479938653876650013848813e-18, /* logim[152] */ 
+    -7.00052160915705629865262646818211330004502638341784e-34, /* logil[152] */ 
+  } , 
+  { 
+    1.25183296203613281250000000000000000000000000000000e+00,   /* r[153] */ 
+    -2.24608846873032674817949327916721813380718231201172e-01, /* logih[153] */ 
+    -2.19162128124331068197096372804387663813879070153910e-18, /* logim[153] */ 
+    8.00496321203755877183709886194177284253312594316861e-35, /* logil[153] */ 
+  } , 
+  { 
+    1.24878120422363281250000000000000000000000000000000e+00,   /* r[154] */ 
+    -2.22168039035695707994477743341121822595596313476562e-01, /* logih[154] */ 
+    1.07342637360833029593335438601345228992436813797418e-17, /* logim[154] */ 
+    -7.67553083967135214121581596311206028889095496603001e-34, /* logil[154] */ 
+  } , 
+  { 
+    1.24574279785156250000000000000000000000000000000000e+00,   /* r[155] */ 
+    -2.19731976787238214576802874944405630230903625488281e-01, /* logih[155] */ 
+    -1.35345511944004269567659266993040497754817745842460e-17, /* logim[155] */ 
+    -7.06055747414660075242875132218211703222886262645151e-34, /* logil[155] */ 
+  } , 
+  { 
+    1.24271774291992187500000000000000000000000000000000e+00,   /* r[156] */ 
+    -2.17300709445695711119483917173056397587060928344727e-01, /* logih[156] */ 
+    -1.55632648024565809587441742115549412481509415401206e-18, /* logim[156] */ 
+    -2.73645872916697873734554009814155050548437865470935e-35, /* logil[156] */ 
+  } , 
+  { 
+    1.23970985412597656250000000000000000000000000000000e+00,   /* r[157] */ 
+    -2.14877363629256634691699900940875522792339324951172e-01, /* logih[157] */ 
+    5.51412653363101081432833599630524903528204879298177e-18, /* logim[157] */ 
+    1.93479402223180105608082323440368830737884048556178e-34, /* logil[157] */ 
+  } , 
+  { 
+    1.23671531677246093750000000000000000000000000000000e+00,   /* r[158] */ 
+    -2.12458926885637500170389557752059772610664367675781e-01, /* logih[158] */ 
+    9.62416986757368333294762208707250932658825738879454e-18, /* logim[158] */ 
+    1.34243694982089823913061491133601163572475339258708e-34, /* logil[158] */ 
+  } , 
+  { 
+    1.23373413085937500000000000000000000000000000000000e+00,   /* r[159] */ 
+    -2.10045449157502006620745760301360860466957092285156e-01, /* logih[159] */ 
+    -1.14897192287332807026526402359503839328475948011071e-17, /* logim[159] */ 
+    3.22998731854659925401919707956820087718358954278512e-34, /* logil[159] */ 
+  } , 
+  { 
+    1.23077011108398437500000000000000000000000000000000e+00,   /* r[160] */ 
+    -2.07640080033725998864824191514344420284032821655273e-01, /* logih[160] */ 
+    -1.21752158956595077938199084785214052668704102263663e-17, /* logim[160] */ 
+    3.85113498704488412720849922642321502513839838743598e-34, /* logil[160] */ 
+  } , 
+  { 
+    1.22781753540039062500000000000000000000000000000000e+00,   /* r[161] */ 
+    -2.05238231877337917730130811833078041672706604003906e-01, /* logih[161] */ 
+    -6.49170319816279074800980031896509389281475760737419e-18, /* logim[161] */ 
+    7.54230794214336863035202362512077511130553782508548e-35, /* logil[161] */ 
+  } , 
+  { 
+    1.22488021850585937500000000000000000000000000000000e+00,   /* r[162] */ 
+    -2.02843058404291731733337655896320939064025878906250e-01, /* logih[162] */ 
+    -2.09733857251185914090082750810867355591642377167668e-18, /* logim[162] */ 
+    -7.58503055294887496788011335562125472007511746053015e-35, /* logil[162] */ 
+  } , 
+  { 
+    1.22195625305175781250000000000000000000000000000000e+00,   /* r[163] */ 
+    -2.00453060641940739028399320886819623410701751708984e-01, /* logih[163] */ 
+    -6.53774572382445798876000474193661396320697712784592e-18, /* logim[163] */ 
+    3.51772439194901607097398534803672574024027259307605e-34, /* logil[163] */ 
+  } , 
+  { 
+    1.21904754638671875000000000000000000000000000000000e+00,   /* r[164] */ 
+    -1.98069854157447239328959653903439175337553024291992e-01, /* logih[164] */ 
+    -3.74277289637934596837745314540095849706853736054736e-18, /* logim[164] */ 
+    2.20940287174632344749918330821286328950105212564345e-34, /* logil[164] */ 
+  } , 
+  { 
+    1.21615219116210937500000000000000000000000000000000e+00,   /* r[165] */ 
+    -1.95691932918147681874643240007571876049041748046875e-01, /* logih[165] */ 
+    -7.08261236288433014439133183526990067310528978959932e-18, /* logim[165] */ 
+    -1.96435463626369637687474243037286042706661477855383e-34, /* logil[165] */ 
+  } , 
+  { 
+    1.21327018737792968750000000000000000000000000000000e+00,   /* r[166] */ 
+    -1.93319348256398265695210625381150748580694198608398e-01, /* logih[166] */ 
+    -4.63045754803609100012916107813305239709411987466506e-18, /* logim[166] */ 
+    3.81311992624323390610440652445847060246376140730432e-34, /* logil[166] */ 
+  } , 
+  { 
+    1.21040153503417968750000000000000000000000000000000e+00,   /* r[167] */ 
+    -1.90952151695252925200918525661109015345573425292969e-01, /* logih[167] */ 
+    -5.80616769316522716849138580075656569977606755839734e-18, /* logim[167] */ 
+    1.34601476508880492535970189187338024694052031880198e-34, /* logil[167] */ 
+  } , 
+  { 
+    1.20754623413085937500000000000000000000000000000000e+00,   /* r[168] */ 
+    -1.88590394946867745407104166588396765291690826416016e-01, /* logih[168] */ 
+    7.58724192474608110981409818070149841661745061197758e-18, /* logim[168] */ 
+    5.09865531698430288976485112090438508546399086848170e-34, /* logil[168] */ 
+  } , 
+  { 
+    1.20470619201660156250000000000000000000000000000000e+00,   /* r[169] */ 
+    -1.86235713160088522943880207094480283558368682861328e-01, /* logih[169] */ 
+    9.83598941678855625746040824683214800947055255023752e-18, /* logim[169] */ 
+    2.46513729584939313689642856331884108597210035577156e-35, /* logil[169] */ 
+  } , 
+  { 
+    1.20187759399414062500000000000000000000000000000000e+00,   /* r[170] */ 
+    -1.83884995648034593740405284734151791781187057495117e-01, /* logih[170] */ 
+    -6.70852935530959296202331099325187741392981643909817e-18, /* logim[170] */ 
+    3.00844769658087560728352059501736867279973513368500e-34, /* logil[170] */ 
+  } , 
+  { 
+    1.19906234741210937500000000000000000000000000000000e+00,   /* r[171] */ 
+    -1.81539874203132112207015325111569836735725402832031e-01, /* logih[171] */ 
+    9.29803006036969326009349085152256934923841308327213e-18, /* logim[171] */ 
+    -5.87687279777529126455867415463448459437016045941915e-34, /* logil[171] */ 
+  } , 
+  { 
+    1.19626235961914062500000000000000000000000000000000e+00,   /* r[172] */ 
+    -1.79201995701676053407425115437945351004600524902344e-01, /* logih[172] */ 
+    1.07244987411303504039951333305926418667267361291349e-17, /* logim[172] */ 
+    6.96460410267841846987295265759921471979042436315030e-34, /* logil[172] */ 
+  } , 
+  { 
+    1.19347381591796875000000000000000000000000000000000e+00,   /* r[173] */ 
+    -1.76868227651996584581794991208880674093961715698242e-01, /* logih[173] */ 
+    -1.10573571536398568326433843554050954952961171968919e-17, /* logim[173] */ 
+    -7.15366049912217554019889444240641484300247544429326e-34, /* logil[173] */ 
+  } , 
+  { 
+    1.19069862365722656250000000000000000000000000000000e+00,   /* r[174] */ 
+    -1.74540213563705776111945056072727311402559280395508e-01, /* logih[174] */ 
+    1.41441535586615290351432125355737755606926544229499e-18, /* logim[174] */ 
+    -9.09232357027904656212336285800609485022315015052927e-35, /* logil[174] */ 
+  } , 
+  { 
+    1.18793487548828125000000000000000000000000000000000e+00,   /* r[175] */ 
+    -1.72216400825300264276762618464999832212924957275391e-01, /* logih[175] */ 
+    4.70555006507071052711499439464966393443028017169630e-18, /* logim[175] */ 
+    -2.05933939394796488034283377335053411303251320729741e-36, /* logil[175] */ 
+  } , 
+  { 
+    1.18518447875976562500000000000000000000000000000000e+00,   /* r[176] */ 
+    -1.69898440748772083797035747920745052397251129150391e-01, /* logih[176] */ 
+    5.57386986936216704195834036089361797810285720893573e-19, /* logim[176] */ 
+    1.95979458384118524767836145844611746655750937760436e-35, /* logil[176] */ 
+  } , 
+  { 
+    1.18244743347167968750000000000000000000000000000000e+00,   /* r[177] */ 
+    -1.67586386672116810503396777676243800669908523559570e-01, /* logih[177] */ 
+    -2.10518678245997312072852724987229988978414584927966e-18, /* logim[177] */ 
+    1.28828497071302497365120049253927765655050473764692e-34, /* logil[177] */ 
+  } , 
+  { 
+    1.17972373962402343750000000000000000000000000000000e+00,   /* r[178] */ 
+    -1.65280292104758808058306840393925085663795471191406e-01, /* logih[178] */ 
+    6.23517789601925714710479118600106051919949505966744e-19, /* logim[178] */ 
+    -3.18208255979837719298953172591840257465716328738635e-35, /* logil[178] */ 
+  } , 
+  { 
+    1.17701148986816406250000000000000000000000000000000e+00,   /* r[179] */ 
+    -1.62978590225533376267819107852119486778974533081055e-01, /* logih[179] */ 
+    -9.90718539912068708756719628839252162668848272704435e-18, /* logim[179] */ 
+    2.65318297676807803018499365510556573456222990710937e-34, /* logil[179] */ 
+  } , 
+  { 
+    1.17431259155273437500000000000000000000000000000000e+00,   /* r[180] */ 
+    -1.60682947934438519199673578441434074193239212036133e-01, /* logih[180] */ 
+    3.58966483931976449925223154468506323464461604873135e-18, /* logim[180] */ 
+    -2.61108466517449169019772324573366398622685617699208e-35, /* logil[180] */ 
+  } , 
+  { 
+    1.17162513732910156250000000000000000000000000000000e+00,   /* r[181] */ 
+    -1.58391791297011308436992749193450435996055603027344e-01, /* logih[181] */ 
+    1.17290336952422323777350005767652445704229453391095e-17, /* logim[181] */ 
+    -2.09345211610593757799592941150206031045717866622119e-34, /* logil[181] */ 
+  } , 
+  { 
+    1.16894912719726562500000000000000000000000000000000e+00,   /* r[182] */ 
+    -1.56105163319945505762120774306822568178176879882812e-01, /* logih[182] */ 
+    1.28628359267905556190943307276740736661339408993324e-17, /* logim[182] */ 
+    -5.95304689974676498338427563732575867009069071311929e-34, /* logil[182] */ 
+  } , 
+  { 
+    1.16628646850585937500000000000000000000000000000000e+00,   /* r[183] */ 
+    -1.53824742577648665431411245663184672594070434570312e-01, /* logih[183] */ 
+    -1.21520306098644174029034710109981732360242413879415e-18, /* logim[183] */ 
+    -3.46376210577156535712238040881332980606390914922373e-35, /* logil[183] */ 
+  } , 
+  { 
+    1.16363716125488281250000000000000000000000000000000e+00,   /* r[184] */ 
+    -1.51550583580380926473907265972229652106761932373047e-01, /* logih[184] */ 
+    -5.27431191607729841894071463956904781997884546886957e-18, /* logim[184] */ 
+    -2.12312727053942207829403955523840244683485282807904e-34, /* logil[184] */ 
+  } , 
+  { 
+    1.16099739074707031250000000000000000000000000000000e+00,   /* r[185] */ 
+    -1.49279455294684920696468566347903106361627578735352e-01, /* logih[185] */ 
+    1.30791371646357520506414737413216453391959478831327e-17, /* logim[185] */ 
+    7.56862790077388154224564404755685931026804721911961e-34, /* logil[185] */ 
+  } , 
+  { 
+    1.15837097167968750000000000000000000000000000000000e+00,   /* r[186] */ 
+    -1.47014683357163111754317696977523155510425567626953e-01, /* logih[186] */ 
+    4.46701777108311388441189058844554903695616000674812e-18, /* logim[186] */ 
+    -1.53168389834566630100313932781112142055948393405761e-34, /* logil[186] */ 
+  } , 
+  { 
+    1.15575599670410156250000000000000000000000000000000e+00,   /* r[187] */ 
+    -1.44754672455130850572402323450660333037376403808594e-01, /* logih[187] */ 
+    -1.11765997308804560786725769664171557832093187263628e-17, /* logim[187] */ 
+    -2.54391351083201803872348589456916885864191215547753e-34, /* logil[187] */ 
+  } , 
+  { 
+    1.15315246582031250000000000000000000000000000000000e+00,   /* r[188] */ 
+    -1.42499466560657650493482151432544924318790435791016e-01, /* logih[188] */ 
+    9.99697434471805963116106325782098963574947115358262e-18, /* logim[188] */ 
+    -4.16991647873877558887722645601154258382043780560798e-34, /* logil[188] */ 
+  } , 
+  { 
+    1.15056228637695312500000000000000000000000000000000e+00,   /* r[189] */ 
+    -1.40250767556271416225399661925621330738067626953125e-01, /* logih[189] */ 
+    -2.42967383902664590341317347111432842699638485445637e-18, /* logim[189] */ 
+    1.89046895909651011241835667303830696393887263209723e-35, /* logil[189] */ 
+  } , 
+  { 
+    1.14798164367675781250000000000000000000000000000000e+00,   /* r[190] */ 
+    -1.38005307940927829379873514881182927638292312622070e-01, /* logih[190] */ 
+    3.09897250271566693336611278140158537034235759176630e-18, /* logim[190] */ 
+    4.18076944171954954430079149735725094064207802954500e-35, /* logil[190] */ 
+  } , 
+  { 
+    1.14541435241699218750000000000000000000000000000000e+00,   /* r[191] */ 
+    -1.35766451383654063178596516081597656011581420898438e-01, /* logih[191] */ 
+    -1.26737144704388924877419888090078242028004784977676e-17, /* logim[191] */ 
+    -6.55254988981886759240332153938275164053851414525063e-34, /* logil[191] */ 
+  } , 
+  { 
+    1.14285659790039062500000000000000000000000000000000e+00,   /* r[192] */ 
+    -1.33530915787250736848079668561695143580436706542969e-01, /* logih[192] */ 
+    3.70059774900097017560711245248993036856587443848886e-18, /* logim[192] */ 
+    -1.44076022950175208091543146453702789322369025821334e-34, /* logil[192] */ 
+  } , 
+  { 
+    1.14031219482421875000000000000000000000000000000000e+00,   /* r[193] */ 
+    -1.31302080023902228989030049888242501765489578247070e-01, /* logih[193] */ 
+    9.77595259647047985795328829376646744546732643730202e-18, /* logim[193] */ 
+    7.14001485916042767804723486534578453220499721661498e-34, /* logil[193] */ 
+  } , 
+  { 
+    1.13777732849121093750000000000000000000000000000000e+00,   /* r[194] */ 
+    -1.29076647394292753912026228135800920426845550537109e-01, /* logih[194] */ 
+    1.29614980241403171231290027930196525012258765738554e-17, /* logim[194] */ 
+    -5.85566533144206341645149580771754974185386331638589e-34, /* logil[194] */ 
+  } , 
+  { 
+    1.13525581359863281250000000000000000000000000000000e+00,   /* r[195] */ 
+    -1.26858011968173783889923811329936143010854721069336e-01, /* logih[195] */ 
+    -1.69678439390834976532815985483256409225876795508054e-18, /* logim[195] */ 
+    -2.71228529760193445477650881984529057919186509828788e-35, /* logil[195] */ 
+  } , 
+  { 
+    1.13274383544921875000000000000000000000000000000000e+00,   /* r[196] */ 
+    -1.24642862439702989396650423259416129440069198608398e-01, /* logih[196] */ 
+    5.78470166144150337574069781581246057448668006106709e-18, /* logim[196] */ 
+    -1.51194875373975987733573028833303263737665603241701e-34, /* logil[196] */ 
+  } , 
+  { 
+    1.13024330139160156250000000000000000000000000000000e+00,   /* r[197] */ 
+    -1.22432920514188886551565360605309251695871353149414e-01, /* logih[197] */ 
+    -1.49693760153482569091449280029762521944027633466473e-18, /* logim[197] */ 
+    -5.39965434369591591869001705818915138621233644825736e-35, /* logil[197] */ 
+  } , 
+  { 
+    1.12775421142578125000000000000000000000000000000000e+00,   /* r[198] */ 
+    -1.20228231660540529901481932029128074645996093750000e-01, /* logih[198] */ 
+    2.66388161368585650190234204294063114917602653271451e-18, /* logim[198] */ 
+    -4.74069350504018899441229048102955157835045789801575e-35, /* logil[198] */ 
+  } , 
+  { 
+    1.12527465820312500000000000000000000000000000000000e+00,   /* r[199] */ 
+    -1.18027146483910813645756832102051703259348869323730e-01, /* logih[199] */ 
+    -3.60219775645429345296067350839693560520470018134018e-18, /* logim[199] */ 
+    -2.54791949912299670752413217558541051658120178578709e-36, /* logil[199] */ 
+  } , 
+  { 
+    1.12280654907226562500000000000000000000000000000000e+00,   /* r[200] */ 
+    -1.15831398292521231541130077857815194875001907348633e-01, /* logih[200] */ 
+    -4.31427333715618757910709691609269654043220111432066e-18, /* logim[200] */ 
+    -9.92584460384660583856113744874441511647452425237725e-35, /* logil[200] */ 
+  } , 
+  { 
+    1.12034988403320312500000000000000000000000000000000e+00,   /* r[201] */ 
+    -1.13641032979606732000732449705537874251604080200195e-01, /* logih[201] */ 
+    -2.80052852737773106136039129617512559000765084602728e-18, /* logim[201] */ 
+    1.05442382041672403942755754838681010220413395137635e-34, /* logil[201] */ 
+  } , 
+  { 
+    1.11790466308593750000000000000000000000000000000000e+00,   /* r[202] */ 
+    -1.11456096576200411329971018403739435598254203796387e-01, /* logih[202] */ 
+    -5.77990794389030241792168588642671979086900695176190e-18, /* logim[202] */ 
+    -1.69142770089478743453734869721080946466526879559136e-35, /* logil[202] */ 
+  } , 
+  { 
+    1.11546897888183593750000000000000000000000000000000e+00,   /* r[203] */ 
+    -1.09274925343603279692672458622837439179420471191406e-01, /* logih[203] */ 
+    -3.85400236141315267161376748908212877710726873076641e-18, /* logim[203] */ 
+    -2.42661397467022652703862793756433704621690971685882e-34, /* logil[203] */ 
+  } , 
+  { 
+    1.11304283142089843750000000000000000000000000000000e+00,   /* r[204] */ 
+    -1.07097554410911677269524489020113833248615264892578e-01, /* logih[204] */ 
+    1.80247443768247945406811707831640352654515433418144e-18, /* logim[204] */ 
+    -1.85453257375612125088595374639844790140667033156959e-34, /* logil[204] */ 
+  } , 
+  { 
+    1.11062812805175781250000000000000000000000000000000e+00,   /* r[205] */ 
+    -1.04925736401603963976469913177425041794776916503906e-01, /* logih[205] */ 
+    2.91414777009923095944264947235313742597856028896167e-18, /* logim[205] */ 
+    -3.61510340016815217927552346757607780248730263443438e-35, /* logil[205] */ 
+  } , 
+  { 
+    1.10822486877441406250000000000000000000000000000000e+00,   /* r[206] */ 
+    -1.02759517890908286252837910978996660560369491577148e-01, /* logih[206] */ 
+    4.71099321843214355541046112004586746562119362394250e-18, /* logim[206] */ 
+    -1.09517195512805323092039219231698490527876281773580e-34, /* logil[206] */ 
+  } , 
+  { 
+    1.10583114624023437500000000000000000000000000000000e+00,   /* r[207] */ 
+    -1.00597220775924339752904757006035652011632919311523e-01, /* logih[207] */ 
+    -3.42156695637354590153605355608799216036823724345522e-18, /* logim[207] */ 
+    -1.24284989441486949568174045668508613287571207046391e-36, /* logil[207] */ 
+  } , 
+  { 
+    1.10344886779785156250000000000000000000000000000000e+00,   /* r[208] */ 
+    -9.84406092549116179535317883164680097252130508422852e-02, /* logih[208] */ 
+    4.38755240283229348312039895902645159531255023723883e-18, /* logim[208] */ 
+    1.60705777926564974905947594633801050091055265351041e-34, /* logil[208] */ 
+  } , 
+  { 
+    1.10107612609863281250000000000000000000000000000000e+00,   /* r[209] */ 
+    -9.62879980375207500387091386073734611272811889648438e-02, /* logih[209] */ 
+    -3.66395854119785801784314943749236711112635925431669e-18, /* logim[209] */ 
+    1.90682128658230085463599916944170383720123953153313e-34, /* logil[209] */ 
+  } , 
+  { 
+    1.09871292114257812500000000000000000000000000000000e+00,   /* r[210] */ 
+    -9.41394230474431603639118293358478695154190063476562e-02, /* logih[210] */ 
+    -1.52427934389046025790404533372637255540123275063242e-18, /* logim[210] */ 
+    2.38117709862259339359946293808333798071470115227448e-35, /* logil[210] */ 
+  } , 
+  { 
+    1.09635925292968750000000000000000000000000000000000e+00,   /* r[211] */ 
+    -9.19949203356747319260122708328708540648221969604492e-02, /* logih[211] */ 
+    -5.76786325743187763097260207334809269062162873149715e-18, /* logim[211] */ 
+    -1.16076884637403681975821590448659743070392522145404e-34, /* logil[211] */ 
+  } , 
+  { 
+    1.09401702880859375000000000000000000000000000000000e+00,   /* r[212] */ 
+    -8.98562695172144959565585509153606835752725601196289e-02, /* logih[212] */ 
+    6.27446602451052736319026996501069657057280086335290e-19, /* logim[212] */ 
+    -3.52284010127094716016693656249620808330731317587528e-35, /* logil[212] */ 
+  } , 
+  { 
+    1.09168434143066406250000000000000000000000000000000e+00,   /* r[213] */ 
+    -8.77217709115478833092893751199881080538034439086914e-02, /* logih[213] */ 
+    -1.37126670070706012825933173130657669787213551002177e-18, /* logim[213] */ 
+    -1.23989072968810371061913173649528401394932986260312e-36, /* logil[213] */ 
+  } , 
+  { 
+    1.08936119079589843750000000000000000000000000000000e+00,   /* r[214] */ 
+    -8.55914609487157390654843425181752536445856094360352e-02, /* logih[214] */ 
+    -6.73539996941766729916657848715943989064126863847235e-18, /* logim[214] */ 
+    3.21430126927804602931832802266482628675064054148856e-34, /* logil[214] */ 
+  } , 
+  { 
+    1.08704948425292968750000000000000000000000000000000e+00,   /* r[215] */ 
+    -8.34671307946482227135831521991349291056394577026367e-02, /* logih[215] */ 
+    -2.59301417543796652810804139098455715391427697882095e-18, /* logim[215] */ 
+    1.65211492395331390788992293150317962555299571277512e-34, /* logil[215] */ 
+  } , 
+  { 
+    1.08474540710449218750000000000000000000000000000000e+00,   /* r[216] */ 
+    -8.13453116283524013674366415216354653239250183105469e-02, /* logih[216] */ 
+    -5.06533259416045510334473576398828704896081639774469e-18, /* logim[216] */ 
+    3.58554694819254814251485471545002207143063628923407e-34, /* logil[216] */ 
+  } , 
+  { 
+    1.08245277404785156250000000000000000000000000000000e+00,   /* r[217] */ 
+    -7.92295531972000560694269211126083973795175552368164e-02, /* logih[217] */ 
+    3.08430116625330602805431897032551509181475376762118e-18, /* logim[217] */ 
+    1.27521745632715758795764081462338721511029897619340e-34, /* logil[217] */ 
+  } , 
+  { 
+    1.08016967773437500000000000000000000000000000000000e+00,   /* r[218] */ 
+    -7.71181378091099767324578806437784805893898010253906e-02, /* logih[218] */ 
+    -2.75912394291266277302481383554992246538214466259557e-18, /* logim[218] */ 
+    5.96984502944699741108276688448842397927326332487835e-35, /* logil[218] */ 
+  } , 
+  { 
+    1.07789421081542968750000000000000000000000000000000e+00,   /* r[219] */ 
+    -7.50093329917183998523100285638065543025732040405273e-02, /* logih[219] */ 
+    1.21553538095744083798831566922580286219799129072055e-18, /* logim[219] */ 
+    -5.89842100461659880732549401024388472535698324065996e-35, /* logil[219] */ 
+  } , 
+  { 
+    1.07563018798828125000000000000000000000000000000000e+00,   /* r[220] */ 
+    -7.29067112034412351251333461732428986579179763793945e-02, /* logih[220] */ 
+    6.30693084361487082247322771068486204374546343933133e-18, /* logim[220] */ 
+    3.44825082371128400572272238979928316738696119124015e-34, /* logil[220] */ 
+  } , 
+  { 
+    1.07337570190429687500000000000000000000000000000000e+00,   /* r[221] */ 
+    -7.08085439330154442494347222236683592200279235839844e-02, /* logih[221] */ 
+    6.21205862241802265972824064219836764844223885696046e-18, /* logim[221] */ 
+    -2.58313322603855039499688568243180373305456453270216e-34, /* logil[221] */ 
+  } , 
+  { 
+    1.07112884521484375000000000000000000000000000000000e+00,   /* r[222] */ 
+    -6.87130878850236020971564698811562266200780868530273e-02, /* logih[222] */ 
+    2.70354961689989817022493816753711952290500355166865e-18, /* logim[222] */ 
+    -4.32103888921541828258452321965605627074720991923399e-35, /* logil[222] */ 
+  } , 
+  { 
+    1.06889343261718750000000000000000000000000000000000e+00,   /* r[223] */ 
+    -6.66239382216213954501782268380338791757822036743164e-02, /* logih[223] */ 
+    5.70083134370999669291082348348689873755740434296954e-18, /* logim[223] */ 
+    -8.10096531474775368286716199375642728810684749797528e-35, /* logil[223] */ 
+  } , 
+  { 
+    1.06666755676269531250000000000000000000000000000000e+00,   /* r[224] */ 
+    -6.45393556022498676716381282858492340892553329467773e-02, /* logih[224] */ 
+    6.27679858230689064724912619776653321119382603385890e-18, /* logim[224] */ 
+    3.82578436460361832583744997495972964625953636902884e-34, /* logil[224] */ 
+  } , 
+  { 
+    1.06444931030273437500000000000000000000000000000000e+00,   /* r[225] */ 
+    -6.24575859017184389920807063845131779089570045471191e-02, /* logih[225] */ 
+    3.12396238135026689723293065657341228563060732941880e-18, /* logim[225] */ 
+    -2.56480637242869270592951014242676091679089182875022e-35, /* logil[225] */ 
+  } , 
+  { 
+    1.06224060058593750000000000000000000000000000000000e+00,   /* r[226] */ 
+    -6.03804513842609302809449900450999848544597625732422e-02, /* logih[226] */ 
+    2.15703432342306119511642925211564389619524247753812e-18, /* logim[226] */ 
+    -3.99051054966201464148223117427430962485432571249835e-35, /* logil[226] */ 
+  } , 
+  { 
+    1.06004142761230468750000000000000000000000000000000e+00,   /* r[227] */ 
+    -5.83079900133864140188144631338218459859490394592285e-02, /* logih[227] */ 
+    -2.26614868674930470856533040936568995022733760870024e-18, /* logim[227] */ 
+    4.93654463845011924979397150953449636718851245018416e-36, /* logil[227] */ 
+  } , 
+  { 
+    1.05785179138183593750000000000000000000000000000000e+00,   /* r[228] */ 
+    -5.62402398633818634277048431613366119563579559326172e-02, /* logih[228] */ 
+    3.23622784070623643425179422456037835068049704948076e-18, /* logim[228] */ 
+    8.21211163681263455010708306384902557377035880000243e-35, /* logil[228] */ 
+  } , 
+  { 
+    1.05566978454589843750000000000000000000000000000000e+00,   /* r[229] */ 
+    -5.41754323534648848936789988783857552334666252136230e-02, /* logih[229] */ 
+    -1.63682825416879776300941023746021061378436290037990e-18, /* logim[229] */ 
+    -7.00922691871793498425237363067495151340436490327669e-35, /* logil[229] */ 
+  } , 
+  { 
+    1.05349731445312500000000000000000000000000000000000e+00,   /* r[230] */ 
+    -5.21154050923886280610730636908556334674358367919922e-02, /* logih[230] */ 
+    -6.39781587823151025739574281786018493556176254138154e-19, /* logim[230] */ 
+    3.56720195764935648932285840665933091100063235873938e-35, /* logil[230] */ 
+  } , 
+  { 
+    1.05133438110351562500000000000000000000000000000000e+00,   /* r[231] */ 
+    -5.00601964830668655359602325916057452559471130371094e-02, /* logih[231] */ 
+    2.51984665593202228822706788872411441168875867302045e-18, /* logim[231] */ 
+    -2.18342737706092628156578807143832418432366157819325e-35, /* logil[231] */ 
+  } , 
+  { 
+    1.04918098449707031250000000000000000000000000000000e+00,   /* r[232] */ 
+    -4.80098450349349045729319129804935073480010032653809e-02, /* logih[232] */ 
+    -1.52080250600506339582829684987843924335937235135276e-18, /* logim[232] */ 
+    -9.24379674215907095849380058311583825692328514013958e-35, /* logil[232] */ 
+  } , 
+  { 
+    1.04703521728515625000000000000000000000000000000000e+00,   /* r[233] */ 
+    -4.59625676982170078277434299707238096743822097778320e-02, /* logih[233] */ 
+    -3.31972713633937264538106994059359671095924053342216e-18, /* logim[233] */ 
+    -1.13937339607744860727400568917500096969385851217146e-34, /* logil[233] */ 
+  } , 
+  { 
+    1.04489707946777343750000000000000000000000000000000e+00,   /* r[234] */ 
+    -4.39183920188736254264227909516193903982639312744141e-02, /* logih[234] */ 
+    -1.56343240701227240066055187635828001828861125718036e-18, /* logim[234] */ 
+    -3.02746820911254374279963651479509453045839237097215e-35, /* logil[234] */ 
+  } , 
+  { 
+    1.04277038574218750000000000000000000000000000000000e+00,   /* r[235] */ 
+    -4.18810038843394558116806081216054735705256462097168e-02, /* logih[235] */ 
+    7.08767348853067953695390709296896788518980234122108e-19, /* logim[235] */ 
+    5.81746887353045891576525685995993541223272544408687e-36, /* logil[235] */ 
+  } , 
+  { 
+    1.04065132141113281250000000000000000000000000000000e+00,   /* r[236] */ 
+    -3.98467877153236421650106535707891453057527542114258e-02, /* logih[236] */ 
+    2.90303379363907111194760685579166515046306452777543e-18, /* logim[236] */ 
+    -1.87179669992551157656392090580258428294705323369769e-34, /* logil[236] */ 
+  } , 
+  { 
+    1.03853988647460937500000000000000000000000000000000e+00,   /* r[237] */ 
+    -3.78157713717320251300968436680705053731799125671387e-02, /* logih[237] */ 
+    1.31557218113972830753744753624727966873659341218890e-19, /* logim[237] */ 
+    3.06309949074642996410908941009119700992862883848855e-36, /* logil[237] */ 
+  } , 
+  { 
+    1.03643798828125000000000000000000000000000000000000e+00,   /* r[238] */ 
+    -3.57898231070667913189531361695117084309458732604980e-02, /* logih[238] */ 
+    2.61901199505080724827733891681136430570574020973310e-18, /* logim[238] */ 
+    -1.03901456915381040350545966439681190782130708435783e-34, /* logil[238] */ 
+  } , 
+  { 
+    1.03434371948242187500000000000000000000000000000000e+00,   /* r[239] */ 
+    -3.37671381422615726752844977909262524917721748352051e-02, /* logih[239] */ 
+    5.67782765535494174549017056202204751471356116304136e-19, /* logim[239] */ 
+    2.53528355791248032893098939659784274260892498065275e-35, /* logil[239] */ 
+  } , 
+  { 
+    1.03225898742675781250000000000000000000000000000000e+00,   /* r[240] */ 
+    -3.17495923838522486892799179258872754871845245361328e-02, /* logih[240] */ 
+    -3.27645416513913885099937157154221271265660318847254e-18, /* logim[240] */ 
+    8.28856608327529296008590058532581223963810647767730e-35, /* logil[240] */ 
+  } , 
+  { 
+    1.03018188476562500000000000000000000000000000000000e+00,   /* r[241] */ 
+    -2.97353738029609328263891399046769947744905948638916e-02, /* logih[241] */ 
+    -1.42123656023807324094007557899495837832764341820361e-18, /* logim[241] */ 
+    6.91675602259020207318590223540920124856020443401708e-35, /* logil[241] */ 
+  } , 
+  { 
+    1.02811241149902343750000000000000000000000000000000e+00,   /* r[242] */ 
+    -2.77245107619511835239656249996187398210167884826660e-02, /* logih[242] */ 
+    1.56537436220084983093655029081028016172956628311065e-18, /* logim[242] */ 
+    -4.26959324792631463690822650182944301609062827136870e-35, /* logil[242] */ 
+  } , 
+  { 
+    1.02605247497558593750000000000000000000000000000000e+00,   /* r[243] */ 
+    -2.57188906410827818060926830412427079863846302032471e-02, /* logih[243] */ 
+    -4.32555496623632207496744723792774270215720987145012e-19, /* logim[243] */ 
+    1.52055580639983796045911400446456477822011205599594e-35, /* logil[243] */ 
+  } , 
+  { 
+    1.02400016784667968750000000000000000000000000000000e+00,   /* r[244] */ 
+    -2.37166905300757423213919850013553514145314693450928e-02, /* logih[244] */ 
+    1.57595637918687487090746306283132097902404584964498e-18, /* logim[244] */ 
+    9.74151980884630209236553635927232431547283770922398e-36, /* logil[244] */ 
+  } , 
+  { 
+    1.02195549011230468750000000000000000000000000000000e+00,   /* r[245] */ 
+    -2.17179390838950908682036811114812735468149185180664e-02, /* logih[245] */ 
+    1.51145445644716133590266967637567408648790588957093e-19, /* logim[245] */ 
+    -6.02620888867536172611371375475252817876600211415641e-36, /* logil[245] */ 
+  } , 
+  { 
+    1.01992034912109375000000000000000000000000000000000e+00,   /* r[246] */ 
+    -1.97245351501005340699723689112943247891962528228760e-02, /* logih[246] */ 
+    1.34458916305708123412045028332259969564528051018263e-18, /* logim[246] */ 
+    -6.02768376061644464555810636396264987280148524662430e-35, /* logil[246] */ 
+  } , 
+  { 
+    1.01789283752441406250000000000000000000000000000000e+00,   /* r[247] */ 
+    -1.77346449295557526126820846457121660932898521423340e-02, /* logih[247] */ 
+    7.79495017362897286873974720552694669993891890935313e-19, /* logim[247] */ 
+    1.36178679065204639598156495958075391845124350978061e-35, /* logil[247] */ 
+  } , 
+  { 
+    1.01587295532226562500000000000000000000000000000000e+00,   /* r[248] */ 
+    -1.57482973634926158579272481574662378989160060882568e-02, /* logih[248] */ 
+    -1.00208727697080412925749596659626020152032796409604e-18, /* logim[248] */ 
+    7.75790823155383991507800579878754988160969197338737e-35, /* logil[248] */ 
+  } , 
+  { 
+    1.01386070251464843750000000000000000000000000000000e+00,   /* r[249] */ 
+    -1.37655214863766119093302364717601449228823184967041e-02, /* logih[249] */ 
+    -5.48983179446608237058051237183129839336112673134214e-19, /* logim[249] */ 
+    -1.07124914949087525209371623912638443397942890041101e-35, /* logil[249] */ 
+  } , 
+  { 
+    1.01185798645019531250000000000000000000000000000000e+00,   /* r[250] */ 
+    -1.17882314234863290469679242278289166279137134552002e-02, /* logih[250] */ 
+    -2.27798661830469484283633290231243375517062716277910e-19, /* logim[250] */ 
+    -1.39810745565350762832359759144648110107303965002540e-35, /* logil[250] */ 
+  } , 
+  { 
+    1.00986099243164062500000000000000000000000000000000e+00,   /* r[251] */ 
+    -9.81269012531632393858682661402781377546489238739014e-03, /* logih[251] */ 
+    -6.97507609288120398034926564017756235032809786202962e-19, /* logim[251] */ 
+    -4.77223430605379546730200636004016887477665718525716e-35, /* logil[251] */ 
+  } , 
+  { 
+    1.00787353515625000000000000000000000000000000000000e+00,   /* r[252] */ 
+    -7.84270062375400263399161104871382121928036212921143e-03, /* logih[252] */ 
+    -2.40330730071604899669779379793438954457155324844264e-19, /* logim[252] */ 
+    1.77453639459760487861944622725812265877091856705197e-36, /* logil[252] */ 
+  } , 
+  { 
+    1.00589370727539062500000000000000000000000000000000e+00,   /* r[253] */ 
+    -5.87640732328869111467106733925902517512440681457520e-03, /* logih[253] */ 
+    -4.48574348377346892833940286850982368331573394791167e-20, /* logim[253] */ 
+    -1.60289170664661311448886936584931944274496990139304e-36, /* logil[253] */ 
+  } , 
+  { 
+    1.00392150878906250000000000000000000000000000000000e+00,   /* r[254] */ 
+    -3.91383971648977691676352108629544090945273637771606e-03, /* logih[254] */ 
+    -4.28019276224719221462393891683495367484578724177817e-19, /* logim[254] */ 
+    -2.25272542183557712010826889962617244762256960750126e-35, /* logil[254] */ 
+  } , 
+  { 
+    1.00195693969726562500000000000000000000000000000000e+00,   /* r[255] */ 
+    -1.95502738522272592053274919976502133067697286605835e-03, /* logih[255] */ 
+    4.23091354502479132756026938785685564809899588018682e-20, /* logim[255] */ 
+    2.38479717170645227429169885358660522796868401607905e-36, /* logil[255] */ 
+  } }; 
+ 
diff --git a/src/crlibm/log10-td.c b/src/crlibm/log10-td.c
new file mode 100644
index 0000000..6823e2e
--- /dev/null
+++ b/src/crlibm/log10-td.c
@@ -0,0 +1,906 @@
+/* 
+ * This function computes log10, correctly rounded, 
+ * using experimental techniques based on triple double arithmetics
+
+ THIS IS EXPERIMENTAL SOFTWARE
+ 
+ *
+ * Author :  Christoph Lauter
+ * christoph.lauter at ens-lyon.fr
+ *
+
+ To have it replace the crlibm log10, do:
+
+ gcc -DHAVE_CONFIG_H -I.  -fPIC  -O2 -c log10-td.c;   mv log10-td.o log10_accurate.o; make 
+
+
+ **********************************************************
+ *
+ *  NOTE: THIS FUNCTION USES SOME BASIC SEQUENCES AND
+ *  FURTHER FINAL ROUNDING SEQUENCES WITH SPECIAL CASE
+ *  TESTS NO FORMAL PROOF IS AVAILABLE FOR IN THE MOMENT
+ *
+ **********************************************************
+
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "log10-td.h"
+
+#define AVOID_FMA 0
+
+
+void log10_td_accurate(double *logb10h, double *logb10m, double *logb10l, int E, double ed, int index, double zh, double zl, double logih, double logim) {
+  double highPoly, t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l, t8h, t8l, t9h, t9l, t10h, t10l, t11h, t11l;
+  double t12h, t12l, t13h, t13l, t14h, t14l, zSquareh, zSquarem, zSquarel, zCubeh, zCubem, zCubel, higherPolyMultZh, higherPolyMultZm;
+  double higherPolyMultZl, zSquareHalfh, zSquareHalfm, zSquareHalfl, polyWithSquareh, polyWithSquarem, polyWithSquarel;
+  double polyh, polym, polyl, logil, logyh, logym, logyl, loghover, logmover, loglover, log2edhover, log2edmover, log2edlover;
+  double log2edh, log2edm, log2edl, logb10hover, logb10mover, logb10lover;
+  double logyhnorm, logymnorm, logylnorm;
+
+
+
+
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+
+  /* Accurate phase:
+
+     Argument reduction is already done. 
+     We must return logh, logm and logl representing the intermediate result in 118 bits precision.
+
+     We use a 14 degree polynomial, computing the first 3 (the first is 0) coefficients in triple double,
+     calculating the next 7 coefficients in double double arithmetics and the last in double.
+
+     We must account for zl starting with the monome of degree 4 (7^3 + 53 - 7 >> 118); so 
+     double double calculations won't account for it.
+
+  */
+
+  /* Start of the horner scheme */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(accPolyC14,zh,accPolyC13),zh,accPolyC12),zh,accPolyC11),zh,accPolyC10);
+#else
+  highPoly = accPolyC10 + zh * (accPolyC11 + zh * (accPolyC12 + zh * (accPolyC13 + zh * accPolyC14)));
+#endif
+  
+  /* We want to write 
+
+     accPolyC3 + zh * (accPoly4 + zh * (accPoly5 + zh * (accPoly6 + zh * (accPoly7 + zh * (accPoly8 + zh * (accPoly9 + zh * highPoly))))));
+     (        t14  t13         t12  t11         t10   t9          t8   t7          t6   t5          t4   t3          t2   t1  )
+
+     with all additions and multiplications in double double arithmetics
+     but we will produce intermediate results labelled t1h/t1l thru t14h/t14l
+  */
+
+  Mul12(&t1h, &t1l, zh, highPoly);
+  Add22(&t2h, &t2l, accPolyC9h, accPolyC9l, t1h, t1l);
+  Mul22(&t3h, &t3l, zh, zl, t2h, t2l);
+  Add22(&t4h, &t4l, accPolyC8h, accPolyC8l, t3h, t3l);
+  Mul22(&t5h, &t5l, zh, zl, t4h, t4l);
+  Add22(&t6h, &t6l, accPolyC7h, accPolyC7l, t5h, t5l);
+  Mul22(&t7h, &t7l, zh, zl, t6h, t6l);
+  Add22(&t8h, &t8l, accPolyC6h, accPolyC6l, t7h, t7l);
+  Mul22(&t9h, &t9l, zh, zl, t8h, t8l);
+  Add22(&t10h, &t10l, accPolyC5h, accPolyC5l, t9h, t9l);
+  Mul22(&t11h, &t11l, zh, zl, t10h, t10l);
+  Add22(&t12h, &t12l, accPolyC4h, accPolyC4l, t11h, t11l);
+  Mul22(&t13h, &t13l, zh, zl, t12h, t12l);
+  Add22(&t14h, &t14l, accPolyC3h, accPolyC3l, t13h, t13l);
+
+  /* We must now prepare (zh + zl)^2 and (zh + zl)^3 as triple doubles */
+
+  Mul23(&zSquareh, &zSquarem, &zSquarel, zh, zl, zh, zl); 
+  Mul233(&zCubeh, &zCubem, &zCubel, zh, zl, zSquareh, zSquarem, zSquarel); 
+  
+  /* We can now multiplicate the middle and higher polynomial by z^3 */
+
+  Mul233(&higherPolyMultZh, &higherPolyMultZm, &higherPolyMultZl, t14h, t14l, zCubeh, zCubem, zCubel);
+  
+  /* Multiply now z^2 by -1/2 (exact op) and add to middle and higher polynomial */
+  
+  zSquareHalfh = zSquareh * -0.5;
+  zSquareHalfm = zSquarem * -0.5;
+  zSquareHalfl = zSquarel * -0.5;
+
+  Add33(&polyWithSquareh, &polyWithSquarem, &polyWithSquarel, 
+	zSquareHalfh, zSquareHalfm, zSquareHalfl, 
+	higherPolyMultZh, higherPolyMultZm, higherPolyMultZl);
+
+  /* Add now zh and zl to obtain the polynomial evaluation result */
+
+  Add233(&polyh, &polym, &polyl, zh, zl, polyWithSquareh, polyWithSquarem, polyWithSquarel);
+
+  /* Reconstruct now log(y) = log(1 + z) - log(ri) by adding logih, logim, logil
+     logil has not been read to the time, do this first 
+  */
+
+  logil =  argredtable[index].logil;
+
+  Add33(&logyh, &logym, &logyl, logih, logim, logil, polyh, polym, polyl);
+
+
+  /* Renormalize logyh, logym and logyl to a non-overlapping triple-double for winning some 
+     accuracy in the final ln(x) result before multiplying with log10inv 
+
+     THIS MAY NOT BE NECESSARY NOR SUFFICIENT
+
+  */
+
+  Renormalize3(&logyhnorm, &logymnorm, &logylnorm, logyh, logym, logyl);
+
+
+  /* Multiply log2 with E, i.e. log2h, log2m, log2l by ed 
+     ed is always less than 2^(12) and log2h and log2m are stored with at least 12 trailing zeros 
+     So multiplying naively is correct (up to 134 bits at least)
+
+     The final result is thus obtained by adding log2 * E to log(y)
+  */
+
+  log2edhover = log2h * ed;
+  log2edmover = log2m * ed;
+  log2edlover = log2l * ed;
+
+  /* It may be necessary to renormalize the tabulated value (multiplied by ed) before adding
+     the to the log(y)-result 
+
+     If needed, uncomment the following Renormalize3-Statement and comment out the copies 
+     following it.
+  */
+
+  /* Renormalize3(&log2edh, &log2edm, &log2edl, log2edhover, log2edmover, log2edlover); */
+
+  log2edh = log2edhover;
+  log2edm = log2edmover;
+  log2edl = log2edlover;
+
+  Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyhnorm, logymnorm, logylnorm);
+
+
+  /* Change logarithm base from natural base to base 10 by multiplying */
+
+  Mul33(&logb10hover, &logb10mover, &logb10lover, log10invh, log10invm, log10invl, loghover, logmover, loglover);
+
+
+  /* Since we can not guarantee in each addition and multiplication procedure that 
+     the results are not overlapping, we must renormalize the result before handing
+     it over to the final rounding
+  */
+
+  Renormalize3(logb10h,logb10m,logb10l,logb10hover,logb10mover,logb10lover);
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+ double log10_rn(double x){ 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, roundcst;
+   double logb10h, logb10m, logb10l;
+   int E, index;
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+
+
+   /* Change logarithm base from natural base to base 10 by multiplying */
+
+   Mul22(&logb10h, &logb10m, log10invh, log10invm, logh, logm);
+
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = ROUNDCST1;
+   else
+      roundcst = ROUNDCST2;
+
+
+   if(logb10h == (logb10h + (logb10m * roundcst)))
+     return logb10h;
+   else 
+     {
+       
+#if DEBUG
+       printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+       log10_td_accurate(&logb10h, &logb10m, &logb10l, E, ed, index, zh, zl, logih, logim); 
+       
+       ReturnRoundToNearest3(logb10h, logb10m, logb10l);
+
+     } /* Accurate phase launched */
+ }
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  UPWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log10_ru(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, roundcst;
+   double logb10h, logb10m, logb10l;
+   int E, index;
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+
+
+   /* Change logarithm base from natural base to base 10 by multiplying */
+
+   Mul22(&logb10h, &logb10m, log10invh, log10invm, logh, logm);
+
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RU(logb10h, logb10m, roundcst);
+
+#if DEBUG  
+   printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log10_td_accurate(&logb10h, &logb10m, &logb10l, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundUpwards3Unfiltered(logb10h, logb10m, logb10l, WORSTCASEACCURACY);
+
+ } 
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  DOWNWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log10_rd(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, roundcst;
+   double logb10h, logb10m, logb10l;
+   int E, index;
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+
+
+   /* Change logarithm base from natural base to base 10 by multiplying */
+
+   Mul22(&logb10h, &logb10m, log10invh, log10invm, logh, logm);
+
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RD(logb10h, logb10m, roundcst);
+
+#if DEBUG
+  printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log10_td_accurate(&logb10h, &logb10m, &logb10l, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundDownwards3Unfiltered(logb10h, logb10m, logb10l, WORSTCASEACCURACY);
+ } 
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARDS ZERO			     *
+ *************************************************************
+ *************************************************************/
+ double log10_rz(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, roundcst;
+   double logb10h, logb10m, logb10l;
+   int E, index;
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+
+
+   /* Change logarithm base from natural base to base 10 by multiplying */
+
+   Mul22(&logb10h, &logb10m, log10invh, log10invm, logh, logm);
+
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RZ(logb10h, logb10m, roundcst);
+
+#if DEBUG
+  printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log10_td_accurate(&logb10h, &logb10m, &logb10l, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundTowardsZero3Unfiltered(logb10h, logb10m, logb10l, WORSTCASEACCURACY);
+ } 
+
+
+
diff --git a/src/crlibm/log10-td.h b/src/crlibm/log10-td.h
new file mode 100644
index 0000000..b6892d8
--- /dev/null
+++ b/src/crlibm/log10-td.h
@@ -0,0 +1,823 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/*File generated by maple/log10-td.mpl*/
+
+#define L 7
+
+#define MAXINDEX 53
+
+#define INDEXMASK 127
+#define two52 4.50359962737049600000000000000000000000000000000000e+15
+#define log2h 6.93147180559890330187045037746429443359375000000000e-01
+#define log2m 5.49792301870850242169664946507035702127907939029683e-14
+#define log2l -1.31246984177852556920995753667322295879593697972250e-27
+#define log10invh 4.34294481903251816667932416748953983187675476074219e-01
+#define log10invm 1.09831965021676507273885982186335434116483395815072e-17
+#define log10invl 3.71718123311095896669981767697359971405165651422486e-34
+#define WORSTCASEACCURACY 5.31691198313966349161522824112137830400000000000000e+36
+#define ROUNDCST1 1.00787401574803160796292764473221714405939530505554e+00
+#define ROUNDCST2 1.00787401574803160796292764473221714405939530505554e+00
+#define RDROUNDCST1 4.33680868994201773602981120347976684570312500000000e-19
+#define RDROUNDCST2 4.33680868994201773602981120347976684570312500000000e-19
+
+
+#define c3 3.33333333333333370340767487505218014121055603027344e-01
+#define c4 -2.49999999990904886448817023847368545830249786376953e-01
+#define c5 1.99999999978980019799124079327157232910394668579102e-01
+#define c6 -1.66669050883027802800739891608827747404575347900391e-01
+#define c7 1.42860109897981618631845890377007890492677688598633e-01
+
+
+#define accPolyC3h 3.33333333333333314829616256247390992939472198486328e-01
+#define accPolyC3l 1.85037170770859413132312241283212169118117639547054e-17
+#define accPolyC4h -2.50000000000000000000000000000000000000000000000000e-01
+#define accPolyC4l 4.62199018306924685334006418421322154174127637249391e-33
+#define accPolyC5h 2.00000000000000011102230246251565404236316680908203e-01
+#define accPolyC5l -1.11022302443127785678379338452126964515833173338601e-17
+#define accPolyC6h -1.66666666666666657414808128123695496469736099243164e-01
+#define accPolyC6l -9.25185854591372488017120157358742564605503054108327e-18
+#define accPolyC7h 1.42857142857142849212692681248881854116916656494141e-01
+#define accPolyC7l 7.92868209382438390589949095717120486682310988838960e-18
+#define accPolyC8h -1.25000000000000000000000000000000000000000000000000e-01
+#define accPolyC8l 3.42769668947376590645174407718339199260639267364101e-21
+#define accPolyC9h 1.11111111111111521276839653182832989841699600219727e-01
+#define accPolyC9l 4.33331955380787609416227741118274520376899199903317e-18
+#define accPolyC10 -1.00000000000000699440505513848620466887950897216797e-01
+#define accPolyC11 9.09090908567022348840680479042930528521537780761719e-02
+#define accPolyC12 -8.33333332642126056732934102910803630948066711425781e-02
+#define accPolyC13 7.69261287585959879775643344146374147385358810424805e-02
+#define accPolyC14 -7.14319092953022982683819464000407606363296508789062e-02
+
+
+typedef struct rri_tag {float ri; double logih; double logim; double logil;} rri;  
+static const rri argredtable[128] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00,   /* r[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logih[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logim[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logil[0] */ 
+  } , 
+  { 
+    9.92248058319091796875000000000000000000000000000000e-01,   /* r[1] */ 
+    7.78214416734525436109004559170898573938757181167603e-03, /* logih[1] */ 
+    -1.28191618904143681948935996668824218266800862156024e-20, /* logim[1] */ 
+    1.17655068600225378123891861200215069271455859581641e-37, /* logil[1] */ 
+  } , 
+  { 
+    9.84615325927734375000000000000000000000000000000000e-01,   /* r[2] */ 
+    1.55042461406118062261505485821544425562024116516113e-02, /* logih[2] */ 
+    -3.27761516207149627029928635703400435929630184221293e-19, /* logim[2] */ 
+    2.95200020707030964072253388818190769795416371257942e-37, /* logil[2] */ 
+  } , 
+  { 
+    9.77099180221557617187500000000000000000000000000000e-01,   /* r[3] */ 
+    2.31671170235356708999585606534310500137507915496826e-02, /* logih[3] */ 
+    5.57833156048330069504471566938468802334954100224869e-19, /* logim[3] */ 
+    4.08416064054113313191746248503653555682943539201798e-35, /* logil[3] */ 
+  } , 
+  { 
+    9.69696998596191406250000000000000000000000000000000e-01,   /* r[4] */ 
+    3.07716288644317437217523547587916254997253417968750e-02, /* logih[4] */ 
+    1.04316437964092669923942103072089812062131860035492e-18, /* logim[4] */ 
+    -8.26837774892530079043982861155759865584698067912967e-36, /* logil[4] */ 
+  } , 
+  { 
+    9.62406039237976074218750000000000000000000000000000e-01,   /* r[5] */ 
+    3.83188391564273991840572364253603154793381690979004e-02, /* logih[5] */ 
+    1.54512636366303706650320890230224472259662656606095e-18, /* logim[5] */ 
+    8.30977110244055528389241824578843983429633068152463e-35, /* logil[5] */ 
+  } , 
+  { 
+    9.55223917961120605468750000000000000000000000000000e-01,   /* r[6] */ 
+    4.58094969157468376308450785927561810240149497985840e-02, /* logih[6] */ 
+    -3.30123051072550842868548428055668582607719074881820e-18, /* logim[6] */ 
+    1.64164772626574162996727598513545022472742050176492e-34, /* logil[6] */ 
+  } , 
+  { 
+    9.48148131370544433593750000000000000000000000000000e-01,   /* r[7] */ 
+    5.32445322139413548812036935942160198464989662170410e-02, /* logih[7] */ 
+    2.23755385085953619415254057336256700540433618368589e-18, /* logim[7] */ 
+    -9.41330315099866735037984721876103977945647219756033e-35, /* logil[7] */ 
+  } , 
+  { 
+    9.41176414489746093750000000000000000000000000000000e-01,   /* r[8] */ 
+    6.06246814210813916856679384181916248053312301635742e-02, /* logih[8] */ 
+    2.64247317995478646334926909653435556549332769494295e-18, /* logim[8] */ 
+    1.55075207452234839722600788456166299408429635417895e-34, /* logil[8] */ 
+  } , 
+  { 
+    9.34306621551513671875000000000000000000000000000000e-01,   /* r[9] */ 
+    6.79506060291548280583029395529592875391244888305664e-02, /* logih[9] */ 
+    5.65862161871167282533541105359923619273100535513035e-18, /* logim[9] */ 
+    -3.57889357320249912090032102867532919048871786355064e-34, /* logil[9] */ 
+  } , 
+  { 
+    9.27536249160766601562500000000000000000000000000000e-01,   /* r[10] */ 
+    7.52234026111362058530929175503842998296022415161133e-02, /* logih[10] */ 
+    1.00828755349783911736541446332784521904773238841865e-18, /* logim[10] */ 
+    7.77966415828014771486738038255868010153689429282538e-36, /* logil[10] */ 
+  } , 
+  { 
+    9.20863270759582519531250000000000000000000000000000e-01,   /* r[11] */ 
+    8.24437111205913314426751981045526918023824691772461e-02, /* logih[11] */ 
+    -4.27419767632228646217014766651675738804062364961374e-18, /* logim[11] */ 
+    3.58539257549786746072726449331073277906948658046759e-34, /* logil[11] */ 
+  } , 
+  { 
+    9.14285659790039062500000000000000000000000000000000e-01,   /* r[12] */ 
+    8.96122182943336897942288032936630770564079284667969e-02, /* logih[12] */ 
+    -5.42674234758262048883730612286095846547194397615989e-18, /* logim[12] */ 
+    -7.94903110897686868047461590865098481976776339992810e-35, /* logil[12] */ 
+  } , 
+  { 
+    9.07801389694213867187500000000000000000000000000000e-01,   /* r[13] */ 
+    9.67296581235191493819414176869031507521867752075195e-02, /* logih[13] */ 
+    1.17499431052084706890372286741885325822732164697539e-18, /* logim[13] */ 
+    -7.47188021694240554877009439429630012902672969107896e-35, /* logil[13] */ 
+  } , 
+  { 
+    9.01408433914184570312500000000000000000000000000000e-01,   /* r[14] */ 
+    1.03796812308095232069149460585322231054306030273438e-01, /* logih[14] */ 
+    -1.46116759252442942691327623497388991415382979093093e-18, /* logim[14] */ 
+    -5.84766064918572844473631496354606243606272630720064e-35, /* logil[14] */ 
+  } , 
+  { 
+    8.95104885101318359375000000000000000000000000000000e-01,   /* r[15] */ 
+    1.10814377516161077785739053069846704602241516113281e-01, /* logih[15] */ 
+    -5.75514509579248124656596649605847554012818793702281e-18, /* logim[15] */ 
+    3.29977719536339952907783192540462408052319847426319e-34, /* logil[15] */ 
+  } , 
+  { 
+    8.88888835906982421875000000000000000000000000000000e-01,   /* r[16] */ 
+    1.17783095261030007483427084480354096740484237670898e-01, /* logih[16] */ 
+    -1.19709798867727449215060005668653850880775796697715e-18, /* logim[16] */ 
+    8.04222018353684236067064017226062133396406008492921e-35, /* logil[16] */ 
+  } , 
+  { 
+    8.82758617401123046875000000000000000000000000000000e-01,   /* r[17] */ 
+    1.24703482226247538977581541530526010319590568542480e-01, /* logih[17] */ 
+    2.28663295749049514726834658528273231115811065734312e-18, /* logim[17] */ 
+    -3.51123005875932392272239647660221882537057244586168e-35, /* logil[17] */ 
+  } , 
+  { 
+    8.76712322235107421875000000000000000000000000000000e-01,   /* r[18] */ 
+    1.31576365239299886145118989588809199631214141845703e-01, /* logih[18] */ 
+    1.11230010175930229418362785876222391520299564865730e-17, /* logim[18] */ 
+    7.27451645836749926637643602480531900716806359121297e-34, /* logil[18] */ 
+  } , 
+  { 
+    8.70748281478881835937500000000000000000000000000000e-01,   /* r[19] */ 
+    1.38402343348215994822680841025430709123611450195312e-01, /* logih[19] */ 
+    -7.69528416335144553864151614176326744245393995127969e-18, /* logim[19] */ 
+    1.14202629230472885861778260955781649682548331183808e-34, /* logil[19] */ 
+  } , 
+  { 
+    8.64864826202392578125000000000000000000000000000000e-01,   /* r[20] */ 
+    1.45182054547982469783207193358975928276777267456055e-01, /* logih[20] */ 
+    8.24244856152552570070228105635897158979868211170798e-18, /* logim[20] */ 
+    -6.13072808770694892835379995250538817854995507648779e-34, /* logil[20] */ 
+  } , 
+  { 
+    8.59060406684875488281250000000000000000000000000000e-01,   /* r[21] */ 
+    1.51916037369229123266123337998578790575265884399414e-01, /* logih[21] */ 
+    -1.04296908000297145574171199957656893307239877379000e-17, /* logim[21] */ 
+    -5.53636436435840586444373230094200986769217138540854e-34, /* logil[21] */ 
+  } , 
+  { 
+    8.53333353996276855468750000000000000000000000000000e-01,   /* r[22] */ 
+    1.58605005962251938145257668111298698931932449340820e-01, /* logih[22] */ 
+    -8.86065192248216377790637508171938194510660992474042e-19, /* logim[22] */ 
+    -5.87995214834401673695486864800931832452468264932844e-35, /* logil[22] */ 
+  } , 
+  { 
+    8.47682118415832519531250000000000000000000000000000e-01,   /* r[23] */ 
+    1.65249573826629747586025587224867194890975952148438e-01, /* logih[23] */ 
+    -9.66125475305916070790888958698289394696700966750453e-18, /* logim[23] */ 
+    1.22853647999759344001960461047755491313341721869856e-34, /* logil[23] */ 
+  } , 
+  { 
+    8.42105269432067871093750000000000000000000000000000e-01,   /* r[24] */ 
+    1.71850249476078659194300257695431355386972427368164e-01, /* logih[24] */ 
+    -6.02245395887480538795512923412250309472746231920746e-18, /* logim[24] */ 
+    1.52961687917434402329553899350235008490821862631877e-34, /* logil[24] */ 
+  } , 
+  { 
+    8.36601257324218750000000000000000000000000000000000e-01,   /* r[25] */ 
+    1.78407717077464861299418430462537799030542373657227e-01, /* logih[25] */ 
+    -1.24324832026190372515095573175819374097319572461178e-17, /* logim[25] */ 
+    -5.99222696564577786410580709003476847421843326905428e-34, /* logil[25] */ 
+  } , 
+  { 
+    8.31168889999389648437500000000000000000000000000000e-01,   /* r[26] */ 
+    1.84922267713498816865680396404059138149023056030273e-01, /* logih[26] */ 
+    9.96243711860796179875713739627414673019270693540839e-18, /* logim[26] */ 
+    -1.99546782893888540832510298706525540082513642365204e-34, /* logil[26] */ 
+  } , 
+  { 
+    8.25806498527526855468750000000000000000000000000000e-01,   /* r[27] */ 
+    1.91394796188954025017991966706176754087209701538086e-01, /* logih[27] */ 
+    -8.22643020277300444045205706293674132131812201700538e-18, /* logim[27] */ 
+    5.69056030867564774930537188285078930441778787828211e-34, /* logil[27] */ 
+  } , 
+  { 
+    8.20512771606445312500000000000000000000000000000000e-01,   /* r[28] */ 
+    1.97825802934566419288842098467284813523292541503906e-01, /* logih[28] */ 
+    1.28212649590622342007825921152819823725126964367518e-17, /* logim[28] */ 
+    4.34712978477783827374998481132430084872238812357849e-34, /* logil[28] */ 
+  } , 
+  { 
+    8.15286636352539062500000000000000000000000000000000e-01,   /* r[29] */ 
+    2.04215526527529805944638496839615982025861740112305e-01, /* logih[29] */ 
+    2.73382699896480606605004885268461286375739934002155e-18, /* logim[29] */ 
+    1.88415596219599490517606146615135776386751947516623e-34, /* logil[29] */ 
+  } , 
+  { 
+    8.10126543045043945312500000000000000000000000000000e-01,   /* r[30] */ 
+    2.10564817536124687658016796376614365726709365844727e-01, /* logih[30] */ 
+    2.68952644992466202072392146799884466396384136175691e-18, /* logim[30] */ 
+    -1.58883120037037559046153789501260274259127656480088e-34, /* logil[30] */ 
+  } , 
+  { 
+    8.05031418800354003906250000000000000000000000000000e-01,   /* r[31] */ 
+    2.16873972759550226463431954471161589026451110839844e-01, /* logih[31] */ 
+    -1.23625140584833845652640860288020787431726668393088e-17, /* logim[31] */ 
+    -1.28369360755661214950804825668450767372141502246786e-34, /* logil[31] */ 
+  } , 
+  { 
+    7.99999952316284179687500000000000000000000000000000e-01,   /* r[32] */ 
+    2.23143610918856316605030087885097600519657135009766e-01, /* logih[32] */ 
+    -9.09120001124270523314725361445863555491966823753373e-18, /* logim[32] */ 
+    1.15945802868784933647836819275496182741822080543604e-34, /* logil[32] */ 
+  } , 
+  { 
+    7.95031070709228515625000000000000000000000000000000e-01,   /* r[33] */ 
+    2.29374082438394522043267897970508784055709838867188e-01, /* logih[33] */ 
+    -1.08890120418598083770448590672876580941469212582837e-17, /* logim[33] */ 
+    4.74877924128943438272197143958394008126523960202900e-34, /* logil[33] */ 
+  } , 
+  { 
+    7.90123462677001953125000000000000000000000000000000e-01,   /* r[34] */ 
+    2.35566063862186342303672859088692348450422286987305e-01, /* logih[34] */ 
+    -2.39433728738216998660812173360881116827035967139939e-18, /* logim[34] */ 
+    -9.62471867414270770251397101906428335828045927610883e-35, /* logil[34] */ 
+  } , 
+  { 
+    7.85276055335998535156250000000000000000000000000000e-01,   /* r[35] */ 
+    2.41719960170209802186036540661007165908813476562500e-01, /* logih[35] */ 
+    2.39578119451184969695376143676233310543075971208880e-18, /* logim[35] */ 
+    1.86231935097448741662637615288316997021879162207127e-34, /* logil[35] */ 
+  } , 
+  { 
+    7.80487775802612304687500000000000000000000000000000e-01,   /* r[36] */ 
+    2.47836201157484947721343360171886160969734191894531e-01, /* logih[36] */ 
+    -1.24321923457726137680465119406863072977770725701004e-17, /* logim[36] */ 
+    -2.09577513970149680056365167860895085898294691979404e-34, /* logil[36] */ 
+  } , 
+  { 
+    7.75757551193237304687500000000000000000000000000000e-01,   /* r[37] */ 
+    2.53915241645931488712051304901251569390296936035156e-01, /* logih[37] */ 
+    -6.31336333527435824035156315376733999545148217960567e-18, /* logim[37] */ 
+    4.63496313971202069379055986715253908538961883067566e-35, /* logil[37] */ 
+  } , 
+  { 
+    7.71084308624267578125000000000000000000000000000000e-01,   /* r[38] */ 
+    2.59957561689829752538116736104711890220642089843750e-01, /* logih[38] */ 
+    -7.05748899290965383754297836711168798219001736647281e-18, /* logim[38] */ 
+    4.27245447011230141916526741370315150982259792796987e-34, /* logil[38] */ 
+  } , 
+  { 
+    7.66467094421386718750000000000000000000000000000000e-01,   /* r[39] */ 
+    2.65963511244235673025571031757863238453865051269531e-01, /* logih[39] */ 
+    -2.24162125724264292804912034054420308588570407662844e-17, /* logim[39] */ 
+    4.90471140265143981765909599584287898945638617268867e-34, /* logil[39] */ 
+  } , 
+  { 
+    7.61904716491699218750000000000000000000000000000000e-01,   /* r[40] */ 
+    2.71933775088288309795814257086021825671195983886719e-01, /* logih[40] */ 
+    7.83390223779535346513505580003968001040971161798700e-19, /* logim[40] */ 
+    -3.02585215101390470982866376614279464778757620082138e-35, /* logil[40] */ 
+  } , 
+  { 
+    7.57396459579467773437500000000000000000000000000000e-01,   /* r[41] */ 
+    2.77868437964940373507971571598318405449390411376953e-01, /* logih[41] */ 
+    -2.69368711734232128278453248569958166651302969280381e-17, /* logim[41] */ 
+    1.27334496810554064003001771076892864921428144153570e-33, /* logil[41] */ 
+  } , 
+  { 
+    7.52941131591796875000000000000000000000000000000000e-01,   /* r[42] */ 
+    2.83768232735291170421021433867281302809715270996094e-01, /* logih[42] */ 
+    -2.03265852251844689554711830689719609838328388091381e-17, /* logim[42] */ 
+    3.99265876662456660849597520210659365811534845502505e-34, /* logil[42] */ 
+  } , 
+  { 
+    7.48538017272949218750000000000000000000000000000000e-01,   /* r[43] */ 
+    2.89633285132462114930262941925320774316787719726562e-01, /* logih[43] */ 
+    -7.21962253363417273270454867455071277489833577725373e-18, /* logim[43] */ 
+    -2.16150227221931053192432009592422674631830770048369e-34, /* logil[43] */ 
+  } , 
+  { 
+    7.44186043739318847656250000000000000000000000000000e-01,   /* r[44] */ 
+    2.95464216619126196494704572614864446222782135009766e-01, /* logih[44] */ 
+    -1.47072146829197428851717511710908602721304319475328e-17, /* logim[44] */ 
+    4.88114627787723832872543510409367916590649903129304e-34, /* logil[44] */ 
+  } , 
+  { 
+    7.39884376525878906250000000000000000000000000000000e-01,   /* r[45] */ 
+    3.01261352929903802877475982313626445829868316650391e-01, /* logih[45] */ 
+    1.87070681938931680167624656750430985298856099421569e-17, /* logim[45] */ 
+    1.51413799416501325421897094776870076323182009328971e-33, /* logil[45] */ 
+  } , 
+  { 
+    7.35632181167602539062500000000000000000000000000000e-01,   /* r[46] */ 
+    3.07025039020202172856954803137341514229774475097656e-01, /* logih[46] */ 
+    -5.38102227896180596526923200171118043417676846319102e-18, /* logim[46] */ 
+    2.06712483430759996475892191286335029882052180959917e-34, /* logil[46] */ 
+  } , 
+  { 
+    7.31428623199462890625000000000000000000000000000000e-01,   /* r[47] */ 
+    3.12755639223383730129768309780047275125980377197266e-01, /* logih[47] */ 
+    -7.57930782773895721056011815787401170737920404028723e-18, /* logim[47] */ 
+    8.39475110593319988799512618628582752750846924050440e-35, /* logil[47] */ 
+  } , 
+  { 
+    7.27272748947143554687500000000000000000000000000000e-01,   /* r[48] */ 
+    3.18453701316212645089365196326980367302894592285156e-01, /* logih[48] */ 
+    2.71147705440665649189983820006370647423267349507715e-17, /* logim[48] */ 
+    4.61673001741568050305139864943649666789926072891368e-34, /* logil[48] */ 
+  } , 
+  { 
+    7.23163843154907226562500000000000000000000000000000e-01,   /* r[49] */ 
+    3.24119466791566834817928111078799702227115631103516e-01, /* logih[49] */ 
+    -6.22349090807112113628215383245238541760656175683922e-18, /* logim[49] */ 
+    -2.94864944946984528585289533414905600786096792764282e-34, /* logil[49] */ 
+  } , 
+  { 
+    7.19101071357727050781250000000000000000000000000000e-01,   /* r[50] */ 
+    3.29753359015631464234985514849540777504444122314453e-01, /* logih[50] */ 
+    -2.38987037434306035496609341036867889075145964580121e-17, /* logim[50] */ 
+    -1.22161021411351376080765213758661026982900357467596e-33, /* logil[50] */ 
+  } , 
+  { 
+    7.15083837509155273437500000000000000000000000000000e-01,   /* r[51] */ 
+    3.35355487904429983014864546930766664445400238037109e-01, /* logih[51] */ 
+    -2.15530481136091842439480783176785939188081961777809e-17, /* logim[51] */ 
+    5.65377778536716902900522531845470344712374772157319e-34, /* logil[51] */ 
+  } , 
+  { 
+    7.11111068725585937500000000000000000000000000000000e-01,   /* r[52] */ 
+    3.40926646575239744585417156486073508858680725097656e-01, /* logih[52] */ 
+    1.74672070296268393919501631375949801326271042364782e-17, /* logim[52] */ 
+    1.28757784323920807504216254145051967795248381758825e-33, /* logil[52] */ 
+  } , 
+  { 
+    1.41436457633972167968750000000000000000000000000000e+00,   /* r[53] */ 
+    -3.46680367578929504723816990008344873785972595214844e-01, /* logih[53] */ 
+    -2.63487075436177288054440686474043695042741778901884e-17, /* logim[53] */ 
+    -1.38972774108545698123375234719775474495262622652200e-33, /* logil[53] */ 
+  } , 
+  { 
+    1.40659332275390625000000000000000000000000000000000e+00,   /* r[54] */ 
+    -3.41170697798120592381110327551141381263732910156250e-01, /* logih[54] */ 
+    1.93668606486849623510457675345565515553170548397263e-17, /* logim[54] */ 
+    -6.31924577586791945681481090971933602378723267089765e-34, /* logil[54] */ 
+  } , 
+  { 
+    1.39890718460083007812500000000000000000000000000000e+00,   /* r[55] */ 
+    -3.35691349380139503200126682713744230568408966064453e-01, /* logih[55] */ 
+    8.91843232308579533655667936963342665384096382048557e-18, /* logim[55] */ 
+    -7.43852632990846244963757376301756885994340719135686e-34, /* logil[55] */ 
+  } , 
+  { 
+    1.39130425453186035156250000000000000000000000000000e+00,   /* r[56] */ 
+    -3.30241619815349218836075806393637321889400482177734e-01, /* logih[56] */ 
+    -1.69271534756955752333877800530082817995576241189249e-17, /* logim[56] */ 
+    -2.05124125474152062675126703058085713735683777118919e-34, /* logil[56] */ 
+  } , 
+  { 
+    1.38378381729125976562500000000000000000000000000000e+00,   /* r[57] */ 
+    -3.24821643615624322531942880232236348092555999755859e-01, /* logih[57] */ 
+    1.93287622140617006961244731990086787828970688523722e-17, /* logim[57] */ 
+    -1.40211415833516824405184666805315188814704601258065e-33, /* logil[57] */ 
+  } , 
+  { 
+    1.37634420394897460937500000000000000000000000000000e+00,   /* r[58] */ 
+    -3.19430856448034428130000605960958637297153472900391e-01, /* logih[58] */ 
+    5.58442737360353866559969930374464901851229137435661e-18, /* logim[58] */ 
+    -2.25313306148742433454599602113064828727792769150620e-34, /* logil[58] */ 
+  } , 
+  { 
+    1.36898398399353027343750000000000000000000000000000e+00,   /* r[59] */ 
+    -3.14068847182749744106899925100151449441909790039062e-01, /* logih[59] */ 
+    1.74087330539322720259314067705480812845274240645592e-17, /* logim[59] */ 
+    2.87763442397890459672608687761118393908121210479900e-34, /* logil[59] */ 
+  } , 
+  { 
+    1.36170220375061035156250000000000000000000000000000e+00,   /* r[60] */ 
+    -3.08735537528966208498104606405831873416900634765625e-01, /* logih[60] */ 
+    2.31380218279209479391607966489385619371870731511261e-17, /* logim[60] */ 
+    5.75649697670342883220331709767832654878804183961435e-34, /* logil[60] */ 
+  } , 
+  { 
+    1.35449743270874023437500000000000000000000000000000e+00,   /* r[61] */ 
+    -3.03430487161918061023158088573836721479892730712891e-01, /* logih[61] */ 
+    5.88591784280850309549180895879864991445414905765635e-18, /* logim[61] */ 
+    3.80740105286783019924475997846877792541810370319751e-34, /* logil[61] */ 
+  } , 
+  { 
+    1.34736847877502441406250000000000000000000000000000e+00,   /* r[62] */ 
+    -2.98153415159913837140237546918797306716442108154297e-01, /* logih[62] */ 
+    -8.81391967432414632609646763074561636922040597203571e-18, /* logim[62] */ 
+    -2.02736910549706342663167850737697734462522018249963e-34, /* logil[62] */ 
+  } , 
+  { 
+    1.34031414985656738281250000000000000000000000000000e+00,   /* r[63] */ 
+    -2.92904026677480888718463347686338238418102264404297e-01, /* logih[63] */ 
+    1.79356774462556308958502912313675336181211584010969e-17, /* logim[63] */ 
+    1.02350086185905899058999882149766002774623879978153e-34, /* logil[63] */ 
+  } , 
+  { 
+    1.33333325386047363281250000000000000000000000000000e+00,   /* r[64] */ 
+    -2.87682012847134349620148441317724063992500305175781e-01, /* logih[64] */ 
+    -2.60715355783435444041951693925565689223533295668838e-17, /* logim[64] */ 
+    -9.83372234709377378449141028490939682198507140512540e-34, /* logil[64] */ 
+  } , 
+  { 
+    1.32642483711242675781250000000000000000000000000000e+00,   /* r[65] */ 
+    -2.82487230428967117656924301627441309392452239990234e-01, /* logih[65] */ 
+    2.49452771019268745755792758464310261659699707675018e-17, /* logim[65] */ 
+    -1.40230272425562150522506576584140991296902734870694e-33, /* logil[65] */ 
+  } , 
+  { 
+    1.31958770751953125000000000000000000000000000000000e+00,   /* r[66] */ 
+    -2.77319345020877350282972884087939746677875518798828e-01, /* logih[66] */ 
+    7.44521346975934828880026635948320543669274837358637e-18, /* logim[66] */ 
+    -5.41922476182319969711469733445405189836277342215443e-34, /* logil[66] */ 
+  } , 
+  { 
+    1.31282043457031250000000000000000000000000000000000e+00,   /* r[67] */ 
+    -2.72177826311169102080356196893262676894664764404297e-01, /* logih[67] */ 
+    -1.94604737767255604321061638736698666324990178271015e-17, /* logim[67] */ 
+    4.93318792723831633917605655356651628446409622108869e-34, /* logil[67] */ 
+  } , 
+  { 
+    1.30612254142761230468750000000000000000000000000000e+00,   /* r[68] */ 
+    -2.67062856029558426396164350080653093755245208740234e-01, /* logih[68] */ 
+    1.42676910305707233200559864526771082234384991613068e-17, /* logim[68] */ 
+    9.40874014190123375853921812584677628111272401841540e-34, /* logil[68] */ 
+  } , 
+  { 
+    1.29949235916137695312500000000000000000000000000000e+00,   /* r[69] */ 
+    -2.61973695252477101202970288795768283307552337646484e-01, /* logih[69] */ 
+    -1.59130185496344773949627658712806321021374170989957e-17, /* logim[69] */ 
+    2.05966526658843352548575822504612882857523370085076e-34, /* logil[69] */ 
+  } , 
+  { 
+    1.29292941093444824218750000000000000000000000000000e+00,   /* r[70] */ 
+    -2.56910505054635363020310023784986697137355804443359e-01, /* logih[70] */ 
+    -2.32939629151451727444770801596466641031683815428509e-17, /* logim[70] */ 
+    -1.43942742464573220634874496721239465737503205324375e-33, /* logil[70] */ 
+  } , 
+  { 
+    1.28643226623535156250000000000000000000000000000000e+00,   /* r[71] */ 
+    -2.51872701711453261808060233306605368852615356445312e-01, /* logih[71] */ 
+    -2.58573188266130078596915247890597291360969537163785e-17, /* logim[71] */ 
+    3.36064630885731507350249551263037246653963144676932e-34, /* logil[71] */ 
+  } , 
+  { 
+    1.27999997138977050781250000000000000000000000000000e+00,   /* r[72] */ 
+    -2.46860055579783743695543307694606482982635498046875e-01, /* logih[72] */ 
+    -1.36174299951708605118822966558244798958741114531493e-17, /* logim[72] */ 
+    -8.23883896198784591738914635896001757021238114385808e-35, /* logil[72] */ 
+  } , 
+  { 
+    1.27363181114196777343750000000000000000000000000000e+00,   /* r[73] */ 
+    -2.41872513137422084916750009142560884356498718261719e-01, /* logih[73] */ 
+    -2.91827950997726014268071786281330008614392694540440e-18, /* logim[73] */ 
+    8.66387628958027677722140876839269007945711340420961e-35, /* logil[73] */ 
+  } , 
+  { 
+    1.26732683181762695312500000000000000000000000000000e+00,   /* r[74] */ 
+    -2.36909825309450927655063878773944452404975891113281e-01, /* logih[74] */ 
+    4.97049401191734143236484721843489954792294974449682e-18, /* logim[74] */ 
+    2.12212094628219632031384179435720857347529888567725e-34, /* logil[74] */ 
+  } , 
+  { 
+    1.26108384132385253906250000000000000000000000000000e+00,   /* r[75] */ 
+    -2.31971542737545860513037609962339047342538833618164e-01, /* logih[75] */ 
+    1.20064411563385414488688519726171456939870706105353e-17, /* logim[75] */ 
+    -5.20241965000144345106493348505238495111737026311766e-34, /* logil[75] */ 
+  } , 
+  { 
+    1.25490188598632812500000000000000000000000000000000e+00,   /* r[76] */ 
+    -2.27057391030699523559732710964453872293233871459961e-01, /* logih[76] */ 
+    -9.55134517665639461592830714479938653876650013848813e-18, /* logim[76] */ 
+    -7.00052160915705629865262646818211330004502638341784e-34, /* logil[76] */ 
+  } , 
+  { 
+    1.24878048896789550781250000000000000000000000000000e+00,   /* r[77] */ 
+    -2.22167466272476882283015697794326115399599075317383e-01, /* logih[77] */ 
+    1.12308837854924459441805420173945034636561801020789e-17, /* logim[77] */ 
+    1.05992689326800868505291338111574353445179905470698e-34, /* logil[77] */ 
+  } , 
+  { 
+    1.24271845817565917968750000000000000000000000000000e+00,   /* r[78] */ 
+    -2.17301285003207084178811214769666548818349838256836e-01, /* logih[78] */ 
+    -1.37599098464784711367545798871014398359913153389606e-17, /* logim[78] */ 
+    -5.44676947016522950876420214713413739910691265570885e-34, /* logil[78] */ 
+  } , 
+  { 
+    1.23671507835388183593750000000000000000000000000000e+00,   /* r[79] */ 
+    -2.12458734101899110457978281374380458146333694458008e-01, /* logih[79] */ 
+    3.12575020468223244847667531342710056704202576314513e-18, /* logim[79] */ 
+    1.27082738610098894087384580413567050181540844264548e-35, /* logil[79] */ 
+  } , 
+  { 
+    1.23076915740966796875000000000000000000000000000000e+00,   /* r[80] */ 
+    -2.07639305173597937814733427330793347209692001342773e-01, /* logih[80] */ 
+    -1.20531726306040366742269494142059745690218464556184e-17, /* logim[80] */ 
+    3.33883514126655983920316543317695602289579500921493e-34, /* logil[80] */ 
+  } , 
+  { 
+    1.22488045692443847656250000000000000000000000000000e+00,   /* r[81] */ 
+    -2.02843253050716987306856253781006671488285064697266e-01, /* logih[81] */ 
+    -1.66453566992001313940518505696243672056063400746100e-18, /* logim[81] */ 
+    2.78446239404510241881587234176263335863162887428131e-35, /* logil[81] */ 
+  } , 
+  { 
+    1.21904754638671875000000000000000000000000000000000e+00,   /* r[82] */ 
+    -1.98069854157447239328959653903439175337553024291992e-01, /* logih[82] */ 
+    -3.74277289637934596837745314540095849706853736054736e-18, /* logim[82] */ 
+    2.20940287174632344749918330821286328950105212564345e-34, /* logil[82] */ 
+  } , 
+  { 
+    1.21327018737792968750000000000000000000000000000000e+00,   /* r[83] */ 
+    -1.93319348256398265695210625381150748580694198608398e-01, /* logih[83] */ 
+    -4.63045754803609100012916107813305239709411987466506e-18, /* logim[83] */ 
+    3.81311992624323390610440652445847060246376140730432e-34, /* logil[83] */ 
+  } , 
+  { 
+    1.20754718780517578125000000000000000000000000000000e+00,   /* r[84] */ 
+    -1.88591184708711112616441596401273272931575775146484e-01, /* logih[84] */ 
+    7.43216311628945500204739783937941202296964434266492e-18, /* logim[84] */ 
+    -4.02931080995428730719681936637527024502063366412999e-34, /* logil[84] */ 
+  } , 
+  { 
+    1.20187783241271972656250000000000000000000000000000e+00,   /* r[85] */ 
+    -1.83885194019779485419263664880418218672275543212891e-01, /* logih[85] */ 
+    4.12613043545869607985270580107985887836449099592842e-18, /* logim[85] */ 
+    -1.13080344207561908198013613253456946184091830340475e-34, /* logil[85] */ 
+  } , 
+  { 
+    1.19626164436340332031250000000000000000000000000000e+00,   /* r[86] */ 
+    -1.79201397792742966874612875471939332783222198486328e-01, /* logih[86] */ 
+    1.25197515140082668570664893296659406065442168045883e-17, /* logim[86] */ 
+    2.08673445558311131685127966451011169090072111640797e-34, /* logil[86] */ 
+  } , 
+  { 
+    1.19069766998291015625000000000000000000000000000000e+00,   /* r[87] */ 
+    -1.74539412626609380385644954003510065376758575439453e-01, /* logih[87] */ 
+    8.52219781255028950312107624449830634785785378861392e-18, /* logim[87] */ 
+    5.46720442033771639415150684633589460164820712880324e-34, /* logil[87] */ 
+  } , 
+  { 
+    1.18518519401550292968750000000000000000000000000000e+00,   /* r[88] */ 
+    -1.69899044245978042555478282338299322873353958129883e-01, /* logih[88] */ 
+    4.86800738580472456380134000450154397097303177737598e-19, /* logim[88] */ 
+    -4.48365665383134519709151659261825733866549119396251e-36, /* logil[88] */ 
+  } , 
+  { 
+    1.17972350120544433593750000000000000000000000000000e+00,   /* r[89] */ 
+    -1.65280090007780350314092743246874306350946426391602e-01, /* logih[89] */ 
+    1.05991222445546499578510819426998369466676418510398e-18, /* logim[89] */ 
+    2.15535973016890499002202117947684925307171077322261e-36, /* logil[89] */ 
+  } , 
+  { 
+    1.17431187629699707031250000000000000000000000000000e+00,   /* r[90] */ 
+    -1.60682338849634120947484916541725397109985351562500e-01, /* logih[90] */ 
+    5.38493323815703006679696841052856196024573538758454e-18, /* logim[90] */ 
+    1.60200163876329179080224417109933041789065267300895e-34, /* logil[90] */ 
+  } , 
+  { 
+    1.16894984245300292968750000000000000000000000000000e+00,   /* r[91] */ 
+    -1.56105775199027185795586092353914864361286163330078e-01, /* logih[91] */ 
+    1.32405772531609804709122583998125231935523184710352e-17, /* logim[91] */ 
+    4.88933388697666736600942679327919927438390701656817e-35, /* logil[91] */ 
+  } , 
+  { 
+    1.16363644599914550781250000000000000000000000000000e+00,   /* r[92] */ 
+    -1.51549968907714105448292229993967339396476745605469e-01, /* logih[92] */ 
+    1.77181633478899593214922561799512844823326841018122e-18, /* logim[92] */ 
+    5.44951453107128861626798538797020344311568819287008e-35, /* logil[92] */ 
+  } , 
+  { 
+    1.15837097167968750000000000000000000000000000000000e+00,   /* r[93] */ 
+    -1.47014683357163111754317696977523155510425567626953e-01, /* logih[93] */ 
+    4.46701777108311388441189058844554903695616000674812e-18, /* logim[93] */ 
+    -1.53168389834566630100313932781112142055948393405761e-34, /* logil[93] */ 
+  } , 
+  { 
+    1.15315318107604980468750000000000000000000000000000e+00,   /* r[94] */ 
+    -1.42500086821669674774781810810964088886976242065430e-01, /* logih[94] */ 
+    -2.21668083020505832726646787146199970227457581911830e-18, /* logim[94] */ 
+    -4.73140768447350921077611938776759805597533720242102e-36, /* logil[94] */ 
+  } , 
+  { 
+    1.14798212051391601562500000000000000000000000000000e+00,   /* r[95] */ 
+    -1.38005723310861472263866289722500368952751159667969e-01, /* logih[95] */ 
+    -9.06035372834454229539393713977175584764482079542462e-18, /* logim[95] */ 
+    -6.58482110068426815722709702700082916058774211791842e-34, /* logil[95] */ 
+  } , 
+  { 
+    1.14285707473754882812500000000000000000000000000000e+00,   /* r[96] */ 
+    -1.33531333019876075063336884340969845652580261230469e-01, /* logih[96] */ 
+    3.66452824974217778950176131406293356640863401093569e-18, /* logim[96] */ 
+    6.15050085774566840615703784135477182311292227710416e-35, /* logil[96] */ 
+  } , 
+  { 
+    1.13777780532836914062500000000000000000000000000000e+00,   /* r[97] */ 
+    -1.29077066489528990977930789085803553462028503417969e-01, /* logih[97] */ 
+    7.97904258955058431558707127373439732289437010877585e-19, /* logim[97] */ 
+    -4.72584148771245137732808879600361038781792271619664e-35, /* logil[97] */ 
+  } , 
+  { 
+    1.13274335861206054687500000000000000000000000000000e+00,   /* r[98] */ 
+    -1.24642441481986290807704165217728586867451667785645e-01, /* logih[98] */ 
+    -1.12998120773332791412288663337308123303520797473827e-18, /* logim[98] */ 
+    5.04751909879024305911295754405025108738663901055449e-35, /* logil[98] */ 
+  } , 
+  { 
+    1.12775325775146484375000000000000000000000000000000e+00,   /* r[99] */ 
+    -1.20227386019965673535914163494453532621264457702637e-01, /* logih[99] */ 
+    -4.10132123403305460439841682733159064509468253505934e-18, /* logim[99] */ 
+    1.89802934268459828223199224893946334512039168636632e-34, /* logil[99] */ 
+  } , 
+  { 
+    1.12280702590942382812500000000000000000000000000000e+00,   /* r[100] */ 
+    -1.15831822975702269928888199501670897006988525390625e-01, /* logih[100] */ 
+    -4.33848450767153009712329850176816190393287866962401e-18, /* logim[100] */ 
+    -3.16979691573058896647113947407157157214490081484725e-34, /* logil[100] */ 
+  } , 
+  { 
+    1.11790394783020019531250000000000000000000000000000e+00,   /* r[101] */ 
+    -1.11455456757806464773707944004854653030633926391602e-01, /* logih[101] */ 
+    -5.25227837292521929481451677551514755953859335394548e-18, /* logim[101] */ 
+    -1.35455162271740897316919848287529722248286557667632e-34, /* logil[101] */ 
+  } , 
+  { 
+    1.11304354667663574218750000000000000000000000000000e+00,   /* r[102] */ 
+    -1.07098197023655139492603893813793547451496124267578e-01, /* logih[102] */ 
+    3.47169710366632825350486634041554320998659998614468e-18, /* logim[102] */ 
+    4.16291803858237783591365989446195611338780307382474e-35, /* logil[102] */ 
+  } , 
+  { 
+    1.10822510719299316406250000000000000000000000000000e+00,   /* r[103] */ 
+    -1.02759733026446364867467764270259067416191101074219e-01, /* logih[103] */ 
+    5.14131173582414775653668171432178439238499706689565e-18, /* logim[103] */ 
+    -2.03511710633920722432014459953905354472733979743122e-34, /* logil[103] */ 
+  } , 
+  { 
+    1.10344839096069335937500000000000000000000000000000e+00,   /* r[104] */ 
+    -9.84401771213754411826712953370588365942239761352539e-02, /* logih[104] */ 
+    4.43863133643792238822177111529042861410430977956950e-18, /* logim[104] */ 
+    3.12055863098469149547827014037274497005231280699218e-34, /* logil[104] */ 
+  } , 
+  { 
+    1.09871244430541992187500000000000000000000000000000e+00,   /* r[105] */ 
+    -9.41389890512167593072945237508974969387054443359375e-02, /* logih[105] */ 
+    2.37342936135295683496202513568031672884920488134173e-19, /* logim[105] */ 
+    2.33721773003055253003147894270712826153088420940698e-35, /* logil[105] */ 
+  } , 
+  { 
+    1.09401702880859375000000000000000000000000000000000e+00,   /* r[106] */ 
+    -8.98562695172144959565585509153606835752725601196289e-02, /* logih[106] */ 
+    6.27446602451052736319026996501069657057280086335290e-19, /* logim[106] */ 
+    -3.52284010127094716016693656249620808330731317587528e-35, /* logil[106] */ 
+  } , 
+  { 
+    1.08936166763305664062500000000000000000000000000000e+00,   /* r[107] */ 
+    -8.55918986704354706196440361054555978626012802124023e-02, /* logih[107] */ 
+    -5.03513826084130895904008327416965851388338774947593e-18, /* logim[107] */ 
+    6.86424026896698901114373288904478288437409959196820e-35, /* logil[107] */ 
+  } , 
+  { 
+    1.08474564552307128906250000000000000000000000000000e+00,   /* r[108] */ 
+    -8.13455314205279167438789045263547450304031372070312e-02, /* logih[108] */ 
+    1.86223784192593707654359268192644483006930996779864e-18, /* logim[108] */ 
+    -9.08215611660981343459991418247070342987317386688394e-35, /* logil[108] */ 
+  } , 
+  { 
+    1.08016872406005859375000000000000000000000000000000e+00,   /* r[109] */ 
+    -7.71172549156562414651716608204878866672515869140625e-02, /* logih[109] */ 
+    4.37349590112793692636976332290601524356283649435490e-18, /* logim[109] */ 
+    -2.43638510650083687411626047741666976256819270953612e-34, /* logil[109] */ 
+  } , 
+  { 
+    1.07563018798828125000000000000000000000000000000000e+00,   /* r[110] */ 
+    -7.29067112034412351251333461732428986579179763793945e-02, /* logih[110] */ 
+    6.30693084361487082247322771068486204374546343933133e-18, /* logim[110] */ 
+    3.44825082371128400572272238979928316738696119124015e-34, /* logil[110] */ 
+  } , 
+  { 
+    1.07112979888916015625000000000000000000000000000000e+00,   /* r[111] */ 
+    -6.87139782297249979148290321973036043345928192138672e-02, /* logih[111] */ 
+    -4.40922228882126717948257852084234011599535648658716e-18, /* logim[111] */ 
+    2.00071285755297414487130516445636815235532199087333e-34, /* logil[111] */ 
+  } , 
+  { 
+    1.06666660308837890625000000000000000000000000000000e+00,   /* r[112] */ 
+    -6.45384615329246263959461771264614071696996688842773e-02, /* logih[112] */ 
+    6.47055724777502681297997296903095954212491541204973e-18, /* logim[112] */ 
+    -3.53995576621708408093066388957026321212073337996708e-34, /* logil[112] */ 
+  } , 
+  { 
+    1.06224060058593750000000000000000000000000000000000e+00,   /* r[113] */ 
+    -6.03804513842609302809449900450999848544597625732422e-02, /* logih[113] */ 
+    2.15703432342306119511642925211564389619524247753812e-18, /* logim[113] */ 
+    -3.99051054966201464148223117427430962485432571249835e-35, /* logil[113] */ 
+  } , 
+  { 
+    1.05785131454467773437500000000000000000000000000000e+00,   /* r[114] */ 
+    -5.62397891033892469159205518280941760167479515075684e-02, /* logih[114] */ 
+    3.28339677990388790029372693220459728960401288179580e-18, /* logim[114] */ 
+    1.51915205677141595589208947882243470550543557886170e-35, /* logil[114] */ 
+  } , 
+  { 
+    1.05349802970886230468750000000000000000000000000000e+00,   /* r[115] */ 
+    -5.21160840267197236763685452842764789238572120666504e-02, /* logih[115] */ 
+    -2.76876652450490527514912306264172616345243137067863e-19, /* logim[115] */ 
+    4.97747635693761803951848478678221385327287067714555e-36, /* logil[115] */ 
+  } , 
+  { 
+    1.04918026924133300781250000000000000000000000000000e+00,   /* r[116] */ 
+    -4.80091633070045681330739739678392652422189712524414e-02, /* logih[116] */ 
+    -1.43903217358996287866324353045636173989420593009940e-18, /* logim[116] */ 
+    9.24533961563047616614044310774847027299245259235749e-35, /* logil[116] */ 
+  } , 
+  { 
+    1.04489803314208984375000000000000000000000000000000e+00,   /* r[117] */ 
+    -4.39193047153486545997047585387917933985590934753418e-02, /* logih[117] */ 
+    -1.76247347066130256555880115492006953917590179181782e-18, /* logim[117] */ 
+    2.95067167680037492936848210009098107643918346324819e-35, /* logil[117] */ 
+  } , 
+  { 
+    1.04065036773681640625000000000000000000000000000000e+00,   /* r[118] */ 
+    -3.98458712942959952796329048396728467196226119995117e-02, /* logih[118] */ 
+    3.12956491324511750770873688790894657687633404551217e-18, /* logim[118] */ 
+    9.08530842942513514982993220469010912494881545842223e-35, /* logil[118] */ 
+  } , 
+  { 
+    1.03643727302551269531250000000000000000000000000000e+00,   /* r[119] */ 
+    -3.57891329972944774451271143789199413731694221496582e-02, /* logih[119] */ 
+    -2.94786708868720304892365707065135221787713948130908e-19, /* logim[119] */ 
+    1.84384763058385810856389175018656477977822636794864e-35, /* logil[119] */ 
+  } , 
+  { 
+    1.03225803375244140625000000000000000000000000000000e+00,   /* r[120] */ 
+    -3.17486685122574663342476242178236134350299835205078e-02, /* logih[120] */ 
+    -3.03821748520802146852642560679641488082417537178322e-18, /* logim[120] */ 
+    6.90127669441551609256721347857289051065660383455449e-35, /* logil[120] */ 
+  } , 
+  { 
+    1.02811241149902343750000000000000000000000000000000e+00,   /* r[121] */ 
+    -2.77245107619511835239656249996187398210167884826660e-02, /* logih[121] */ 
+    1.56537436220084983093655029081028016172956628311065e-18, /* logim[121] */ 
+    -4.26959324792631463690822650182944301609062827136870e-35, /* logil[121] */ 
+  } , 
+  { 
+    1.02399992942810058593750000000000000000000000000000e+00,   /* r[122] */ 
+    -2.37164576994431455791989549197751330211758613586426e-02, /* logih[122] */ 
+    -1.57190014657555079881764699090245893269914973184857e-19, /* logim[122] */ 
+    4.62721637019171363059082221740445258999073602747011e-36, /* logil[122] */ 
+  } , 
+  { 
+    1.01992034912109375000000000000000000000000000000000e+00,   /* r[123] */ 
+    -1.97245351501005340699723689112943247891962528228760e-02, /* logih[123] */ 
+    1.34458916305708123412045028332259969564528051018263e-18, /* logim[123] */ 
+    -6.02768376061644464555810636396264987280148524662430e-35, /* logil[123] */ 
+  } , 
+  { 
+    1.01587295532226562500000000000000000000000000000000e+00,   /* r[124] */ 
+    -1.57482973634926158579272481574662378989160060882568e-02, /* logih[124] */ 
+    -1.00208727697080412925749596659626020152032796409604e-18, /* logim[124] */ 
+    7.75790823155383991507800579878754988160969197338737e-35, /* logil[124] */ 
+  } , 
+  { 
+    1.01185774803161621093750000000000000000000000000000e+00,   /* r[125] */ 
+    -1.17879957989121472716753658005472971126437187194824e-02, /* logih[125] */ 
+    2.12843993900806841444093729096134188145078357457959e-19, /* logim[125] */ 
+    -7.36236149534638490756917054603187520349493909791838e-36, /* logil[125] */ 
+  } , 
+  { 
+    1.00787401199340820312500000000000000000000000000000e+00,   /* r[126] */ 
+    -7.84317373573558719590526067122482345439493656158447e-03, /* logih[126] */ 
+    -2.76470798179560918828283984091643257584228907545928e-19, /* logim[126] */ 
+    1.46121103426200283031313413564673422143931331178612e-35, /* logil[126] */ 
+  } , 
+  { 
+    1.00392150878906250000000000000000000000000000000000e+00,   /* r[127] */ 
+    -3.91383971648977691676352108629544090945273637771606e-03, /* logih[127] */ 
+    -4.28019276224719221462393891683495367484578724177817e-19, /* logim[127] */ 
+    -2.25272542183557712010826889962617244762256960750126e-35, /* logil[127] */ 
+  } }; 
+ 
diff --git a/src/crlibm/log1p.c b/src/crlibm/log1p.c
new file mode 100644
index 0000000..6ab43c9
--- /dev/null
+++ b/src/crlibm/log1p.c
@@ -0,0 +1,1295 @@
+/*
+ * Correctly rounded log1p(x) = log(1 + x)
+ *
+ * Author : Christoph Lauter (ENS Lyon)
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "log-td.h"
+
+#define AVOID_FMA 0
+
+
+
+void log1p_td_accurate(double *logh, double *logm, double *logl, double ed, int index, 
+		       double zh, double zm, double zl, double logih, double logim) {
+  double highPoly, t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l, t8h, t8l, t9h, t9l, t10h, t10l, t11h, t11l;
+  double t12h, t12l, t13h, t13l, t14h, t14l, zSquareh, zSquarem, zSquarel, zCubeh, zCubem, zCubel, higherPolyMultZh, higherPolyMultZm;
+  double higherPolyMultZl, zSquareHalfh, zSquareHalfm, zSquareHalfl, polyWithSquareh, polyWithSquarem, polyWithSquarel;
+  double polyh, polym, polyl, logil, logyh, logym, logyl, loghover, logmover, loglover, log2edhover, log2edmover, log2edlover;
+  double log2edh, log2edm, log2edl;
+
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+
+  /* Accurate phase:
+
+     Argument reduction is already done. 
+     We must return logh, logm and logl representing the intermediate result in 118 bits precision.
+
+     We use a 14 degree polynomial, computing the first 3 (the first is 0) coefficients in triple double,
+     calculating the next 7 coefficients in double double arithmetics and the last in double.
+
+  */
+
+  /* Start of the horner scheme */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(accPolyC14,zh,accPolyC13),zh,accPolyC12),zh,accPolyC11),zh,accPolyC10);
+#else
+  highPoly = accPolyC10 + zh * (accPolyC11 + zh * (accPolyC12 + zh * (accPolyC13 + zh * accPolyC14)));
+#endif
+  
+  /* We want to write 
+
+     accPolyC3 + zh * (accPoly4 + zh * (accPoly5 + zh * (accPoly6 + zh * (accPoly7 + zh * (accPoly8 + zh * (accPoly9 + zh * highPoly))))));
+     (        t14  t13         t12  t11         t10   t9          t8   t7          t6   t5          t4   t3          t2   t1  )
+
+     with all additions and multiplications in double double arithmetics
+     but we will produce intermediate results labelled t1h/t1l thru t14h/t14l
+  */
+
+  Mul12(&t1h, &t1l, zh, highPoly);
+  Add22(&t2h, &t2l, accPolyC9h, accPolyC9l, t1h, t1l);
+  Mul22(&t3h, &t3l, zh, zm, t2h, t2l);
+  Add22(&t4h, &t4l, accPolyC8h, accPolyC8l, t3h, t3l);
+  Mul22(&t5h, &t5l, zh, zm, t4h, t4l);
+  Add22(&t6h, &t6l, accPolyC7h, accPolyC7l, t5h, t5l);
+  Mul22(&t7h, &t7l, zh, zm, t6h, t6l);
+  Add22(&t8h, &t8l, accPolyC6h, accPolyC6l, t7h, t7l);
+  Mul22(&t9h, &t9l, zh, zm, t8h, t8l);
+  Add22(&t10h, &t10l, accPolyC5h, accPolyC5l, t9h, t9l);
+  Mul22(&t11h, &t11l, zh, zm, t10h, t10l);
+  Add22(&t12h, &t12l, accPolyC4h, accPolyC4l, t11h, t11l);
+  Mul22(&t13h, &t13l, zh, zm, t12h, t12l);
+  Add22(&t14h, &t14l, accPolyC3h, accPolyC3l, t13h, t13l);
+
+  /* We must now prepare (zh + zm)^2 and (zh + zm)^3 as triple doubles */
+
+  Mul33(&zSquareh, &zSquarem, &zSquarel, zh, zm, zl, zh, zm, zl); 
+  Mul33(&zCubeh, &zCubem, &zCubel, zh, zm, zl, zSquareh, zSquarem, zSquarel); 
+  
+  /* We can now multiplicate the middle and higher polynomial by z^3 */
+
+  Mul233(&higherPolyMultZh, &higherPolyMultZm, &higherPolyMultZl, t14h, t14l, zCubeh, zCubem, zCubel);
+  
+  /* Multiply now z^2 by -1/2 (exact op) and add to middle and higher polynomial */
+  
+  zSquareHalfh = zSquareh * -0.5;
+  zSquareHalfm = zSquarem * -0.5;
+  zSquareHalfl = zSquarel * -0.5;
+
+  Add33(&polyWithSquareh, &polyWithSquarem, &polyWithSquarel, 
+	zSquareHalfh, zSquareHalfm, zSquareHalfl, 
+	higherPolyMultZh, higherPolyMultZm, higherPolyMultZl);
+
+  /* Add now zh and zm to obtain the polynomial evaluation result */
+
+  Add33(&polyh, &polym, &polyl, zh, zm, zl, polyWithSquareh, polyWithSquarem, polyWithSquarel);
+
+  /* Reconstruct now log(y) = log(1 + z) - log(ri) by adding logih, logim, logil
+     logil has not been read to the time, do this first 
+  */
+
+  logil =  argredtable[index].logil;
+
+  Add33(&logyh, &logym, &logyl, logih, logim, logil, polyh, polym, polyl);
+
+  /* Multiply log2 with E, i.e. log2h, log2m, log2l by ed 
+     ed is always less than 2^(12) and log2h and log2m are stored with at least 12 trailing zeros 
+     So multiplying naively is correct (up to 134 bits at least)
+
+     The final result is thus obtained by adding log2 * E to log(y)
+  */
+
+  log2edhover = log2h * ed;
+  log2edmover = log2m * ed;
+  log2edlover = log2l * ed;
+
+  /* It may be necessary to renormalize the tabulated value (multiplied by ed) before adding
+     the to the log(y)-result 
+
+     If needed, uncomment the following Renormalize3-Statement and comment out the copies 
+     following it.
+  */
+
+  /* Renormalize3(&log2edh, &log2edm, &log2edl, log2edhover, log2edmover, log2edlover); */
+
+  log2edh = log2edhover;
+  log2edm = log2edmover;
+  log2edl = log2edlover;
+
+  Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyh, logym, logyl);
+
+  /* Since we can not guarantee in each addition and multiplication procedure that 
+     the results are not overlapping, we must renormalize the result before handing
+     it over to the final rounding
+  */
+
+  Renormalize3(logh,logm,logl,loghover,logmover,loglover);
+
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+ double log1p_rn(double x){ 
+   db_number xdb, shdb, scaledb;
+   double yh, yl, ed, ri, logih, logim, yhrih, yhril, ylri, t1, t2, t3, t4, t5, t6, zh, zm, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, logl, roundcst;
+   double sh, sl;
+   int E, index;
+
+
+   xdb.d=x;
+
+   /* Filter cases */
+   if ((xdb.i[HI] & 0x7fffffff) < 0x3c900000) {
+     /* We are less than 2^(-54) and return simply an adjusted x 
+	This captures also the algebraic case x = 0
+     */
+     return x;
+   }
+
+   if (((xdb.i[HI] & 0x80000000) != 0) && ((xdb.i[HI] & 0x7fffffff) >= 0x3ff00000)) {
+     /* We are less or equal than -1 (-inf and NaN, too), 
+	we return -inf for -1 and NaN otherwise 
+     */
+     if (x == -1.0) return x/0.0;
+
+     
+     return (x-x)/0.0;
+   }
+
+   if ((xdb.i[HI] & 0x7ff00000) == 0x7ff00000) {
+     /* We are +inf or NaN 
+	If +inf, we return +inf (x+x)
+	If NaN, we return NaN (x+x)
+     */
+     return x+x;
+   }
+
+   /* Test if |x| < 2^(-8)
+      
+   If yes, short-circuit the range reduction 
+   
+   */
+   
+   if ((xdb.i[HI] & 0x7fffffff) < 0x3f700000) {
+     /* Use the polynomial p(zh + zl) approximating log(1+zh+zl) directly 
+	Set E and index to values that read 0.0 in the accurate phase.
+     */
+     logih = 0.0;
+     logim = 0.0;
+     index = 0;
+     ed = 0.0;
+     index = 0;
+     zh = x;
+     zm = 0.0;
+     zl = 0.0;
+   } else {
+     /* If we are here, |x| >= 2^(-8) and we must perform range reduction */
+     
+     /* Compute first exactly
+	
+        sh + sl = 1 + x 
+     
+        x can move over 1, so use a conditional Add12
+     */
+     
+     Add12Cond(sh,sl,1.0,x);
+     
+     /* Transform higher order double to integer */
+     
+     shdb.d = sh;
+
+     /* Extract exponent and mantissa 
+	Do range reduction,
+	yielding to E holding the exponent and
+	y the mantissa between sqrt(2)/2 and sqrt(2)
+     */
+     E = 0;
+     E += (shdb.i[HI]>>20)-1023;             /* extract the exponent */
+     index = (shdb.i[HI] & 0x000fffff);
+     shdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+     index = (index + (1<<(20-L-1))) >> (20-L);
+     
+     /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+     if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+       shdb.i[HI] -= 0x00100000; 
+       E++;
+     }
+     
+     
+     /* Transform shdb to yh */
+     yh = shdb.d;
+     
+    
+     /* Compute the index to the table */
+     index = index & INDEXMASK;
+     
+     /* Cast integer E into double ed for multiplication later */
+     ed = (double) E;
+     
+     /* 
+	Read tables:
+	Read one float for ri
+	Read the first two doubles for -log(r_i) (out of three)
+	    
+	Organization of the table:
+	
+	one struct entry per index, the struct entry containing 
+	r, logih, logim and logil in this order
+     */
+     
+     
+     ri = argredtable[index].ri;
+     /* 
+	Actually we don't need the logarithm entries now
+	Move the following two lines to the eventual reconstruction
+	As long as we don't have any if in the following code, we can overlap 
+	memory access with calculations 
+     */
+     logih = argredtable[index].logih;
+     logim = argredtable[index].logim;
+     
+     /* Test if we have a simple range reduction or a complicated one 
+	
+        Simple range reduction for x < 0: x + 1 is exact, sl = 0 exactly
+        Simple range reduction for x > 2^(125) (sh > 2^(125)): x + 1 is not exact but its error less than 2^(-125)
+     
+	Complicated range reduction: other cases 
+	
+     */
+
+     
+     if ((sl == 0.0) || (E > 125)) {
+       /* Simple range reduction */
+       
+       Mul12(&yhrih, &yhril, yh, ri);
+       t1 = yhrih - 1.0; 
+       Add12Cond(zh, zm, t1, yhril); 
+       zl = 0.0;
+       
+     } else {
+       /* Complicated range reduction; E <= 125 */
+       
+       
+       /* Scale sl accordingly to sh, from which the exponent was extracted 
+	  
+          We form first 2^(-E) and multiply sl with this value; this gives yl.
+       */
+       
+       scaledb.i[HI] = (-E + 1023) << 20;
+       scaledb.i[LO] = 0;
+       
+       yl = sl * scaledb.d;
+       
+       
+       /* Do complicated range reduction:
+	
+          zh + zm + zl = (yh + yl) * ri - 1.0 
+
+
+	  We use zh + zm in the quick phase and zh + zm + zl in the accurate phase
+	  
+	  The multiplication yl * ri is exact because yl contains at most 9 bits and
+	  ri contains at most 24 bits.
+	  
+	  The substraction yhrih - 1.0 is exact as per Sterbenz' lemma.
+
+       */
+     
+       Mul12(&yhrih,&yhril,yh,ri);
+       ylri = yl * ri;
+       
+       t1 = yhrih - 1.0;
+       
+       /* The unnormalized triple-double t1 + yhril + ylri is equal to (yh + yl) * ri - 1.0 
+	  As t1 can move over yhril and yhri can move over ylri, we normalize first these
+	  values pairwise with Add12Conds. Then we renormalize the pairs by a 
+	  "inverted" (A.E.) Renormalize3.
+       */
+       
+       Add12Cond(t2,t3,yhril,ylri);
+       Add12Cond(t4,t5,t1,t2);
+       
+       Add12Cond(t6,zl,t3,t5);
+       Add12Cond(zh,zm,t4,t6);
+       
+     }
+   }
+   
+   
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zm
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zm));
+   Add22(&t2h, &t2l, zh, zm, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = ROUNDCST1;
+   else
+      roundcst = ROUNDCST2;
+
+
+   if(logh == (logh + (logm * roundcst)))
+     return logh;
+   else 
+     {
+       
+#if DEBUG
+       printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+       log1p_td_accurate(&logh, &logm, &logl, ed, index, zh, zm, zl, logih, logim); 
+       
+       ReturnRoundToNearest3(logh, logm, logl);
+
+     } /* Accurate phase launched */
+ }
+
+
+
+
+double log1p_ru(double x) {
+   db_number xdb, shdb, scaledb;
+   double yh, yl, ed, ri, logih, logim, yhrih, yhril, ylri, t1, t2, t3, t4, t5, t6, zh, zm, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, logl, roundcst;
+   double sh, sl;
+   int E, index;
+
+
+   xdb.d=x;
+
+   /* Filter cases */
+   if ((xdb.i[HI] & 0x7fffffff) < 0x3c900000) {
+     /* We are less than 2^(-54) and return simply an adjusted x 
+	
+        If x = 0, the result is algebraic and equal to 0.
+	
+	The series for log(1 + x) = x - 1/2 * x^2 + ... is alternated
+	and converges in this interval. 
+	The truncation rest -1/2 * x^2 + 1/3 * x^3 - ... is
+	always negative, so log(1 + x) is always less than x but less than
+	1 ulp of x away.
+	We round up, so we return x.
+
+     */
+     return x;
+   }
+
+   if (((xdb.i[HI] & 0x80000000) != 0) && ((xdb.i[HI] & 0x7fffffff) >= 0x3ff00000)) {
+     /* We are less or equal than -1 (-inf and NaN, too), 
+	we return -inf for -1 and NaN otherwise 
+     */
+     if (x == -1.0) return x/0.0;
+
+     
+     return (x-x)/0.0;
+   }
+
+   if ((xdb.i[HI] & 0x7ff00000) == 0x7ff00000) {
+     /* We are +inf or NaN 
+	If +inf, we return +inf (x+x)
+	If NaN, we return NaN (x+x)
+     */
+     return x+x;
+   }
+
+   /* Test if |x| < 2^(-8)
+      
+   If yes, short-circuit the range reduction 
+   
+   */
+   
+   if ((xdb.i[HI] & 0x7fffffff) < 0x3f700000) {
+     /* Use the polynomial p(zh + zl) approximating log(1+zh+zl) directly 
+	Set E and index to values that read 0.0 in the accurate phase.
+     */
+     logih = 0.0;
+     logim = 0.0;
+     index = 0;
+     ed = 0.0;
+     index = 0;
+     zh = x;
+     zm = 0.0;
+     zl = 0.0;
+   } else {
+     /* If we are here, |x| >= 2^(-8) and we must perform range reduction */
+     
+     /* Compute first exactly
+	
+        sh + sl = 1 + x 
+     
+        x can move over 1, so use a conditional Add12
+     */
+     
+     Add12Cond(sh,sl,1.0,x);
+     
+     /* Transform higher order double to integer */
+     
+     shdb.d = sh;
+
+     /* Extract exponent and mantissa 
+	Do range reduction,
+	yielding to E holding the exponent and
+	y the mantissa between sqrt(2)/2 and sqrt(2)
+     */
+     E = 0;
+     E += (shdb.i[HI]>>20)-1023;             /* extract the exponent */
+     index = (shdb.i[HI] & 0x000fffff);
+     shdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+     index = (index + (1<<(20-L-1))) >> (20-L);
+     
+     /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+     if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+       shdb.i[HI] -= 0x00100000; 
+       E++;
+     }
+     
+     
+     /* Transform shdb to yh */
+     yh = shdb.d;
+     
+    
+     /* Compute the index to the table */
+     index = index & INDEXMASK;
+     
+     /* Cast integer E into double ed for multiplication later */
+     ed = (double) E;
+     
+     /* 
+	Read tables:
+	Read one float for ri
+	Read the first two doubles for -log(r_i) (out of three)
+	    
+	Organization of the table:
+	
+	one struct entry per index, the struct entry containing 
+	r, logih, logim and logil in this order
+     */
+     
+     
+     ri = argredtable[index].ri;
+     /* 
+	Actually we don't need the logarithm entries now
+	Move the following two lines to the eventual reconstruction
+	As long as we don't have any if in the following code, we can overlap 
+	memory access with calculations 
+     */
+     logih = argredtable[index].logih;
+     logim = argredtable[index].logim;
+     
+     /* Test if we have a simple range reduction or a complicated one 
+	
+        Simple range reduction for x < 0: x + 1 is exact, sl = 0 exactly
+        Simple range reduction for x > 2^(125) (sh > 2^(125)): x + 1 is not exact but its error less than 2^(-125)
+     
+	Complicated range reduction: other cases 
+	
+     */
+
+     
+     if ((sl == 0.0) || (E > 125)) {
+       /* Simple range reduction */
+       
+       Mul12(&yhrih, &yhril, yh, ri);
+       t1 = yhrih - 1.0; 
+       Add12Cond(zh, zm, t1, yhril); 
+       zl = 0.0;
+       
+     } else {
+       /* Complicated range reduction; E <= 125 */
+       
+       
+       /* Scale sl accordingly to sh, from which the exponent was extracted 
+	  
+          We form first 2^(-E) and multiply sl with this value; this gives yl.
+       */
+       
+       scaledb.i[HI] = (-E + 1023) << 20;
+       scaledb.i[LO] = 0;
+       
+       yl = sl * scaledb.d;
+       
+       
+       /* Do complicated range reduction:
+	
+          zh + zm + zl = (yh + yl) * ri - 1.0 
+
+
+	  We use zh + zm in the quick phase and zh + zm + zl in the accurate phase
+	  
+	  The multiplication yl * ri is exact because yl contains at most 9 bits and
+	  ri contains at most 24 bits.
+	  
+	  The substraction yhrih - 1.0 is exact as per Sterbenz' lemma.
+
+       */
+     
+       Mul12(&yhrih,&yhril,yh,ri);
+       ylri = yl * ri;
+       
+       t1 = yhrih - 1.0;
+       
+       /* The unnormalized triple-double t1 + yhril + ylri is equal to (yh + yl) * ri - 1.0 
+	  As t1 can move over yhril and yhri can move over ylri, we normalize first these
+	  values pairwise with Add12Conds. Then we renormalize the pairs by a 
+	  "inverted" (A.E.) Renormalize3.
+       */
+       
+       Add12Cond(t2,t3,yhril,ylri);
+       Add12Cond(t4,t5,t1,t2);
+       
+       Add12Cond(t6,zl,t3,t5);
+       Add12Cond(zh,zm,t4,t6);
+       
+     }
+   }
+   
+   
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zm
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zm));
+   Add22(&t2h, &t2l, zh, zm, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RU(logh, logm, roundcst);
+       
+#if DEBUG
+       printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+       log1p_td_accurate(&logh, &logm, &logl, ed, index, zh, zm, zl, logih, logim); 
+       
+       ReturnRoundUpwards3(logh, logm, logl);
+}
+
+double log1p_rd(double x) {
+   db_number xdb, shdb, scaledb;
+   double yh, yl, ed, ri, logih, logim, yhrih, yhril, ylri, t1, t2, t3, t4, t5, t6, zh, zm, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, logl, roundcst;
+   double sh, sl;
+   int E, index;
+
+
+   xdb.d=x;
+
+   /* Filter cases */
+   if ((xdb.i[HI] & 0x7fffffff) < 0x3c900000) {
+     /* We are less than 2^(-54) and return simply an adjusted x 
+	
+        If x = 0, the result is algebraic and equal to 0.
+	
+	The series for log(1 + x) = x - 1/2 * x^2 + ... is alternated
+	and converges in this interval. 
+	The truncation rest -1/2 * x^2 + 1/3 * x^3 - ... is
+	always negative, so log(1 + x) is always less than x but less than
+	1 ulp of x away.
+	We round down, so we return x - 1ulp;
+	
+     */
+
+     if (x == 0.0) return x;
+
+     if (x > 0) {
+       xdb.l--;
+     } else {
+       xdb.l++;
+     }
+     return xdb.d;
+   }
+
+   if (((xdb.i[HI] & 0x80000000) != 0) && ((xdb.i[HI] & 0x7fffffff) >= 0x3ff00000)) {
+     /* We are less or equal than -1 (-inf and NaN, too), 
+	we return -inf for -1 and NaN otherwise 
+     */
+     if (x == -1.0) return x/0.0;
+
+     
+     return (x-x)/0.0;
+   }
+
+   if ((xdb.i[HI] & 0x7ff00000) == 0x7ff00000) {
+     /* We are +inf or NaN 
+	If +inf, we return +inf (x+x)
+	If NaN, we return NaN (x+x)
+     */
+     return x+x;
+   }
+
+   /* Test if |x| < 2^(-8)
+      
+   If yes, short-circuit the range reduction 
+   
+   */
+   
+   if ((xdb.i[HI] & 0x7fffffff) < 0x3f700000) {
+     /* Use the polynomial p(zh + zl) approximating log(1+zh+zl) directly 
+	Set E and index to values that read 0.0 in the accurate phase.
+     */
+     logih = 0.0;
+     logim = 0.0;
+     index = 0;
+     ed = 0.0;
+     index = 0;
+     zh = x;
+     zm = 0.0;
+     zl = 0.0;
+   } else {
+     /* If we are here, |x| >= 2^(-8) and we must perform range reduction */
+     
+     /* Compute first exactly
+	
+        sh + sl = 1 + x 
+     
+        x can move over 1, so use a conditional Add12
+     */
+     
+     Add12Cond(sh,sl,1.0,x);
+     
+     /* Transform higher order double to integer */
+     
+     shdb.d = sh;
+
+     /* Extract exponent and mantissa 
+	Do range reduction,
+	yielding to E holding the exponent and
+	y the mantissa between sqrt(2)/2 and sqrt(2)
+     */
+     E = 0;
+     E += (shdb.i[HI]>>20)-1023;             /* extract the exponent */
+     index = (shdb.i[HI] & 0x000fffff);
+     shdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+     index = (index + (1<<(20-L-1))) >> (20-L);
+     
+     /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+     if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+       shdb.i[HI] -= 0x00100000; 
+       E++;
+     }
+     
+     
+     /* Transform shdb to yh */
+     yh = shdb.d;
+     
+    
+     /* Compute the index to the table */
+     index = index & INDEXMASK;
+     
+     /* Cast integer E into double ed for multiplication later */
+     ed = (double) E;
+     
+     /* 
+	Read tables:
+	Read one float for ri
+	Read the first two doubles for -log(r_i) (out of three)
+	    
+	Organization of the table:
+	
+	one struct entry per index, the struct entry containing 
+	r, logih, logim and logil in this order
+     */
+     
+     
+     ri = argredtable[index].ri;
+     /* 
+	Actually we don't need the logarithm entries now
+	Move the following two lines to the eventual reconstruction
+	As long as we don't have any if in the following code, we can overlap 
+	memory access with calculations 
+     */
+     logih = argredtable[index].logih;
+     logim = argredtable[index].logim;
+     
+     /* Test if we have a simple range reduction or a complicated one 
+	
+        Simple range reduction for x < 0: x + 1 is exact, sl = 0 exactly
+        Simple range reduction for x > 2^(125) (sh > 2^(125)): x + 1 is not exact but its error less than 2^(-125)
+     
+	Complicated range reduction: other cases 
+	
+     */
+
+     
+     if ((sl == 0.0) || (E > 125)) {
+       /* Simple range reduction */
+       
+       Mul12(&yhrih, &yhril, yh, ri);
+       t1 = yhrih - 1.0; 
+       Add12Cond(zh, zm, t1, yhril); 
+       zl = 0.0;
+       
+     } else {
+       /* Complicated range reduction; E <= 125 */
+       
+       
+       /* Scale sl accordingly to sh, from which the exponent was extracted 
+	  
+          We form first 2^(-E) and multiply sl with this value; this gives yl.
+       */
+       
+       scaledb.i[HI] = (-E + 1023) << 20;
+       scaledb.i[LO] = 0;
+       
+       yl = sl * scaledb.d;
+       
+       
+       /* Do complicated range reduction:
+	
+          zh + zm + zl = (yh + yl) * ri - 1.0 
+
+
+	  We use zh + zm in the quick phase and zh + zm + zl in the accurate phase
+	  
+	  The multiplication yl * ri is exact because yl contains at most 9 bits and
+	  ri contains at most 24 bits.
+	  
+	  The substraction yhrih - 1.0 is exact as per Sterbenz' lemma.
+
+       */
+     
+       Mul12(&yhrih,&yhril,yh,ri);
+       ylri = yl * ri;
+       
+       t1 = yhrih - 1.0;
+       
+       /* The unnormalized triple-double t1 + yhril + ylri is equal to (yh + yl) * ri - 1.0 
+	  As t1 can move over yhril and yhri can move over ylri, we normalize first these
+	  values pairwise with Add12Conds. Then we renormalize the pairs by a 
+	  "inverted" (A.E.) Renormalize3.
+       */
+       
+       Add12Cond(t2,t3,yhril,ylri);
+       Add12Cond(t4,t5,t1,t2);
+       
+       Add12Cond(t6,zl,t3,t5);
+       Add12Cond(zh,zm,t4,t6);
+       
+     }
+   }
+   
+   
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zm
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zm));
+   Add22(&t2h, &t2l, zh, zm, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RD(logh, logm, roundcst);
+       
+#if DEBUG
+       printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+       log1p_td_accurate(&logh, &logm, &logl, ed, index, zh, zm, zl, logih, logim); 
+       
+       ReturnRoundDownwards3(logh, logm, logl);
+}
+
+double log1p_rz(double x) {
+   db_number xdb, shdb, scaledb;
+   double yh, yl, ed, ri, logih, logim, yhrih, yhril, ylri, t1, t2, t3, t4, t5, t6, zh, zm, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, logl, roundcst;
+   double sh, sl;
+   int E, index;
+
+
+   xdb.d=x;
+
+   /* Filter cases */
+   if ((xdb.i[HI] & 0x7fffffff) < 0x3c900000) {
+     /* We are less than 2^(-54) and return simply an adjusted x 
+	
+        If x = 0, the result is algebraic and equal to 0.
+	
+	The series for log(1 + x) = x - 1/2 * x^2 + ... is alternated
+	and converges in this interval. 
+	The truncation rest -1/2 * x^2 + 1/3 * x^3 - ... is
+	always negative, so log(1 + x) is always less than x but less than
+	1 ulp of x away.
+	For x < 0, we have log(1 + x) < 0, so we round up and return x;
+	For x > 0, we round down and return x - 1ulp
+
+     */
+     if (x > 0) {
+       xdb.l--;
+       return xdb.d;
+     }
+
+     /* Algebraic case x == 0.0 and round up */
+
+     return x;
+   }
+
+   if (((xdb.i[HI] & 0x80000000) != 0) && ((xdb.i[HI] & 0x7fffffff) >= 0x3ff00000)) {
+     /* We are less or equal than -1 (-inf and NaN, too), 
+	we return -inf for -1 and NaN otherwise 
+     */
+     if (x == -1.0) return x/0.0;
+
+     
+     return (x-x)/0.0;
+   }
+
+   if ((xdb.i[HI] & 0x7ff00000) == 0x7ff00000) {
+     /* We are +inf or NaN 
+	If +inf, we return +inf (x+x)
+	If NaN, we return NaN (x+x)
+     */
+     return x+x;
+   }
+
+   /* Test if |x| < 2^(-8)
+      
+   If yes, short-circuit the range reduction 
+   
+   */
+   
+   if ((xdb.i[HI] & 0x7fffffff) < 0x3f700000) {
+     /* Use the polynomial p(zh + zl) approximating log(1+zh+zl) directly 
+	Set E and index to values that read 0.0 in the accurate phase.
+     */
+     logih = 0.0;
+     logim = 0.0;
+     index = 0;
+     ed = 0.0;
+     index = 0;
+     zh = x;
+     zm = 0.0;
+     zl = 0.0;
+   } else {
+     /* If we are here, |x| >= 2^(-8) and we must perform range reduction */
+     
+     /* Compute first exactly
+	
+        sh + sl = 1 + x 
+     
+        x can move over 1, so use a conditional Add12
+     */
+     
+     Add12Cond(sh,sl,1.0,x);
+     
+     /* Transform higher order double to integer */
+     
+     shdb.d = sh;
+
+     /* Extract exponent and mantissa 
+	Do range reduction,
+	yielding to E holding the exponent and
+	y the mantissa between sqrt(2)/2 and sqrt(2)
+     */
+     E = 0;
+     E += (shdb.i[HI]>>20)-1023;             /* extract the exponent */
+     index = (shdb.i[HI] & 0x000fffff);
+     shdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+     index = (index + (1<<(20-L-1))) >> (20-L);
+     
+     /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+     if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+       shdb.i[HI] -= 0x00100000; 
+       E++;
+     }
+     
+     
+     /* Transform shdb to yh */
+     yh = shdb.d;
+     
+    
+     /* Compute the index to the table */
+     index = index & INDEXMASK;
+     
+     /* Cast integer E into double ed for multiplication later */
+     ed = (double) E;
+     
+     /* 
+	Read tables:
+	Read one float for ri
+	Read the first two doubles for -log(r_i) (out of three)
+	    
+	Organization of the table:
+	
+	one struct entry per index, the struct entry containing 
+	r, logih, logim and logil in this order
+     */
+     
+     
+     ri = argredtable[index].ri;
+     /* 
+	Actually we don't need the logarithm entries now
+	Move the following two lines to the eventual reconstruction
+	As long as we don't have any if in the following code, we can overlap 
+	memory access with calculations 
+     */
+     logih = argredtable[index].logih;
+     logim = argredtable[index].logim;
+     
+     /* Test if we have a simple range reduction or a complicated one 
+	
+        Simple range reduction for x < 0: x + 1 is exact, sl = 0 exactly
+        Simple range reduction for x > 2^(125) (sh > 2^(125)): x + 1 is not exact but its error less than 2^(-125)
+     
+	Complicated range reduction: other cases 
+	
+     */
+
+     
+     if ((sl == 0.0) || (E > 125)) {
+       /* Simple range reduction */
+       
+       Mul12(&yhrih, &yhril, yh, ri);
+       t1 = yhrih - 1.0; 
+       Add12Cond(zh, zm, t1, yhril); 
+       zl = 0.0;
+       
+     } else {
+       /* Complicated range reduction; E <= 125 */
+       
+       
+       /* Scale sl accordingly to sh, from which the exponent was extracted 
+	  
+          We form first 2^(-E) and multiply sl with this value; this gives yl.
+       */
+       
+       scaledb.i[HI] = (-E + 1023) << 20;
+       scaledb.i[LO] = 0;
+       
+       yl = sl * scaledb.d;
+       
+       
+       /* Do complicated range reduction:
+	
+          zh + zm + zl = (yh + yl) * ri - 1.0 
+
+
+	  We use zh + zm in the quick phase and zh + zm + zl in the accurate phase
+	  
+	  The multiplication yl * ri is exact because yl contains at most 9 bits and
+	  ri contains at most 24 bits.
+	  
+	  The substraction yhrih - 1.0 is exact as per Sterbenz' lemma.
+
+       */
+     
+       Mul12(&yhrih,&yhril,yh,ri);
+       ylri = yl * ri;
+       
+       t1 = yhrih - 1.0;
+       
+       /* The unnormalized triple-double t1 + yhril + ylri is equal to (yh + yl) * ri - 1.0 
+	  As t1 can move over yhril and yhri can move over ylri, we normalize first these
+	  values pairwise with Add12Conds. Then we renormalize the pairs by a 
+	  "inverted" (A.E.) Renormalize3.
+       */
+       
+       Add12Cond(t2,t3,yhril,ylri);
+       Add12Cond(t4,t5,t1,t2);
+       
+       Add12Cond(t6,zl,t3,t5);
+       Add12Cond(zh,zm,t4,t6);
+       
+     }
+   }
+   
+   
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zm
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zm));
+   Add22(&t2h, &t2l, zh, zm, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RZ(logh, logm, roundcst);
+       
+#if DEBUG
+       printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+       log1p_td_accurate(&logh, &logm, &logl, ed, index, zh, zm, zl, logih, logim); 
+       
+       ReturnRoundTowardsZero3(logh, logm, logl);
+}
diff --git a/src/crlibm/log2-td.c b/src/crlibm/log2-td.c
new file mode 100644
index 0000000..11090f4
--- /dev/null
+++ b/src/crlibm/log2-td.c
@@ -0,0 +1,1521 @@
+/* 
+ * This function computes log2, correctly rounded, 
+ * using experimental techniques based on triple double arithmetics
+
+ THIS IS EXPERIMENTAL SOFTWARE
+ 
+ *
+ * Author :  Christoph Lauter
+ * christoph.lauter at ens-lyon.fr
+ *
+
+ To have it replace the crlibm log2, do:
+
+ gcc -DHAVE_CONFIG_H -I.  -fPIC  -O2 -c log2-td.c;   mv log2-td.o log2_accurate.o; make 
+
+ 
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "log2-td.h"
+#ifdef BUILD_INTERVAL_FUNCTIONS
+#include "interval.h"
+#endif
+
+
+#define AVOID_FMA 0
+
+
+void log2_td_accurate(double *logb2h, double *logb2m, double *logb2l, int E, double ed, int index, double zh, double zl, double logih, double logim) {
+  double highPoly, t1h, t1l, t2h, t2l, t3h, t3l, t4h, t4l, t5h, t5l, t6h, t6l, t7h, t7l, t8h, t8l, t9h, t9l, t10h, t10l, t11h, t11l;
+  double t12h, t12l, t13h, t13l, t14h, t14l, zSquareh, zSquarem, zSquarel, zCubeh, zCubem, zCubel, higherPolyMultZh, higherPolyMultZm;
+  double higherPolyMultZl, zSquareHalfh, zSquareHalfm, zSquareHalfl, polyWithSquareh, polyWithSquarem, polyWithSquarel;
+  double polyh, polym, polyl, logil, logyh, logym, logyl, loghover, logmover, loglover, log2edhover, log2edmover, log2edlover;
+  double log2edh, log2edm, log2edl, logb2hover, logb2mover, logb2lover;
+
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+
+  /* Accurate phase:
+
+     Argument reduction is already done. 
+     We must return logh, logm and logl representing the intermediate result in 118 bits precision.
+
+     We use a 14 degree polynomial, computing the first 3 (the first is 0) coefficients in triple double,
+     calculating the next 7 coefficients in double double arithmetics and the last in double.
+
+     We must account for zl starting with the monome of degree 4 (7^3 + 53 - 7 >> 118); so 
+     double double calculations won't account for it.
+
+  */
+
+  /* Start of the horner scheme */
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+  highPoly = FMA(FMA(FMA(FMA(accPolyC14,zh,accPolyC13),zh,accPolyC12),zh,accPolyC11),zh,accPolyC10);
+#else
+  highPoly = accPolyC10 + zh * (accPolyC11 + zh * (accPolyC12 + zh * (accPolyC13 + zh * accPolyC14)));
+#endif
+  
+  /* We want to write 
+
+     accPolyC3 + zh * (accPoly4 + zh * (accPoly5 + zh * (accPoly6 + zh * (accPoly7 + zh * (accPoly8 + zh * (accPoly9 + zh * highPoly))))));
+     (        t14  t13         t12  t11         t10   t9          t8   t7          t6   t5          t4   t3          t2   t1  )
+
+     with all additions and multiplications in double double arithmetics
+     but we will produce intermediate results labelled t1h/t1l thru t14h/t14l
+  */
+
+  Mul12(&t1h, &t1l, zh, highPoly);
+  Add22(&t2h, &t2l, accPolyC9h, accPolyC9l, t1h, t1l);
+  Mul22(&t3h, &t3l, zh, zl, t2h, t2l);
+  Add22(&t4h, &t4l, accPolyC8h, accPolyC8l, t3h, t3l);
+  Mul22(&t5h, &t5l, zh, zl, t4h, t4l);
+  Add22(&t6h, &t6l, accPolyC7h, accPolyC7l, t5h, t5l);
+  Mul22(&t7h, &t7l, zh, zl, t6h, t6l);
+  Add22(&t8h, &t8l, accPolyC6h, accPolyC6l, t7h, t7l);
+  Mul22(&t9h, &t9l, zh, zl, t8h, t8l);
+  Add22(&t10h, &t10l, accPolyC5h, accPolyC5l, t9h, t9l);
+  Mul22(&t11h, &t11l, zh, zl, t10h, t10l);
+  Add22(&t12h, &t12l, accPolyC4h, accPolyC4l, t11h, t11l);
+  Mul22(&t13h, &t13l, zh, zl, t12h, t12l);
+  Add22(&t14h, &t14l, accPolyC3h, accPolyC3l, t13h, t13l);
+
+  /* We must now prepare (zh + zl)^2 and (zh + zl)^3 as triple doubles */
+
+  Mul23(&zSquareh, &zSquarem, &zSquarel, zh, zl, zh, zl); 
+  Mul233(&zCubeh, &zCubem, &zCubel, zh, zl, zSquareh, zSquarem, zSquarel); 
+  
+  /* We can now multiplicate the middle and higher polynomial by z^3 */
+
+  Mul233(&higherPolyMultZh, &higherPolyMultZm, &higherPolyMultZl, t14h, t14l, zCubeh, zCubem, zCubel);
+  
+  /* Multiply now z^2 by -1/2 (exact op) and add to middle and higher polynomial */
+  
+  zSquareHalfh = zSquareh * -0.5;
+  zSquareHalfm = zSquarem * -0.5;
+  zSquareHalfl = zSquarel * -0.5;
+
+  Add33(&polyWithSquareh, &polyWithSquarem, &polyWithSquarel, 
+	zSquareHalfh, zSquareHalfm, zSquareHalfl, 
+	higherPolyMultZh, higherPolyMultZm, higherPolyMultZl);
+
+  /* Add now zh and zl to obtain the polynomial evaluation result */
+
+  Add233(&polyh, &polym, &polyl, zh, zl, polyWithSquareh, polyWithSquarem, polyWithSquarel);
+
+  /* Reconstruct now log(y) = log(1 + z) - log(ri) by adding logih, logim, logil
+     logil has not been read to the time, do this first 
+  */
+
+  logil =  argredtable[index].logil;
+
+  Add33(&logyh, &logym, &logyl, logih, logim, logil, polyh, polym, polyl);
+
+  /* Multiply log2 with E, i.e. log2h, log2m, log2l by ed 
+     ed is always less than 2^(12) and log2h and log2m are stored with at least 12 trailing zeros 
+     So multiplying naively is correct (up to 134 bits at least)
+
+     The final result is thus obtained by adding log2 * E to log(y)
+  */
+
+  log2edhover = log2h * ed;
+  log2edmover = log2m * ed;
+  log2edlover = log2l * ed;
+
+  /* It may be necessary to renormalize the tabulated value (multiplied by ed) before adding
+     the to the log(y)-result 
+
+     If needed, uncomment the following Renormalize3-Statement and comment out the copies 
+     following it.
+  */
+
+  /* Renormalize3(&log2edh, &log2edm, &log2edl, log2edhover, log2edmover, log2edlover); */
+
+  log2edh = log2edhover;
+  log2edm = log2edmover;
+  log2edl = log2edlover;
+
+  Add33(&loghover, &logmover, &loglover, log2edh, log2edm, log2edl, logyh, logym, logyl);
+
+
+  /* Change logarithm base from natural base to base 2 by multiplying */
+
+  Mul233(&logb2hover, &logb2mover, &logb2lover, log2invh, log2invl, loghover, logmover, loglover);
+
+
+  /* Since we can not guarantee in each addition and multiplication procedure that 
+     the results are not overlapping, we must renormalize the result before handing
+     it over to the final rounding
+  */
+
+  Renormalize3(logb2h,logb2m,logb2l,logb2hover,logb2mover,logb2lover);
+
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+ double log2_rn(double x){ 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, roundcst;
+   double logb2h, logb2m, logb2l;
+   int E, index;
+
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+
+
+   /* Change logarithm base from natural base to base 2 by multiplying */
+
+   Mul22(&logb2h, &logb2m, log2invh, log2invl, logh, logm);
+
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = ROUNDCST1;
+   else
+      roundcst = ROUNDCST2;
+
+
+   if(logb2h == (logb2h + (logb2m * roundcst)))
+     return logb2h;
+   else 
+     {
+       
+#if DEBUG
+       printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+       log2_td_accurate(&logb2h, &logb2m, &logb2l, E, ed, index, zh, zl, logih, logim); 
+       
+       ReturnRoundToNearest3(logb2h, logb2m, logb2l);
+
+     } /* Accurate phase launched */
+ }
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  UPWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log2_ru(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, roundcst;
+   double logb2h, logb2m, logb2l;
+   int E, index;
+
+  
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+
+
+   /* Test now if the argument is an exact power of 2
+      i.e. if the mantissa is exactly 1 (0x0..0 with the implicit bit) 
+      This test is necessary for filtering out the cases where the final 
+      rounding test cannot distinguish between an exact algebraic 
+      number and a hard case to round 
+   */
+
+   if ((index | xdb.i[LO]) == 0) {
+     /* Handle the "trivial" case for log2: 
+	The argument is an exact power of 2, return thus
+	just the exponant of the number 
+     */
+
+     return (double) E;
+
+   }
+
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Change logarithm base from natural base to base 2 by multiplying */
+
+   Mul22(&logb2h, &logb2m, log2invh, log2invl, logh, logm);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RU(logb2h, logb2m, roundcst);
+
+#if DEBUG
+  printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log2_td_accurate(&logb2h, &logb2m, &logb2l, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundUpwards3(logb2h, logb2m, logb2l);
+
+ } 
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  DOWNWARDS			     *
+ *************************************************************
+ *************************************************************/
+ double log2_rd(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, roundcst;
+   double logb2h, logb2m, logb2l;
+   int E, index;
+
+  
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+
+
+   /* Test now if the argument is an exact power of 2
+      i.e. if the mantissa is exactly 1 (0x0..0 with the implicit bit) 
+      This test is necessary for filtering out the cases where the final 
+      rounding test cannot distinguish between an exact algebraic 
+      number and a hard case to round 
+   */
+
+   if ((index | xdb.i[LO]) == 0) {
+     /* Handle the "trivial" case for log2: 
+	The argument is an exact power of 2, return thus
+	just the exponant of the number 
+     */
+
+     return (double) E;
+
+   }
+
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Change logarithm base from natural base to base 2 by multiplying */
+
+   Mul22(&logb2h, &logb2m, log2invh, log2invl, logh, logm);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RD(logb2h, logb2m, roundcst);
+
+#if DEBUG
+  printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log2_td_accurate(&logb2h, &logb2m, &logb2l, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundDownwards3(logb2h, logb2m, logb2l);
+ } 
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARDS ZERO			     *
+ *************************************************************
+ *************************************************************/
+ double log2_rz(double x) { 
+   db_number xdb;
+   double y, ed, ri, logih, logim, yrih, yril, th, zh, zl;
+   double polyHorner, zhSquareh, zhSquarel, polyUpper, zhSquareHalfh, zhSquareHalfl;
+   double t1h, t1l, t2h, t2l, ph, pl, log2edh, log2edl, logTabPolyh, logTabPolyl, logh, logm, roundcst;
+   double logb2h, logb2m, logb2l;
+   int E, index;
+
+  
+   E=0;
+   xdb.d=x;
+
+   /* Filter cases */
+   if (xdb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb.i[HI] & 0x7fffffff)|xdb.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (xdb.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     xdb.d *= two52; 	  /* make x a normal number    */ 
+   }
+    
+   if (xdb.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+   index = (xdb.i[HI] & 0x000fffff);
+
+
+   /* Test now if the argument is an exact power of 2
+      i.e. if the mantissa is exactly 1 (0x0..0 with the implicit bit) 
+      This test is necessary for filtering out the cases where the final 
+      rounding test cannot distinguish between an exact algebraic 
+      number and a hard case to round 
+   */
+
+   if ((index | xdb.i[LO]) == 0) {
+     /* Handle the "trivial" case for log2: 
+	The argument is an exact power of 2, return thus
+	just the exponant of the number 
+     */
+
+     return (double) E;
+
+   }
+
+   xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+   index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+   /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+   if (index >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+     xdb.i[HI] -= 0x00100000; 
+     E++;
+   }
+   y = xdb.d;
+   index = index & INDEXMASK;
+   /* Cast integer E into double ed for multiplication later */
+   ed = (double) E;
+
+   /* 
+      Read tables:
+      Read one float for ri
+      Read the first two doubles for -log(r_i) (out of three)
+
+      Organization of the table:
+
+      one struct entry per index, the struct entry containing 
+      r, logih, logim and logil in this order
+   */
+   
+
+   ri = argredtable[index].ri;
+   /* 
+      Actually we don't need the logarithm entries now
+      Move the following two lines to the eventual reconstruction
+      As long as we don't have any if in the following code, we can overlap 
+      memory access with calculations 
+   */
+   logih = argredtable[index].logih;
+   logim = argredtable[index].logim;
+
+   /* Do range reduction:
+
+      zh + zl = y * ri - 1.0 correctly
+
+      Correctness is assured by use of Mul12 and Add12
+      even if we don't force ri to have its' LSBs set to zero
+
+      Discard zl for higher monome degrees
+   */
+
+   Mul12(&yrih, &yril, y, ri);
+   th = yrih - 1.0; 
+   Add12Cond(zh, zl, th, yril); 
+
+   /* 
+      Polynomial evaluation
+
+      Use a 7 degree polynomial
+      Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+      Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+      using an ad hoc method
+
+   */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+   polyHorner = FMA(FMA(FMA(FMA(c7,zh,c6),zh,c5),zh,c4),zh,c3);
+#else
+   polyHorner = c3 + zh * (c4 + zh * (c5 + zh * (c6 + zh * c7)));
+#endif
+
+   Mul12(&zhSquareh, &zhSquarel, zh, zh);
+   polyUpper = polyHorner * (zh * zhSquareh);
+   zhSquareHalfh = zhSquareh * -0.5;
+   zhSquareHalfl = zhSquarel * -0.5;
+   Add12(t1h, t1l, polyUpper, -1 * (zh * zl));
+   Add22(&t2h, &t2l, zh, zl, zhSquareHalfh, zhSquareHalfl);
+   Add22(&ph, &pl, t2h, t2l, t1h, t1l);
+
+   /* Reconstruction 
+
+      Read logih and logim in the tables (already done)
+      
+      Compute log(x) = E * log(2) + log(1+z) - log(ri)
+      i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+      Carry out everything in double double precision
+
+   */
+   
+   /* 
+      We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+      Multiplication of ed (double E) and log2h is thus correct
+      The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+      is enough for the accurate phase
+      The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+      Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+      triple double values. We have to take it into account for the accurate phase 
+      basic procedures for addition and multiplication
+      The condition on the next Add12 is verified as log2m is smaller than log2h 
+      and both are scaled by ed
+   */
+
+   Add12(log2edh, log2edl, log2h * ed, log2m * ed);
+
+   /* Add logih and logim to ph and pl 
+
+      We must use conditioned Add22 as logih can move over ph
+   */
+
+   Add22Cond(&logTabPolyh, &logTabPolyl, logih, logim, ph, pl);
+
+   /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+   Add22Cond(&logh, &logm, log2edh, log2edl, logTabPolyh, logTabPolyl);
+
+   /* Change logarithm base from natural base to base 2 by multiplying */
+
+   Mul22(&logb2h, &logb2m, log2invh, log2invl, logh, logm);
+
+   /* Rounding test and eventual return or call to the accurate function */
+
+   if(E==0)
+      roundcst = RDROUNDCST1;
+   else
+      roundcst = RDROUNDCST2;
+
+   TEST_AND_RETURN_RZ(logb2h, logb2m, roundcst);
+
+#if DEBUG
+  printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+
+    log2_td_accurate(&logb2h, &logb2m, &logb2l, E, ed, index, zh, zl, logih, logim); 
+
+    ReturnRoundTowardsZero3(logb2h, logb2m, logb2l);
+ } 
+
+#ifdef BUILD_INTERVAL_FUNCTIONS
+ interval j_log2(interval x) { 
+   interval res;
+   double res_inf, res_sup, restemp_inf, restemp_sup;
+   int infDone, supDone;
+   int roundable;
+   db_number xdb_inf;
+   double y_inf, ed_inf, ri_inf, logih_inf, logim_inf, yrih_inf, yril_inf, th_inf, zh_inf, zl_inf;
+   double polyHorner_inf, zhSquareh_inf, zhSquarel_inf, polyUpper_inf, zhSquareHalfh_inf, zhSquareHalfl_inf;
+   double t1h_inf, t1l_inf, t2h_inf, t2l_inf, ph_inf, pl_inf, log2edh_inf, log2edl_inf, logTabPolyh_inf, logTabPolyl_inf, logh_inf, logm_inf, roundcst_inf;
+   double logb2h_inf, logb2m_inf, logb2l_inf;
+   int E_inf, index_inf;
+
+   db_number xdb_sup;
+   double y_sup, ed_sup, ri_sup, logih_sup, logim_sup, yrih_sup, yril_sup, th_sup, zh_sup, zl_sup;
+   double polyHorner_sup, zhSquareh_sup, zhSquarel_sup, polyUpper_sup, zhSquareHalfh_sup, zhSquareHalfl_sup;
+   double t1h_sup, t1l_sup, t2h_sup, t2l_sup, ph_sup, pl_sup, log2edh_sup, log2edl_sup, logTabPolyh_sup, logTabPolyl_sup, logh_sup, logm_sup, roundcst_sup;
+   double logb2h_sup, logb2m_sup, logb2l_sup;
+   int E_sup, index_sup;
+   
+   double x_inf, x_sup;
+   x_inf=LOW(x);
+   x_sup=UP(x);
+   infDone=0; supDone=0;
+
+   E_inf=0;
+   E_sup=0;
+   xdb_inf.d=x_inf;
+   xdb_sup.d=x_sup;
+
+   /* Filter cases */
+   if (xdb_inf.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb_inf.i[HI] & 0x7fffffff)|xdb_inf.i[LO])==0){
+       infDone=1;
+       restemp_inf = -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if ((xdb_inf.i[HI] < 0) && (infDone==0)){ 
+       infDone=1;
+       restemp_inf = (x_inf-x_inf)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E_inf = -52; 		
+     xdb_inf.d *= two52; 	  /* make x a normal number    */ 
+   }
+
+   if ((xdb_inf.i[HI] >= 0x7ff00000) && (infDone==0)){
+     infDone=1;
+     restemp_inf =  x_inf+x_inf;				 /* Inf or Nan       */
+   }
+
+   /* Filter cases */
+   if (xdb_sup.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((xdb_sup.i[HI] & 0x7fffffff)|xdb_sup.i[LO])==0){
+       supDone=1;
+       restemp_sup = -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if ((xdb_sup.i[HI] < 0) && (supDone==0)){ 
+       supDone=1;
+       restemp_sup = (x_sup-x_sup)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E_sup = -52; 		
+     xdb_sup.d *= two52; 	  /* make x a normal number    */ 
+   }
+
+   if ((xdb_sup.i[HI] >= 0x7ff00000) && (supDone==0)){
+     supDone=1;
+     restemp_sup = x_sup+x_sup;				 /* Inf or Nan       */
+   }
+   
+   
+   /* Extract exponent and mantissa 
+      Do range reduction,
+      yielding to E holding the exponent and
+      y the mantissa between sqrt(2)/2 and sqrt(2)
+   */
+   E_inf += (xdb_inf.i[HI]>>20)-1023;             /* extract the exponent */
+   E_sup += (xdb_sup.i[HI]>>20)-1023;             /* extract the exponent */
+   index_inf = (xdb_inf.i[HI] & 0x000fffff);
+   index_sup = (xdb_sup.i[HI] & 0x000fffff);
+
+   /* Test now if the argument is an exact power of 2
+      i.e. if the mantissa is exactly 1 (0x0..0 with the implicit bit) 
+      This test is necessary for filtering out the cases where the final 
+      rounding test cannot distinguish between an exact algebraic 
+      number and a hard case to round 
+   */
+
+   if (((index_inf | xdb_inf.i[LO]) == 0) && (infDone==0)) {
+     /* Handle the "trivial" case for log2: 
+	The argument is an exact power of 2, return thus
+	just the exponant of the number 
+     */
+
+     supDone=1;
+     restemp_inf = (double) E_inf;
+
+   }
+   if (((index_sup | xdb_sup.i[LO]) == 0) && (supDone==0)) {
+     /* Handle the "trivial" case for log2: 
+	The argument is an exact power of 2, return thus
+	just the exponant of the number 
+     */
+
+     supDone=1;
+     restemp_sup = (double) E_sup;
+
+   }
+
+   if((infDone==1) && (supDone==1))
+   {
+     ASSIGN_LOW(res,restemp_inf);
+     ASSIGN_UP(res,restemp_sup);
+     return res;
+   }
+   if((infDone==0) && (supDone==0))
+   {
+     xdb_inf.i[HI] =  index_inf | 0x3ff00000;	/* do exponent = 0 */
+     xdb_sup.i[HI] =  index_sup | 0x3ff00000;	/* do exponent = 0 */
+     index_inf = (index_inf + (1<<(20-L-1))) >> (20-L);
+     index_sup = (index_sup + (1<<(20-L-1))) >> (20-L);
+
+ 
+     /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+     if (index_inf >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+       xdb_inf.i[HI] -= 0x00100000; 
+       E_inf++;
+     }
+     if (index_sup >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+       xdb_sup.i[HI] -= 0x00100000; 
+       E_sup++;
+     }
+     y_inf = xdb_inf.d;
+     y_sup = xdb_sup.d;
+     index_inf = index_inf & INDEXMASK;
+     index_sup = index_sup & INDEXMASK;
+     /* Cast integer E into double ed for multiplication later */
+     ed_inf = (double) E_inf;
+     ed_sup = (double) E_sup;
+     /* 
+        Read tables:
+        Read one float for ri
+        Read the first two doubles for -log(r_i) (out of three)
+
+        Organization of the table:
+
+        one struct entry per index, the struct entry containing 
+        r, logih, logim and logil in this order
+     */
+   
+     ri_inf = argredtable[index_inf].ri;
+     ri_sup = argredtable[index_sup].ri;
+
+     /* 
+        Actually we don't need the logarithm entries now
+        Move the following two lines to the eventual reconstruction
+        As long as we don't have any if in the following code, we can overlap 
+        memory access with calculations 
+     */
+     logih_inf = argredtable[index_inf].logih;
+     logih_sup = argredtable[index_sup].logih;
+     logim_inf = argredtable[index_inf].logim;
+     logim_sup = argredtable[index_sup].logim;
+
+     /* Do range reduction:
+
+        zh + zl = y * ri - 1.0 correctly
+
+        Correctness is assured by use of Mul12 and Add12
+        even if we don't force ri to have its' LSBs set to zero
+
+        Discard zl for higher monome degrees
+     */
+
+     Mul12(&yrih_inf, &yril_inf, y_inf, ri_inf);
+     Mul12(&yrih_sup, &yril_sup, y_sup, ri_sup);
+     th_inf = yrih_inf - 1.0; 
+     th_sup = yrih_sup - 1.0; 
+     Add12Cond(zh_inf, zl_inf, th_inf, yril_inf); 
+     Add12Cond(zh_sup, zl_sup, th_sup, yril_sup); 
+
+
+     /* 
+        Polynomial evaluation
+
+        Use a 7 degree polynomial
+        Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+        Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+        using an ad hoc method
+
+     */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+     polyHorner_inf = FMA(FMA(FMA(FMA(c7_inf,zh_inf,c6),zh_inf,c5),zh_inf,c4),zh_inf,c3);
+     polyHorner_sup = FMA(FMA(FMA(FMA(c7,zh_sup,c6),zh_sup,c5),zh_sup,c4),zh_sup,c3);
+#else
+     polyHorner_inf = c3 + zh_inf * (c4 + zh_inf * (c5 + zh_inf * (c6 + zh_inf * c7)));
+     polyHorner_sup = c3 + zh_sup * (c4 + zh_sup * (c5 + zh_sup * (c6 + zh_sup * c7)));
+#endif
+
+     Mul12(&zhSquareh_inf, &zhSquarel_inf, zh_inf, zh_inf);
+     Mul12(&zhSquareh_sup, &zhSquarel_sup, zh_sup, zh_sup);
+     polyUpper_inf = polyHorner_inf * (zh_inf * zhSquareh_inf);
+     polyUpper_sup = polyHorner_sup * (zh_sup * zhSquareh_sup);
+     zhSquareHalfh_inf = zhSquareh_inf * -0.5;
+     zhSquareHalfh_sup = zhSquareh_sup * -0.5;
+     zhSquareHalfl_inf = zhSquarel_inf * -0.5;
+     zhSquareHalfl_sup = zhSquarel_sup * -0.5;
+     Add12(t1h_inf, t1l_inf, polyUpper_inf, -1 * (zh_inf * zl_inf));
+     Add12(t1h_sup, t1l_sup, polyUpper_sup, -1 * (zh_sup * zl_sup));
+     Add22(&t2h_inf, &t2l_inf, zh_inf, zl_inf, zhSquareHalfh_inf, zhSquareHalfl_inf);
+     Add22(&t2h_sup, &t2l_sup, zh_sup, zl_sup, zhSquareHalfh_sup, zhSquareHalfl_sup);
+     Add22(&ph_inf, &pl_inf, t2h_inf, t2l_inf, t1h_inf, t1l_inf);
+     Add22(&ph_sup, &pl_sup, t2h_sup, t2l_sup, t1h_sup, t1l_sup);
+
+
+     /* Reconstruction 
+
+        Read logih and logim in the tables (already done)
+      
+        Compute log(x) = E * log(2) + log(1+z) - log(ri)
+        i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+        Carry out everything in double double precision
+
+     */
+   
+     /* 
+        We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+        Multiplication of ed (double E) and log2h is thus correct
+        The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+        is enough for the accurate phase
+        The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+        Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+        triple double values. We have to take it into account for the accurate phase 
+        basic procedures for addition and multiplication
+        The condition on the next Add12 is verified as log2m is smaller than log2h 
+        and both are scaled by ed
+     */
+
+     Add12(log2edh_inf, log2edl_inf, log2h * ed_inf, log2m * ed_inf);
+     Add12(log2edh_sup, log2edl_sup, log2h * ed_sup, log2m * ed_sup);
+
+     /* Add logih and logim to ph and pl 
+
+        We must use conditioned Add22 as logih can move over ph
+     */
+
+     Add22Cond(&logTabPolyh_inf, &logTabPolyl_inf, logih_inf, logim_inf, ph_inf, pl_inf);
+     Add22Cond(&logTabPolyh_sup, &logTabPolyl_sup, logih_sup, logim_sup, ph_sup, pl_sup);
+
+     /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+     Add22Cond(&logh_inf, &logm_inf, log2edh_inf, log2edl_inf, logTabPolyh_inf, logTabPolyl_inf);
+     Add22Cond(&logh_sup, &logm_sup, log2edh_sup, log2edl_sup, logTabPolyh_sup, logTabPolyl_sup);
+
+     /* Change logarithm base from natural base to base 2 by multiplying */
+
+     Mul22(&logb2h_inf, &logb2m_inf, log2invh, log2invl, logh_inf, logm_inf);
+     Mul22(&logb2h_sup, &logb2m_sup, log2invh, log2invl, logh_sup, logm_sup);
+
+     /* Rounding test and eventual return or call to the accurate function */
+
+     if(E_inf==0)
+        roundcst_inf = RDROUNDCST1;
+     else
+        roundcst_inf = RDROUNDCST2;
+
+     if(E_sup==0)
+      roundcst_sup = RDROUNDCST1;
+     else
+        roundcst_sup = RDROUNDCST2;
+
+     TEST_AND_COPY_RDRU_LOG2(roundable, restemp_inf,logb2h_inf, logb2m_inf, restemp_sup, logb2h_sup, logb2m_sup, roundcst_inf, roundcst_sup);
+
+
+#if DEBUG
+     printf("Going for Accurate Phase for x=%1.50e\n",x_inf);
+#endif
+
+     if((roundable==2) || (roundable==0))
+     {
+       log2_td_accurate(&logb2h_inf, &logb2m_inf, &logb2l_inf, E_inf, ed_inf, index_inf, zh_inf, zl_inf, logih_inf, logim_inf); 
+       RoundDownwards3(&restemp_inf,logb2h_inf, logb2m_inf, logb2l_inf);
+     }
+     if((roundable==1) || (roundable==0))
+     {
+       log2_td_accurate(&logb2h_sup, &logb2m_sup, &logb2l_sup, E_sup, ed_sup, index_sup, zh_sup, zl_sup, logih_sup, logim_sup); 
+       RoundUpwards3(&restemp_sup,logb2h_sup, logb2m_sup, logb2l_sup);
+     }
+     ASSIGN_LOW(res,restemp_inf);
+     ASSIGN_UP(res,restemp_sup);
+     return res;
+   }
+   if((infDone==0))
+   {
+     xdb_inf.i[HI] =  index_inf | 0x3ff00000;	/* do exponent = 0 */
+     index_inf = (index_inf + (1<<(20-L-1))) >> (20-L);
+ 
+     /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+     if (index_inf >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+       xdb_inf.i[HI] -= 0x00100000; 
+       E_inf++;
+     }
+     y_inf = xdb_inf.d;
+     index_inf = index_inf & INDEXMASK;
+     /* Cast integer E into double ed for multiplication later */
+     ed_inf = (double) E_inf;
+     /* 
+        Read tables:
+        Read one float for ri
+        Read the first two doubles for -log(r_i) (out of three)
+        Organization of the table:
+        one struct entry per index, the struct entry containing 
+        r, logih, logim and logil in this order
+     */
+   
+     ri_inf = argredtable[index_inf].ri;
+
+     /* 
+        Actually we don't need the logarithm entries now
+        Move the following two lines to the eventual reconstruction
+        As long as we don't have any if in the following code, we can overlap 
+        memory access with calculations 
+     */
+     logih_inf = argredtable[index_inf].logih;
+     logim_inf = argredtable[index_inf].logim;
+
+     /* Do range reduction:
+
+        zh + zl = y * ri - 1.0 correctly
+
+        Correctness is assured by use of Mul12 and Add12
+        even if we don't force ri to have its' LSBs set to zero
+
+        Discard zl for higher monome degrees
+     */
+
+     Mul12(&yrih_inf, &yril_inf, y_inf, ri_inf);
+     th_inf = yrih_inf - 1.0; 
+     Add12Cond(zh_inf, zl_inf, th_inf, yril_inf); 
+
+
+     /* 
+        Polynomial evaluation
+
+        Use a 7 degree polynomial
+        Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+        Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+        using an ad hoc method
+
+     */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+     polyHorner_inf = FMA(FMA(FMA(FMA(c7_inf,zh_inf,c6),zh_inf,c5),zh_inf,c4),zh_inf,c3);
+#else
+     polyHorner_inf = c3 + zh_inf * (c4 + zh_inf * (c5 + zh_inf * (c6 + zh_inf * c7)));
+#endif
+
+     Mul12(&zhSquareh_inf, &zhSquarel_inf, zh_inf, zh_inf);
+     polyUpper_inf = polyHorner_inf * (zh_inf * zhSquareh_inf);
+     zhSquareHalfh_inf = zhSquareh_inf * -0.5;
+     zhSquareHalfl_inf = zhSquarel_inf * -0.5;
+     Add12(t1h_inf, t1l_inf, polyUpper_inf, -1 * (zh_inf * zl_inf));
+     Add22(&t2h_inf, &t2l_inf, zh_inf, zl_inf, zhSquareHalfh_inf, zhSquareHalfl_inf);
+     Add22(&ph_inf, &pl_inf, t2h_inf, t2l_inf, t1h_inf, t1l_inf);
+
+
+     /* Reconstruction 
+
+        Read logih and logim in the tables (already done)
+      
+        Compute log(x) = E * log(2) + log(1+z) - log(ri)
+        i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+        Carry out everything in double double precision
+
+     */
+   
+     /* 
+        We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+        Multiplication of ed (double E) and log2h is thus correct
+        The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+        is enough for the accurate phase
+        The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+        Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+        triple double values. We have to take it into account for the accurate phase 
+        basic procedures for addition and multiplication
+        The condition on the next Add12 is verified as log2m is smaller than log2h 
+        and both are scaled by ed
+     */
+
+     Add12(log2edh_inf, log2edl_inf, log2h * ed_inf, log2m * ed_inf);
+
+     /* Add logih and logim to ph and pl 
+
+        We must use conditioned Add22 as logih can move over ph
+     */
+
+     Add22Cond(&logTabPolyh_inf, &logTabPolyl_inf, logih_inf, logim_inf, ph_inf, pl_inf);
+
+     /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+     Add22Cond(&logh_inf, &logm_inf, log2edh_inf, log2edl_inf, logTabPolyh_inf, logTabPolyl_inf);
+
+     /* Change logarithm base from natural base to base 2 by multiplying */
+
+     Mul22(&logb2h_inf, &logb2m_inf, log2invh, log2invl, logh_inf, logm_inf);
+
+     /* Rounding test and eventual return or call to the accurate function */
+
+     if(E_inf==0)
+        roundcst_inf = RDROUNDCST1;
+     else
+        roundcst_inf = RDROUNDCST2;
+
+
+     TEST_AND_COPY_RD(roundable, restemp_inf,logb2h_inf, logb2m_inf, roundcst_inf);
+
+
+#if DEBUG
+     printf("Going for Accurate Phase for x=%1.50e\n",x_inf);
+#endif
+
+     if((roundable==0))
+     {
+       log2_td_accurate(&logb2h_inf, &logb2m_inf, &logb2l_inf, E_inf, ed_inf, index_inf, zh_inf, zl_inf, logih_inf, logim_inf); 
+       RoundDownwards3(&restemp_inf,logb2h_inf, logb2m_inf, logb2l_inf);
+     }
+     ASSIGN_LOW(res,restemp_inf);
+     ASSIGN_UP(res,restemp_sup);
+     return res;
+   }
+   if((supDone==0))
+   {
+     xdb_sup.i[HI] =  index_sup | 0x3ff00000;	/* do exponent = 0 */
+     index_sup = (index_sup + (1<<(20-L-1))) >> (20-L);
+
+ 
+     /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+     if (index_sup >= MAXINDEX){ /* corresponds to xdb>sqrt(2)*/
+       xdb_sup.i[HI] -= 0x00100000; 
+       E_sup++;
+     }
+     y_sup = xdb_sup.d;
+     index_sup = index_sup & INDEXMASK;
+     /* Cast integer E into double ed for multiplication later */
+     ed_sup = (double) E_sup;
+     /* 
+        Read tables:
+        Read one float for ri
+        Read the first two doubles for -log(r_i) (out of three)
+
+        Organization of the table:
+
+        one struct entry per index, the struct entry containing 
+        r, logih, logim and logil in this order
+     */
+   
+     ri_sup = argredtable[index_sup].ri;
+
+     /* 
+        Actually we don't need the logarithm entries now
+        Move the following two lines to the eventual reconstruction
+        As long as we don't have any if in the following code, we can overlap 
+        memory access with calculations 
+     */
+     logih_sup = argredtable[index_sup].logih;
+     logim_sup = argredtable[index_sup].logim;
+
+     /* Do range reduction:
+
+        zh + zl = y * ri - 1.0 correctly
+
+        Correctness is assured by use of Mul12 and Add12
+        even if we don't force ri to have its' LSBs set to zero
+
+        Discard zl for higher monome degrees
+     */
+
+     Mul12(&yrih_sup, &yril_sup, y_sup, ri_sup);
+     th_sup = yrih_sup - 1.0; 
+     Add12Cond(zh_sup, zl_sup, th_sup, yril_sup); 
+
+
+     /* 
+        Polynomial evaluation
+
+        Use a 7 degree polynomial
+        Evaluate the higher 5 terms in double precision (-7 * 3 = -21) using Horner's scheme
+        Evaluate the lower 3 terms (the last is 0) in double double precision accounting also for zl
+        using an ad hoc method
+
+     */
+
+
+
+#if defined(PROCESSOR_HAS_FMA) && !defined(AVOID_FMA)
+     polyHorner_sup = FMA(FMA(FMA(FMA(c7,zh_sup,c6),zh_sup,c5),zh_sup,c4),zh_sup,c3);
+#else
+     polyHorner_sup = c3 + zh_sup * (c4 + zh_sup * (c5 + zh_sup * (c6 + zh_sup * c7)));
+#endif
+
+     Mul12(&zhSquareh_sup, &zhSquarel_sup, zh_sup, zh_sup);
+     polyUpper_sup = polyHorner_sup * (zh_sup * zhSquareh_sup);
+     zhSquareHalfh_sup = zhSquareh_sup * -0.5;
+     zhSquareHalfl_sup = zhSquarel_sup * -0.5;
+     Add12(t1h_sup, t1l_sup, polyUpper_sup, -1 * (zh_sup * zl_sup));
+     Add22(&t2h_sup, &t2l_sup, zh_sup, zl_sup, zhSquareHalfh_sup, zhSquareHalfl_sup);
+     Add22(&ph_sup, &pl_sup, t2h_sup, t2l_sup, t1h_sup, t1l_sup);
+
+
+     /* Reconstruction 
+
+        Read logih and logim in the tables (already done)
+      
+        Compute log(x) = E * log(2) + log(1+z) - log(ri)
+        i.e. log(x) = ed * (log2h + log2m) + (ph + pl) + (logih + logim) + delta
+
+        Carry out everything in double double precision
+
+     */
+   
+     /* 
+        We store log2 as log2h + log2m + log2l where log2h and log2m have 12 trailing zeros
+        Multiplication of ed (double E) and log2h is thus correct
+        The overall accuracy of log2h + log2m + log2l is 53 * 3 - 24 = 135 which
+        is enough for the accurate phase
+        The accuracy suffices also for the quick phase: 53 * 2 - 24 = 82
+        Nevertheless the storage with trailing zeros implies an overlap of the tabulated
+        triple double values. We have to take it into account for the accurate phase 
+        basic procedures for addition and multiplication
+        The condition on the next Add12 is verified as log2m is smaller than log2h 
+        and both are scaled by ed
+     */
+
+     Add12(log2edh_sup, log2edl_sup, log2h * ed_sup, log2m * ed_sup);
+
+     /* Add logih and logim to ph and pl 
+
+        We must use conditioned Add22 as logih can move over ph
+     */
+
+     Add22Cond(&logTabPolyh_sup, &logTabPolyl_sup, logih_sup, logim_sup, ph_sup, pl_sup);
+
+     /* Add log2edh + log2edl to logTabPolyh + logTabPolyl */
+
+     Add22Cond(&logh_sup, &logm_sup, log2edh_sup, log2edl_sup, logTabPolyh_sup, logTabPolyl_sup);
+
+     /* Change logarithm base from natural base to base 2 by multiplying */
+
+     Mul22(&logb2h_sup, &logb2m_sup, log2invh, log2invl, logh_sup, logm_sup);
+
+     /* Rounding test and eventual return or call to the accurate function */
+
+     if(E_sup==0)
+      roundcst_sup = RDROUNDCST1;
+     else
+        roundcst_sup = RDROUNDCST2;
+
+     TEST_AND_COPY_RU(roundable, restemp_sup,logb2h_sup, logb2m_sup, roundcst_sup);
+
+
+#if DEBUG
+     printf("Going for Accurate Phase for x=%1.50e\n",x_inf);
+#endif
+
+     if((roundable==0))
+     {
+       log2_td_accurate(&logb2h_sup, &logb2m_sup, &logb2l_sup, E_sup, ed_sup, index_sup, zh_sup, zl_sup, logih_sup, logim_sup); 
+       RoundUpwards3(&restemp_sup,logb2h_sup, logb2m_sup, logb2l_sup);
+     }
+     ASSIGN_LOW(res,restemp_inf);
+     ASSIGN_UP(res,restemp_sup);
+     return res;
+   }
+
+ } 
+#endif
+
diff --git a/src/crlibm/log2-td.h b/src/crlibm/log2-td.h
new file mode 100644
index 0000000..5466d76
--- /dev/null
+++ b/src/crlibm/log2-td.h
@@ -0,0 +1,821 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/*File generated by maple/log2-td.mpl*/
+
+#define L 7
+
+#define MAXINDEX 53
+
+#define INDEXMASK 127
+#define two52 4.50359962737049600000000000000000000000000000000000e+15
+#define log2h 6.93147180559890330187045037746429443359375000000000e-01
+#define log2m 5.49792301870850242169664946507035702127907939029683e-14
+#define log2l -1.31246984177852556920995753667322295879593697972250e-27
+#define log2invh 1.44269504088896338700465094007086008787155151367188e+00
+#define log2invl 2.03552737409310331110210900522069120325603861485809e-17
+#define ROUNDCST1 1.00787401574803160796292764473221714405939530505554e+00
+#define ROUNDCST2 1.00787401574803160796292764473221714405939530505554e+00
+#define RDROUNDCST1 4.33680868994201773602981120347976684570312500000000e-19
+#define RDROUNDCST2 4.33680868994201773602981120347976684570312500000000e-19
+
+
+#define c3 3.33333333333333370340767487505218014121055603027344e-01
+#define c4 -2.49999999990904886448817023847368545830249786376953e-01
+#define c5 1.99999999978980019799124079327157232910394668579102e-01
+#define c6 -1.66669050883027802800739891608827747404575347900391e-01
+#define c7 1.42860109897981618631845890377007890492677688598633e-01
+
+
+#define accPolyC3h 3.33333333333333314829616256247390992939472198486328e-01
+#define accPolyC3l 1.85037170770859413132312241283212169118117639547054e-17
+#define accPolyC4h -2.50000000000000000000000000000000000000000000000000e-01
+#define accPolyC4l 4.62199018306924685334006418421322154174127637249391e-33
+#define accPolyC5h 2.00000000000000011102230246251565404236316680908203e-01
+#define accPolyC5l -1.11022302443127785678379338452126964515833173338601e-17
+#define accPolyC6h -1.66666666666666657414808128123695496469736099243164e-01
+#define accPolyC6l -9.25185854591372488017120157358742564605503054108327e-18
+#define accPolyC7h 1.42857142857142849212692681248881854116916656494141e-01
+#define accPolyC7l 7.92868209382438390589949095717120486682310988838960e-18
+#define accPolyC8h -1.25000000000000000000000000000000000000000000000000e-01
+#define accPolyC8l 3.42769668947376590645174407718339199260639267364101e-21
+#define accPolyC9h 1.11111111111111521276839653182832989841699600219727e-01
+#define accPolyC9l 4.33331955380787609416227741118274520376899199903317e-18
+#define accPolyC10 -1.00000000000000699440505513848620466887950897216797e-01
+#define accPolyC11 9.09090908567022348840680479042930528521537780761719e-02
+#define accPolyC12 -8.33333332642126056732934102910803630948066711425781e-02
+#define accPolyC13 7.69261287585959879775643344146374147385358810424805e-02
+#define accPolyC14 -7.14319092953022982683819464000407606363296508789062e-02
+
+
+typedef struct rri_tag {float ri; double logih; double logim; double logil;} rri;  
+static const rri argredtable[128] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00,   /* r[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logih[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logim[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logil[0] */ 
+  } , 
+  { 
+    9.92248058319091796875000000000000000000000000000000e-01,   /* r[1] */ 
+    7.78214416734525436109004559170898573938757181167603e-03, /* logih[1] */ 
+    -1.28191618904143681948935996668824218266800862156024e-20, /* logim[1] */ 
+    1.17655068600225378123891861200215069271455859581641e-37, /* logil[1] */ 
+  } , 
+  { 
+    9.84615325927734375000000000000000000000000000000000e-01,   /* r[2] */ 
+    1.55042461406118062261505485821544425562024116516113e-02, /* logih[2] */ 
+    -3.27761516207149627029928635703400435929630184221293e-19, /* logim[2] */ 
+    2.95200020707030964072253388818190769795416371257942e-37, /* logil[2] */ 
+  } , 
+  { 
+    9.77099180221557617187500000000000000000000000000000e-01,   /* r[3] */ 
+    2.31671170235356708999585606534310500137507915496826e-02, /* logih[3] */ 
+    5.57833156048330069504471566938468802334954100224869e-19, /* logim[3] */ 
+    4.08416064054113313191746248503653555682943539201798e-35, /* logil[3] */ 
+  } , 
+  { 
+    9.69696998596191406250000000000000000000000000000000e-01,   /* r[4] */ 
+    3.07716288644317437217523547587916254997253417968750e-02, /* logih[4] */ 
+    1.04316437964092669923942103072089812062131860035492e-18, /* logim[4] */ 
+    -8.26837774892530079043982861155759865584698067912967e-36, /* logil[4] */ 
+  } , 
+  { 
+    9.62406039237976074218750000000000000000000000000000e-01,   /* r[5] */ 
+    3.83188391564273991840572364253603154793381690979004e-02, /* logih[5] */ 
+    1.54512636366303706650320890230224472259662656606095e-18, /* logim[5] */ 
+    8.30977110244055528389241824578843983429633068152463e-35, /* logil[5] */ 
+  } , 
+  { 
+    9.55223917961120605468750000000000000000000000000000e-01,   /* r[6] */ 
+    4.58094969157468376308450785927561810240149497985840e-02, /* logih[6] */ 
+    -3.30123051072550842868548428055668582607719074881820e-18, /* logim[6] */ 
+    1.64164772626574162996727598513545022472742050176492e-34, /* logil[6] */ 
+  } , 
+  { 
+    9.48148131370544433593750000000000000000000000000000e-01,   /* r[7] */ 
+    5.32445322139413548812036935942160198464989662170410e-02, /* logih[7] */ 
+    2.23755385085953619415254057336256700540433618368589e-18, /* logim[7] */ 
+    -9.41330315099866735037984721876103977945647219756033e-35, /* logil[7] */ 
+  } , 
+  { 
+    9.41176414489746093750000000000000000000000000000000e-01,   /* r[8] */ 
+    6.06246814210813916856679384181916248053312301635742e-02, /* logih[8] */ 
+    2.64247317995478646334926909653435556549332769494295e-18, /* logim[8] */ 
+    1.55075207452234839722600788456166299408429635417895e-34, /* logil[8] */ 
+  } , 
+  { 
+    9.34306621551513671875000000000000000000000000000000e-01,   /* r[9] */ 
+    6.79506060291548280583029395529592875391244888305664e-02, /* logih[9] */ 
+    5.65862161871167282533541105359923619273100535513035e-18, /* logim[9] */ 
+    -3.57889357320249912090032102867532919048871786355064e-34, /* logil[9] */ 
+  } , 
+  { 
+    9.27536249160766601562500000000000000000000000000000e-01,   /* r[10] */ 
+    7.52234026111362058530929175503842998296022415161133e-02, /* logih[10] */ 
+    1.00828755349783911736541446332784521904773238841865e-18, /* logim[10] */ 
+    7.77966415828014771486738038255868010153689429282538e-36, /* logil[10] */ 
+  } , 
+  { 
+    9.20863270759582519531250000000000000000000000000000e-01,   /* r[11] */ 
+    8.24437111205913314426751981045526918023824691772461e-02, /* logih[11] */ 
+    -4.27419767632228646217014766651675738804062364961374e-18, /* logim[11] */ 
+    3.58539257549786746072726449331073277906948658046759e-34, /* logil[11] */ 
+  } , 
+  { 
+    9.14285659790039062500000000000000000000000000000000e-01,   /* r[12] */ 
+    8.96122182943336897942288032936630770564079284667969e-02, /* logih[12] */ 
+    -5.42674234758262048883730612286095846547194397615989e-18, /* logim[12] */ 
+    -7.94903110897686868047461590865098481976776339992810e-35, /* logil[12] */ 
+  } , 
+  { 
+    9.07801389694213867187500000000000000000000000000000e-01,   /* r[13] */ 
+    9.67296581235191493819414176869031507521867752075195e-02, /* logih[13] */ 
+    1.17499431052084706890372286741885325822732164697539e-18, /* logim[13] */ 
+    -7.47188021694240554877009439429630012902672969107896e-35, /* logil[13] */ 
+  } , 
+  { 
+    9.01408433914184570312500000000000000000000000000000e-01,   /* r[14] */ 
+    1.03796812308095232069149460585322231054306030273438e-01, /* logih[14] */ 
+    -1.46116759252442942691327623497388991415382979093093e-18, /* logim[14] */ 
+    -5.84766064918572844473631496354606243606272630720064e-35, /* logil[14] */ 
+  } , 
+  { 
+    8.95104885101318359375000000000000000000000000000000e-01,   /* r[15] */ 
+    1.10814377516161077785739053069846704602241516113281e-01, /* logih[15] */ 
+    -5.75514509579248124656596649605847554012818793702281e-18, /* logim[15] */ 
+    3.29977719536339952907783192540462408052319847426319e-34, /* logil[15] */ 
+  } , 
+  { 
+    8.88888835906982421875000000000000000000000000000000e-01,   /* r[16] */ 
+    1.17783095261030007483427084480354096740484237670898e-01, /* logih[16] */ 
+    -1.19709798867727449215060005668653850880775796697715e-18, /* logim[16] */ 
+    8.04222018353684236067064017226062133396406008492921e-35, /* logil[16] */ 
+  } , 
+  { 
+    8.82758617401123046875000000000000000000000000000000e-01,   /* r[17] */ 
+    1.24703482226247538977581541530526010319590568542480e-01, /* logih[17] */ 
+    2.28663295749049514726834658528273231115811065734312e-18, /* logim[17] */ 
+    -3.51123005875932392272239647660221882537057244586168e-35, /* logil[17] */ 
+  } , 
+  { 
+    8.76712322235107421875000000000000000000000000000000e-01,   /* r[18] */ 
+    1.31576365239299886145118989588809199631214141845703e-01, /* logih[18] */ 
+    1.11230010175930229418362785876222391520299564865730e-17, /* logim[18] */ 
+    7.27451645836749926637643602480531900716806359121297e-34, /* logil[18] */ 
+  } , 
+  { 
+    8.70748281478881835937500000000000000000000000000000e-01,   /* r[19] */ 
+    1.38402343348215994822680841025430709123611450195312e-01, /* logih[19] */ 
+    -7.69528416335144553864151614176326744245393995127969e-18, /* logim[19] */ 
+    1.14202629230472885861778260955781649682548331183808e-34, /* logil[19] */ 
+  } , 
+  { 
+    8.64864826202392578125000000000000000000000000000000e-01,   /* r[20] */ 
+    1.45182054547982469783207193358975928276777267456055e-01, /* logih[20] */ 
+    8.24244856152552570070228105635897158979868211170798e-18, /* logim[20] */ 
+    -6.13072808770694892835379995250538817854995507648779e-34, /* logil[20] */ 
+  } , 
+  { 
+    8.59060406684875488281250000000000000000000000000000e-01,   /* r[21] */ 
+    1.51916037369229123266123337998578790575265884399414e-01, /* logih[21] */ 
+    -1.04296908000297145574171199957656893307239877379000e-17, /* logim[21] */ 
+    -5.53636436435840586444373230094200986769217138540854e-34, /* logil[21] */ 
+  } , 
+  { 
+    8.53333353996276855468750000000000000000000000000000e-01,   /* r[22] */ 
+    1.58605005962251938145257668111298698931932449340820e-01, /* logih[22] */ 
+    -8.86065192248216377790637508171938194510660992474042e-19, /* logim[22] */ 
+    -5.87995214834401673695486864800931832452468264932844e-35, /* logil[22] */ 
+  } , 
+  { 
+    8.47682118415832519531250000000000000000000000000000e-01,   /* r[23] */ 
+    1.65249573826629747586025587224867194890975952148438e-01, /* logih[23] */ 
+    -9.66125475305916070790888958698289394696700966750453e-18, /* logim[23] */ 
+    1.22853647999759344001960461047755491313341721869856e-34, /* logil[23] */ 
+  } , 
+  { 
+    8.42105269432067871093750000000000000000000000000000e-01,   /* r[24] */ 
+    1.71850249476078659194300257695431355386972427368164e-01, /* logih[24] */ 
+    -6.02245395887480538795512923412250309472746231920746e-18, /* logim[24] */ 
+    1.52961687917434402329553899350235008490821862631877e-34, /* logil[24] */ 
+  } , 
+  { 
+    8.36601257324218750000000000000000000000000000000000e-01,   /* r[25] */ 
+    1.78407717077464861299418430462537799030542373657227e-01, /* logih[25] */ 
+    -1.24324832026190372515095573175819374097319572461178e-17, /* logim[25] */ 
+    -5.99222696564577786410580709003476847421843326905428e-34, /* logil[25] */ 
+  } , 
+  { 
+    8.31168889999389648437500000000000000000000000000000e-01,   /* r[26] */ 
+    1.84922267713498816865680396404059138149023056030273e-01, /* logih[26] */ 
+    9.96243711860796179875713739627414673019270693540839e-18, /* logim[26] */ 
+    -1.99546782893888540832510298706525540082513642365204e-34, /* logil[26] */ 
+  } , 
+  { 
+    8.25806498527526855468750000000000000000000000000000e-01,   /* r[27] */ 
+    1.91394796188954025017991966706176754087209701538086e-01, /* logih[27] */ 
+    -8.22643020277300444045205706293674132131812201700538e-18, /* logim[27] */ 
+    5.69056030867564774930537188285078930441778787828211e-34, /* logil[27] */ 
+  } , 
+  { 
+    8.20512771606445312500000000000000000000000000000000e-01,   /* r[28] */ 
+    1.97825802934566419288842098467284813523292541503906e-01, /* logih[28] */ 
+    1.28212649590622342007825921152819823725126964367518e-17, /* logim[28] */ 
+    4.34712978477783827374998481132430084872238812357849e-34, /* logil[28] */ 
+  } , 
+  { 
+    8.15286636352539062500000000000000000000000000000000e-01,   /* r[29] */ 
+    2.04215526527529805944638496839615982025861740112305e-01, /* logih[29] */ 
+    2.73382699896480606605004885268461286375739934002155e-18, /* logim[29] */ 
+    1.88415596219599490517606146615135776386751947516623e-34, /* logil[29] */ 
+  } , 
+  { 
+    8.10126543045043945312500000000000000000000000000000e-01,   /* r[30] */ 
+    2.10564817536124687658016796376614365726709365844727e-01, /* logih[30] */ 
+    2.68952644992466202072392146799884466396384136175691e-18, /* logim[30] */ 
+    -1.58883120037037559046153789501260274259127656480088e-34, /* logil[30] */ 
+  } , 
+  { 
+    8.05031418800354003906250000000000000000000000000000e-01,   /* r[31] */ 
+    2.16873972759550226463431954471161589026451110839844e-01, /* logih[31] */ 
+    -1.23625140584833845652640860288020787431726668393088e-17, /* logim[31] */ 
+    -1.28369360755661214950804825668450767372141502246786e-34, /* logil[31] */ 
+  } , 
+  { 
+    7.99999952316284179687500000000000000000000000000000e-01,   /* r[32] */ 
+    2.23143610918856316605030087885097600519657135009766e-01, /* logih[32] */ 
+    -9.09120001124270523314725361445863555491966823753373e-18, /* logim[32] */ 
+    1.15945802868784933647836819275496182741822080543604e-34, /* logil[32] */ 
+  } , 
+  { 
+    7.95031070709228515625000000000000000000000000000000e-01,   /* r[33] */ 
+    2.29374082438394522043267897970508784055709838867188e-01, /* logih[33] */ 
+    -1.08890120418598083770448590672876580941469212582837e-17, /* logim[33] */ 
+    4.74877924128943438272197143958394008126523960202900e-34, /* logil[33] */ 
+  } , 
+  { 
+    7.90123462677001953125000000000000000000000000000000e-01,   /* r[34] */ 
+    2.35566063862186342303672859088692348450422286987305e-01, /* logih[34] */ 
+    -2.39433728738216998660812173360881116827035967139939e-18, /* logim[34] */ 
+    -9.62471867414270770251397101906428335828045927610883e-35, /* logil[34] */ 
+  } , 
+  { 
+    7.85276055335998535156250000000000000000000000000000e-01,   /* r[35] */ 
+    2.41719960170209802186036540661007165908813476562500e-01, /* logih[35] */ 
+    2.39578119451184969695376143676233310543075971208880e-18, /* logim[35] */ 
+    1.86231935097448741662637615288316997021879162207127e-34, /* logil[35] */ 
+  } , 
+  { 
+    7.80487775802612304687500000000000000000000000000000e-01,   /* r[36] */ 
+    2.47836201157484947721343360171886160969734191894531e-01, /* logih[36] */ 
+    -1.24321923457726137680465119406863072977770725701004e-17, /* logim[36] */ 
+    -2.09577513970149680056365167860895085898294691979404e-34, /* logil[36] */ 
+  } , 
+  { 
+    7.75757551193237304687500000000000000000000000000000e-01,   /* r[37] */ 
+    2.53915241645931488712051304901251569390296936035156e-01, /* logih[37] */ 
+    -6.31336333527435824035156315376733999545148217960567e-18, /* logim[37] */ 
+    4.63496313971202069379055986715253908538961883067566e-35, /* logil[37] */ 
+  } , 
+  { 
+    7.71084308624267578125000000000000000000000000000000e-01,   /* r[38] */ 
+    2.59957561689829752538116736104711890220642089843750e-01, /* logih[38] */ 
+    -7.05748899290965383754297836711168798219001736647281e-18, /* logim[38] */ 
+    4.27245447011230141916526741370315150982259792796987e-34, /* logil[38] */ 
+  } , 
+  { 
+    7.66467094421386718750000000000000000000000000000000e-01,   /* r[39] */ 
+    2.65963511244235673025571031757863238453865051269531e-01, /* logih[39] */ 
+    -2.24162125724264292804912034054420308588570407662844e-17, /* logim[39] */ 
+    4.90471140265143981765909599584287898945638617268867e-34, /* logil[39] */ 
+  } , 
+  { 
+    7.61904716491699218750000000000000000000000000000000e-01,   /* r[40] */ 
+    2.71933775088288309795814257086021825671195983886719e-01, /* logih[40] */ 
+    7.83390223779535346513505580003968001040971161798700e-19, /* logim[40] */ 
+    -3.02585215101390470982866376614279464778757620082138e-35, /* logil[40] */ 
+  } , 
+  { 
+    7.57396459579467773437500000000000000000000000000000e-01,   /* r[41] */ 
+    2.77868437964940373507971571598318405449390411376953e-01, /* logih[41] */ 
+    -2.69368711734232128278453248569958166651302969280381e-17, /* logim[41] */ 
+    1.27334496810554064003001771076892864921428144153570e-33, /* logil[41] */ 
+  } , 
+  { 
+    7.52941131591796875000000000000000000000000000000000e-01,   /* r[42] */ 
+    2.83768232735291170421021433867281302809715270996094e-01, /* logih[42] */ 
+    -2.03265852251844689554711830689719609838328388091381e-17, /* logim[42] */ 
+    3.99265876662456660849597520210659365811534845502505e-34, /* logil[42] */ 
+  } , 
+  { 
+    7.48538017272949218750000000000000000000000000000000e-01,   /* r[43] */ 
+    2.89633285132462114930262941925320774316787719726562e-01, /* logih[43] */ 
+    -7.21962253363417273270454867455071277489833577725373e-18, /* logim[43] */ 
+    -2.16150227221931053192432009592422674631830770048369e-34, /* logil[43] */ 
+  } , 
+  { 
+    7.44186043739318847656250000000000000000000000000000e-01,   /* r[44] */ 
+    2.95464216619126196494704572614864446222782135009766e-01, /* logih[44] */ 
+    -1.47072146829197428851717511710908602721304319475328e-17, /* logim[44] */ 
+    4.88114627787723832872543510409367916590649903129304e-34, /* logil[44] */ 
+  } , 
+  { 
+    7.39884376525878906250000000000000000000000000000000e-01,   /* r[45] */ 
+    3.01261352929903802877475982313626445829868316650391e-01, /* logih[45] */ 
+    1.87070681938931680167624656750430985298856099421569e-17, /* logim[45] */ 
+    1.51413799416501325421897094776870076323182009328971e-33, /* logil[45] */ 
+  } , 
+  { 
+    7.35632181167602539062500000000000000000000000000000e-01,   /* r[46] */ 
+    3.07025039020202172856954803137341514229774475097656e-01, /* logih[46] */ 
+    -5.38102227896180596526923200171118043417676846319102e-18, /* logim[46] */ 
+    2.06712483430759996475892191286335029882052180959917e-34, /* logil[46] */ 
+  } , 
+  { 
+    7.31428623199462890625000000000000000000000000000000e-01,   /* r[47] */ 
+    3.12755639223383730129768309780047275125980377197266e-01, /* logih[47] */ 
+    -7.57930782773895721056011815787401170737920404028723e-18, /* logim[47] */ 
+    8.39475110593319988799512618628582752750846924050440e-35, /* logil[47] */ 
+  } , 
+  { 
+    7.27272748947143554687500000000000000000000000000000e-01,   /* r[48] */ 
+    3.18453701316212645089365196326980367302894592285156e-01, /* logih[48] */ 
+    2.71147705440665649189983820006370647423267349507715e-17, /* logim[48] */ 
+    4.61673001741568050305139864943649666789926072891368e-34, /* logil[48] */ 
+  } , 
+  { 
+    7.23163843154907226562500000000000000000000000000000e-01,   /* r[49] */ 
+    3.24119466791566834817928111078799702227115631103516e-01, /* logih[49] */ 
+    -6.22349090807112113628215383245238541760656175683922e-18, /* logim[49] */ 
+    -2.94864944946984528585289533414905600786096792764282e-34, /* logil[49] */ 
+  } , 
+  { 
+    7.19101071357727050781250000000000000000000000000000e-01,   /* r[50] */ 
+    3.29753359015631464234985514849540777504444122314453e-01, /* logih[50] */ 
+    -2.38987037434306035496609341036867889075145964580121e-17, /* logim[50] */ 
+    -1.22161021411351376080765213758661026982900357467596e-33, /* logil[50] */ 
+  } , 
+  { 
+    7.15083837509155273437500000000000000000000000000000e-01,   /* r[51] */ 
+    3.35355487904429983014864546930766664445400238037109e-01, /* logih[51] */ 
+    -2.15530481136091842439480783176785939188081961777809e-17, /* logim[51] */ 
+    5.65377778536716902900522531845470344712374772157319e-34, /* logil[51] */ 
+  } , 
+  { 
+    7.11111068725585937500000000000000000000000000000000e-01,   /* r[52] */ 
+    3.40926646575239744585417156486073508858680725097656e-01, /* logih[52] */ 
+    1.74672070296268393919501631375949801326271042364782e-17, /* logim[52] */ 
+    1.28757784323920807504216254145051967795248381758825e-33, /* logil[52] */ 
+  } , 
+  { 
+    1.41436457633972167968750000000000000000000000000000e+00,   /* r[53] */ 
+    -3.46680367578929504723816990008344873785972595214844e-01, /* logih[53] */ 
+    -2.63487075436177288054440686474043695042741778901884e-17, /* logim[53] */ 
+    -1.38972774108545698123375234719775474495262622652200e-33, /* logil[53] */ 
+  } , 
+  { 
+    1.40659332275390625000000000000000000000000000000000e+00,   /* r[54] */ 
+    -3.41170697798120592381110327551141381263732910156250e-01, /* logih[54] */ 
+    1.93668606486849623510457675345565515553170548397263e-17, /* logim[54] */ 
+    -6.31924577586791945681481090971933602378723267089765e-34, /* logil[54] */ 
+  } , 
+  { 
+    1.39890718460083007812500000000000000000000000000000e+00,   /* r[55] */ 
+    -3.35691349380139503200126682713744230568408966064453e-01, /* logih[55] */ 
+    8.91843232308579533655667936963342665384096382048557e-18, /* logim[55] */ 
+    -7.43852632990846244963757376301756885994340719135686e-34, /* logil[55] */ 
+  } , 
+  { 
+    1.39130425453186035156250000000000000000000000000000e+00,   /* r[56] */ 
+    -3.30241619815349218836075806393637321889400482177734e-01, /* logih[56] */ 
+    -1.69271534756955752333877800530082817995576241189249e-17, /* logim[56] */ 
+    -2.05124125474152062675126703058085713735683777118919e-34, /* logil[56] */ 
+  } , 
+  { 
+    1.38378381729125976562500000000000000000000000000000e+00,   /* r[57] */ 
+    -3.24821643615624322531942880232236348092555999755859e-01, /* logih[57] */ 
+    1.93287622140617006961244731990086787828970688523722e-17, /* logim[57] */ 
+    -1.40211415833516824405184666805315188814704601258065e-33, /* logil[57] */ 
+  } , 
+  { 
+    1.37634420394897460937500000000000000000000000000000e+00,   /* r[58] */ 
+    -3.19430856448034428130000605960958637297153472900391e-01, /* logih[58] */ 
+    5.58442737360353866559969930374464901851229137435661e-18, /* logim[58] */ 
+    -2.25313306148742433454599602113064828727792769150620e-34, /* logil[58] */ 
+  } , 
+  { 
+    1.36898398399353027343750000000000000000000000000000e+00,   /* r[59] */ 
+    -3.14068847182749744106899925100151449441909790039062e-01, /* logih[59] */ 
+    1.74087330539322720259314067705480812845274240645592e-17, /* logim[59] */ 
+    2.87763442397890459672608687761118393908121210479900e-34, /* logil[59] */ 
+  } , 
+  { 
+    1.36170220375061035156250000000000000000000000000000e+00,   /* r[60] */ 
+    -3.08735537528966208498104606405831873416900634765625e-01, /* logih[60] */ 
+    2.31380218279209479391607966489385619371870731511261e-17, /* logim[60] */ 
+    5.75649697670342883220331709767832654878804183961435e-34, /* logil[60] */ 
+  } , 
+  { 
+    1.35449743270874023437500000000000000000000000000000e+00,   /* r[61] */ 
+    -3.03430487161918061023158088573836721479892730712891e-01, /* logih[61] */ 
+    5.88591784280850309549180895879864991445414905765635e-18, /* logim[61] */ 
+    3.80740105286783019924475997846877792541810370319751e-34, /* logil[61] */ 
+  } , 
+  { 
+    1.34736847877502441406250000000000000000000000000000e+00,   /* r[62] */ 
+    -2.98153415159913837140237546918797306716442108154297e-01, /* logih[62] */ 
+    -8.81391967432414632609646763074561636922040597203571e-18, /* logim[62] */ 
+    -2.02736910549706342663167850737697734462522018249963e-34, /* logil[62] */ 
+  } , 
+  { 
+    1.34031414985656738281250000000000000000000000000000e+00,   /* r[63] */ 
+    -2.92904026677480888718463347686338238418102264404297e-01, /* logih[63] */ 
+    1.79356774462556308958502912313675336181211584010969e-17, /* logim[63] */ 
+    1.02350086185905899058999882149766002774623879978153e-34, /* logil[63] */ 
+  } , 
+  { 
+    1.33333325386047363281250000000000000000000000000000e+00,   /* r[64] */ 
+    -2.87682012847134349620148441317724063992500305175781e-01, /* logih[64] */ 
+    -2.60715355783435444041951693925565689223533295668838e-17, /* logim[64] */ 
+    -9.83372234709377378449141028490939682198507140512540e-34, /* logil[64] */ 
+  } , 
+  { 
+    1.32642483711242675781250000000000000000000000000000e+00,   /* r[65] */ 
+    -2.82487230428967117656924301627441309392452239990234e-01, /* logih[65] */ 
+    2.49452771019268745755792758464310261659699707675018e-17, /* logim[65] */ 
+    -1.40230272425562150522506576584140991296902734870694e-33, /* logil[65] */ 
+  } , 
+  { 
+    1.31958770751953125000000000000000000000000000000000e+00,   /* r[66] */ 
+    -2.77319345020877350282972884087939746677875518798828e-01, /* logih[66] */ 
+    7.44521346975934828880026635948320543669274837358637e-18, /* logim[66] */ 
+    -5.41922476182319969711469733445405189836277342215443e-34, /* logil[66] */ 
+  } , 
+  { 
+    1.31282043457031250000000000000000000000000000000000e+00,   /* r[67] */ 
+    -2.72177826311169102080356196893262676894664764404297e-01, /* logih[67] */ 
+    -1.94604737767255604321061638736698666324990178271015e-17, /* logim[67] */ 
+    4.93318792723831633917605655356651628446409622108869e-34, /* logil[67] */ 
+  } , 
+  { 
+    1.30612254142761230468750000000000000000000000000000e+00,   /* r[68] */ 
+    -2.67062856029558426396164350080653093755245208740234e-01, /* logih[68] */ 
+    1.42676910305707233200559864526771082234384991613068e-17, /* logim[68] */ 
+    9.40874014190123375853921812584677628111272401841540e-34, /* logil[68] */ 
+  } , 
+  { 
+    1.29949235916137695312500000000000000000000000000000e+00,   /* r[69] */ 
+    -2.61973695252477101202970288795768283307552337646484e-01, /* logih[69] */ 
+    -1.59130185496344773949627658712806321021374170989957e-17, /* logim[69] */ 
+    2.05966526658843352548575822504612882857523370085076e-34, /* logil[69] */ 
+  } , 
+  { 
+    1.29292941093444824218750000000000000000000000000000e+00,   /* r[70] */ 
+    -2.56910505054635363020310023784986697137355804443359e-01, /* logih[70] */ 
+    -2.32939629151451727444770801596466641031683815428509e-17, /* logim[70] */ 
+    -1.43942742464573220634874496721239465737503205324375e-33, /* logil[70] */ 
+  } , 
+  { 
+    1.28643226623535156250000000000000000000000000000000e+00,   /* r[71] */ 
+    -2.51872701711453261808060233306605368852615356445312e-01, /* logih[71] */ 
+    -2.58573188266130078596915247890597291360969537163785e-17, /* logim[71] */ 
+    3.36064630885731507350249551263037246653963144676932e-34, /* logil[71] */ 
+  } , 
+  { 
+    1.27999997138977050781250000000000000000000000000000e+00,   /* r[72] */ 
+    -2.46860055579783743695543307694606482982635498046875e-01, /* logih[72] */ 
+    -1.36174299951708605118822966558244798958741114531493e-17, /* logim[72] */ 
+    -8.23883896198784591738914635896001757021238114385808e-35, /* logil[72] */ 
+  } , 
+  { 
+    1.27363181114196777343750000000000000000000000000000e+00,   /* r[73] */ 
+    -2.41872513137422084916750009142560884356498718261719e-01, /* logih[73] */ 
+    -2.91827950997726014268071786281330008614392694540440e-18, /* logim[73] */ 
+    8.66387628958027677722140876839269007945711340420961e-35, /* logil[73] */ 
+  } , 
+  { 
+    1.26732683181762695312500000000000000000000000000000e+00,   /* r[74] */ 
+    -2.36909825309450927655063878773944452404975891113281e-01, /* logih[74] */ 
+    4.97049401191734143236484721843489954792294974449682e-18, /* logim[74] */ 
+    2.12212094628219632031384179435720857347529888567725e-34, /* logil[74] */ 
+  } , 
+  { 
+    1.26108384132385253906250000000000000000000000000000e+00,   /* r[75] */ 
+    -2.31971542737545860513037609962339047342538833618164e-01, /* logih[75] */ 
+    1.20064411563385414488688519726171456939870706105353e-17, /* logim[75] */ 
+    -5.20241965000144345106493348505238495111737026311766e-34, /* logil[75] */ 
+  } , 
+  { 
+    1.25490188598632812500000000000000000000000000000000e+00,   /* r[76] */ 
+    -2.27057391030699523559732710964453872293233871459961e-01, /* logih[76] */ 
+    -9.55134517665639461592830714479938653876650013848813e-18, /* logim[76] */ 
+    -7.00052160915705629865262646818211330004502638341784e-34, /* logil[76] */ 
+  } , 
+  { 
+    1.24878048896789550781250000000000000000000000000000e+00,   /* r[77] */ 
+    -2.22167466272476882283015697794326115399599075317383e-01, /* logih[77] */ 
+    1.12308837854924459441805420173945034636561801020789e-17, /* logim[77] */ 
+    1.05992689326800868505291338111574353445179905470698e-34, /* logil[77] */ 
+  } , 
+  { 
+    1.24271845817565917968750000000000000000000000000000e+00,   /* r[78] */ 
+    -2.17301285003207084178811214769666548818349838256836e-01, /* logih[78] */ 
+    -1.37599098464784711367545798871014398359913153389606e-17, /* logim[78] */ 
+    -5.44676947016522950876420214713413739910691265570885e-34, /* logil[78] */ 
+  } , 
+  { 
+    1.23671507835388183593750000000000000000000000000000e+00,   /* r[79] */ 
+    -2.12458734101899110457978281374380458146333694458008e-01, /* logih[79] */ 
+    3.12575020468223244847667531342710056704202576314513e-18, /* logim[79] */ 
+    1.27082738610098894087384580413567050181540844264548e-35, /* logil[79] */ 
+  } , 
+  { 
+    1.23076915740966796875000000000000000000000000000000e+00,   /* r[80] */ 
+    -2.07639305173597937814733427330793347209692001342773e-01, /* logih[80] */ 
+    -1.20531726306040366742269494142059745690218464556184e-17, /* logim[80] */ 
+    3.33883514126655983920316543317695602289579500921493e-34, /* logil[80] */ 
+  } , 
+  { 
+    1.22488045692443847656250000000000000000000000000000e+00,   /* r[81] */ 
+    -2.02843253050716987306856253781006671488285064697266e-01, /* logih[81] */ 
+    -1.66453566992001313940518505696243672056063400746100e-18, /* logim[81] */ 
+    2.78446239404510241881587234176263335863162887428131e-35, /* logil[81] */ 
+  } , 
+  { 
+    1.21904754638671875000000000000000000000000000000000e+00,   /* r[82] */ 
+    -1.98069854157447239328959653903439175337553024291992e-01, /* logih[82] */ 
+    -3.74277289637934596837745314540095849706853736054736e-18, /* logim[82] */ 
+    2.20940287174632344749918330821286328950105212564345e-34, /* logil[82] */ 
+  } , 
+  { 
+    1.21327018737792968750000000000000000000000000000000e+00,   /* r[83] */ 
+    -1.93319348256398265695210625381150748580694198608398e-01, /* logih[83] */ 
+    -4.63045754803609100012916107813305239709411987466506e-18, /* logim[83] */ 
+    3.81311992624323390610440652445847060246376140730432e-34, /* logil[83] */ 
+  } , 
+  { 
+    1.20754718780517578125000000000000000000000000000000e+00,   /* r[84] */ 
+    -1.88591184708711112616441596401273272931575775146484e-01, /* logih[84] */ 
+    7.43216311628945500204739783937941202296964434266492e-18, /* logim[84] */ 
+    -4.02931080995428730719681936637527024502063366412999e-34, /* logil[84] */ 
+  } , 
+  { 
+    1.20187783241271972656250000000000000000000000000000e+00,   /* r[85] */ 
+    -1.83885194019779485419263664880418218672275543212891e-01, /* logih[85] */ 
+    4.12613043545869607985270580107985887836449099592842e-18, /* logim[85] */ 
+    -1.13080344207561908198013613253456946184091830340475e-34, /* logil[85] */ 
+  } , 
+  { 
+    1.19626164436340332031250000000000000000000000000000e+00,   /* r[86] */ 
+    -1.79201397792742966874612875471939332783222198486328e-01, /* logih[86] */ 
+    1.25197515140082668570664893296659406065442168045883e-17, /* logim[86] */ 
+    2.08673445558311131685127966451011169090072111640797e-34, /* logil[86] */ 
+  } , 
+  { 
+    1.19069766998291015625000000000000000000000000000000e+00,   /* r[87] */ 
+    -1.74539412626609380385644954003510065376758575439453e-01, /* logih[87] */ 
+    8.52219781255028950312107624449830634785785378861392e-18, /* logim[87] */ 
+    5.46720442033771639415150684633589460164820712880324e-34, /* logil[87] */ 
+  } , 
+  { 
+    1.18518519401550292968750000000000000000000000000000e+00,   /* r[88] */ 
+    -1.69899044245978042555478282338299322873353958129883e-01, /* logih[88] */ 
+    4.86800738580472456380134000450154397097303177737598e-19, /* logim[88] */ 
+    -4.48365665383134519709151659261825733866549119396251e-36, /* logil[88] */ 
+  } , 
+  { 
+    1.17972350120544433593750000000000000000000000000000e+00,   /* r[89] */ 
+    -1.65280090007780350314092743246874306350946426391602e-01, /* logih[89] */ 
+    1.05991222445546499578510819426998369466676418510398e-18, /* logim[89] */ 
+    2.15535973016890499002202117947684925307171077322261e-36, /* logil[89] */ 
+  } , 
+  { 
+    1.17431187629699707031250000000000000000000000000000e+00,   /* r[90] */ 
+    -1.60682338849634120947484916541725397109985351562500e-01, /* logih[90] */ 
+    5.38493323815703006679696841052856196024573538758454e-18, /* logim[90] */ 
+    1.60200163876329179080224417109933041789065267300895e-34, /* logil[90] */ 
+  } , 
+  { 
+    1.16894984245300292968750000000000000000000000000000e+00,   /* r[91] */ 
+    -1.56105775199027185795586092353914864361286163330078e-01, /* logih[91] */ 
+    1.32405772531609804709122583998125231935523184710352e-17, /* logim[91] */ 
+    4.88933388697666736600942679327919927438390701656817e-35, /* logil[91] */ 
+  } , 
+  { 
+    1.16363644599914550781250000000000000000000000000000e+00,   /* r[92] */ 
+    -1.51549968907714105448292229993967339396476745605469e-01, /* logih[92] */ 
+    1.77181633478899593214922561799512844823326841018122e-18, /* logim[92] */ 
+    5.44951453107128861626798538797020344311568819287008e-35, /* logil[92] */ 
+  } , 
+  { 
+    1.15837097167968750000000000000000000000000000000000e+00,   /* r[93] */ 
+    -1.47014683357163111754317696977523155510425567626953e-01, /* logih[93] */ 
+    4.46701777108311388441189058844554903695616000674812e-18, /* logim[93] */ 
+    -1.53168389834566630100313932781112142055948393405761e-34, /* logil[93] */ 
+  } , 
+  { 
+    1.15315318107604980468750000000000000000000000000000e+00,   /* r[94] */ 
+    -1.42500086821669674774781810810964088886976242065430e-01, /* logih[94] */ 
+    -2.21668083020505832726646787146199970227457581911830e-18, /* logim[94] */ 
+    -4.73140768447350921077611938776759805597533720242102e-36, /* logil[94] */ 
+  } , 
+  { 
+    1.14798212051391601562500000000000000000000000000000e+00,   /* r[95] */ 
+    -1.38005723310861472263866289722500368952751159667969e-01, /* logih[95] */ 
+    -9.06035372834454229539393713977175584764482079542462e-18, /* logim[95] */ 
+    -6.58482110068426815722709702700082916058774211791842e-34, /* logil[95] */ 
+  } , 
+  { 
+    1.14285707473754882812500000000000000000000000000000e+00,   /* r[96] */ 
+    -1.33531333019876075063336884340969845652580261230469e-01, /* logih[96] */ 
+    3.66452824974217778950176131406293356640863401093569e-18, /* logim[96] */ 
+    6.15050085774566840615703784135477182311292227710416e-35, /* logil[96] */ 
+  } , 
+  { 
+    1.13777780532836914062500000000000000000000000000000e+00,   /* r[97] */ 
+    -1.29077066489528990977930789085803553462028503417969e-01, /* logih[97] */ 
+    7.97904258955058431558707127373439732289437010877585e-19, /* logim[97] */ 
+    -4.72584148771245137732808879600361038781792271619664e-35, /* logil[97] */ 
+  } , 
+  { 
+    1.13274335861206054687500000000000000000000000000000e+00,   /* r[98] */ 
+    -1.24642441481986290807704165217728586867451667785645e-01, /* logih[98] */ 
+    -1.12998120773332791412288663337308123303520797473827e-18, /* logim[98] */ 
+    5.04751909879024305911295754405025108738663901055449e-35, /* logil[98] */ 
+  } , 
+  { 
+    1.12775325775146484375000000000000000000000000000000e+00,   /* r[99] */ 
+    -1.20227386019965673535914163494453532621264457702637e-01, /* logih[99] */ 
+    -4.10132123403305460439841682733159064509468253505934e-18, /* logim[99] */ 
+    1.89802934268459828223199224893946334512039168636632e-34, /* logil[99] */ 
+  } , 
+  { 
+    1.12280702590942382812500000000000000000000000000000e+00,   /* r[100] */ 
+    -1.15831822975702269928888199501670897006988525390625e-01, /* logih[100] */ 
+    -4.33848450767153009712329850176816190393287866962401e-18, /* logim[100] */ 
+    -3.16979691573058896647113947407157157214490081484725e-34, /* logil[100] */ 
+  } , 
+  { 
+    1.11790394783020019531250000000000000000000000000000e+00,   /* r[101] */ 
+    -1.11455456757806464773707944004854653030633926391602e-01, /* logih[101] */ 
+    -5.25227837292521929481451677551514755953859335394548e-18, /* logim[101] */ 
+    -1.35455162271740897316919848287529722248286557667632e-34, /* logil[101] */ 
+  } , 
+  { 
+    1.11304354667663574218750000000000000000000000000000e+00,   /* r[102] */ 
+    -1.07098197023655139492603893813793547451496124267578e-01, /* logih[102] */ 
+    3.47169710366632825350486634041554320998659998614468e-18, /* logim[102] */ 
+    4.16291803858237783591365989446195611338780307382474e-35, /* logil[102] */ 
+  } , 
+  { 
+    1.10822510719299316406250000000000000000000000000000e+00,   /* r[103] */ 
+    -1.02759733026446364867467764270259067416191101074219e-01, /* logih[103] */ 
+    5.14131173582414775653668171432178439238499706689565e-18, /* logim[103] */ 
+    -2.03511710633920722432014459953905354472733979743122e-34, /* logil[103] */ 
+  } , 
+  { 
+    1.10344839096069335937500000000000000000000000000000e+00,   /* r[104] */ 
+    -9.84401771213754411826712953370588365942239761352539e-02, /* logih[104] */ 
+    4.43863133643792238822177111529042861410430977956950e-18, /* logim[104] */ 
+    3.12055863098469149547827014037274497005231280699218e-34, /* logil[104] */ 
+  } , 
+  { 
+    1.09871244430541992187500000000000000000000000000000e+00,   /* r[105] */ 
+    -9.41389890512167593072945237508974969387054443359375e-02, /* logih[105] */ 
+    2.37342936135295683496202513568031672884920488134173e-19, /* logim[105] */ 
+    2.33721773003055253003147894270712826153088420940698e-35, /* logil[105] */ 
+  } , 
+  { 
+    1.09401702880859375000000000000000000000000000000000e+00,   /* r[106] */ 
+    -8.98562695172144959565585509153606835752725601196289e-02, /* logih[106] */ 
+    6.27446602451052736319026996501069657057280086335290e-19, /* logim[106] */ 
+    -3.52284010127094716016693656249620808330731317587528e-35, /* logil[106] */ 
+  } , 
+  { 
+    1.08936166763305664062500000000000000000000000000000e+00,   /* r[107] */ 
+    -8.55918986704354706196440361054555978626012802124023e-02, /* logih[107] */ 
+    -5.03513826084130895904008327416965851388338774947593e-18, /* logim[107] */ 
+    6.86424026896698901114373288904478288437409959196820e-35, /* logil[107] */ 
+  } , 
+  { 
+    1.08474564552307128906250000000000000000000000000000e+00,   /* r[108] */ 
+    -8.13455314205279167438789045263547450304031372070312e-02, /* logih[108] */ 
+    1.86223784192593707654359268192644483006930996779864e-18, /* logim[108] */ 
+    -9.08215611660981343459991418247070342987317386688394e-35, /* logil[108] */ 
+  } , 
+  { 
+    1.08016872406005859375000000000000000000000000000000e+00,   /* r[109] */ 
+    -7.71172549156562414651716608204878866672515869140625e-02, /* logih[109] */ 
+    4.37349590112793692636976332290601524356283649435490e-18, /* logim[109] */ 
+    -2.43638510650083687411626047741666976256819270953612e-34, /* logil[109] */ 
+  } , 
+  { 
+    1.07563018798828125000000000000000000000000000000000e+00,   /* r[110] */ 
+    -7.29067112034412351251333461732428986579179763793945e-02, /* logih[110] */ 
+    6.30693084361487082247322771068486204374546343933133e-18, /* logim[110] */ 
+    3.44825082371128400572272238979928316738696119124015e-34, /* logil[110] */ 
+  } , 
+  { 
+    1.07112979888916015625000000000000000000000000000000e+00,   /* r[111] */ 
+    -6.87139782297249979148290321973036043345928192138672e-02, /* logih[111] */ 
+    -4.40922228882126717948257852084234011599535648658716e-18, /* logim[111] */ 
+    2.00071285755297414487130516445636815235532199087333e-34, /* logil[111] */ 
+  } , 
+  { 
+    1.06666660308837890625000000000000000000000000000000e+00,   /* r[112] */ 
+    -6.45384615329246263959461771264614071696996688842773e-02, /* logih[112] */ 
+    6.47055724777502681297997296903095954212491541204973e-18, /* logim[112] */ 
+    -3.53995576621708408093066388957026321212073337996708e-34, /* logil[112] */ 
+  } , 
+  { 
+    1.06224060058593750000000000000000000000000000000000e+00,   /* r[113] */ 
+    -6.03804513842609302809449900450999848544597625732422e-02, /* logih[113] */ 
+    2.15703432342306119511642925211564389619524247753812e-18, /* logim[113] */ 
+    -3.99051054966201464148223117427430962485432571249835e-35, /* logil[113] */ 
+  } , 
+  { 
+    1.05785131454467773437500000000000000000000000000000e+00,   /* r[114] */ 
+    -5.62397891033892469159205518280941760167479515075684e-02, /* logih[114] */ 
+    3.28339677990388790029372693220459728960401288179580e-18, /* logim[114] */ 
+    1.51915205677141595589208947882243470550543557886170e-35, /* logil[114] */ 
+  } , 
+  { 
+    1.05349802970886230468750000000000000000000000000000e+00,   /* r[115] */ 
+    -5.21160840267197236763685452842764789238572120666504e-02, /* logih[115] */ 
+    -2.76876652450490527514912306264172616345243137067863e-19, /* logim[115] */ 
+    4.97747635693761803951848478678221385327287067714555e-36, /* logil[115] */ 
+  } , 
+  { 
+    1.04918026924133300781250000000000000000000000000000e+00,   /* r[116] */ 
+    -4.80091633070045681330739739678392652422189712524414e-02, /* logih[116] */ 
+    -1.43903217358996287866324353045636173989420593009940e-18, /* logim[116] */ 
+    9.24533961563047616614044310774847027299245259235749e-35, /* logil[116] */ 
+  } , 
+  { 
+    1.04489803314208984375000000000000000000000000000000e+00,   /* r[117] */ 
+    -4.39193047153486545997047585387917933985590934753418e-02, /* logih[117] */ 
+    -1.76247347066130256555880115492006953917590179181782e-18, /* logim[117] */ 
+    2.95067167680037492936848210009098107643918346324819e-35, /* logil[117] */ 
+  } , 
+  { 
+    1.04065036773681640625000000000000000000000000000000e+00,   /* r[118] */ 
+    -3.98458712942959952796329048396728467196226119995117e-02, /* logih[118] */ 
+    3.12956491324511750770873688790894657687633404551217e-18, /* logim[118] */ 
+    9.08530842942513514982993220469010912494881545842223e-35, /* logil[118] */ 
+  } , 
+  { 
+    1.03643727302551269531250000000000000000000000000000e+00,   /* r[119] */ 
+    -3.57891329972944774451271143789199413731694221496582e-02, /* logih[119] */ 
+    -2.94786708868720304892365707065135221787713948130908e-19, /* logim[119] */ 
+    1.84384763058385810856389175018656477977822636794864e-35, /* logil[119] */ 
+  } , 
+  { 
+    1.03225803375244140625000000000000000000000000000000e+00,   /* r[120] */ 
+    -3.17486685122574663342476242178236134350299835205078e-02, /* logih[120] */ 
+    -3.03821748520802146852642560679641488082417537178322e-18, /* logim[120] */ 
+    6.90127669441551609256721347857289051065660383455449e-35, /* logil[120] */ 
+  } , 
+  { 
+    1.02811241149902343750000000000000000000000000000000e+00,   /* r[121] */ 
+    -2.77245107619511835239656249996187398210167884826660e-02, /* logih[121] */ 
+    1.56537436220084983093655029081028016172956628311065e-18, /* logim[121] */ 
+    -4.26959324792631463690822650182944301609062827136870e-35, /* logil[121] */ 
+  } , 
+  { 
+    1.02399992942810058593750000000000000000000000000000e+00,   /* r[122] */ 
+    -2.37164576994431455791989549197751330211758613586426e-02, /* logih[122] */ 
+    -1.57190014657555079881764699090245893269914973184857e-19, /* logim[122] */ 
+    4.62721637019171363059082221740445258999073602747011e-36, /* logil[122] */ 
+  } , 
+  { 
+    1.01992034912109375000000000000000000000000000000000e+00,   /* r[123] */ 
+    -1.97245351501005340699723689112943247891962528228760e-02, /* logih[123] */ 
+    1.34458916305708123412045028332259969564528051018263e-18, /* logim[123] */ 
+    -6.02768376061644464555810636396264987280148524662430e-35, /* logil[123] */ 
+  } , 
+  { 
+    1.01587295532226562500000000000000000000000000000000e+00,   /* r[124] */ 
+    -1.57482973634926158579272481574662378989160060882568e-02, /* logih[124] */ 
+    -1.00208727697080412925749596659626020152032796409604e-18, /* logim[124] */ 
+    7.75790823155383991507800579878754988160969197338737e-35, /* logil[124] */ 
+  } , 
+  { 
+    1.01185774803161621093750000000000000000000000000000e+00,   /* r[125] */ 
+    -1.17879957989121472716753658005472971126437187194824e-02, /* logih[125] */ 
+    2.12843993900806841444093729096134188145078357457959e-19, /* logim[125] */ 
+    -7.36236149534638490756917054603187520349493909791838e-36, /* logil[125] */ 
+  } , 
+  { 
+    1.00787401199340820312500000000000000000000000000000e+00,   /* r[126] */ 
+    -7.84317373573558719590526067122482345439493656158447e-03, /* logih[126] */ 
+    -2.76470798179560918828283984091643257584228907545928e-19, /* logim[126] */ 
+    1.46121103426200283031313413564673422143931331178612e-35, /* logil[126] */ 
+  } , 
+  { 
+    1.00392150878906250000000000000000000000000000000000e+00,   /* r[127] */ 
+    -3.91383971648977691676352108629544090945273637771606e-03, /* logih[127] */ 
+    -4.28019276224719221462393891683495367484578724177817e-19, /* logim[127] */ 
+    -2.25272542183557712010826889962617244762256960750126e-35, /* logil[127] */ 
+  } }; 
+ 
diff --git a/src/crlibm/log2_accurate.c b/src/crlibm/log2_accurate.c
new file mode 100644
index 0000000..840ecb4
--- /dev/null
+++ b/src/crlibm/log2_accurate.c
@@ -0,0 +1,330 @@
+/*
+ * Correctly rounded base 2 logarithm
+ *
+ * Author : David Defour
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+#include "log2_accurate.h"
+
+/*
+ *  1) First reduction: exponent extraction      
+ *         E  
+ *  x = 2^   .(1+f)    with  0 <= f < 1
+ *
+ *  log2(x) = E + log2(1+f) where:
+ *     - log2(1+f) need to be evalute 
+ *  
+ *
+ *  2) Avoiding accuracy problem when E=-1 by testing
+ *   
+ *    if (1+f >= sqrt(2)) then 
+ *        1+f = (1+f)/2;  E = E+1; 
+ *    and,
+ *        log2(x) = (E+1) + log2((1+f)/2)
+ *
+ *    so now:      sqrt(2)/2 <= (1+f) < sqrt(2)
+ *
+ *
+ *  3) Second reduction: tabular reduction
+ *                   -4  
+ *   wi = 1 + i. 2^
+ *                                      1  
+ *   log2(1+f) = log2(wi) + log2 ( 1 + --- . (1 + f - wi) ) 
+ *                                     wi 
+ *
+ *   then |(1+f-wi)/wi| <= 2^-5 if we use rounded to nearest.
+ *
+ *  4) Computation:
+ *   a) Table lookup of: 
+ *        - ti    = log2(wi)
+ *        - inv_wi = 1/(wi)
+ *   b) Polynomial evaluation of:
+ *        - P(R) ~ log2(1 + R), where R = (1+f-wi) * inv_wi 
+ *
+ *                 -5 
+ *   with  |R| < 2^
+ *
+ *
+ *  5) Reconstruction:
+ *   log2(x) = E + t_i + P(R)
+ *
+ *
+ *   Note 1:
+ *	To guarantee log2(2^n)=n, where 2^n is normal, the rounding 
+ *	mode must set to Round-to-Nearest.
+ *
+ *   Special cases:
+ *	log2(x) is NaN with signal if x < 0; 
+ *	log2(+INF) is +INF with no signal; log2(0) is -INF with signal;
+ *	log2(NaN) is that NaN with no signal;
+ *	log2(2^N) = N 
+ *
+ */
+#define SQRT_2 1.4142135623730950489e0 
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST
+ *************************************************************
+ *************************************************************/
+double log2_rn(double x) {
+  scs_t R, res1, sc_exp;
+  scs_ptr inv_wi, ti;
+
+  db_number nb, nb2, wi, resd;
+  int i, E=0;
+
+  nb.d = x;
+  /* Filter cases */
+  if (nb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+    if (((nb.i[HI] & 0x7fffffff)|nb.i[LO])==0)
+      return 1.0/0.0;                       /* log(+/-0) = -Inf */
+    if (nb.i[HI] < 0) 
+      return (x-x)/0;                       /* log(-x) = Nan    */
+
+    /* Subnormal number */
+    E    -= (SCS_NB_BITS*2); /* keep in mind that x is a subnormal number */ 
+    nb.d *=SCS_RADIX_TWO_DOUBLE;  /* make x as normal number     */         
+    /* We may just want add 2 to the scs number.index */
+    /* may be .... we will see */
+  }
+  if (nb.i[HI] >= 0x7ff00000)
+    return x+x;                             /* Inf or Nan       */
+
+  /* find n, nb.d such that sqrt(2)/2 < nb.d < sqrt(2) */
+  E += (nb.i[HI]>>20)-1023;
+  nb.i[HI] =  (nb.i[HI] & 0x000fffff) | 0x3ff00000;
+  if (nb.d > SQRT_2){
+    nb.d *= 0.5;
+    E++;
+  }
+
+  scs_set_si(sc_exp, E);
+
+  /* to normalize nb.d and round to nearest      */
+  /* +((2^4 - trunc(sqrt(2)/2) *2^4 )*2 + 1)/2^5 */ 
+  nb2.d = nb.d + norm_number.d; 
+  i = (nb2.i[HI] & 0x000fffff);
+  i = i >> 16; /* 0<= i <=11 */
+  
+  wi.d = (11+i)*(double)0.6250e-1;
+
+  /* (1+f-w_i) */
+  nb.d -= wi.d; 
+  
+  /* Table reduction */
+  ti     = table_ti_ptr[i]; 
+  inv_wi = table_inv_wi_ptr[i];
+
+ 
+  /* R = (1+f-w_i)/w_i */
+  scs_set_d(R, nb.d);
+  scs_mul(R, R, inv_wi);
+
+
+  /*
+   * Polynomial evaluation of log2(1 + R) with an error less than 2^(-130)
+   */
+  scs_mul(res1, constant_poly_ptr[0], R);
+  for(i=1; i<20; i++){
+    scs_add(res1, constant_poly_ptr[i], res1);
+    scs_mul(res1, res1, R);
+  }
+  scs_add(res1, res1, ti);
+  scs_add(res1, res1, sc_exp);
+  
+  scs_get_d(&resd.d, res1);  
+    
+  return resd.d;
+}
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  -INFINITY
+ *************************************************************
+ *************************************************************/
+double log2_rd(double x) {
+  scs_t R, res1, sc_exp;
+  scs_ptr inv_wi, ti;
+
+  db_number nb, nb2, wi, resd;
+  int i, E=0;
+
+  nb.d = x;
+  /* Filter cases */
+  if (nb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+    if (((nb.i[HI] & 0x7fffffff)|nb.i[LO])==0)
+      return 1.0/0.0;                       /* log(+/-0) = -Inf */
+    if (nb.i[HI] < 0) 
+      return (x-x)/0;                       /* log(-x) = Nan    */
+
+    /* Subnormal number */
+    E    -= (SCS_NB_BITS*2); /* keep in mind that x is a subnormal number */ 
+    nb.d *=SCS_RADIX_TWO_DOUBLE;  /* make x as normal number     */         
+    /* We may just want add 2 to the scs number.index */
+    /* may be .... we will see */
+  }
+  if (nb.i[HI] >= 0x7ff00000)
+    return x+x;                             /* Inf or Nan       */
+
+  /* find n, nb.d such that sqrt(2)/2 < nb.d < sqrt(2) */
+  E += (nb.i[HI]>>20)-1023;
+  nb.i[HI] =  (nb.i[HI] & 0x000fffff) | 0x3ff00000;
+  if (nb.d > SQRT_2){
+    nb.d *= 0.5;
+    E++;
+  }
+
+  scs_set_si(sc_exp, E);
+
+  /* to normalize nb.d and round to nearest      */
+  /* +((2^4 - trunc(sqrt(2)/2) *2^4 )*2 + 1)/2^5 */ 
+  nb2.d = nb.d + norm_number.d; 
+  i = (nb2.i[HI] & 0x000fffff);
+  i = i >> 16; /* 0<= i <=11 */
+  
+  wi.d = (11+i)*(double)0.6250e-1;
+
+  /* (1+f-w_i) */
+  nb.d -= wi.d; 
+  
+  /* Table reduction */
+  ti     = table_ti_ptr[i]; 
+  inv_wi = table_inv_wi_ptr[i];
+
+ 
+  /* R = (1+f-w_i)/w_i */
+  scs_set_d(R, nb.d);
+  scs_mul(R, R, inv_wi);
+
+
+  /*
+   * Polynomial evaluation of log2(1 + R) with an error less than 2^(-130)
+   */
+  scs_mul(res1, constant_poly_ptr[0], R);
+  for(i=1; i<20; i++){
+    scs_add(res1, constant_poly_ptr[i], res1);
+    scs_mul(res1, res1, R);
+  }
+  scs_add(res1, res1, ti);
+  scs_add(res1, res1, sc_exp);
+  
+  scs_get_d_minf(&resd.d, res1);  
+    
+  return resd.d;
+}
+
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  +INFINITY
+ *************************************************************
+ *************************************************************/
+double log2_ru(double x) {
+  scs_t R, res1, sc_exp;
+  scs_ptr inv_wi, ti;
+
+  db_number nb, nb2, wi, resd;
+  int i, E=0;
+
+  nb.d = x;
+  /* Filter cases */
+  if (nb.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+    if (((nb.i[HI] & 0x7fffffff)|nb.i[LO])==0)
+      return 1.0/0.0;                       /* log(+/-0) = -Inf */
+    if (nb.i[HI] < 0) 
+      return (x-x)/0;                       /* log(-x) = Nan    */
+
+    /* Subnormal number */
+    E    -= (SCS_NB_BITS*2); /* keep in mind that x is a subnormal number */ 
+    nb.d *=SCS_RADIX_TWO_DOUBLE;  /* make x as normal number     */         
+    /* We may just want add 2 to the scs number.index */
+    /* may be .... we will see */
+  }
+  if (nb.i[HI] >= 0x7ff00000)
+    return x+x;                             /* Inf or Nan       */
+
+  /* find n, nb.d such that sqrt(2)/2 < nb.d < sqrt(2) */
+  E += (nb.i[HI]>>20)-1023;
+  nb.i[HI] =  (nb.i[HI] & 0x000fffff) | 0x3ff00000;
+  if (nb.d > SQRT_2){
+    nb.d *= 0.5;
+    E++;
+  }
+
+  scs_set_si(sc_exp, E);
+
+  /* to normalize nb.d and round to nearest      */
+  /* +((2^4 - trunc(sqrt(2)/2) *2^4 )*2 + 1)/2^5 */ 
+  nb2.d = nb.d + norm_number.d; 
+  i = (nb2.i[HI] & 0x000fffff);
+  i = i >> 16; /* 0<= i <=11 */
+  
+  wi.d = (11+i)*(double)0.6250e-1;
+
+  /* (1+f-w_i) */
+  nb.d -= wi.d; 
+  
+  /* Table reduction */
+  ti     = table_ti_ptr[i]; 
+  inv_wi = table_inv_wi_ptr[i];
+
+ 
+  /* R = (1+f-w_i)/w_i */
+  scs_set_d(R, nb.d);
+  scs_mul(R, R, inv_wi);
+
+
+  /*
+   * Polynomial evaluation of log2(1 + R) with an error less than 2^(-130)
+   */
+  scs_mul(res1, constant_poly_ptr[0], R);
+  for(i=1; i<20; i++){
+    scs_add(res1, constant_poly_ptr[i], res1);
+    scs_mul(res1, res1, R);
+  }
+  scs_add(res1, res1, ti);
+  scs_add(res1, res1, sc_exp);
+  
+  scs_get_d_pinf(&resd.d, res1);  
+    
+  return resd.d;
+}
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARDS ZERO
+ *************************************************************
+ *************************************************************/
+double log2_rz(double x) {
+  if (x > 1) 
+    return log2_rd(x);
+  else 
+    return log2_ru(x);
+}
diff --git a/src/crlibm/log2_accurate.h b/src/crlibm/log2_accurate.h
new file mode 100644
index 0000000..786f18c
--- /dev/null
+++ b/src/crlibm/log2_accurate.h
@@ -0,0 +1,261 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+/*
+ * Constant to compute the logarithm base 2. 
+ */
+#ifdef WORDS_BIGENDIAN
+static const db_number 
+  norm_number = {{0x3FD60000, 0x00000000}}; /* 11*2^(-5) */
+#else
+static const db_number 
+  norm_number = {{0x00000000, 0x3FD60000}}; /* 11*2^(-5) */
+#endif
+
+
+static const scs table_ti[13]=
+/* ~-5.405684e-01 */ 
+{{{0x2298ac1f, 0x33457c40, 0x1c141e66, 0x3eaaab29, 
+0x1030633d, 0x048bef17, 0x1a91d6a1, 0x22230522},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-4.150375e-01 */ 
+{{0x1a8ff971, 0x20429786, 0x017fd3b7, 0x35f97452, 
+0x0bb6c306, 0x15c5da64, 0x3efe1069, 0x2fb2da05},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-2.995603e-01 */ 
+{{0x132bfee3, 0x1c3b9a19, 0x1a24978d, 0x38d67cae, 
+0x3878c2df, 0x02d6ff98, 0x24e1a2a9, 0x1b4f917d},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-1.926451e-01 */ 
+{{0x0c544c05, 0x17f7a64c, 0x3354dbf1, 0x1bec1a57, 
+0x2e31ce56, 0x2b7fe8e9, 0x20d510a7, 0x19e262f3},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-9.310940e-02 */ 
+{{0x05f58125, 0x2cfbb4c6, 0x1ced1447, 0x38c2b4e4, 
+0x3edd56b0, 0x1637ed79, 0x2a14f4fe, 0x3db0ce67},
+DB_ONE,  -1,  -1 } 
+,
+/* ZERO         */
+{{0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+{{0, 0}},  0,   1 }
+,
+/* ~8.746284e-02 */ 
+{{0x0598fdbe, 0x2c913167, 0x33314e09, 0x2144575a, 
+0x30f2941f, 0x0fab1d27, 0x3e612491, 0x0849fe51},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.699250e-01 */ 
+{{0x0ae00d1c, 0x3f7ad0f3, 0x3d005890, 0x140d175b, 
+0x289279f3, 0x14744b36, 0x0203df2c, 0x209a4bf4},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.479275e-01 */ 
+{{0x0fde0b5c, 0x204d0144, 0x1d46ccc5, 0x0f09de6b, 
+0x39267ab7, 0x1b5a9520, 0x35aacfb1, 0x311d7642},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.219281e-01 */ 
+{{0x149a784b, 0x3346e2bf, 0x2492bf6f, 0x3d36bf6d, 
+0x0cd96c55, 0x3f8deceb, 0x14e91b6a, 0x32020b9e},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.923174e-01 */ 
+{{0x191bba89, 0x07c5c22d, 0x0b2b5056, 0x2e1a7156, 
+0x06176ea2, 0x3eba3cb1, 0x202cdeee, 0x366ac306},
+DB_ONE,  -1,   1 } 
+,
+/* ~4.594316e-01 */ 
+{{0x1d6753e0, 0x0cba83bf, 0x23ebe199, 0x015554d6, 
+0x2fcf9cc2, 0x3b7410e8, 0x256e295e, 0x1ddcfadd},
+DB_ONE,  -1,   1 } 
+,
+/* ~5.235620e-01 */ 
+{{0x21820a01, 0x2b1d532c, 0x104aea53, 0x1b12ef0a, 
+0x2a0fca1a, 0x1dd6be1d, 0x0730b711, 0x35eaa979},
+DB_ONE,  -1,   1 } 
+};
+
+
+
+static const scs table_inv_wi[13]=
+/* ~1.454545e+00 */ 
+{{{0x00000001, 0x1d1745d1, 0x1d1745d1, 0x1d1745d1, 
+0x1d1745d1, 0x1d1745d1, 0x1d183e2a, 0x36835582},
+DB_ONE,   0,   1 } 
+,
+/* ~1.333333e+00 */ 
+{{0x00000001, 0x15555555, 0x15555555, 0x15555555, 
+0x15555555, 0x15555555, 0x15549b7e, 0x1a416c6b},
+DB_ONE,   0,   1 } 
+,
+/* ~1.230769e+00 */ 
+{{0x00000001, 0x0ec4ec4e, 0x313b13b1, 0x0ec4ec4e, 
+0x313b13b1, 0x0ec4ec4e, 0x313a6825, 0x3ab28b77},
+DB_ONE,   0,   1 } 
+,
+/* ~1.142857e+00 */ 
+{{0x00000001, 0x09249249, 0x09249249, 0x09249249, 
+0x09249249, 0x09249249, 0x09238b74, 0x26f620a6},
+DB_ONE,   0,   1 } 
+,
+/* ~1.066667e+00 */ 
+{{0x00000001, 0x04444444, 0x11111111, 0x04444444, 
+0x11111111, 0x04444444, 0x1111d60e, 0x1f0c9d58},
+DB_ONE,   0,   1 } 
+,
+/* ~1.000000e+00 */ 
+{{0x00000001, 0x00000000, 0x00000000, 0x00000000, 
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+DB_ONE,   0,   1 } 
+,
+/* ~9.411765e-01 */ 
+{{0x3c3c3c3c, 0x0f0f0f0f, 0x03c3c3c3, 0x30f0f0f0, 
+0x3c3c3c3c, 0x0f0f923d, 0x16e0e0a4, 0x3a84202f},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.888889e-01 */ 
+{{0x38e38e38, 0x38e38e38, 0x38e38e38, 0x38e38e38, 
+0x38e38e38, 0x38e3946a, 0x2e0ee2c9, 0x0d6e0fbd},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.421053e-01 */ 
+{{0x35e50d79, 0x10d79435, 0x39435e50, 0x35e50d79, 
+0x10d79435, 0x3943324d, 0x0637ea85, 0x131a67ba},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.000000e-01 */ 
+{{0x33333333, 0x0ccccccc, 0x33333333, 0x0ccccccc, 
+0x33333333, 0x0ccccccc, 0x33333333, 0x0ccccccc},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.619048e-01 */ 
+{{0x30c30c30, 0x30c30c30, 0x30c30c30, 0x30c30c30, 
+0x30c30c30, 0x30c2f1a4, 0x160958a1, 0x2b03bc88},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.272727e-01 */ 
+{{0x2e8ba2e8, 0x2e8ba2e8, 0x2e8ba2e8, 0x2e8ba2e8, 
+0x2e8ba2e8, 0x2e8bcb74, 0x2d78b525, 0x00a1db67},
+DB_ONE,  -1,   1 } 
+,
+/* ~6.956522e-01 */ 
+{{0x2c8590b2, 0x0590b216, 0x10b21642, 0x321642c8, 
+0x1642c859, 0x02c8590b, 0x08590b21, 0x190b2164},
+DB_ONE,  -1,   1 } 
+};
+
+
+
+
+
+
+static const scs constant_poly[20]=
+/* ~-7.247187e-02 */ 
+{{{0x04a3610e, 0x3280f22f, 0x1de04b83, 0x13d0592c, 
+0x01c1f347, 0x0e59a808, 0x0bcf5cfa, 0x3009a167},
+DB_ONE,  -1,  -1 } 
+,
+/* ~7.626763e-02 */ 
+{{0x04e191a1, 0x27127aea, 0x2fb498c3, 0x3f8e3721, 
+0x2688ed52, 0x38503e4f, 0x3b216e42, 0x17d8666c},
+DB_ONE,  -1,   1 } 
+,
+/* ~-8.014898e-02 */ 
+{{0x05212933, 0x12c0276e, 0x1534c74e, 0x1ffc3802, 
+0x36935f91, 0x25fe848d, 0x2bade416, 0x110f0662},
+DB_ONE,  -1,  -1 } 
+,
+/* ~8.486372e-02 */ 
+{{0x056e6838, 0x35aa4f4a, 0x2ae2f258, 0x30768483, 
+0x2bc43d6e, 0x176d2fe1, 0x17488263, 0x30f7670b},
+DB_ONE,  -1,   1 } 
+,
+/* ~-9.016844e-02 */ 
+{{0x05c551da, 0x1166e535, 0x10625f98, 0x08af81ee, 
+0x04feb59e, 0x2906123e, 0x0b31f878, 0x0693beb1},
+DB_ONE,  -1,  -1 } 
+,
+/* ~9.617967e-02 */ 
+{{0x0627cec6, 0x20792d0d, 0x181b90ab, 0x0c8e3405, 
+0x1fe3b53f, 0x0f6d3b7a, 0x00eefd12, 0x0808849b},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.030496e-01 */ 
+{{0x06985d8a, 0x27a1d37d, 0x3fa3c0e9, 0x37e7d679, 
+0x0379ed1d, 0x25a15e16, 0x3ef8c491, 0x2414ab4f},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.109765e-01 */ 
+{{0x071a3d5a, 0x0d27a702, 0x138411a6, 0x15701cae, 
+0x31ef415d, 0x1985227d, 0x31a4c54c, 0x15d3a279},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.202246e-01 */ 
+{{0x07b1c277, 0x03a04150, 0x3be8d05b, 0x2f373cf4, 
+0x105c73c2, 0x0ee0272b, 0x0b2bf018, 0x1ad7026f},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.311541e-01 */ 
+{{0x0864d424, 0x328046b9, 0x132f0fc6, 0x2b14d554, 
+0x189d4b79, 0x2ec40035, 0x15083d44, 0x33a13b8c},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.442695e-01 */ 
+{{0x093bb628, 0x1df37fcf, 0x022eb69a, 0x0b325d1d, 
+0x0625c904, 0x1ccaa7ae, 0x0ed7ce1d, 0x3202ff74},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.602994e-01 */ 
+{{0x0a42589e, 0x2f80551e, 0x3eb3ec54, 0x1a1094cd, 
+0x23649796, 0x328d4019, 0x3f6371c6, 0x37a359a1},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.803369e-01 */ 
+{{0x0b8aa3b2, 0x25705fc2, 0x3bbedcca, 0x35a13588, 
+0x15c06cdc, 0x39fbf52c, 0x2b666451, 0x350d8287},
+DB_ONE,  -1,  -1 } 
+,
+/* ~2.060993e-01 */ 
+{{0x0d30bb15, 0x0f5bdb27, 0x3b23121c, 0x383c6bb0, 
+0x2f3b4fd2, 0x2dba0ce0, 0x0230a445, 0x306b1136},
+DB_ONE,  -1,   1 } 
+,
+/* ~-2.404492e-01 */ 
+{{0x0f6384ee, 0x07407fae, 0x24fe0aa6, 0x3c7aefd2, 
+0x12953456, 0x0d1d1991, 0x2af86714, 0x26b4c925},
+DB_ONE,  -1,  -1 } 
+,
+/* ~2.885390e-01 */ 
+{{0x12776c50, 0x3be6ff9e, 0x12ca7330, 0x1a6d448b, 
+0x1ef18433, 0x375e9366, 0x21f2efcf, 0x38ab1d93},
+DB_ONE,  -1,   1 } 
+,
+/* ~-3.606738e-01 */ 
+{{0x17154765, 0x0ae0bf85, 0x377d0ffd, 0x2836248a, 
+0x3b8e6858, 0x123f10ae, 0x0c65387c, 0x26048456},
+DB_ONE,  -1,  -1 } 
+,
+/* ~4.808983e-01 */ 
+{{0x1ec709dc, 0x0e80ff5d, 0x09fc1552, 0x0af12c97, 
+0x37bd6a2c, 0x3ebc8f65, 0x113a7c28, 0x1663571a},
+DB_ONE,  -1,   1 } 
+,
+/* ~-7.213475e-01 */ 
+{{0x2e2a8eca, 0x15c17f0b, 0x2efa1ffb, 0x10691d3d, 
+0x09a93721, 0x2d59e835, 0x1baea424, 0x28b120a0},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.442695e+00 */ 
+{{0x00000001, 0x1c551d94, 0x2b82fe17, 0x1df43ff6, 
+0x20d23a7c, 0x3b9ff352, 0x14d59cbf, 0x00fe1bdb},
+DB_ONE,   0,   1 } 
+};
+
+
+#define constant_poly_ptr (scs_ptr)&constant_poly
+#define table_ti_ptr      (scs_ptr)&table_ti
+#define table_inv_wi_ptr  (scs_ptr)&table_inv_wi
diff --git a/src/crlibm/log_accurate.c b/src/crlibm/log_accurate.c
new file mode 100644
index 0000000..a1faee8
--- /dev/null
+++ b/src/crlibm/log_accurate.c
@@ -0,0 +1,133 @@
+/*
+ * Correctly rounded logarithm
+ *
+ * Author : David Defour
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+#include <stdio.h>
+#include "log_accurate.h"
+
+/*
+ *  1) First reduction: exponent extraction      
+ *         E  
+ *  x = 2^   .(1+f)    with  0 <= f < 1
+ *
+ *  log(x) = E.log(2) + log(1+f) where:
+ *     - log(2)   is tabulated
+ *     - log(1+f) need to be evaluated 
+ *  
+ *
+ *  2) Avoiding accuracy problem when E=-1 by testing
+ *   
+ *    if (1+f >= sqrt(2)) then 
+ *        1+f = (1+f)/2;  E = E+1; 
+ *    and,
+ *        log(x) = (E+1).log(2) + log((1+f)/2)
+ *
+ *    so now:      sqrt(2)/2 <= (1+f) < sqrt(2)
+ *
+ *
+ *  3) Second reduction: tabular reduction
+ *                   -4  
+ *   wi = 1 + i. 2^
+ *                                   1  
+ *   log(1+f) = log(wi) + log ( 1 + --- . (1 + f - wi) ) 
+ *                                   wi 
+ *
+ *   then |(1+f-wi)/wi| <= 2^-5 if we use rounded to nearest.
+ *
+ *  4) Computation:
+ *   a) Table lookup of: 
+ *        - ti    = log(wi)
+ *        - inv_wi = 1/(wi)
+ *   b) Polynomial evaluation of:
+ *        - P(R) ~ log(1 + R), where R = (1+f-wi) * inv_wi 
+ *
+ *                 -5 
+ *   with  |R| < 2^
+ *
+ *
+ *  5) Reconstruction:
+ *   log(x) = E.log(2) + t_i + P(R)
+ *
+ */
+
+
+
+
+void scs_log(scs_ptr res, db_number y, int E){ 
+  scs_t R, sc_ln2_times_E, res1, addi;
+  scs_ptr ti, inv_wi;
+  db_number z, wi;
+  int i;
+
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+
+  /* to normalize y.d and round to nearest      */
+  /* + (1-trunc(sqrt(2.)/2 * 2^(4))*2^(-4) )+2.^(-(4+1))*/ 
+  z.d = y.d + norm_number.d; 
+  i = (z.i[HI] & 0x000fffff);
+  i = i >> 16; /* 0<= i <=11 */
+  
+  
+  wi.d = ((double)(11+i))*0.0625;
+
+  /* (1+f-w_i) */
+  y.d -= wi.d; 
+  
+  /* Table reduction */
+  ti     = table_ti_ptr[i]; 
+  inv_wi = table_inv_wi_ptr[i];
+   
+  /* R = (1+f-w_i)/w_i */
+  scs_set_d(R, y.d);
+  scs_mul(R, R, inv_wi);
+
+ 
+  /*
+   * Polynomial evaluation of log(1 + R) with an error less than 2^(-130)
+   */
+   
+  scs_mul(res1, constant_poly_ptr[0], R);
+  for(i=1; i<20; i++){
+    scs_add(addi, constant_poly_ptr[i], res1);
+    scs_mul(res1, addi, R);
+  }
+
+  if(E==0){
+    scs_add(res, res1, ti);
+  }else{
+    /* sc_ln2_times_E = E*log(2)  */
+    scs_set(sc_ln2_times_E, sc_ln2_ptr);
+
+    if (E >= 0){
+      scs_mul_ui(sc_ln2_times_E, (unsigned int) E);
+    }else{
+      scs_mul_ui(sc_ln2_times_E, (unsigned int) -E);
+      sc_ln2_times_E->sign = -1;
+    }
+    scs_add(addi, res1, ti);
+    scs_add(res, addi, sc_ln2_times_E); 
+  }
+}
+
diff --git a/src/crlibm/log_accurate.h b/src/crlibm/log_accurate.h
new file mode 100644
index 0000000..6bd025d
--- /dev/null
+++ b/src/crlibm/log_accurate.h
@@ -0,0 +1,261 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+/*
+ * Constant to compute the natural logarithm. 
+ */
+
+#ifdef WORDS_BIGENDIAN
+static const db_number 
+  norm_number = {{0x3FD60000, 0x00000000}}; /* 11*2^(-5) */
+#else
+static const db_number 
+  norm_number = {{0x00000000, 0x3FD60000}}; /* 11*2^(-5) */
+#endif
+
+#define SQRT_2 1.4142135623730950489e0 
+
+static const scs 
+   sc_ln2={{0x2c5c85fd, 0x3d1cf79a, 0x2f278ece, 0x1803f2f6, 
+	     0x2bd03cd0, 0x3267298b, 0x18b62834, 0x175b8baa},
+	    DB_ONE,  -1,   1 };
+#define sc_ln2_ptr (scs_ptr)(&sc_ln2)
+
+
+static const scs table_ti[13]=
+/* ~-3.746934e-01 */ 
+{{{0x17fafa3b, 0x360546fb, 0x1e6fdb53, 0x0b1225e6, 
+0x15f38987, 0x26664702, 0x3cb1bf6d, 0x118a64f9},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-2.876821e-01 */ 
+{{0x12696211, 0x0d36e49e, 0x03beb767, 0x1b02aa70, 
+0x2a30f490, 0x3732bb37, 0x2425c6da, 0x1fc53d0e},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-2.076394e-01 */ 
+{{0x0d49f69e, 0x115b3c6d, 0x395f53bd, 0x0b901b99, 
+0x2e77188a, 0x3e3d1ab5, 0x1147dede, 0x05483ae4},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-1.335314e-01 */ 
+{{0x088bc741, 0x04fc8f7b, 0x319c5a0f, 0x38e5bd03, 
+0x31dda8fe, 0x30f08645, 0x2fa1d5c5, 0x02c6529d},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-6.453852e-02 */ 
+{{0x0421662d, 0x19e3a068, 0x228ff66f, 0x3503372c, 
+0x04bf1b16, 0x0ff1b85c, 0x006c21b2, 0x21a9efd6},
+DB_ONE,  -1,  -1 } 
+,
+/* ZERO         */
+{{0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+{{0, 0}},  0,   1 }
+,
+/* ~6.062462e-02 */ 
+{{0x03e14618, 0x008b1533, 0x02f992e2, 0x37759978, 
+0x2634d1d3, 0x13375edb, 0x2e4634ea, 0x1dcf0aef},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.177830e-01 */ 
+{{0x0789c1db, 0x22af2e5e, 0x27aa1fff, 0x21fe9e15, 
+0x176e53af, 0x04015c6b, 0x021a0541, 0x006df1d7},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.718503e-01 */ 
+{{0x0aff9838, 0x14f27a79, 0x039f1050, 0x0e424775, 
+0x3f35571c, 0x355ff008, 0x1ca13efc, 0x3c2c8490},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.231436e-01 */ 
+{{0x0e47fbe3, 0x33534435, 0x212ec0f7, 0x25ff7344, 
+0x2571d97a, 0x274129e2, 0x12b111db, 0x2c051568},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.719337e-01 */ 
+{{0x11675cab, 0x2ae98380, 0x39cc7d57, 0x041b8b82, 
+0x0fc19f41, 0x0a43c91d, 0x1523ef69, 0x164b69f6},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.184537e-01 */ 
+{{0x14618bc2, 0x0717b09f, 0x10b7b37b, 0x0cf1cd10, 
+0x15dcb349, 0x0c00c397, 0x2c39cc9b, 0x274c94a8},
+DB_ONE,  -1,   1 } 
+,
+{{0x1739d7f6, 0x2ef401a7, 0x0e24c53f, 0x2b4fbde5, 
+0x2ab77843, 0x1cea5975, 0x1eeef249, 0x384d2344},
+DB_ONE,  -1,   1 } 
+};
+#define table_ti_ptr      (scs_ptr)&table_ti
+
+static const scs table_inv_wi[13]=
+/* ~1.454545e+00 */ 
+{{{0x00000001, 0x1d1745d1, 0x1d1745d1, 0x1d1745d1, 
+0x1d1745d1, 0x1d1745d1, 0x1d183e2a, 0x36835582},
+DB_ONE,   0,   1 } 
+,
+/* ~1.333333e+00 */ 
+{{0x00000001, 0x15555555, 0x15555555, 0x15555555, 
+0x15555555, 0x15555555, 0x15549b7e, 0x1a416c6b},
+DB_ONE,   0,   1 } 
+,
+/* ~1.230769e+00 */ 
+{{0x00000001, 0x0ec4ec4e, 0x313b13b1, 0x0ec4ec4e, 
+0x313b13b1, 0x0ec4ec4e, 0x313a6825, 0x3ab28b77},
+DB_ONE,   0,   1 } 
+,
+/* ~1.142857e+00 */ 
+{{0x00000001, 0x09249249, 0x09249249, 0x09249249, 
+0x09249249, 0x09249249, 0x09238b74, 0x26f620a6},
+DB_ONE,   0,   1 } 
+,
+/* ~1.066667e+00 */ 
+{{0x00000001, 0x04444444, 0x11111111, 0x04444444, 
+0x11111111, 0x04444444, 0x1111d60e, 0x1f0c9d58},
+DB_ONE,   0,   1 } 
+,
+/* ~1.000000e+00 */ 
+{{0x00000001, 0x00000000, 0x00000000, 0x00000000, 
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+DB_ONE,   0,   1 } 
+,
+/* ~9.411765e-01 */ 
+{{0x3c3c3c3c, 0x0f0f0f0f, 0x03c3c3c3, 0x30f0f0f0, 
+0x3c3c3c3c, 0x0f0f923d, 0x16e0e0a4, 0x3a84202f},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.888889e-01 */ 
+{{0x38e38e38, 0x38e38e38, 0x38e38e38, 0x38e38e38, 
+0x38e38e38, 0x38e3946a, 0x2e0ee2c9, 0x0d6e0fbd},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.421053e-01 */ 
+{{0x35e50d79, 0x10d79435, 0x39435e50, 0x35e50d79, 
+0x10d79435, 0x3943324d, 0x0637ea85, 0x131a67ba},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.000000e-01 */ 
+{{0x33333333, 0x0ccccccc, 0x33333333, 0x0ccccccc, 
+0x33333333, 0x0ccccccc, 0x33333333, 0x0ccccccc},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.619048e-01 */ 
+{{0x30c30c30, 0x30c30c30, 0x30c30c30, 0x30c30c30, 
+0x30c30c30, 0x30c2f1a4, 0x160958a1, 0x2b03bc88},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.272727e-01 */ 
+{{0x2e8ba2e8, 0x2e8ba2e8, 0x2e8ba2e8, 0x2e8ba2e8, 
+0x2e8ba2e8, 0x2e8bcb74, 0x2d78b525, 0x00a1db67},
+DB_ONE,  -1,   1 } 
+,
+/* ~6.956522e-01 */ 
+{{0x2c8590b2, 0x0590b216, 0x10b21642, 0x321642c8, 
+0x1642c859, 0x02c8590b, 0x08590b21, 0x190b2164},
+DB_ONE,  -1,   1 } 
+};
+#define table_inv_wi_ptr  (scs_ptr)&table_inv_wi
+
+
+static const scs constant_poly[20]=
+/*0 ~-5.023367e-02 */ 
+{{{0x0337074b, 0x275aac5c, 0x2cf4a893, 0x38013cc3, 
+0x149a3416, 0x0e067307, 0x12745608, 0x1658e0d5},
+DB_ONE,  -1,  -1 } 
+,
+/*1 ~5.286469e-02 */ 
+{{0x03622298, 0x252ff65c, 0x03001550, 0x2f457908, 
+0x32f78ecc, 0x17442a4e, 0x1d806366, 0x2c50350e},
+DB_ONE,  -1,   1 } 
+,
+/*2 ~-5.555504e-02 */ 
+{{0x038e36bb, 0x30665a9c, 0x119434c7, 0x3fdec8cb, 
+0x37dd3adb, 0x2663cd45, 0x230e43e9, 0x32b9663c},
+DB_ONE,  -1,  -1 } 
+,
+/*3 ~5.882305e-02 */ 
+{{0x03c3c1bb, 0x38c473ae, 0x192b9c18, 0x242b7c4e, 
+0x3da8edc8, 0x04454ffe, 0x2cf133c6, 0x0c926fd0},
+DB_ONE,  -1,   1 } 
+,
+/*4 ~-6.250000e-02 */ 
+{{0x04000000, 0x2b72bb0a, 0x038f5efc, 0x34665092, 
+0x2461b6c9, 0x172f7050, 0x1218b5c1, 0x104862d7},
+DB_ONE,  -1,  -1 } 
+,
+/*5 ~6.666667e-02 */ 
+{{0x04444444, 0x374f3324, 0x1531bcf1, 0x1d7d23fc, 
+0x26ff9670, 0x38fc33ae, 0x15bf1cfb, 0x2c9f1c2d},
+DB_ONE,  -1,   1 } 
+,
+/*6 ~-7.142857e-02 */ 
+{{0x04924924, 0x2489e5b6, 0x288b19c5, 0x2893519b, 
+0x2c3f35c0, 0x0b8bfdce, 0x3541ab49, 0x1de415bc},
+DB_ONE,  -1,  -1 } 
+,
+/*7 ~7.692308e-02 */ 
+{{0x04ec4ec4, 0x3b0ce4bd, 0x14d14046, 0x0243ade9, 
+0x083cc34f, 0x393e6a5a, 0x2c1855f2, 0x259d599f},
+DB_ONE,  -1,   1 } 
+,
+/*8 ~-8.333333e-02 */ 
+{{0x05555555, 0x1555565b, 0x064b42af, 0x13bc7961, 
+0x1396754b, 0x33d85415, 0x2ba548d4, 0x039c4ff6},
+DB_ONE,  -1,  -1 } 
+,
+/*9 ~9.090909e-02 */ 
+{{0x05d1745d, 0x05d1751c, 0x24facd05, 0x07540f86, 
+0x014f2ec1, 0x3bb3fa8b, 0x02e1da4c, 0x3304817c},
+DB_ONE,  -1,   1 } 
+,
+/*10 ~-1.000000e-01 */ 
+{{0x06666666, 0x19999999, 0x21667ee1, 0x0f5f75ea, 
+0x353af37f, 0x2578daa1, 0x07c76f47, 0x16541534},
+DB_ONE,  -1,  -1 } 
+,
+/*11 ~1.111111e-01 */ 
+{{0x071c71c7, 0x071c71c7, 0x03e7af88, 0x2fca5d74, 
+0x0bb43f38, 0x050edb70, 0x3631b696, 0x1fc3e0d3},
+DB_ONE,  -1,   1 } 
+,
+/*12 ~-1.250000e-01 */ 
+{{0x08000000, 0x00000000, 0x00003ac6, 0x36c11384, 
+0x2d596ab4, 0x09257878, 0x0597dc26, 0x2d60813a},
+DB_ONE,  -1,  -1 } 
+,
+/*13 ~1.428571e-01 */ 
+{{0x09249249, 0x09249249, 0x0924b1db, 0x0d002ac1, 
+0x0eafd708, 0x2b4df21d, 0x0458da93, 0x2d11460c},
+DB_ONE,  -1,   1 } 
+,
+/*14 ~-1.666667e-01 */ 
+{{0x0aaaaaaa, 0x2aaaaaaa, 0x2aaaaaa9, 0x0bb6630e, 
+0x2e44a5cf, 0x39f32e04, 0x105732b9, 0x01a76208},
+DB_ONE,  -1,  -1 } 
+,
+/*15 ~2.000000e-01 */ 
+{{0x0ccccccc, 0x33333333, 0x0ccccccc, 0x0bbbe6e8, 
+0x253269ea, 0x0ec2a630, 0x10defc5c, 0x238aef3b},
+DB_ONE,  -1,   1 } 
+,
+/*16 ~-2.500000e-01 */ 
+{{0x10000000, 0x00000000, 0x00000000, 0x0001195c, 
+0x3654cd5a, 0x16ca3471, 0x343d2da0, 0x235273f2},
+DB_ONE,  -1,  -1 } 
+,
+/*17 ~3.333333e-01 */ 
+{{0x15555555, 0x15555555, 0x15555555, 0x1555a1e0, 
+0x2eb2094a, 0x07dde891, 0x230e2bfa, 0x28aae6ab},
+DB_ONE,  -1,   1 } 
+,
+/*18 ~-5.000000e-01 */ 
+{{0x1fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff, 
+0x029bd81b, 0x360f63df, 0x28d28bd3, 0x3c15f394},
+DB_ONE,  -1,  -1 } 
+,
+/*19 ~1.000000e+00 */ 
+{{0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff, 
+0x39e04b7e, 0x08e4e337, 0x1a1e2ed3, 0x23e85705},
+DB_ONE,  -1,   1 } 
+};
+#define constant_poly_ptr (scs_ptr)&constant_poly
diff --git a/src/crlibm/log_fast.c b/src/crlibm/log_fast.c
new file mode 100644
index 0000000..955c649
--- /dev/null
+++ b/src/crlibm/log_fast.c
@@ -0,0 +1,360 @@
+/*
+ * Correctly rounded logarithm
+ *
+ * Author : Daramy Catherine, Florent de Dinechin
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "log_fast.h"
+
+
+/* switches on various printfs. Default 0 */
+#define DEBUG 0
+
+
+
+
+/*
+ *  1) First reduction: exponent extraction      
+ *         E  
+ *  x = 2^   .(y)    with  1 <= y < 2
+ *
+ *  log(x) = E.log(2) + log(y) where:
+ *     - log(2)   is tabulated
+ *     - log(y) need to be evaluated 
+ *  
+ *
+ *  2) Avoiding accuracy problem when E=-1 by testing
+ *   
+ *    if (ny >= sqrt(2)) then 
+ *        y = z/2;  E = E+1; 
+ *    and,
+ *        log(x) = (E+1).log(2) + log(y/2)
+ *
+ *    so now:    11/16 <= sqrt(2)/2 <= y < sqrt(2) <= 23/16
+ *
+ *
+ *  3) Second reduction: tabular reduction
+ *                    
+ *     The interval 1/sqrt(2) .. sqrt(2) is divided in 8 intervals.                                 
+ *     So, find the interval X_i where y is.
+ *     And compute z = y - middle(X_i);
+ *                                    
+ *  4) Computation:
+ *   
+ *     Polynomial evaluation of:
+ *        - P(z) ~ log(z+middle(X_i))
+ *
+ *                   -4      -5
+ *   with  |z| < 2^   or 2^   depending the considered interval.
+ *
+ *
+ *  5) Reconstruction:
+ *   log(x) = E.log(2) + P(z)
+ *
+ */
+
+
+
+
+
+
+
+/*
+ * Function used to evaluate log and pow functions
+ */
+void log_quick(double *pres_hi, double *pres_lo, int* prndcstindex, db_number * py, int E) {
+   double ln2_times_E_HI, ln2_times_E_LO, res_hi, res_lo;
+   double z, res, P_hi, P_lo;
+   int k, i;
+   
+    res=(double)E;
+    if(E<0) E=-E;
+
+    /* find the interval including y.d */
+    i = ((((*py).i[HI] & 0x001F0000)>>16)-6) ;
+    if (i < 10)
+      i = i>>1;
+    else
+      i = ((i-1)>>1);
+    
+    z = (*py).d - (middle[i]).d;  /* (exact thanks to Sterbenz Lemma) */
+    
+
+    /* Compute ln2_times_E = E*log(2)   in double-double */
+    Add12( ln2_times_E_HI, ln2_times_E_LO, res*ln2hi.d, res*ln2lo.d); 
+
+    /* Now begin the polynomial evaluation of log(1 + z)      */
+
+    res = (Poly_h[i][DEGREE]).d;
+
+    for(k=DEGREE-1; k>1; k--){
+      res *= z;
+      res += (Poly_h[i][k]).d;
+    }
+
+    if(E <=  EMIN_FASTPATH) {
+      /* Slow path */
+      if(E==0) {
+	*prndcstindex = 0 ;
+	/* In this case we start with a double-double multiplication to get enough relative accuracy */ 
+	Mul12(&P_hi, &P_lo, res, z); 
+	Add22(&res_hi, &res_lo, (Poly_h[i][1]).d,  (Poly_l[i][1]).d, P_hi, P_lo);
+	Mul22(&P_hi, &P_lo, res_hi, res_lo, z, 0.); 
+	Add22(pres_hi, pres_lo, (Poly_h[i][0]).d, (Poly_l[i][0]).d, P_hi, P_lo);
+      } 
+      else
+	{
+	  if(E >  EMIN_MEDIUMPATH)
+	    *prndcstindex = 2; 
+	  else 
+	    *prndcstindex =1;
+	  P_hi=res*z;
+	  Add12(res_hi, res_lo, (Poly_h[i][1]).d,  (Poly_l[i][1]).d + P_hi);
+	  Mul22(&P_hi, &P_lo, res_hi, res_lo, z, 0.); 
+	  Add22(&res_hi, &res_lo, (Poly_h[i][0]).d, (Poly_l[i][0]).d, P_hi, P_lo);
+
+	/* Add E*log(2)  */
+	  Add22(pres_hi, pres_lo, ln2_times_E_HI, ln2_times_E_LO, res_hi, res_lo);
+	}
+    }
+    else { /* Fast path */
+      
+      *prndcstindex = 3 ;
+      res =   z*((Poly_h[i][1]).d + z*res);
+#if 1
+      Add12(P_hi,P_lo,  ln2_times_E_HI, (Poly_h[i][0]).d );
+      Add12(*pres_hi, *pres_lo, P_hi, (res + ((Poly_l[i][0]).d + (ln2_times_E_LO + P_lo))));
+#else
+      Add12(*pres_hi, *pres_lo, 
+	    ln2_times_E_HI,  
+	    (Poly_h[i][0]).d + (res + ((Poly_l[i][0]).d + ln2_times_E_LO)));
+#endif
+    }
+}
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+ double log_rn(double x){ 
+   db_number y;
+   double res_hi,res_lo,roundcst;
+   int E,rndcstindex;
+
+   E=0;
+   y.d=x;
+
+   /* Filter cases */
+   if (y.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((y.i[HI] & 0x7fffffff)|y.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (y.i[HI] < 0){ 
+       return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     y.d *= two52.d; 	  /* make x a normal number    */ 
+   }
+    
+   if (y.i[HI] >= 0x7ff00000){
+     return  x+x;				 /* Inf or Nan       */
+   }
+   
+   /* reduce to  y.d such that sqrt(2)/2 < y.d < sqrt(2) */
+   E += (y.i[HI]>>20)-1023;				/* extract the exponent */
+   y.i[HI] =  (y.i[HI] & 0x000fffff) | 0x3ff00000;	/* do exponent = 0 */
+   if (y.d > SQRT_2){
+     y.d *= 0.5;
+     E++;
+   }
+
+   /* Call the actual computation */
+   log_quick(&res_hi, &res_lo, &rndcstindex, &y, E);
+   roundcst = rncst[rndcstindex];
+
+  /* Test for rounding to the nearest */
+  if(res_hi == (res_hi + (res_lo * roundcst)))
+    return res_hi;
+  else {
+    scs_t res;
+#if DEBUG
+    printf("Going for Accurate Phase for x=%1.50e\n",x);
+#endif
+    scs_log(res, y, E);
+    scs_get_d(&res_hi, res);
+    return res_hi;
+  }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  -INFINITY		     *
+ *************************************************************
+ *************************************************************/
+ double log_rd(double x){ 
+   db_number y;
+   double res_hi,res_lo,roundcst;
+   int E,rndcstindex;
+   scs_t res;
+
+   E=0;
+   y.d=x;
+
+ /* Filter cases */
+   if (y.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((y.i[HI] & 0x7fffffff)|y.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (y.i[HI] < 0){ 
+      return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     y.d *= two52.d; 	  /* make x as normal number = x's mantissa    */ 
+   }
+    
+   if (y.i[HI] >= 0x7ff00000){
+     return  x+x;				    /* Inf or Nan       */
+   }
+
+   /* The only double whose log is exactly a double */
+   if(x==1.0) return 0.0; 
+ 
+   E += (y.i[HI]>>20)-1023;				/* extract the exponent */
+   y.i[HI] =  (y.i[HI] & 0x000fffff) | 0x3ff00000;	/* do exponent = 0 */
+   if (y.d > SQRT_2){
+     y.d *= 0.5;
+     E++;
+   }
+
+   log_quick(&res_hi, &res_lo, &rndcstindex, &y, E);
+   roundcst = epsilon[rndcstindex];
+   
+   TEST_AND_RETURN_RD(res_hi, res_lo, roundcst);
+
+   /* if the previous block didn't return a value, launch accurate phase */
+#if DEBUG
+   printf("Going for Accurate Phase");
+#endif
+   scs_log(res, y, E);
+   scs_get_d_minf(&res_hi, res);
+   return res_hi;
+ 
+ }
+
+
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  +INFINITY		     *
+ *************************************************************
+ *************************************************************/
+double log_ru(double x){ 
+   db_number y;
+   double res_hi,res_lo,roundcst;
+   int E,rndcstindex;
+   scs_t res;
+
+   E=0;
+   y.d=x;
+
+ /* Filter cases */
+   if (y.i[HI] < 0x00100000){        /* x < 2^(-1022)    */
+     if (((y.i[HI] & 0x7fffffff)|y.i[LO])==0){
+       return -1.0/0.0;     
+     }                    		   /* log(+/-0) = -Inf */
+     if (y.i[HI] < 0){ 
+      return (x-x)/0;                      /* log(-x) = Nan    */
+     }
+     /* Subnormal number */
+     E = -52; 		
+     y.d *= two52.d; 	  /* make x as normal number = x's mantissa    */ 
+   }
+    
+   if (y.i[HI] >= 0x7ff00000){
+     return  x+x;				    /* Inf or Nan       */
+   }
+
+   /* The only double whose log is exactly a double */
+   if(x==1.0) return 0.0;   
+
+   E += (y.i[HI]>>20)-1023;				/* extract the exponent */
+   y.i[HI] =  (y.i[HI] & 0x000fffff) | 0x3ff00000;	/* do exponent = 0 */
+   if (y.d > SQRT_2){
+     y.d *= 0.5;
+     E++;
+   }
+
+   log_quick(&res_hi, &res_lo, &rndcstindex, &y, E);
+   roundcst = epsilon[rndcstindex];
+
+
+   TEST_AND_RETURN_RU(res_hi, res_lo, roundcst);
+
+   /* if the previous block didn't return a value, launch accurate phase */
+#if DEBUG
+   printf("Going for Accurate Phase");
+#endif
+   scs_log(res, y, E);
+   scs_get_d_pinf(&res_hi, res);
+   return res_hi;
+}
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  ZERO		     *
+ *************************************************************
+ *************************************************************/
+double log_rz(double x){ 
+  if(x>1)
+    return log_rd(x);
+  else
+    return log_ru(x);
+}
diff --git a/src/crlibm/log_fast.h b/src/crlibm/log_fast.h
new file mode 100644
index 0000000..3a201f8
--- /dev/null
+++ b/src/crlibm/log_fast.h
@@ -0,0 +1,440 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/*File generated by maple/coef_log.mw*/
+
+#define SQRT_2 1.4142135623730950489e0 
+
+#define DEGREE 12
+
+#define EMIN_MEDIUMPATH 23.000 
+#define EMIN_FASTPATH 185.000 
+/* Constants for rounding  */
+static const double epsilon[4] =
+{
+  /* Case E=0  */
+  4.47385432225115274522995672974873440655535693998277e-18, 
+  /* Middle case   */
+  8.40963020519242390613590856552459545441732156457476e-19, 
+  /* Case E>EminMedPath  */
+  3.19013236586914638175957676953204491380730158561523e-20, 
+  /* And for the fast path  */
+  1.65439555368591958127629148820687373633319579538065e-19 
+
+};
+
+static const double rncst[4] =
+{
+  /* Case E=0  */
+  1.08596671427669422271833354898262768983840942382813e+00, 
+  /* Middle case   */
+  1.01526872993599659444896587956463918089866638183594e+00, 
+  /* Case E>EminMedPath  */
+  1.00057496390146027920309279579669237136840820312500e+00, 
+  /* And for the fast path  */
+  1.00298612635768380485501438670326024293899536132813e+00 
+};
+
+#ifdef WORDS_BIGENDIAN
+static const db_number ln2hi = {{0x3FE62E42,0xFEFA3800}} /* +6.9314718056e-01 */;
+static const db_number ln2lo = {{0x3D2EF357,0x93C76730}} /* +5.4979230187e-14 */;
+static const db_number two52 = {{0x43300000,0x00000000}} /* +4.5035996274e+15 */;
+static const db_number middle[8] =
+{
+{{0x3FE7504F,0x333F9DE3}} /* +7.2855339059e-01 */ ,
+{{0x3FE90000,0x00000000}} /* +7.8125000000e-01 */ ,
+{{0x3FEB0000,0x00000000}} /* +8.4375000000e-01 */ ,
+{{0x3FED0000,0x00000000}} /* +9.0625000000e-01 */ ,
+{{0x3FF00000,0x00000000}} /* +1.0000000000e+00 */ ,
+{{0x3FF20000,0x00000000}} /* +1.1250000000e+00 */ ,
+{{0x3FF40000,0x00000000}} /* +1.2500000000e+00 */ ,
+{{0x3FF5D04F,0x333F9DE9}} /* +1.3633567812e+00 */
+};
+
+static const db_number Poly_h[8][13] =
+{
+ /* polynomial 1 */
+{
+{{0xBFD444B8,0x73F60B09}} /* -3.1669436764e-01 */ ,
+{{0x3FF5F619,0x980C433A}} /* +1.3725830020e+00 */ ,
+{{0xBFEE24CC,0x824C9A57}} /* -9.4199204873e-01 */ ,
+{{0x3FEB954C,0x47881604}} /* +8.6197484942e-01 */ ,
+{{0xBFEC6529,0xC58FCD22}} /* -8.8734901987e-01 */ ,
+{{0x3FEF2E06,0x1AC1D834}} /* +9.7436814524e-01 */ ,
+{{0xBFF1D4FE,0xF5D42E1A}} /* -1.1145009616e+00 */ ,
+{{0x3FF4FAB7,0x67F441DC}} /* +1.3112100659e+00 */ ,
+{{0xBFF93248,0xEA47B471}} /* -1.5747765686e+00 */ ,
+{{0x3FFEBDCE,0x85276A57}} /* +1.9213395311e+00 */ ,
+{{0xC002FCE1,0x0ABAD697}} /* -2.3734761084e+00 */ ,
+{{0x4007BFE9,0x8C0B7AF7}} /* +2.9687071744e+00 */ ,
+{{0xC00DE4D4,0xF57FD2EC}} /* -3.7367343120e+00 */
+},
+ /* polynomial 2 */
+{
+{{0xBFCF991C,0x6CB3B379}} /* -2.4686007793e-01 */ ,
+{{0x3FF47AE1,0x47AE147B}} /* +1.2800000000e+00 */ ,
+{{0xBFEA36E2,0xEB1C432D}} /* -8.1920000000e-01 */ ,
+{{0x3FE65E9F,0x80F29213}} /* +6.9905066667e-01 */ ,
+{{0xBFE5798E,0xE2308C3F}} /* -6.7108864000e-01 */ ,
+{{0x3FE5FD7F,0xE1793910}} /* +6.8719476736e-01 */ ,
+{{0xBFE774CC,0xAC3CC49E}} /* -7.3300775185e-01 */ ,
+{{0x3FE9BC1F,0x779F31B6}} /* +8.0421422351e-01 */ ,
+{{0xBFECD2B2,0x9C89806A}} /* -9.0071993421e-01 */ ,
+{{0x3FF065A0,0xF663DD55}} /* +1.0248117089e+00 */ ,
+{{0xBFF2E3A7,0x64D28253}} /* -1.1805795611e+00 */ ,
+{{0x3FF613D4,0x162168A9}} /* +1.3798409333e+00 */ ,
+{{0xBFF9EC69,0x1E7E75E1}} /* -1.6202174369e+00 */
+},
+ /* polynomial 3 */
+{
+{{0xBFC5BF40,0x6B543DB2}} /* -1.6989903680e-01 */ ,
+{{0x3FF2F684,0xBDA12F68}} /* +1.1851851852e+00 */ ,
+{{0xBFE67980,0xE0BF08C7}} /* -7.0233196159e-01 */ ,
+{{0x3FE1C1FA,0x5F678885}} /* +5.5492895731e-01 */ ,
+{{0xBFDF91BD,0x1B62B9D2}} /* -4.9327018427e-01 */ ,
+{{0x3FDDEEAF,0x8242EF01}} /* +4.6769321175e-01 */ ,
+{{0xBFDD9015,0xA36B029B}} /* -4.6191922149e-01 */ ,
+{{0x3FDE0836,0x7F176341}} /* +4.6925127422e-01 */ ,
+{{0xBFDF24F6,0x26663631}} /* -4.8663095236e-01 */ ,
+{{0x3FE067BA,0x19D8F153}} /* +5.1266198204e-01 */ ,
+{{0xBFE17FB2,0xECA216B7}} /* -5.4683824747e-01 */ ,
+{{0x3FE2ECE6,0x2FABC4B9}} /* +5.9141835509e-01 */ ,
+{{0xBFE492F3,0x21A51E4E}} /* -6.4293819972e-01 */
+},
+ /* polynomial 4 */
+{
+{{0xBFB9335E,0x5D594989}} /* -9.8440072813e-02 */ ,
+{{0x3FF1A7B9,0x611A7B96}} /* +1.1034482759e+00 */ ,
+{{0xBFE37B48,0x24872744}} /* -6.0879904875e-01 */ ,
+{{0x3FDCA99C,0x29F8DE8E}} /* +4.4785217379e-01 */ ,
+{{0xBFD7B881,0x3D37E454}} /* -3.7063628176e-01 */ ,
+{{0x3FD4F08E,0x55D1F3A8}} /* +3.2718237286e-01 */ ,
+{{0xBFD3413F,0x346E99D3}} /* -3.0085735436e-01 */ ,
+{{0x3FD23625,0x15433E66}} /* +2.8455473973e-01 */ ,
+{{0xBFD19561,0x9976A7ED}} /* -2.7474250781e-01 */ ,
+{{0x3FD13F21,0x5935F4CB}} /* +2.6947816574e-01 */ ,
+{{0xBFD120AC,0x8299A6A4}} /* -2.6761925463e-01 */ ,
+{{0x3FD13CDB,0x325D4F09}} /* +2.6933936995e-01 */ ,
+{{0xBFD1720B,0x858B6D5D}} /* -2.7258575479e-01 */
+},
+ /* polynomial 5 */
+{
+{{0x00000000,0x00000000}} /* +0.0000000000e-01 */ ,
+{{0x3FF00000,0x00000000}} /* +1.0000000000e+00 */ ,
+{{0xBFE00000,0x00000000}} /* -5.0000000000e-01 */ ,
+{{0x3FD55555,0x55555582}} /* +3.3333333333e-01 */ ,
+{{0xBFD00000,0x000000A9}} /* -2.5000000000e-01 */ ,
+{{0x3FC99999,0x99958511}} /* +1.9999999999e-01 */ ,
+{{0xBFC55555,0x554BF922}} /* -1.6666666665e-01 */ ,
+{{0x3FC24924,0xA3AEF673}} /* +1.4285715096e-01 */ ,
+{{0xBFC00000,0x1CE3E886}} /* -1.2500001345e-01 */ ,
+{{0x3FBC7184,0x13CEB1B9}} /* +1.1110711559e-01 */ ,
+{{0xBFB99941,0xE1BDC076}} /* -9.9994771588e-02 */ ,
+{{0x3FB78146,0xBC144107}} /* +9.1816349905e-02 */ ,
+{{0xBFB595CF,0x0AA58754}} /* -8.4317150211e-02 */
+},
+ /* polynomial 6 */
+{
+{{0x3FBE2707,0x6E2AF2E6}} /* +1.1778303566e-01 */ ,
+{{0x3FEC71C7,0x1C71C71C}} /* +8.8888888889e-01 */ ,
+{{0xBFD948B0,0xFCD6E9E0}} /* -3.9506172840e-01 */ ,
+{{0x3FCDF756,0x80FEB690}} /* +2.3411065386e-01 */ ,
+{{0xBFC3FA39,0xAB547A1A}} /* -1.5607376924e-01 */ ,
+{{0x3FBC6990,0x98A29957}} /* +1.1098579146e-01 */ ,
+{{0xBFB50BD3,0x6791851B}} /* -8.2211697374e-02 */ ,
+{{0x3FB00902,0xA288F0A9}} /* +6.2637486154e-02 */ ,
+{{0xBFA8F192,0x5F283335}} /* -4.8718046299e-02 */ ,
+{{0x3FA3B540,0xE7508F6E}} /* +3.8492229687e-02 */ ,
+{{0xBF9F8850,0xBFE2263F}} /* -3.0793439590e-02 */ ,
+{{0x3F99B300,0x12EF8724}} /* +2.5096894413e-02 */ ,
+{{0xBF94F85D,0x99AF0E14}} /* -2.0478689675e-02 */
+},
+ /* polynomial 7 */
+{
+{{0x3FCC8FF7,0xC79A9A22}} /* +2.2314355131e-01 */ ,
+{{0x3FE99999,0x9999999A}} /* +8.0000000000e-01 */ ,
+{{0xBFD47AE1,0x47AE147B}} /* -3.2000000000e-01 */ ,
+{{0x3FC5D867,0xC3ECE2B2}} /* +1.7066666667e-01 */ ,
+{{0xBFBA36E2,0xEB1C436A}} /* -1.0240000000e-01 */ ,
+{{0x3FB0C6F7,0xA0B52722}} /* +6.5535999999e-02 */ ,
+{{0xBFA65E9F,0x80EFFFCD}} /* -4.3690666665e-02 */ ,
+{{0x3F9EADA7,0x96E552E6}} /* +2.9959314904e-02 */ ,
+{{0xBF95798E,0xEF8F2073}} /* -2.0971520778e-02 */ ,
+{{0x3F8E8A9C,0x71A5F85C}} /* +1.4912817210e-02 */ ,
+{{0xBF85FD5B,0xDA92B978}} /* -1.0737149818e-02 */ ,
+{{0x3F801A73,0xDB58E5DE}} /* +7.8629542651e-03 */ ,
+{{0xBF77A54B,0x588CDC6F}} /* -5.7728713226e-03 */
+},
+ /* polynomial 8 */
+{
+{{0x3FD3D638,0x05AA02DB}} /* +3.0994988015e-01 */ ,
+{{0x3FE778B2,0xD84B7B4A}} /* +7.3348371739e-01 */ ,
+{{0xBFD13748,0x582A4354}} /* -2.6899918184e-01 */ ,
+{{0x3FC0D63A,0x08B6E75D}} /* +1.3153767992e-01 */ ,
+{{0xBFB28638,0xBDFF0D07}} /* -7.2360559831e-02 */ ,
+{{0x3FA5BD59,0x0841B395}} /* +4.2460233934e-02 */ ,
+{{0xBF9A937C,0x93FDD519}} /* -2.5953241856e-02 */ ,
+{{0x3F90B55A,0xB37AD191}} /* +1.6316811757e-02 */ ,
+{{0xBF857265,0xA500F702}} /* -1.0472101305e-02 */ ,
+{{0x3F7BF747,0x97F62E2F}} /* +6.8276211381e-03 */ ,
+{{0xBF727615,0x37BCA347}} /* -4.5071438615e-03 */ ,
+{{0x3F68B6F6,0x340868F6}} /* +3.0169304521e-03 */ ,
+{{0xBF60A0BF,0x5B164CA3}} /* -2.0297753733e-03 */
+}
+};
+
+static const db_number Poly_l[8][2] =
+{
+ /* polynomial 1 */
+{
+{{0xBC531A78,0xC9731542}} /* -4.1423907624e-18 */ ,
+{{0x3C6DA901,0xD7E733C1}} /* +1.2863054535e-17 */ ,
+
+},
+ /* polynomial 2 */
+{
+{{0xBC6F6650,0x792F85DD}} /* -1.3617434188e-17 */ ,
+{{0xBC7EB9DF,0xF7DDA2CA}} /* -2.6650620715e-17 */ ,
+
+},
+ /* polynomial 3 */
+{
+{{0x3C21F5B3,0xE8EE7A2B}} /* +4.8680071630e-19 */ ,
+{{0x3C92F660,0x2CEA2030}} /* +6.5789058301e-17 */ ,
+
+},
+ /* polynomial 4 */
+{
+{{0x3C5478A8,0x527726CF}} /* +4.4390095748e-18 */ ,
+{{0x3C71A77F,0xA4B8A6F9}} /* +1.5312656901e-17 */ ,
+
+},
+ /* polynomial 5 */
+{
+{{0x00000000,0x00000000}} /* +0.0000000000e-01 */ ,
+{{0xBC03E91A,0xAAF9039B}} /* -1.3491922402e-19 */ ,
+
+},
+ /* polynomial 6 */
+{
+{{0xBC3615B0,0xDBC40302}} /* -1.1972156066e-18 */ ,
+{{0x3C8C55D6,0x047FA77E}} /* +4.9153904729e-17 */ ,
+
+},
+ /* polynomial 7 */
+{
+{{0xBC64F68B,0x97A41961}} /* -9.0912813346e-18 */ ,
+{{0xBC89A0B0,0x9DE4BE41}} /* -4.4456964079e-17 */ ,
+
+},
+ /* polynomial 8 */
+{
+{{0xBC3B294D,0xE20C7AD0}} /* -1.4724194439e-18 */ ,
+{{0xBC818759,0xCA7AB225}} /* -3.0407471421e-17 */ ,
+
+}
+};
+
+#else
+static const db_number ln2hi = {{0xFEFA3800,0x3FE62E42}} /* +6.9314718056e-01 */;
+static const db_number ln2lo = {{0x93C76730,0x3D2EF357}} /* +5.4979230187e-14 */;
+static const db_number two52 = {{0x00000000,0x43300000}} /* +4.5035996274e+15 */;
+static const db_number middle[8] =
+{
+{{0x333F9DE3,0x3FE7504F}} /* +7.2855339059e-01 */ ,
+{{0x00000000,0x3FE90000}} /* +7.8125000000e-01 */ ,
+{{0x00000000,0x3FEB0000}} /* +8.4375000000e-01 */ ,
+{{0x00000000,0x3FED0000}} /* +9.0625000000e-01 */ ,
+{{0x00000000,0x3FF00000}} /* +1.0000000000e+00 */ ,
+{{0x00000000,0x3FF20000}} /* +1.1250000000e+00 */ ,
+{{0x00000000,0x3FF40000}} /* +1.2500000000e+00 */ ,
+{{0x333F9DE9,0x3FF5D04F}} /* +1.3633567812e+00 */
+};
+
+static const db_number Poly_h[8][13] =
+{
+ /* polynomial 1 */
+{
+{{0x73F60B09,0xBFD444B8}} /* -3.1669436764e-01 */ ,
+{{0x980C433A,0x3FF5F619}} /* +1.3725830020e+00 */ ,
+{{0x824C9A57,0xBFEE24CC}} /* -9.4199204873e-01 */ ,
+{{0x47881604,0x3FEB954C}} /* +8.6197484942e-01 */ ,
+{{0xC58FCD22,0xBFEC6529}} /* -8.8734901987e-01 */ ,
+{{0x1AC1D834,0x3FEF2E06}} /* +9.7436814524e-01 */ ,
+{{0xF5D42E1A,0xBFF1D4FE}} /* -1.1145009616e+00 */ ,
+{{0x67F441DC,0x3FF4FAB7}} /* +1.3112100659e+00 */ ,
+{{0xEA47B471,0xBFF93248}} /* -1.5747765686e+00 */ ,
+{{0x85276A57,0x3FFEBDCE}} /* +1.9213395311e+00 */ ,
+{{0x0ABAD697,0xC002FCE1}} /* -2.3734761084e+00 */ ,
+{{0x8C0B7AF7,0x4007BFE9}} /* +2.9687071744e+00 */ ,
+{{0xF57FD2EC,0xC00DE4D4}} /* -3.7367343120e+00 */
+},
+ /* polynomial 2 */
+{
+{{0x6CB3B379,0xBFCF991C}} /* -2.4686007793e-01 */ ,
+{{0x47AE147B,0x3FF47AE1}} /* +1.2800000000e+00 */ ,
+{{0xEB1C432D,0xBFEA36E2}} /* -8.1920000000e-01 */ ,
+{{0x80F29213,0x3FE65E9F}} /* +6.9905066667e-01 */ ,
+{{0xE2308C3F,0xBFE5798E}} /* -6.7108864000e-01 */ ,
+{{0xE1793910,0x3FE5FD7F}} /* +6.8719476736e-01 */ ,
+{{0xAC3CC49E,0xBFE774CC}} /* -7.3300775185e-01 */ ,
+{{0x779F31B6,0x3FE9BC1F}} /* +8.0421422351e-01 */ ,
+{{0x9C89806A,0xBFECD2B2}} /* -9.0071993421e-01 */ ,
+{{0xF663DD55,0x3FF065A0}} /* +1.0248117089e+00 */ ,
+{{0x64D28253,0xBFF2E3A7}} /* -1.1805795611e+00 */ ,
+{{0x162168A9,0x3FF613D4}} /* +1.3798409333e+00 */ ,
+{{0x1E7E75E1,0xBFF9EC69}} /* -1.6202174369e+00 */
+},
+ /* polynomial 3 */
+{
+{{0x6B543DB2,0xBFC5BF40}} /* -1.6989903680e-01 */ ,
+{{0xBDA12F68,0x3FF2F684}} /* +1.1851851852e+00 */ ,
+{{0xE0BF08C7,0xBFE67980}} /* -7.0233196159e-01 */ ,
+{{0x5F678885,0x3FE1C1FA}} /* +5.5492895731e-01 */ ,
+{{0x1B62B9D2,0xBFDF91BD}} /* -4.9327018427e-01 */ ,
+{{0x8242EF01,0x3FDDEEAF}} /* +4.6769321175e-01 */ ,
+{{0xA36B029B,0xBFDD9015}} /* -4.6191922149e-01 */ ,
+{{0x7F176341,0x3FDE0836}} /* +4.6925127422e-01 */ ,
+{{0x26663631,0xBFDF24F6}} /* -4.8663095236e-01 */ ,
+{{0x19D8F153,0x3FE067BA}} /* +5.1266198204e-01 */ ,
+{{0xECA216B7,0xBFE17FB2}} /* -5.4683824747e-01 */ ,
+{{0x2FABC4B9,0x3FE2ECE6}} /* +5.9141835509e-01 */ ,
+{{0x21A51E4E,0xBFE492F3}} /* -6.4293819972e-01 */
+},
+ /* polynomial 4 */
+{
+{{0x5D594989,0xBFB9335E}} /* -9.8440072813e-02 */ ,
+{{0x611A7B96,0x3FF1A7B9}} /* +1.1034482759e+00 */ ,
+{{0x24872744,0xBFE37B48}} /* -6.0879904875e-01 */ ,
+{{0x29F8DE8E,0x3FDCA99C}} /* +4.4785217379e-01 */ ,
+{{0x3D37E454,0xBFD7B881}} /* -3.7063628176e-01 */ ,
+{{0x55D1F3A8,0x3FD4F08E}} /* +3.2718237286e-01 */ ,
+{{0x346E99D3,0xBFD3413F}} /* -3.0085735436e-01 */ ,
+{{0x15433E66,0x3FD23625}} /* +2.8455473973e-01 */ ,
+{{0x9976A7ED,0xBFD19561}} /* -2.7474250781e-01 */ ,
+{{0x5935F4CB,0x3FD13F21}} /* +2.6947816574e-01 */ ,
+{{0x8299A6A4,0xBFD120AC}} /* -2.6761925463e-01 */ ,
+{{0x325D4F09,0x3FD13CDB}} /* +2.6933936995e-01 */ ,
+{{0x858B6D5D,0xBFD1720B}} /* -2.7258575479e-01 */
+},
+ /* polynomial 5 */
+{
+{{0x00000000,0x00000000}} /* +0.0000000000e-01 */ ,
+{{0x00000000,0x3FF00000}} /* +1.0000000000e+00 */ ,
+{{0x00000000,0xBFE00000}} /* -5.0000000000e-01 */ ,
+{{0x55555582,0x3FD55555}} /* +3.3333333333e-01 */ ,
+{{0x000000A9,0xBFD00000}} /* -2.5000000000e-01 */ ,
+{{0x99958511,0x3FC99999}} /* +1.9999999999e-01 */ ,
+{{0x554BF922,0xBFC55555}} /* -1.6666666665e-01 */ ,
+{{0xA3AEF673,0x3FC24924}} /* +1.4285715096e-01 */ ,
+{{0x1CE3E886,0xBFC00000}} /* -1.2500001345e-01 */ ,
+{{0x13CEB1B9,0x3FBC7184}} /* +1.1110711559e-01 */ ,
+{{0xE1BDC076,0xBFB99941}} /* -9.9994771588e-02 */ ,
+{{0xBC144107,0x3FB78146}} /* +9.1816349905e-02 */ ,
+{{0x0AA58754,0xBFB595CF}} /* -8.4317150211e-02 */
+},
+ /* polynomial 6 */
+{
+{{0x6E2AF2E6,0x3FBE2707}} /* +1.1778303566e-01 */ ,
+{{0x1C71C71C,0x3FEC71C7}} /* +8.8888888889e-01 */ ,
+{{0xFCD6E9E0,0xBFD948B0}} /* -3.9506172840e-01 */ ,
+{{0x80FEB690,0x3FCDF756}} /* +2.3411065386e-01 */ ,
+{{0xAB547A1A,0xBFC3FA39}} /* -1.5607376924e-01 */ ,
+{{0x98A29957,0x3FBC6990}} /* +1.1098579146e-01 */ ,
+{{0x6791851B,0xBFB50BD3}} /* -8.2211697374e-02 */ ,
+{{0xA288F0A9,0x3FB00902}} /* +6.2637486154e-02 */ ,
+{{0x5F283335,0xBFA8F192}} /* -4.8718046299e-02 */ ,
+{{0xE7508F6E,0x3FA3B540}} /* +3.8492229687e-02 */ ,
+{{0xBFE2263F,0xBF9F8850}} /* -3.0793439590e-02 */ ,
+{{0x12EF8724,0x3F99B300}} /* +2.5096894413e-02 */ ,
+{{0x99AF0E14,0xBF94F85D}} /* -2.0478689675e-02 */
+},
+ /* polynomial 7 */
+{
+{{0xC79A9A22,0x3FCC8FF7}} /* +2.2314355131e-01 */ ,
+{{0x9999999A,0x3FE99999}} /* +8.0000000000e-01 */ ,
+{{0x47AE147B,0xBFD47AE1}} /* -3.2000000000e-01 */ ,
+{{0xC3ECE2B2,0x3FC5D867}} /* +1.7066666667e-01 */ ,
+{{0xEB1C436A,0xBFBA36E2}} /* -1.0240000000e-01 */ ,
+{{0xA0B52722,0x3FB0C6F7}} /* +6.5535999999e-02 */ ,
+{{0x80EFFFCD,0xBFA65E9F}} /* -4.3690666665e-02 */ ,
+{{0x96E552E6,0x3F9EADA7}} /* +2.9959314904e-02 */ ,
+{{0xEF8F2073,0xBF95798E}} /* -2.0971520778e-02 */ ,
+{{0x71A5F85C,0x3F8E8A9C}} /* +1.4912817210e-02 */ ,
+{{0xDA92B978,0xBF85FD5B}} /* -1.0737149818e-02 */ ,
+{{0xDB58E5DE,0x3F801A73}} /* +7.8629542651e-03 */ ,
+{{0x588CDC6F,0xBF77A54B}} /* -5.7728713226e-03 */
+},
+ /* polynomial 8 */
+{
+{{0x05AA02DB,0x3FD3D638}} /* +3.0994988015e-01 */ ,
+{{0xD84B7B4A,0x3FE778B2}} /* +7.3348371739e-01 */ ,
+{{0x582A4354,0xBFD13748}} /* -2.6899918184e-01 */ ,
+{{0x08B6E75D,0x3FC0D63A}} /* +1.3153767992e-01 */ ,
+{{0xBDFF0D07,0xBFB28638}} /* -7.2360559831e-02 */ ,
+{{0x0841B395,0x3FA5BD59}} /* +4.2460233934e-02 */ ,
+{{0x93FDD519,0xBF9A937C}} /* -2.5953241856e-02 */ ,
+{{0xB37AD191,0x3F90B55A}} /* +1.6316811757e-02 */ ,
+{{0xA500F702,0xBF857265}} /* -1.0472101305e-02 */ ,
+{{0x97F62E2F,0x3F7BF747}} /* +6.8276211381e-03 */ ,
+{{0x37BCA347,0xBF727615}} /* -4.5071438615e-03 */ ,
+{{0x340868F6,0x3F68B6F6}} /* +3.0169304521e-03 */ ,
+{{0x5B164CA3,0xBF60A0BF}} /* -2.0297753733e-03 */
+}
+};
+
+static const db_number Poly_l[8][2] =
+{
+ /* polynomial 1 */
+{
+{{0xC9731542,0xBC531A78}} /* -4.1423907624e-18 */ ,
+{{0xD7E733C1,0x3C6DA901}} /* +1.2863054535e-17 */ ,
+
+},
+ /* polynomial 2 */
+{
+{{0x792F85DD,0xBC6F6650}} /* -1.3617434188e-17 */ ,
+{{0xF7DDA2CA,0xBC7EB9DF}} /* -2.6650620715e-17 */ ,
+
+},
+ /* polynomial 3 */
+{
+{{0xE8EE7A2B,0x3C21F5B3}} /* +4.8680071630e-19 */ ,
+{{0x2CEA2030,0x3C92F660}} /* +6.5789058301e-17 */ ,
+
+},
+ /* polynomial 4 */
+{
+{{0x527726CF,0x3C5478A8}} /* +4.4390095748e-18 */ ,
+{{0xA4B8A6F9,0x3C71A77F}} /* +1.5312656901e-17 */ ,
+
+},
+ /* polynomial 5 */
+{
+{{0x00000000,0x00000000}} /* +0.0000000000e-01 */ ,
+{{0xAAF9039B,0xBC03E91A}} /* -1.3491922402e-19 */ ,
+
+},
+ /* polynomial 6 */
+{
+{{0xDBC40302,0xBC3615B0}} /* -1.1972156066e-18 */ ,
+{{0x047FA77E,0x3C8C55D6}} /* +4.9153904729e-17 */ ,
+
+},
+ /* polynomial 7 */
+{
+{{0x97A41961,0xBC64F68B}} /* -9.0912813346e-18 */ ,
+{{0x9DE4BE41,0xBC89A0B0}} /* -4.4456964079e-17 */ ,
+
+},
+ /* polynomial 8 */
+{
+{{0xE20C7AD0,0xBC3B294D}} /* -1.4724194439e-18 */ ,
+{{0xCA7AB225,0xBC818759}} /* -3.0407471421e-17 */ ,
+
+}
+};
+
+#endif
+
+
diff --git a/src/crlibm/maple/acos-td.mpl b/src/crlibm/maple/acos-td.mpl
new file mode 100644
index 0000000..72ea401
--- /dev/null
+++ b/src/crlibm/maple/acos-td.mpl
@@ -0,0 +1,488 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "exp-td.mpl";
+Digits := 145:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+read "gal.mpl":
+mkdir("TEMPACOS"):
+
+with(orthopoly,T):
+
+
+truncPoly := proc(p,k) 
+local i, q:
+q := 0:
+convert(q,polynom):
+for i from 0 to min(degree(p,x),k) do
+    q := q + coeff(p,x,i) * x^i:
+od:
+return (q):
+end:
+
+intervals := 10:
+
+for i from 1 to intervals do
+	epsAccurate[i] := 0.5:
+	epsQuick[i] := 0.5:
+	polyAccurate[i] := 1:
+	polyQuick[i] := 1:
+od:
+epsAccurateSpecial := 0.5:
+epsQuickExtra := 0.5:
+
+lowestIntervalMax := 0.185:
+highestIntervalMin := 0.78:
+
+polyAccurateTDCoeffsLowest := 13:
+polyAccurateDDCoeffsLowest := 12:
+polyAccurateDCoeffsLowest := 16:
+
+polyAccurateDegreeLowest := polyAccurateTDCoeffsLowest + polyAccurateDDCoeffsLowest + polyAccurateDCoeffsLowest:
+
+polyQuickDDCoeffsLowest := 12:
+polyQuickDCoeffsLowest := 10:
+
+polyQuickDegreeLowest := polyQuickDDCoeffsLowest + polyQuickDCoeffsLowest:
+
+polyAccurateTDCoeffsMiddle := 7:
+polyAccurateDDCoeffsMiddle := 9:
+polyAccurateDCoeffsMiddle := 19:
+
+polyAccurateDegreeMiddle := polyAccurateTDCoeffsMiddle + polyAccurateDDCoeffsMiddle + polyAccurateDCoeffsMiddle:
+
+polyQuickDDCoeffsMiddle := 7:
+polyQuickDCoeffsMiddle := 7:
+
+polyQuickDegreeMiddle := polyQuickDDCoeffsMiddle + polyQuickDCoeffsMiddle:
+
+
+polyAccurateTDCoeffsHighest := 9:
+polyAccurateDDCoeffsHighest := 9:
+polyAccurateDCoeffsHighest := 11:
+
+polyAccurateDegreeHighest := polyAccurateTDCoeffsHighest + polyAccurateDDCoeffsHighest + polyAccurateDCoeffsHighest:
+
+polyQuickDDCoeffsHighest := 9:
+polyQuickDCoeffsHighest := 9:
+
+polyQuickDegreeHighest := polyQuickDDCoeffsHighest + polyQuickDCoeffsHighest:
+
+extrabound := hexa2ieee(["3F500000","00000000"]):
+polyQuickDegreeExtra := 5:
+
+bound[0] := 0:
+b := nearest(lowestIntervalMax):
+he := ieeehexa(b):
+bound[1] := hexa2ieee([he[1],"00000000"]):
+b := nearest(highestIntervalMin):
+he := ieeehexa(b):
+bound[intervals - 1] := hexa2ieee([he[1],"00000000"]):
+bound[intervals] := 1:
+linearWidth := (highestIntervalMin - lowestIntervalMax) / (intervals - 2):
+scaleSum := 0:
+scale[2] := 1.5:
+scale[3] := 1.35:
+scale[4] := 1.18:
+scale[5] := 1.00:
+scale[6] := 0.915:
+scale[7] := 0.74:
+scale[8] := 0.595:
+scale[9] := 0.50:
+for i from 2 to (intervals-1) do
+	scaleSum := scaleSum + scale[i]:
+od:
+for i from 2 to (intervals-1) do
+	scale[i] := scale[i] / scaleSum;
+od:
+current := lowestIntervalMax:
+for i from 2 to (intervals-2) do
+	b := nearest(current + (highestIntervalMin - lowestIntervalMax) * scale[i]):
+	current := b:
+	he := ieeehexa(b):
+	bound[i] := hexa2ieee([he[1],"00000000"]):
+od:
+printf("Using %d intervals with bounds:\n",intervals):
+for i from 0 to intervals do
+	printf("bound[%d] = %1.30e\n",i,bound[i]):
+od:
+printf("Using an extra bound for truncating the quick poly to deg. %d in interval #0 for small args up to %f (2^(%f))\n",
+	polyQuickDegreeExtra,extrabound,log[2](abs(extrabound)));
+
+printf("Computing Gal's accurate table values for interval midpoints\n"):
+for i from 2 to (intervals-1) do
+	m := nearest((bound[i] + bound[i-1]) / 2):
+	mhe := ieeehexa(m):
+	printf("Interval %d: accurate table research start value %f (%s%s)\n",i,m,mhe[1],mhe[2]):
+	midpointFloat[i] := galDoubleToDoubleDouble(nearest(m),arcsin,2^(-121),2^(15)):
+od:
+
+
+printf("Using the following floating point midpoints for intervals 2-%d:\n",intervals-2):
+for i from 2 to (intervals-1) do
+	mhe := ieeehexa(midpointFloat[i]):
+	printf("midpointFloat[%d] = %f (%s%s)\n",i,midpointFloat[i],mhe[1],mhe[2]):
+od:
+
+printf("The reduced argument z is therefore bounded by:\n"):
+printf("Interval 1: |z| < 2^(%f)\n",
+	log[2](abs(bound[1]))):
+for i from 2 to (intervals-1) do
+	printf("Interval %d: |z| < 2^(%f)\n",i,
+	log[2](max(abs(midpointFloat[i] - bound[i-1]),abs(midpointFloat[i] - bound[i])))):
+od:
+printf("Interval %d: |z| < 2^(%f)\n",intervals,
+	log[2](abs(1 - bound[intervals-1]))):
+
+
+
+printf("Using a %d degree polynomial for lowest interval (1) (accurate phase)\n",
+	polyAccurateDegreeLowest):
+printf("with %d triple-double, %d double-double and %d double coefficients\n",
+	polyAccurateTDCoeffsLowest, polyAccurateDDCoeffsLowest, polyAccurateDCoeffsLowest):
+printf("Using a %d degree polynomial for lowest interval (1) (quick phase)\n",
+	polyQuickDegreeLowest):
+printf("with %d double-double and %d double coefficients\n",
+	polyQuickDDCoeffsLowest, polyQuickDCoeffsLowest):
+printf("Using a %d degree polynomial for middle intervals (2-%d) (accurate phase)\n",
+	polyAccurateDegreeMiddle,intervals-2):
+printf("with %d triple-double, %d double-double and %d double coefficients\n",
+	polyAccurateTDCoeffsMiddle, polyAccurateDDCoeffsMiddle, polyAccurateDCoeffsMiddle):
+printf("Using a %d degree polynomial for middle intervals (2-%d) (quick phase)\n",
+	polyQuickDegreeMiddle,intervals-2):
+printf("with %d double-double and %d double coefficients\n",
+	polyQuickDDCoeffsMiddle, polyQuickDCoeffsMiddle):
+printf("Using a %d degree polynomial for highest interval (%d) (accurate phase)\n",
+	polyAccurateDegreeHighest,intervals):
+printf("with %d triple-double, %d double-double and %d double coefficients\n",
+	polyAccurateTDCoeffsHighest, polyAccurateDDCoeffsHighest, polyAccurateDCoeffsHighest):
+printf("Using a %d degree polynomial for highest interval (%d) (quick phase)\n",
+	polyQuickDegreeHighest,intervals):
+printf("with %d double-double and %d double coefficients\n",
+	polyQuickDDCoeffsHighest, polyQuickDCoeffsHighest):
+
+if true then 
+
+printf("Computing polynomials for interval 1 ([%f;%f])\n",bound[0],bound[1]):
+
+f := unapply(convert(series((arcsin(sqrt(x))/sqrt(x) - 1)/x,x=0,300),polynom),x):
+
+p := unapply(eval(numapprox[chebyshev](f(x),x=(bound[0])^2..(bound[1])^2,2^(-127))),x):
+
+polyAccuExact[1] := truncPoly(subs(X=x^2,p(X))*x^3+x,polyAccurateDegreeLowest):
+
+polyAccurate[1] := poly_exact32(polyAccuExact[1],polyAccurateTDCoeffsLowest,polyAccurateDDCoeffsLowest):
+
+epsAccurate[1] := numapprox[infnorm]((polyAccurate[1]/arcsin(x))-1, x=bound[0]..bound[1]):
+epsAccurateSpecial := numapprox[infnorm]((polyAccurate[1]/arcsin(x))-1, x=bound[0]..evalf(sin(2^(-18)))):
+
+epsAccurateUnknown := numapprox[infnorm]((polyAccurate[1]/arcsin(x))-1, x=bound[0]..evalf(cos(12867/8192))):
+
+polyQuickExact[1] := truncPoly(polyAccuExact[1],polyQuickDegreeLowest):
+polyQuick[1] := poly_exact2(polyQuickExact[1],polyQuickDDCoeffsLowest):
+
+epsQuick[1] := numapprox[infnorm]((polyQuick[1]/arcsin(x))-1, x=bound[0]..bound[1]):
+
+polyQuickExtraExact := truncPoly(polyAccuExact[1],polyQuickDegreeExtra):
+polyQuickExtra := poly_exact2(polyQuickExtraExact,polyQuickDegreeExtra):
+epsQuickExtra := numapprox[infnorm]((polyQuickExtra/arcsin(x))-1, x=bound[0]..extrabound):
+
+end if:
+
+for i from 2 to (intervals-1) do
+
+printf("Computing polynomials for interval %d ([%f;%f])\n",i,bound[i-1],bound[i]):
+printf("Reduced argument z will be in interval [%1.8e;%1.8e] ([-2^%f,2^%f]),\n",
+	bound[i-1]-midpointFloat[i],bound[i]-midpointFloat[i],
+	log[2](abs(bound[i-1]-midpointFloat[i])),log[2](abs(bound[i]-midpointFloat[i]))):
+
+f := unapply(arcsin(x+midpointFloat[i]),x):
+
+fhelp := unapply(convert(series((f(x)-arcsin(midpointFloat[i]))/x,x=0,polyAccurateDegreeMiddle*3),polynom),x):
+
+polyAccuExact[i] := numapprox[minimax](fhelp(x),
+				x=bound[i-1]-midpointFloat[i]..bound[i]-midpointFloat[i],
+				[polyAccurateDegreeMiddle,0],1,'err')*x + nearestDD(evalf(arcsin(midpointFloat[i]))):
+
+polyAccurate[i] := poly_exact32(polyAccuExact[i],polyAccurateTDCoeffsMiddle,polyAccurateDDCoeffsMiddle):
+
+epsAccurate[i] := numapprox[infnorm]((polyAccurate[i]/f(x))-1, 
+					x=bound[i-1]-midpointFloat[i]..bound[i]-midpointFloat[i]):
+
+polyQuickExact[i] := truncPoly(polyAccuExact[i],polyQuickDegreeMiddle):
+polyQuick[i] := poly_exact2(polyQuickExact[i],polyQuickDDCoeffsMiddle):
+
+epsQuick[i] := numapprox[infnorm]((polyQuick[i]/f(x))-1, 
+			 	   x=bound[i-1]-midpointFloat[i]..bound[i]-midpointFloat[i]):
+
+
+od:
+
+
+if true then 
+
+printf("Computing polynomials for interval %d ([%f;%f])\n",intervals,bound[intervals-1],bound[intervals]):
+
+
+g := unapply(((arcsin(1 - x) - Pi/2)/sqrt(2*x)),x):
+f := unapply(convert(series(((g(x)+1)/x),x=0,polyAccurateDegreeHighest*4),polynom),x):
+
+
+polyAccuExact[intervals] := numapprox[minimax](f(x),x=(1-bound[intervals]+2^(-53))..(1-bound[intervals-1]),
+						[polyAccurateDegreeHighest-1,0],1,'err')*x-1:
+
+polyAccurate[intervals] := poly_exact32(polyAccuExact[intervals],polyAccurateTDCoeffsHighest,polyAccurateDDCoeffsHighest):
+
+
+epsAccurate[intervals] := numapprox[infnorm](((unapply(polyAccurate[intervals],x)(x)/g(x))-1), 
+					x=(1-bound[intervals]+2^(-53))..(1-bound[intervals-1])):
+
+
+polyQuickExact[intervals] := truncPoly(polyAccuExact[intervals],polyQuickDegreeHighest):
+polyQuick[intervals] := poly_exact2(polyQuickExact[intervals],polyQuickDDCoeffsHighest):
+
+epsQuick[intervals] := numapprox[infnorm](((unapply(polyQuick[intervals],x)(x)/g(x))-1), 
+					x=(1-bound[intervals]+2^(-53))..(1-bound[intervals-1])):
+
+printf("Checking if the polynomial for interval %d is exactly -1 in z = %f...\n",intervals,1-bound[intervals]);
+
+if (unapply(polyAccurate[intervals],x)(1-bound[intervals]) = -1) then
+	printf("  Check passed!\n"):
+else
+	printf("  Check failed!\n"):
+end if:
+
+end if:
+
+
+
+for i from 1 to intervals do 
+	printf("Relative error for accurate phase polynomial in interval %d ([%f;%f]) is 2^(%f)\n",
+       		i,bound[i-1],bound[i],log[2](abs(epsAccurate[i]))):
+	printf("Relative error for quick phase polynomial in interval %d ([%f;%f]) is 2^(%f)\n",
+       		i,bound[i-1],bound[i],log[2](abs(epsQuick[i]))):
+od:
+printf("Relative error for accurate phase polynomial #1 in special interval [0;sin(2^(-18))]) is 2^(%f)\n",
+       log[2](abs(epsAccurateSpecial))):
+printf("Relative error for accurate phase polynomial #1 in \"unknown\" interval [0;cos(12867/8192)]) is 2^(%f)\n",
+       log[2](abs(epsAccurateUnknown))):
+
+
+printf("Relative error for quick phase extra case truncated polynomial #1 in special interval [0;%f]) is 2^(%f)\n",
+       extrabound,log[2](abs(epsQuickExtra))):
+
+
+(PiHalfH, PiHalfM, PiHalfL) := hi_mi_lo(evalf(Pi/2)):
+(PiH, PiM, PiL) := hi_mi_lo(evalf(Pi)):
+
+epsPiDD := evalf(((PiHalfH + PiHalfM) - Pi/2)/(Pi/2)):
+epsPiTD := evalf(((PiHalfH + PiHalfM + PiHalfL) - Pi/2) / (Pi/2)):
+
+printf("Relative error for storing Pi/2 as a double-double is 2^(%f)\n",evalf(log[2](abs(epsPiDD)))):
+printf("Relative error for storing Pi/2 as a triple-double is 2^(%f)\n",evalf(log[2](abs(epsPiTD)))):
+
+# Ce qui suit est pifometrique et doit etre prouve en Gappa ensuite
+
+arithmeticalErrorQuick[1] := 2^(-61):
+arithmeticalErrorQuick[2] := 2^(-61):
+arithmeticalErrorQuick[3] := 2^(-61):
+arithmeticalErrorQuick[4] := 2^(-61):
+arithmeticalErrorQuick[5] := 2^(-61):
+arithmeticalErrorQuick[6] := 2^(-61):
+arithmeticalErrorQuick[7] := 2^(-61):
+arithmeticalErrorQuick[8] := 2^(-61):
+arithmeticalErrorQuick[9] := 2^(-61):
+arithmeticalErrorQuick[10] := 2^(-68):
+
+arithmeticalErrorQuickExtra := 2^(-80):
+
+for i from 1 to intervals do
+	estimatedOverallEpsQuick[i] := abs(epsQuick[i]) + 
+				       abs(arithmeticalErrorQuick[i]) + 
+                                       abs(epsQuick[i]) * abs(arithmeticalErrorQuick[i]):
+	printf("Relative quick phase overall error bound to show in Gappa for interval %d ([%f;%f]) is 2^(%f)\n",
+		i,bound[i-1],bound[i],log[2](abs(estimatedOverallEpsQuick[i]))):
+od:
+
+estimatedOverallEpsQuickExtra := abs(epsQuickExtra) + 
+				 abs(arithmeticalErrorQuickExtra) + 
+                                 abs(epsQuickExtra) * abs(arithmeticalErrorQuickExtra):
+printf("Relative quick phase overall error bound to show for extra truncted poly in interval [0;%f]) is 2^(%f)\n",
+	extrabound,log[2](abs(estimatedOverallEpsQuickExtra))):
+
+
+printf("Write tables...\n"):
+
+filename:="TEMPACOS/acos-td.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/* File generated by maple/acos-td.mpl */\n\n"):
+
+printf("Write table with bounds\n"):
+
+fprintf(fd, "/* High order words of interval bounds (low order word is 0) */\n"):
+for i from 1 to (intervals-1) do 
+	heb := ieeehexa(bound[i]):
+	fprintf(fd, "\#define BOUND%d 0x%s\n",i,heb[1]):
+od:
+
+heb := ieeehexa(extrabound):
+fprintf(fd, "\#define EXTRABOUND 0x%s\n",heb[1]):
+
+printf("Write additional constants\n"):
+
+fprintf(fd, "\n\n/* Pi/2 as a triple-double*/\n"):
+fprintf(fd, "\#define PIHALFH %1.50e\n",PiHalfH):
+fprintf(fd, "\#define PIHALFM %1.50e\n",PiHalfM):
+fprintf(fd, "\#define PIHALFL %1.50e\n",PiHalfL):
+fprintf(fd, "\n\n/* Pi as a triple-double*/\n"):
+fprintf(fd, "\#define PIH %1.50e\n",PiH):
+fprintf(fd, "\#define PIM %1.50e\n",PiM):
+fprintf(fd, "\#define PIL %1.50e\n",PiL):
+fprintf(fd, "\#define PIHALFDOUBLERN %1.50e\n",nearest(evalf(Pi/2))):
+fprintf(fd, "\#define PIHALFDOUBLERU %1.50e\n",roundUp(evalf(Pi/2))):
+fprintf(fd, "\#define PIHALFDOUBLERD %1.50e\n",roundDown(evalf(Pi/2))):
+
+printf("Write table with midpoints and polynomial coefficients\n"):
+k := 0:
+for i from 0 to polyAccurateDegreeLowest do
+	(hi,mi,lo) := hi_mi_lo(coeff(polyAccurate[1],x,i)):
+	if ((abs(hi) = 1.0) and (mi = 0) and (lo = 0)) then 
+		printf(
+		"Coefficient %d of interval 1 polynomial is exactly %f and will not be stored in the table\n",i,hi): 
+	else 
+	g := 0;
+	if (hi <> 0) then
+		if (i <= polyQuickDegreeLowest) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dh, quickPolyLowC%dh */",hi,k,i,i):
+		else
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dh */",hi,k,i):
+		end if:
+		k := k + 1:
+	end if:
+	if (mi <> 0) then
+		if (i <= polyQuickDDCoeffsLowest) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dm, quickPolyLowC%dl */",mi,k,i,i):
+		else
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dm */",mi,k,i):
+		end if:
+		k := k + 1:
+	end if:
+	if (lo <> 0) then
+		tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dl */",lo,k,i):
+		k := k + 1:
+	end if:
+	end if:
+od:
+tbl[k] := sprintf("%1.50e, \t/* %d, RN rounding constant quick poly low*/",
+		compute_rn_constant(estimatedOverallEpsQuick[1]),k):
+k := k + 1:
+tbl[k] := sprintf("%1.50e, \t/* %d, RD rounding constant quick poly low*/",
+		estimatedOverallEpsQuick[1],k):
+k := k + 1:
+printf("Table for interval 1 written\n"):
+for l from 2 to (intervals-1) do
+	tbl[k] := sprintf("%1.50e, \t/* %d, midpoint in interval %d*/",midpointFloat[l],k,l):
+	tblidx[l] := k;
+	k := k + 1;
+	for i from 0 to polyAccurateDegreeMiddle do
+		(hi,mi,lo) := hi_mi_lo(coeff(polyAccurate[l],x,i)):
+		if ((abs(hi) = 1.0) and (mi = 0) and (lo = 0)) then 
+			printf(
+		"Coefficient %d of interval %d polynomial is exactly %f and will not be stored in the table\n",i,l,hi): 
+		else 
+		g := 0;
+		if (hi <> 0) then
+			if (i <= polyQuickDegreeMiddle) then
+				tbl[k] := sprintf(
+					"%1.50e, \t/* %d, accPolyMid%dC%dh, quickPolyMid%dC%dh */",hi,k,l,i,l,i):
+			else
+				tbl[k] := sprintf("%1.50e, \t/* %d, accPolyMid%dC%dh */",hi,k,l,i):
+			end if:
+			k := k + 1:
+		end if:
+		if (mi <> 0) then
+			if (i <= polyQuickDDCoeffsMiddle) then
+				tbl[k] := sprintf(
+					"%1.50e, \t/* %d, accPolyMid%dC%dm, quickPolyMid%dC%dl */",mi,k,l,i,l,i):
+			else
+				tbl[k] := sprintf("%1.50e, \t/* %d, accPolyMid%dC%dm */",mi,k,l,i):
+			end if:
+			k := k + 1:
+		end if:
+		if (lo <> 0) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyMid%dC%dl */",lo,k,l,i):
+			k := k + 1:
+		end if:
+		end if:
+	od:
+	tbl[k] := sprintf("%1.50e, \t/* %d, RN rounding constant quick poly middle %d*/",
+			compute_rn_constant(estimatedOverallEpsQuick[l]),k,l):
+	k := k + 1:
+	tbl[k] := sprintf("%1.50e, \t/* %d, RD rounding constant quick poly middle %d*/",
+			estimatedOverallEpsQuick[l],k,l):
+	k := k + 1:
+	printf("Table for interval %d written\n",l):
+od:
+tblidx[intervals] := k:
+for i from 0 to polyAccurateDegreeHighest do
+	(hi,mi,lo) := hi_mi_lo(coeff(polyAccurate[intervals],x,i)):
+	if ((abs(hi) = 1.0) and (mi = 0) and (lo = 0)) then 
+		printf(
+	"Coefficient %d of interval %d polynomial is exactly %f and will not be stored in the table\n",i,intervals,hi): 
+	else 
+	g := 0;	
+	if (hi <> 0) then
+		if (i <= polyQuickDegreeHighest) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dh, quickPolyHighC%dh */",hi,k,i,i):
+		else
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dh */",hi,k,i):
+		end if:
+		k := k + 1:
+	end if:
+	if (mi <> 0) then
+		if (i <= polyQuickDDCoeffsHighest) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dm, quickPolyHighC%dl */",mi,k,i,i):
+		else
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dm */",mi,k,i):
+		end if:
+		k := k + 1:
+	end if:
+	if (lo <> 0) then
+		tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dl */",lo,k,i):
+		k := k + 1:
+	end if:
+	end if:
+od:
+tbl[k] := sprintf("%1.50e, \t/* %d, RN rounding constant quick poly high*/",
+		compute_rn_constant(estimatedOverallEpsQuick[intervals]),k):
+k := k + 1:
+tbl[k] := sprintf("%1.50e, \t/* %d, RD rounding constant quick poly high*/",
+ 		estimatedOverallEpsQuick[intervals],k):
+k := k + 1:
+printf("Table for interval %d written\n",intervals):
+tbllen := k:
+printf("The whole table has %d entries, so uses %d bytes of memory\n",tbllen,tbllen*8):
+fprintf(fd,"\n\n/* Indices to the following table */\n"):
+for i from 2 to intervals do
+	fprintf(fd,"\#define TBLIDX%d %d\n",i,tblidx[i]):
+od:
+fprintf(fd, "\n\n/* Table with midpoints and polynomial coefficients */\n"):
+fprintf(fd, "static const double tbl[%d] = {\n",tbllen):
+for i from 0 to (tbllen - 1) do
+	fprintf(fd, "%s\n",tbl[i]):
+od:
+fprintf(fd, "};\n\n"):
+
+fclose(fd):
+
+printf("----DONE---\n"):
+
+
diff --git a/src/crlibm/maple/asin-td.mpl b/src/crlibm/maple/asin-td.mpl
new file mode 100644
index 0000000..3306a11
--- /dev/null
+++ b/src/crlibm/maple/asin-td.mpl
@@ -0,0 +1,477 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "exp-td.mpl";
+Digits := 145:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+read "gal.mpl":
+mkdir("TEMPASIN"):
+
+with(orthopoly,T):
+
+
+truncPoly := proc(p,k) 
+local i, q:
+q := 0:
+convert(q,polynom):
+for i from 0 to min(degree(p,x),k) do
+    q := q + coeff(p,x,i) * x^i:
+od:
+return (q):
+end:
+
+intervals := 10:
+
+for i from 1 to intervals do
+	epsAccurate[i] := 0.5:
+	epsQuick[i] := 0.5:
+	polyAccurate[i] := 1:
+	polyQuick[i] := 1:
+od:
+epsAccurateSpecial := 0.5:
+epsQuickExtra := 0.5:
+
+lowestIntervalMax := 0.185:
+highestIntervalMin := 0.78:
+
+polyAccurateTDCoeffsLowest := 13:
+polyAccurateDDCoeffsLowest := 12:
+polyAccurateDCoeffsLowest := 16:
+
+polyAccurateDegreeLowest := polyAccurateTDCoeffsLowest + polyAccurateDDCoeffsLowest + polyAccurateDCoeffsLowest:
+
+polyQuickDDCoeffsLowest := 12:
+polyQuickDCoeffsLowest := 10:
+
+polyQuickDegreeLowest := polyQuickDDCoeffsLowest + polyQuickDCoeffsLowest:
+
+polyAccurateTDCoeffsMiddle := 7:
+polyAccurateDDCoeffsMiddle := 9:
+polyAccurateDCoeffsMiddle := 19:
+
+polyAccurateDegreeMiddle := polyAccurateTDCoeffsMiddle + polyAccurateDDCoeffsMiddle + polyAccurateDCoeffsMiddle:
+
+polyQuickDDCoeffsMiddle := 7:
+polyQuickDCoeffsMiddle := 7:
+
+polyQuickDegreeMiddle := polyQuickDDCoeffsMiddle + polyQuickDCoeffsMiddle:
+
+
+polyAccurateTDCoeffsHighest := 9:
+polyAccurateDDCoeffsHighest := 9:
+polyAccurateDCoeffsHighest := 11:
+
+polyAccurateDegreeHighest := polyAccurateTDCoeffsHighest + polyAccurateDDCoeffsHighest + polyAccurateDCoeffsHighest:
+
+polyQuickDDCoeffsHighest := 9:
+polyQuickDCoeffsHighest := 9:
+
+polyQuickDegreeHighest := polyQuickDDCoeffsHighest + polyQuickDCoeffsHighest:
+
+extrabound := hexa2ieee(["3F500000","00000000"]):
+polyQuickDegreeExtra := 5:
+
+bound[0] := 0:
+b := nearest(lowestIntervalMax):
+he := ieeehexa(b):
+bound[1] := hexa2ieee([he[1],"00000000"]):
+b := nearest(highestIntervalMin):
+he := ieeehexa(b):
+bound[intervals - 1] := hexa2ieee([he[1],"00000000"]):
+bound[intervals] := 1:
+linearWidth := (highestIntervalMin - lowestIntervalMax) / (intervals - 2):
+scaleSum := 0:
+scale[2] := 1.5:
+scale[3] := 1.35:
+scale[4] := 1.18:
+scale[5] := 1.00:
+scale[6] := 0.915:
+scale[7] := 0.74:
+scale[8] := 0.595:
+scale[9] := 0.50:
+for i from 2 to (intervals-1) do
+	scaleSum := scaleSum + scale[i]:
+od:
+for i from 2 to (intervals-1) do
+	scale[i] := scale[i] / scaleSum;
+od:
+current := lowestIntervalMax:
+for i from 2 to (intervals-2) do
+	b := nearest(current + (highestIntervalMin - lowestIntervalMax) * scale[i]):
+	current := b:
+	he := ieeehexa(b):
+	bound[i] := hexa2ieee([he[1],"00000000"]):
+od:
+printf("Using %d intervals with bounds:\n",intervals):
+for i from 0 to intervals do
+	printf("bound[%d] = %1.30e\n",i,bound[i]):
+od:
+printf("Using an extra bound for truncating the quick poly to deg. %d in interval #0 for small args up to %f (2^(%f))\n",
+	polyQuickDegreeExtra,extrabound,log[2](abs(extrabound)));
+
+printf("Computing Gal's accurate table values for interval midpoints\n"):
+for i from 2 to (intervals-1) do
+	m := nearest((bound[i] + bound[i-1]) / 2):
+	mhe := ieeehexa(m):
+	printf("Interval %d: accurate table research start value %f (%s%s)\n",i,m,mhe[1],mhe[2]):
+	midpointFloat[i] := galDoubleToDoubleDouble(nearest(m),arcsin,2^(-121),2^(15)):
+od:
+
+
+printf("Using the following floating point midpoints for intervals 2-%d:\n",intervals-2):
+for i from 2 to (intervals-1) do
+	mhe := ieeehexa(midpointFloat[i]):
+	printf("midpointFloat[%d] = %f (%s%s)\n",i,midpointFloat[i],mhe[1],mhe[2]):
+od:
+
+printf("The reduced argument z is therefore bounded by:\n"):
+printf("Interval 1: |z| < 2^(%f)\n",
+	log[2](abs(bound[1]))):
+for i from 2 to (intervals-1) do
+	printf("Interval %d: |z| < 2^(%f)\n",i,
+	log[2](max(abs(midpointFloat[i] - bound[i-1]),abs(midpointFloat[i] - bound[i])))):
+od:
+printf("Interval %d: |z| < 2^(%f)\n",intervals,
+	log[2](abs(1 - bound[intervals-1]))):
+
+
+
+printf("Using a %d degree polynomial for lowest interval (1) (accurate phase)\n",
+	polyAccurateDegreeLowest):
+printf("with %d triple-double, %d double-double and %d double coefficients\n",
+	polyAccurateTDCoeffsLowest, polyAccurateDDCoeffsLowest, polyAccurateDCoeffsLowest):
+printf("Using a %d degree polynomial for lowest interval (1) (quick phase)\n",
+	polyQuickDegreeLowest):
+printf("with %d double-double and %d double coefficients\n",
+	polyQuickDDCoeffsLowest, polyQuickDCoeffsLowest):
+printf("Using a %d degree polynomial for middle intervals (2-%d) (accurate phase)\n",
+	polyAccurateDegreeMiddle,intervals-2):
+printf("with %d triple-double, %d double-double and %d double coefficients\n",
+	polyAccurateTDCoeffsMiddle, polyAccurateDDCoeffsMiddle, polyAccurateDCoeffsMiddle):
+printf("Using a %d degree polynomial for middle intervals (2-%d) (quick phase)\n",
+	polyQuickDegreeMiddle,intervals-2):
+printf("with %d double-double and %d double coefficients\n",
+	polyQuickDDCoeffsMiddle, polyQuickDCoeffsMiddle):
+printf("Using a %d degree polynomial for highest interval (%d) (accurate phase)\n",
+	polyAccurateDegreeHighest,intervals):
+printf("with %d triple-double, %d double-double and %d double coefficients\n",
+	polyAccurateTDCoeffsHighest, polyAccurateDDCoeffsHighest, polyAccurateDCoeffsHighest):
+printf("Using a %d degree polynomial for highest interval (%d) (quick phase)\n",
+	polyQuickDegreeHighest,intervals):
+printf("with %d double-double and %d double coefficients\n",
+	polyQuickDDCoeffsHighest, polyQuickDCoeffsHighest):
+
+if true then 
+
+printf("Computing polynomials for interval 1 ([%f;%f])\n",bound[0],bound[1]):
+
+f := unapply(convert(series((arcsin(sqrt(x))/sqrt(x) - 1)/x,x=0,300),polynom),x):
+
+p := unapply(eval(numapprox[chebyshev](f(x),x=(bound[0])^2..(bound[1])^2,2^(-127))),x):
+
+polyAccuExact[1] := truncPoly(subs(X=x^2,p(X))*x^3+x,polyAccurateDegreeLowest):
+
+polyAccurate[1] := poly_exact32(polyAccuExact[1],polyAccurateTDCoeffsLowest,polyAccurateDDCoeffsLowest):
+
+
+epsAccurate[1] := numapprox[infnorm]((polyAccurate[1]/arcsin(x))-1, x=bound[0]..bound[1]):
+epsAccurateSpecial := numapprox[infnorm]((polyAccurate[1]/arcsin(x))-1, x=bound[0]..evalf(sin(2^(-18)))):
+
+
+polyQuickExact[1] := truncPoly(polyAccuExact[1],polyQuickDegreeLowest):
+polyQuick[1] := poly_exact2(polyQuickExact[1],polyQuickDDCoeffsLowest):
+
+epsQuick[1] := numapprox[infnorm]((polyQuick[1]/arcsin(x))-1, x=bound[0]..bound[1]):
+
+polyQuickExtraExact := truncPoly(polyAccuExact[1],polyQuickDegreeExtra):
+polyQuickExtra := poly_exact2(polyQuickExtraExact,polyQuickDegreeExtra):
+epsQuickExtra := numapprox[infnorm]((polyQuickExtra/arcsin(x))-1, x=bound[0]..extrabound):
+
+end if:
+
+for i from 2 to (intervals-1) do
+
+printf("Computing polynomials for interval %d ([%f;%f])\n",i,bound[i-1],bound[i]):
+printf("Reduced argument z will be in interval [%1.8e;%1.8e] ([-2^%f,2^%f]),\n",
+	bound[i-1]-midpointFloat[i],bound[i]-midpointFloat[i],
+	log[2](abs(bound[i-1]-midpointFloat[i])),log[2](abs(bound[i]-midpointFloat[i]))):
+
+f := unapply(arcsin(x+midpointFloat[i]),x):
+
+fhelp := unapply(convert(series((f(x)-arcsin(midpointFloat[i]))/x,x=0,polyAccurateDegreeMiddle*3),polynom),x):
+
+polyAccuExact[i] := numapprox[minimax](fhelp(x),
+				x=bound[i-1]-midpointFloat[i]..bound[i]-midpointFloat[i],
+				[polyAccurateDegreeMiddle,0],1,'err')*x + nearestDD(evalf(arcsin(midpointFloat[i]))):
+
+polyAccurate[i] := poly_exact32(polyAccuExact[i],polyAccurateTDCoeffsMiddle,polyAccurateDDCoeffsMiddle):
+
+epsAccurate[i] := numapprox[infnorm]((polyAccurate[i]/f(x))-1, 
+					x=bound[i-1]-midpointFloat[i]..bound[i]-midpointFloat[i]):
+
+polyQuickExact[i] := truncPoly(polyAccuExact[i],polyQuickDegreeMiddle):
+polyQuick[i] := poly_exact2(polyQuickExact[i],polyQuickDDCoeffsMiddle):
+
+epsQuick[i] := numapprox[infnorm]((polyQuick[i]/f(x))-1, 
+			 	   x=bound[i-1]-midpointFloat[i]..bound[i]-midpointFloat[i]):
+
+
+od:
+
+
+if true then 
+
+printf("Computing polynomials for interval %d ([%f;%f])\n",intervals,bound[intervals-1],bound[intervals]):
+
+
+g := unapply(((arcsin(1 - x) - Pi/2)/sqrt(2*x)),x):
+f := unapply(convert(series(((g(x)+1)/x),x=0,polyAccurateDegreeHighest*4),polynom),x):
+
+
+polyAccuExact[intervals] := numapprox[minimax](f(x),x=(1-bound[intervals]+2^(-53))..(1-bound[intervals-1]),
+						[polyAccurateDegreeHighest-1,0],1,'err')*x-1:
+
+polyAccurate[intervals] := poly_exact32(polyAccuExact[intervals],polyAccurateTDCoeffsHighest,polyAccurateDDCoeffsHighest):
+
+
+epsAccurate[intervals] := numapprox[infnorm](((unapply(polyAccurate[intervals],x)(x)/g(x))-1), 
+					x=(1-bound[intervals]+2^(-53))..(1-bound[intervals-1])):
+
+
+polyQuickExact[intervals] := truncPoly(polyAccuExact[intervals],polyQuickDegreeHighest):
+polyQuick[intervals] := poly_exact2(polyQuickExact[intervals],polyQuickDDCoeffsHighest):
+
+epsQuick[intervals] := numapprox[infnorm](((unapply(polyQuick[intervals],x)(x)/g(x))-1), 
+					x=(1-bound[intervals]+2^(-53))..(1-bound[intervals-1])):
+
+printf("Checking if the polynomial for interval %d is exactly -1 in z = %f...\n",intervals,1-bound[intervals]);
+
+if (unapply(polyAccurate[intervals],x)(1-bound[intervals]) = -1) then
+	printf("  Check passed!\n"):
+else
+	printf("  Check failed!\n"):
+end if:
+
+end if:
+
+
+
+for i from 1 to intervals do 
+	printf("Relative error for accurate phase polynomial in interval %d ([%f;%f]) is 2^(%f)\n",
+       		i,bound[i-1],bound[i],log[2](abs(epsAccurate[i]))):
+	printf("Relative error for quick phase polynomial in interval %d ([%f;%f]) is 2^(%f)\n",
+       		i,bound[i-1],bound[i],log[2](abs(epsQuick[i]))):
+od:
+printf("Relative error for accurate phase polynomial #1 in special interval [0;sin(2^(-18))]) is 2^(%f)\n",
+       log[2](abs(epsAccurateSpecial))):
+
+printf("Relative error for quick phase extra case truncated polynomial #1 in special interval [0;%f]) is 2^(%f)\n",
+       extrabound,log[2](abs(epsQuickExtra))):
+
+
+(PiHalfH, PiHalfM, PiHalfL) := hi_mi_lo(evalf(Pi/2)):
+
+epsPiDD := evalf(((PiHalfH + PiHalfM) - Pi/2)/(Pi/2)):
+epsPiTD := evalf(((PiHalfH + PiHalfM + PiHalfL) - Pi/2) / (Pi/2)):
+
+printf("Relative error for storing Pi/2 as a double-double is 2^(%f)\n",evalf(log[2](abs(epsPiDD)))):
+printf("Relative error for storing Pi/2 as a triple-double is 2^(%f)\n",evalf(log[2](abs(epsPiTD)))):
+
+# Ce qui suit est pifometrique et doit etre prouve en Gappa ensuite
+
+arithmeticalErrorQuick[1] := 2^(-61):
+arithmeticalErrorQuick[2] := 2^(-61):
+arithmeticalErrorQuick[3] := 2^(-61):
+arithmeticalErrorQuick[4] := 2^(-61):
+arithmeticalErrorQuick[5] := 2^(-61):
+arithmeticalErrorQuick[6] := 2^(-61):
+arithmeticalErrorQuick[7] := 2^(-61):
+arithmeticalErrorQuick[8] := 2^(-61):
+arithmeticalErrorQuick[9] := 2^(-61):
+arithmeticalErrorQuick[10] := 2^(-68):
+
+arithmeticalErrorQuickExtra := 2^(-80):
+
+for i from 1 to intervals do
+	estimatedOverallEpsQuick[i] := abs(epsQuick[i]) + 
+				       abs(arithmeticalErrorQuick[i]) + 
+                                       abs(epsQuick[i]) * abs(arithmeticalErrorQuick[i]):
+	printf("Relative quick phase overall error bound to show in Gappa for interval %d ([%f;%f]) is 2^(%f)\n",
+		i,bound[i-1],bound[i],log[2](abs(estimatedOverallEpsQuick[i]))):
+od:
+
+estimatedOverallEpsQuickExtra := abs(epsQuickExtra) + 
+				 abs(arithmeticalErrorQuickExtra) + 
+                                 abs(epsQuickExtra) * abs(arithmeticalErrorQuickExtra):
+printf("Relative quick phase overall error bound to show for extra truncted poly in interval [0;%f]) is 2^(%f)\n",
+	extrabound,log[2](abs(estimatedOverallEpsQuickExtra))):
+
+
+printf("Write tables...\n"):
+
+filename:="TEMPASIN/asin-td.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/* File generated by maple/asin-td.mpl */\n\n"):
+
+printf("Write table with bounds\n"):
+
+fprintf(fd, "/* High order words of interval bounds (low order word is 0) */\n"):
+for i from 1 to (intervals-1) do 
+	heb := ieeehexa(bound[i]):
+	fprintf(fd, "\#define BOUND%d 0x%s\n",i,heb[1]):
+od:
+
+heb := ieeehexa(extrabound):
+fprintf(fd, "\#define EXTRABOUND 0x%s\n",heb[1]):
+
+printf("Write additional constants\n"):
+
+fprintf(fd, "\n\n/* Pi/2 as a triple-double*/\n"):
+fprintf(fd, "\#define PIHALFH %1.50e\n",PiHalfH):
+fprintf(fd, "\#define PIHALFM %1.50e\n",PiHalfM):
+fprintf(fd, "\#define PIHALFL %1.50e\n",PiHalfL):
+
+printf("Write table with midpoints and polynomial coefficients\n"):
+k := 0:
+for i from 0 to polyAccurateDegreeLowest do
+	(hi,mi,lo) := hi_mi_lo(coeff(polyAccurate[1],x,i)):
+	if ((abs(hi) = 1.0) and (mi = 0) and (lo = 0)) then 
+		printf(
+		"Coefficient %d of interval 1 polynomial is exactly %f and will not be stored in the table\n",i,hi): 
+	else 
+	g := 0;
+	if (hi <> 0) then
+		if (i <= polyQuickDegreeLowest) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dh, quickPolyLowC%dh */",hi,k,i,i):
+		else
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dh */",hi,k,i):
+		end if:
+		k := k + 1:
+	end if:
+	if (mi <> 0) then
+		if (i <= polyQuickDDCoeffsLowest) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dm, quickPolyLowC%dl */",mi,k,i,i):
+		else
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dm */",mi,k,i):
+		end if:
+		k := k + 1:
+	end if:
+	if (lo <> 0) then
+		tbl[k] := sprintf("%1.50e, \t/* %d, accPolyLowC%dl */",lo,k,i):
+		k := k + 1:
+	end if:
+	end if:
+od:
+tbl[k] := sprintf("%1.50e, \t/* %d, RN rounding constant quick poly low*/",
+		compute_rn_constant(estimatedOverallEpsQuick[1]),k):
+k := k + 1:
+tbl[k] := sprintf("%1.50e, \t/* %d, RD rounding constant quick poly low*/",
+		estimatedOverallEpsQuick[1],k):
+k := k + 1:
+printf("Table for interval 1 written\n"):
+for l from 2 to (intervals-1) do
+	tbl[k] := sprintf("%1.50e, \t/* %d, midpoint in interval %d*/",midpointFloat[l],k,l):
+	tblidx[l] := k;
+	k := k + 1;
+	for i from 0 to polyAccurateDegreeMiddle do
+		(hi,mi,lo) := hi_mi_lo(coeff(polyAccurate[l],x,i)):
+		if ((abs(hi) = 1.0) and (mi = 0) and (lo = 0)) then 
+			printf(
+		"Coefficient %d of interval %d polynomial is exactly %f and will not be stored in the table\n",i,l,hi): 
+		else 
+		g := 0;
+		if (hi <> 0) then
+			if (i <= polyQuickDegreeMiddle) then
+				tbl[k] := sprintf(
+					"%1.50e, \t/* %d, accPolyMid%dC%dh, quickPolyMid%dC%dh */",hi,k,l,i,l,i):
+			else
+				tbl[k] := sprintf("%1.50e, \t/* %d, accPolyMid%dC%dh */",hi,k,l,i):
+			end if:
+			k := k + 1:
+		end if:
+		if (mi <> 0) then
+			if (i <= polyQuickDDCoeffsMiddle) then
+				tbl[k] := sprintf(
+					"%1.50e, \t/* %d, accPolyMid%dC%dm, quickPolyMid%dC%dl */",mi,k,l,i,l,i):
+			else
+				tbl[k] := sprintf("%1.50e, \t/* %d, accPolyMid%dC%dm */",mi,k,l,i):
+			end if:
+			k := k + 1:
+		end if:
+		if (lo <> 0) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyMid%dC%dl */",lo,k,l,i):
+			k := k + 1:
+		end if:
+		end if:
+	od:
+	tbl[k] := sprintf("%1.50e, \t/* %d, RN rounding constant quick poly middle %d*/",
+			compute_rn_constant(estimatedOverallEpsQuick[l]),k,l):
+	k := k + 1:
+	tbl[k] := sprintf("%1.50e, \t/* %d, RD rounding constant quick poly middle %d*/",
+			estimatedOverallEpsQuick[l],k,l):
+	k := k + 1:
+	printf("Table for interval %d written\n",l):
+od:
+tblidx[intervals] := k:
+for i from 0 to polyAccurateDegreeHighest do
+	(hi,mi,lo) := hi_mi_lo(coeff(polyAccurate[intervals],x,i)):
+	if ((abs(hi) = 1.0) and (mi = 0) and (lo = 0)) then 
+		printf(
+	"Coefficient %d of interval %d polynomial is exactly %f and will not be stored in the table\n",i,intervals,hi): 
+	else 
+	g := 0;	
+	if (hi <> 0) then
+		if (i <= polyQuickDegreeHighest) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dh, quickPolyHighC%dh */",hi,k,i,i):
+		else
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dh */",hi,k,i):
+		end if:
+		k := k + 1:
+	end if:
+	if (mi <> 0) then
+		if (i <= polyQuickDDCoeffsHighest) then
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dm, quickPolyHighC%dl */",mi,k,i,i):
+		else
+			tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dm */",mi,k,i):
+		end if:
+		k := k + 1:
+	end if:
+	if (lo <> 0) then
+		tbl[k] := sprintf("%1.50e, \t/* %d, accPolyHighC%dl */",lo,k,i):
+		k := k + 1:
+	end if:
+	end if:
+od:
+tbl[k] := sprintf("%1.50e, \t/* %d, RN rounding constant quick poly high*/",
+		compute_rn_constant(estimatedOverallEpsQuick[intervals]),k):
+k := k + 1:
+tbl[k] := sprintf("%1.50e, \t/* %d, RD rounding constant quick poly high*/",
+ 		estimatedOverallEpsQuick[intervals],k):
+k := k + 1:
+printf("Table for interval %d written\n",intervals):
+tbllen := k:
+printf("The whole table has %d entries, so uses %d bytes of memory\n",tbllen,tbllen*8):
+fprintf(fd,"\n\n/* Indices to the following table */\n"):
+for i from 2 to intervals do
+	fprintf(fd,"\#define TBLIDX%d %d\n",i,tblidx[i]):
+od:
+fprintf(fd, "\n\n/* Table with midpoints and polynomial coefficients */\n"):
+fprintf(fd, "static const double tbl[%d] = {\n",tbllen):
+for i from 0 to (tbllen - 1) do
+	fprintf(fd, "%s\n",tbl[i]):
+od:
+fprintf(fd, "};\n\n"):
+
+fclose(fd):
+
+printf("----DONE---\n"):
+
+
diff --git a/src/crlibm/maple/atan-itanium.mpl b/src/crlibm/maple/atan-itanium.mpl
new file mode 100644
index 0000000..dd5140d
--- /dev/null
+++ b/src/crlibm/maple/atan-itanium.mpl
@@ -0,0 +1,134 @@
+#####################################################################
+# this file contains some useful procedures for the computation of atan in
+# DDE
+
+restart:
+Digits := 200:
+
+with (numapprox):with(orthopoly):
+read "double-extended.mpl";
+read "common-procedures.mpl";
+
+e := 2^(-6.3):
+marge := 2^(-30);
+P19 := convert(series(arctan(x),x=0,20),polynom):
+P18 := (P19-x)/x;
+Q18 := polyExact2Ext(P18, 9);
+Q9 := -1/3 +1/5*x - 1/7*x^2 + 1/9*x^3 - 1/11*x^4 + 1/13*x^5 - 1/15*x^6 + 1/17*x^7- 1/19*x^8;
+Qprime := poly_exact( -x /3 + x^2/5 - x^3/7 + x^4 /9);
+#log2 (infnorm( (arctan(x)-x*(1+Q18))/x, x=0..e));
+
+#function taken from the "old" coef_atan to compute interval parameters.
+maxx := bi -> simplify( solve( (x-bi) / (1+x*bi) = e ,x) ):
+minx := bi -> simplify(solve( (x-bi) /(1+x*bi)=-e ,x)):
+nextbi := proc (x) evalf( max(solve( minx(bi) = x ,bi) )*(1-marge)); end:
+allbi := proc (n)
+local xi,nbi,x,i,j;
+global b,a, nbofai, nbofbi, valuefordicho;
+    x := e;
+    nbi := 0;
+    i := 0;
+    while(i<n and nbi < 1/e and nbi >= 0) do
+        nbi := nearest ( nextbi(x) );
+        b[i] := evalf( nbi );
+        a[i] := x;
+        x   := evalf(maxx(nbi));
+        i:=i+1;
+    od;
+    j:=0;
+    while ( 2^j < i ) do j:=j+1 od:
+    nbofai := i;
+    nbofbi := i;
+    b[i-1] := nearest(1/e+4):
+    valuefordicho := 2^j;
+    return i,b[0],b[i-1];
+end:
+allbi(100);
+#-------------
+
+#-----------------------
+#quick error calc :
+#-----Reduction:-------
+XredEpsilon := 2^(-64) + 2^(-64) + 2^(-64) + 2^(-64):
+Xred2Epsilon := 2*XredEpsilon + 2^(-64);
+log[2.](Xred2Epsilon);
+errlist:=errlist_quickphase_horner(degree(Qprime),0,0,Xred2Epsilon, 2^(-64));
+errorr := compute_horner_rounding_error(Qprime,x,e,errlist,true);
+qEpsilon := errorr[1]:
+log[2.](qEpsilon);
+deltaApprox := e^11/11:
+polyDelta := e^3*qEpsilon + 2^(-64)*e+ 3*2^(-64)*e^3:
+EpsilonFinal := polyDelta/arctan(e)+2*2^(-64)+deltaApprox/e:
+log[2.](EpsilonFinal);
+#------no reduction-------
+Errlist:=errlist_quickphase_horner(degree(Qprime),0,0,0, 2**(-64)):
+qEpsilon:= compute_horner_rounding_error(Qprime,x,e,errlist,true)[1]:
+deltaApprox := e^11/5:
+EpsilonFinalNoRed := infnorm( (qEpsilon.x^3+2^(-64).x+2^(-64).x^3)/arctan(x),x=2^(-27)..2^(-6) ) + deltaApprox + 2^(-64):
+log[2.](EpsilonFinalNoRed);
+#-----------------------
+
+# Output :
+
+doth:=proc()
+ local filename, fd, i, hi, lo;
+   filename := "TEMPATAN/atan_ext.h":
+    fd := fopen (filename,WRITE,TEXT):
+    fprintf(fd,"/* file generated by atan_ext.mpl*/\n\n"):
+    fprintf(fd,"#include \"double_ext.h\"\n"):
+
+    fprintf(fd, "static const double  HALFPI = %1.50e;\n", nearest(Pi/2)):
+
+    fprintf(fd, "#define MIN_REDUCTION_NEEDED %s\n",  printDoubleAsHexInt(e)):
+    fprintf(fd,"#define A 0\n"):
+    fprintf(fd,"#define B 1\n"):
+    fprintf(fd,"#define ATAN_BHI 0\n"):
+    fprintf(fd,"#define ATAN_BLO 1\n"):
+
+    fprintf(fd,"#define epsilon %1.50e\n", EpsilonFinal):
+    fprintf(fd,"#define epsilon_no_red %1.50e\n",EpsilonFinalNoRed):
+    fprintf(fd,"#define TWO_M_64 %1.50e\n",2^(-64)):
+    fprintf(fd,"#define TWO_10 %1.50e\n",2^10):
+
+    if 1+1=3 then
+        fprintf(fd, "__declspec(align(16)) static const unsigned long long int a_table[%d] = {\n", nbofai );
+        for i from 0 to nbofai - 1 do
+            fprintf(fd, " /*a[%d] ~= %1.20e   */ ",i,a[i]):
+            fprintf(fd, "  %s,\n", printDoubleAsULL(a[i]));
+        od:
+        fprintf(fd,"\n};\n"):
+
+        fprintf(fd, "static const double b_table[%d] = {\n", nbofai );
+        for i from 0 to nbofai - 1 do
+            fprintf(fd, "   /*b[%d] = */   %1.50e,\n", i, b[i]):
+        od:
+        fprintf(fd,"\n};\n"):
+
+    else
+        fprintf(fd, "static const struct{long long int a; double b;} ab_table[%d] = {\n", nbofai);
+        for i from 0 to nbofai - 1 do
+            fprintf(fd, " { /*a[%d] ~= %1.20e   */ ",i,a[i]):
+            fprintf(fd, "  %s,\n", printDoubleAsULL(a[i]));
+            fprintf(fd, "   /*b[%d] = */   %1.50e},\n", i, b[i]):
+        od:
+        fprintf(fd,"\n};\n"):
+
+    fi:
+
+    fprintf(fd, "#define atanb_table ((const XC_FLOAT_TYPE *)_atanb_table)\n");
+    fprintf(fd, "__declspec(align(16)) static const unsigned short _atanb_table[] = {\n", nbofai );
+    for i from 0 to nbofai - 1 do
+        fprintf(fd, " /*atan_b[%d] ~= %1.10e*/\n ",i, arctan(b[i])):
+        hi:=nearestExt(arctan(b[i]));
+        lo:=arctan(b[i])-nearestExt(arctan(b[i]));
+        fprintf(fd, " %s, \n", printDoubleExtAsShort(hi));
+        fprintf(fd, "   %s, \n", printDoubleExtAsShort(lo));
+    od:
+    fprintf(fd,"};\n"):
+
+    printPolyExt(fd,Q9,4,"coef_poly"):
+    fclose(fd):
+end proc;
+
+doth();
+
diff --git a/src/crlibm/maple/atan-pentium.mpl b/src/crlibm/maple/atan-pentium.mpl
new file mode 100644
index 0000000..740881e
--- /dev/null
+++ b/src/crlibm/maple/atan-pentium.mpl
@@ -0,0 +1,113 @@
+#####################################################################
+# this file contains some useful procedures for the computation of atan in
+# DDE
+
+restart:
+Digits := 200:
+
+with (numapprox):with(orthopoly):
+read "double-extended.mpl";
+read "common-procedures.mpl";
+
+e := 2^(-6.3):
+marge := 2^(-30);
+P19 := convert(series(arctan(x),x=0,20),polynom):
+P18 := (P19-x)/x;
+Q18 := polyExact2Ext(P18, 9);
+Q9 := -1/3 +1/5*x - 1/7*x^2 + 1/9*x^3 - 1/11*x^4 + 1/13*x^5 - 1/15*x^6 + 1/17*x^7- 1/19*x^8;
+Qprime := poly_exact( -x /3 + x^2/5 - x^3/7 + x^4 /9);
+#log2 (infnorm( (arctan(x)-x*(1+Q18))/x, x=0..e));
+
+#function taken from the "old" coef_atan to compute interval parameters.
+maxx := bi -> simplify( solve( (x-bi) / (1+x*bi) = e ,x) ):
+minx := bi -> simplify(solve( (x-bi) /(1+x*bi)=-e ,x)):
+nextbi := proc (x) evalf( max(solve( minx(bi) = x ,bi) )*(1-marge)); end:
+allbi := proc (n)
+local xi,nbi,x,i,j;
+global b,a, nbofai, nbofbi, valuefordicho;
+    x := e;
+    nbi := 0;
+    i := 0;
+    while(i<n and nbi < 1/e and nbi >= 0) do
+        nbi := nearestExt ( nextbi(x) );
+        b[i] := evalf( nbi );
+        a[i] := x;
+        x   := evalf(maxx(nbi));
+        i:=i+1;
+    od;
+    j:=0;
+    while ( 2^j < i ) do j:=j+1 od:
+    nbofai := i;
+    nbofbi := i;
+    b[i-1] := nearestExt(1/e+4):
+    valuefordicho := 2^j;
+    return i,b[0],b[i-1];
+end:
+allbi(100);
+#-------------
+
+#-----------------------
+#quick error calc :
+#-----Reduction:-------
+XredEpsilon := 2^(-64) + 2^(-64) + 2^(-64) + 2^(-64):
+Xred2Epsilon := 2*XredEpsilon + 2^(-64);
+log[2.](Xred2Epsilon);
+errlist:=errlist_quickphase_horner(degree(Qprime),0,0,Xred2Epsilon, 2^(-64));
+errorr := compute_horner_rounding_error(Qprime,x,e,errlist,true);
+qEpsilon := errorr[1]:
+log[2.](qEpsilon);
+deltaApprox := e^11/11:
+polyDelta := e^3*qEpsilon + 2^(-64)*e+ 3*2^(-64)*e^3:
+EpsilonFinal := polyDelta/arctan(e)+2*2^(-64)+deltaApprox/e:
+log[2.](EpsilonFinal);
+#------no reduction-------
+Errlist:=errlist_quickphase_horner(degree(Qprime),0,0,0, 2**(-64)):
+qEpsilon:= compute_horner_rounding_error(Qprime,x,e,errlist,true)[1]:
+deltaApprox := e^11/5:
+EpsilonFinalNoRed := infnorm( (qEpsilon.x^3+2^(-64).x+2^(-64).x^3)/arctan(x),x=2^(-27)..2^(-6) ) + deltaApprox + 2^(-64):
+log[2.](EpsilonFinalNoRed);
+#-----------------------
+
+# Output :
+filename := "atan_ext_itanium.h":
+fd := fopen (filename,WRITE,TEXT):
+fprintf(fd,"/* file generated by atan_ext.mpl*/\n\n"):
+fprintf(fd,"#include \"double_ext.h\"\n"):
+
+fprintf(fd,"#ifdef WORDS_BIGENDIAN\n"):
+fprintf(fd, "static const db_number HALFPI = {{0x3FF921FB,0x54442D18}};"):
+fprintf(fd,"\n#else\n"):
+fprintf(fd, "static const db_number HALFPI = {{0x54442D18,0x3FF921FB}};"):
+fprintf(fd,"\n"):
+fprintf(fd,"#endif\n"):
+
+fprintf(fd, "#define MIN_REDUCTION_NEEDED %1.50f\n",e):
+fprintf(fd,"#define A 0\n"):
+fprintf(fd,"#define B 1\n"):
+fprintf(fd,"#define ATAN_BHI 2\n"):
+fprintf(fd,"#define ATAN_BLO 3\n"):
+
+fprintf(fd,"#define epsilon %1.50e\n", EpsilonFinal):
+fprintf(fd,"#define epsilon_no_red %1.50e\n",EpsilonFinalNoRed):
+fprintf(fd,"#define TWO_M_64 %1.50e\n",2^(-64)):
+fprintf(fd,"#define TWO_10 %1.50e\n",2^10):
+
+fprintf(fd, "static long double const arctan_table[%d][4] = \n{\n" , nbofai );
+
+
+for i from 0 to nbofai - 1 do
+    fprintf(fd, "{\n/*a[%d]     */ ",i):
+    fprintf(fd, "%1.50eL",a[i]);
+    fprintf(fd," ,\n/*b[%d] :   */ ",i):
+    fprintf(fd, "%1.50eL",b[i]);
+    fprintf(fd," ,\n/*atan_b[%d]*/ ",i):
+    fprintf(fd, "%1.50eL",nearestExt(arctan(b[i])));
+    fprintf(fd,",");
+    fprintf(fd, "%1.50eL",arctan(b[i])-nearestExt(arctan(b[i])));
+    fprintf(fd," ,\n}\n,");
+od:
+fprintf(fd,"\n};\n"):
+
+fprintf(fd, "/*File generated by atan_exp.mpl*/\n"):
+printPolyExt(fd,Q9,4,"coef_poly"):
+fclose(fd):
diff --git a/src/crlibm/maple/atan.mpl b/src/crlibm/maple/atan.mpl
new file mode 100644
index 0000000..fadf160
--- /dev/null
+++ b/src/crlibm/maple/atan.mpl
@@ -0,0 +1,374 @@
+restart:
+Digits := 100:
+with (numapprox):with(orthopoly):
+read "common-procedures.mpl";
+mkdir("TEMPATAN");
+
+#First, quick phase
+#Approach for the first function:
+#atan(x) = atan(b(i)) + atan ( (x-bi) / (1+x*b(i) ) )
+#We try to have 64 correct bits
+
+
+
+#Constants
+
+
+#if (x >= xmax) : return arctan(x)/2)=neareast(Pi/2)
+
+log[2](evalf(min(solve(arctan(x)=nearest(Pi/2),x)))):
+xmax:=2^54:
+
+
+#halfPi=Pi/2 (remark that maxvalue < Pi/2 so that atan(x) < Pi/2
+
+halfPi:=nearest(Pi/2):
+halfPi_to_plus_infinity:=nearest(nearest(Pi/2)*(1+2^(-53))):
+
+
+# invPi, for the atanpi function
+
+invpih,invpil := hi_lo(1/Pi);       
+
+
+
+# if (xmin<xmin) : return arctan(x)=x
+
+xmin=2^(-27);
+
+ieeehexa(halfPi); ieeehexa( halfPi_to_plus_infinity ); ieeehexa(2^(-27));ieeehexa(2^(54));ieeehexa(2^(-10));
+
+
+#Interval parameters
+#Some constants :
+e:=2^(-6.3):
+marge := 2^(-30):
+
+#The intervals are (a[i],a[i+1]). the "middle" is b(i) :
+maxx := bi -> simplify( solve( (x-bi) / (1+x*bi) = e ,x) ):
+minx := bi -> simplify(solve( (x-bi) /(1+x*bi)=-e ,x)):
+
+nextbi := proc (x) evalf( max(solve( minx(bi) = x ,bi) )*(1-marge)); end:
+
+allbi := proc (n)
+  local xi,nbi,x,i,j;
+  global b,a, nb_of_ai, nb_of_bi, value_for_dicho;
+  x := e;
+  nbi := 0;
+  i := 0;
+  while(i<n and nbi < 1/e and nbi >= 0) do
+     nbi := nearest ( nextbi(x) );
+     b[i] := evalf( nbi );
+     a[i] := x;
+     x   := evalf(maxx(nbi));
+     i:=i+1;
+  od;
+  j:=0;
+  while ( 2^j < i ) do j:=j+1 od:
+  nb_of_ai := i;
+  nb_of_bi := i;
+  b[i-1] := nearest(1/e+4):
+  value_for_dicho := 2^j;
+  return i,b[0],b[i-1];
+end:
+
+allbi(100);
+
+
+
+
+#The polynome and its size ( 4 because 4 terms : x^2/3, ...)
+
+Q9:= poly_exact(x-1/3*x^3+1/5*x^5 -1/7*x^7+1/9*x^9):
+deg_poly := 4:
+coef_poly[0]:=nearest (-1/3):
+coef_poly[1]:=nearest (1/5):
+coef_poly[2]:=nearest (-1/7):
+coef_poly[3]:=nearest (1/9):
+
+Q := x^2 * coef_poly[0] + x^4*coef_poly[1] + x^6*coef_poly[2] + x^8 * coef_poly[3]:
+
+Qprime := poly_exact( x * coef_poly[0] + x^2*coef_poly[1] + x^3*coef_poly[2] + x^4 * coef_poly[3]):
+
+log[2] (infnorm( (arctan(x)-x*(1+Q) )/x,x=2^(-53)..e));
+# we can note that arctan(x) = sum((-1)^i*x^(2*i+1)/(2*i+1), i = (0 .. infinity))
+# so ( arctan(x) - Q9(x) ) / x = sum((-1)^i*x^(2*i)/(2*i+1), i = (5 .. infinity))
+# so abs ( (arctan(x) -Q9(x) )/x )  <= x^10 * sum((-1)^(i+1)*x^(2*i)/(2*i+1+10), i = (0 .. infinity))
+#                                   <= x^10 * 1/11
+#                                   <= 2^(-66) if x<2^(-6.3)
+
+
+
+
+
+
+
+
+
+#Conputation of the RN constant
+
+
+#Epsilon = relative error
+#Delta = absolute error
+#1st : Error about reduction:
+
+EpsilonXminusBi := 2^(-105):
+
+# 1 + x*b[i] :
+Epsilon1A22xbi :=  2^(-104):
+
+
+# Xred = (x-b[i]) / ( 1 + x*b[i] )
+
+EpsilonXred := EpsilonXminusBi+Epsilon1A22xbi + 2^(-105):
+
+DeltaXred := EpsilonXred * e:
+
+log2(EpsilonXred);
+
+#Polynomial evaluation :
+#atan ~= x - x^3/3 + x^5/5 - x^7/7 + x^9/9
+#        ~= x * ( 1 + Q(x^2) )
+#    = (xhi+xlo) * ( 1 + Q)
+#        ~= xhi + (xhi*Q + xlo)
+
+#  Warning : the approx about x !!
+
+#calc of Q:
+
+EpsilonXred2 := (1+2^(-53) + 2^(-105) )^2 * (1+2^(-53)) -1 :
+
+log2(EpsilonXred2);
+
+errlist:=errlist_quickphase_horner( degree( x^4 ),0,0,EpsilonXred2, 2**(-53)):
+
+rounding_error1:= compute_horner_rounding_error(Qprime,x,e,errlist,true):
+
+EpsilonQ := rounding_error1[1]:
+log2(EpsilonQ);
+
+# Since q will be multiplied in x(1+q), its absolute error term is :
+
+Qmax:=infnorm(Qprime,x=-e^2..e^2):
+
+DeltaQ := e*Qmax*EpsilonQ;
+log2(DeltaQ);
+
+# calc of xi*Q + xlo + atan(b[i])lo
+
+#First the truncation of xredlo*q : at most half an ulp of xredhi*q
+DeltaTruncXredloQ :=  2^(-53) * e * Qmax:
+log2(DeltaTruncXredloQ);
+#then the sum of atanbilo and xredlo : the largest term is atanbilo
+DeltaAdd1  := 0.5*ulp(2^(-53)*(Pi/2 + e)):
+log2(DeltaAdd1);
+
+#then compute xredhi*q
+DeltaXredhiQ := 0.5*ulp(e*Qmax):
+log2(DeltaXredhiQ);
+
+# and the second addition
+DeltaAdd2 :=  0.5*ulp(e*Qmax +  2^(-53)*(Pi/2 + e) ):
+log2(DeltaAdd2);
+
+DeltaAtanlolo := DeltaTruncXredloQ + DeltaAdd1 + DeltaXredhiQ + DeltaAdd2:
+log2(DeltaAtanlolo);
+
+# In the second reconstruction there is one more FP add which is
+# aligned to the previous:
+DeltaReconst := DeltaAtanlolo + DeltaAdd2 :
+log2(DeltaReconst);
+
+
+
+# error due to the approx of atan by P : < e^11/11
+Deltaapprox := infnorm( (arctan(x)-x*(1+Q)), x=0..e):
+
+log[2](Deltaapprox);
+
+
+
+
+
+DeltaTotal := Deltaapprox + DeltaQ + DeltaReconst :
+log2(DeltaTotal);
+EpsilonTotal := evalf( DeltaTotal / arctan(xx) ):
+
+EpsilonFinal := infnorm( EpsilonTotal,xx=2^(-6.3)..1,'xmaxmax'):
+EpsilonFinal_i_10 := infnorm( EpsilonTotal,xx=a[10]..2^60,'xmaxmax'):
+log2( EpsilonFinal );
+log2( EpsilonFinal_i_10 );
+
+
+# Computation of e and e_i_30 (which is e when i>30 (ie x>1)
+E := evalf(compute_rn_constant(EpsilonFinal));
+E_i_10 := evalf(compute_rn_constant(EpsilonFinal_i_10));
+
+
+#An other Constant : when there is no reduction.
+#We compute the polynom and then atan(x) = x + x.Q
+
+Epsilonx2 := 2^(-53):
+errlist:=errlist_quickphase_horner( degree( Qprime ),0,0,Epsilonx2, 2**(-53)):
+rounding_error:= compute_horner_rounding_error(Qprime,x,e,errlist,true):
+
+epsilon_Q := rounding_error[1]:
+log[2](epsilon_Q);
+
+epsilon_x_Q := 2^(-52):
+
+delta_final := 2^(-105)*x + epsilon_Q*x^3 + epsilon_x_Q*x^3 - arctan(x) + x*(1+Q):
+epsilon_final := infnorm(delta_final/x,x=2^(-10)..e):
+epsilon_final_m10 := infnorm(delta_final/x,x=2^(-24)..2^(-10)):
+
+log[2](epsilon_final);
+E_no_reduction := evalf(compute_rn_constant(epsilon_final));
+E_no_reduction_m10 := evalf(compute_rn_constant(epsilon_final_m10));
+
+
+
+# Output
+
+
+#test
+filename:="TEMPATAN/atan_fast.h":
+
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, "\n/*File generated by maple/atan.mpl */\n"):
+
+fprintf(fd, "#ifndef _ATAN_FAST_H\n#define _ATAN_FAST_H\n\n");
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd,"#ifdef WORDS_BIGENDIAN\n"):
+fprintf(fd, "static const db_number HALFPI = {{0x3FF921FB,0x54442D18}};"):
+fprintf(fd, "static const db_number HALFPI_TO_PLUS_INFINITY = {{0x3FF921FB,0x54442D19}};"):
+fprintf(fd,"\n#else\n"):
+fprintf(fd, "static const db_number HALFPI = {{0x54442D18,0x3FF921FB}};"):
+fprintf(fd, "static const db_number HALFPI_TO_PLUS_INFINITY = {{0x54442D19,0x3FF921FB}};"):
+fprintf(fd,"\n"):
+fprintf(fd,"#endif\n"):
+
+fprintf(fd, "#define MIN_REDUCTION_NEEDED %1.50f\n",e):
+
+fprintf(fd, "#define INVPIH %1.50f\n", invpih):
+fprintf(fd, "#define INVPIL %1.50f\n", invpil):
+
+fprintf(fd,"#define nb_of_ai %d\n",nb_of_ai):
+fprintf(fd,"#define nb_of_bi %d\n",nb_of_bi):
+
+# we multiply by 2^(-20) in order to prevent from rounding
+fprintf(fd, "static const double rncst[4] ={\n"):
+fprintf(fd, "%1.50f , /* i<10 */ \n",E*(1+2^(-20))) :
+fprintf(fd, "%1.50f , /* i>10 */ \n",E_i_10*(1+2^(-20))) :
+fprintf(fd, "%1.50f , /* e > 2^-10 */ \n",E_no_reduction*(1+2^(-20))) :
+fprintf(fd, "%1.50f , /* e < 2^-10 */ \n };\n",E_no_reduction_m10*(1+2^(-20))) :
+
+fprintf(fd, "static const double epsilon[4] ={\n"):
+fprintf(fd, "%1.50e ,\n",EpsilonFinal *(1+2^(-20))) :
+fprintf(fd, "%1.50e ,\n",EpsilonFinal_i_10*(1+2^(-20))) :
+fprintf(fd, "%1.50e ,\n",epsilon_final*(1+2^(-20))) :
+fprintf(fd, "%1.50e ,\n };\n",epsilon_final_m10*(1+2^(-20))) :
+
+fprintf(fd, "#define DEGREE %d\n", deg_poly):
+fprintf(fd, "static double const coef_poly[%d] = \n{\n",deg_poly):
+
+for i from deg_poly-1 to 0 by -1 do
+    fprintf(fd, "/* coef for degree %d */ %1.50f, \n" , 2*i+3, coef_poly[i]):
+od:
+fprintf(fd," }; \n");
+
+fprintf(fd,"#define A 0\n"):
+fprintf(fd,"#define B 1\n"):
+fprintf(fd,"#define ATAN_BHI 2\n"):
+fprintf(fd,"#define ATAN_BLO 3\n"):
+
+fprintf(fd,"\n#ifdef WORDS_BIGENDIAN\n "):
+
+for isbig from 1 to 0 by -1 do
+
+    if(isbig=0) then
+        fprintf(fd,"#else\n");
+    fi:
+
+    if(not (nb_of_ai = nb_of_bi)) then
+        printf("Warning : nb_of_ai != nb_of_bi, this should not work");
+    fi:
+
+    fprintf(fd,"\n/* limits of the intervals [a[i],b[i]] */\n");
+    fprintf(fd, "static db_number const arctan_table[%d][4] = \n{\n" , nb_of_ai );
+
+   for i from 0 to nb_of_ai - 1 do
+        fprintf(fd, "{\n/*a[%d]     */ ",i);
+        printendian(fd,a[i],isbig);
+        fprintf(fd," ,\n/*b[%d] :   */ ",i):
+        printendian(fd,b[i],isbig):
+        fprintf(fd," ,\n/*atan_b[%d]*/ ",i):
+        printendian(fd, arctan(b[i]) ,isbig):
+        fprintf(fd,",");
+        printendian(fd, arctan(b[i])-nearest(arctan(b[i])) ,isbig);
+        fprintf(fd," ,\n}\n,");
+    od;
+    fprintf(fd,"\n};\n");
+od:
+
+fprintf(fd,"\n#endif\n\n"):
+
+fprintf(fd, "#endif /* def _ATAN_FAST_H */\n");
+
+fclose(fd);
+
+
+
+# Scs phase
+
+#Now we want a precision of 130 bits in order to have correct rounding in all cases.
+evalf(log[2](e^21/21));
+#Test about Rounding :
+#error on the polynom :
+P_scs := convert(series(arctan(x),x=0,21),polynom);
+evalf(log[2](e^21/21));
+#Intervals parameters
+#We choose the same e and the same intervals as in the quick phase.
+
+#We have the same b[i]s and a[i]s but we save atan[b[i]] on 4 doubles
+
+# Output
+filename:="TEMPATAN/atan_accurate.h":
+fd1:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd1, "#include \"crlibm.h\"\n#include \"crlibm_private.h\" \n#include \"atan_fast.h\"\n"):
+fprintf(fd1, "\n/*File generated by maple/atan.mpl */\n"):
+
+Write_SCS_poly(fd1, "constant_poly", P_scs);
+
+fprintf(fd1,"#define constant_poly_ptr (scs_ptr)&constant_poly\n");
+
+# The 1/Pi SCS constant
+  fprintf(fd, "static const scs InvPiSCS=\n"):
+  WriteSCS(fd, evalf(1/Pi)):
+  fprintf(fd, ";\n#define InvPiSCS_ptr  (scs_ptr)(& InvPiSCS)\n\n"):
+
+
+fprintf(fd1,"#ifdef WORDS_BIGENDIAN\n\n"):
+for isbig from 1 to 0 by -1 do
+   if isbig = 0 then
+      fprintf(fd1, "\n#else\n"):
+   fi:
+
+   fprintf(fd1,"static const db_number atan_blolo[%d] = {\n",nb_of_ai);
+   for i from 0 to nb_of_ai-1 do
+      fprintf(fd1,"/* %d */  ",i):
+      temp0 := nearest(arctan(b[i]));
+      temp := nearest( arctan(b[i]) - nearest(arctan(b[i])));
+      temp1 := nearest( arctan(b[i]) - temp -temp0);
+      printendian(fd1,temp1,isbig):
+      fprintf(fd1,", \n");
+   od:
+
+   fprintf(fd1,"};\n"):
+
+od:
+fprintf(fd1,"\n#endif  /* WORDS_BIGENDIAN */ \n");
+
+fclose(fd1);
diff --git a/src/crlibm/maple/check-hints-log-td.sh b/src/crlibm/maple/check-hints-log-td.sh
new file mode 100755
index 0000000..79330c1
--- /dev/null
+++ b/src/crlibm/maple/check-hints-log-td.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# This will only function if you have a modified version of the gappa tool
+#
+# You probably need to edit the path to the gappa executable
+GAPPA=~/ble/gappa-0.4.5/src/gappa
+
+
+cat log-td.gappa | grep "#MAPLE" | sed -e s/=/:=/ -e "s/;/:/" > log-td.gappa.autocheck.mpl
+echo "printf(\"You should see only zeros in what follows:\\n\");" >> log-td.gappa.autocheck.mpl
+sed -f ./TEMPLOG/log-td_1.sed log-td.gappa | $GAPPA 2>&1 | grep simplify >> log-td.gappa.autocheck.mpl
+echo "printf(\"If you have seen only zeros up to now, everything's fine \\n\");" >> log-td.gappa.autocheck.mpl
+
+cat log-td-E0.gappa | grep "#MAPLE" | sed -e s/=/:=/ -e "s/;/:/" > log-td-E0.gappa.autocheck.mpl
+echo "printf(\"You should see only zeros in what follows:\\n\");" >> log-td-E0.gappa.autocheck.mpl
+sed -f ./TEMPLOG/log-td_1.sed log-td-E0.gappa | $GAPPA 2>&1 | grep simplify >> log-td-E0.gappa.autocheck.mpl
+echo "printf(\"If you have seen only zeros up to now, everything's fine \\n\");" >> log-td-E0.gappa.autocheck.mpl
+
+cat log-td-E0-logir0.gappa | grep "#MAPLE" | sed -e s/=/:=/ -e "s/;/:/" > log-td-E0-logir0.gappa.autocheck.mpl
+echo "printf(\"You should see only zeros in what follows:\\n\");" >> log-td-E0-logir0.gappa.autocheck.mpl
+sed -f ./TEMPLOG/log-td_1.sed log-td-E0-logir0.gappa | $GAPPA 2>&1 | grep simplify >> log-td-E0-logir0.gappa.autocheck.mpl
+echo "printf(\"If you have seen only zeros up to now, everything's fine \\n\");" >> log-td-E0-logir0.gappa.autocheck.mpl
+
+cat log-td-accurate.gappa | grep "#MAPLE" | sed -e s/=/:=/ -e "s/;/:/" > log-td-accurate.gappa.autocheck.mpl
+echo "printf(\"You should see only zeros in what follows:\\n\");" >> log-td-accurate.gappa.autocheck.mpl
+sed -f ./TEMPLOG/log-td-accurate_1.sed log-td-accurate.gappa | $GAPPA 2>&1 | grep simplify >> log-td-accurate.gappa.autocheck.mpl
+echo "printf(\"If you have seen only zeros up to now, everything's fine \\n\");" >> log-td-accurate.gappa.autocheck.mpl
+
+cat log-td-accurate-E0.gappa | grep "#MAPLE" | sed -e s/=/:=/ -e "s/;/:/" > log-td-accurate-E0.gappa.autocheck.mpl
+echo "printf(\"You should see only zeros in what follows:\\n\");" >> log-td-accurate-E0.gappa.autocheck.mpl
+sed -f ./TEMPLOG/log-td-accurate_1.sed log-td-accurate-E0.gappa | $GAPPA 2>&1 | grep simplify >> log-td-accurate-E0.gappa.autocheck.mpl
+echo "printf(\"If you have seen only zeros up to now, everything's fine \\n\");" >> log-td-accurate-E0.gappa.autocheck.mpl
+
+cat log-td-accurate-E0-logir0.gappa | grep "#MAPLE" | sed -e s/=/:=/ -e "s/;/:/" > log-td-accurate-E0-logir0.gappa.autocheck.mpl
+echo "printf(\"You should see only zeros in what follows:\\n\");" >> log-td-accurate-E0-logir0.gappa.autocheck.mpl
+sed -f ./TEMPLOG/log-td-accurate_1.sed log-td-accurate-E0-logir0.gappa | $GAPPA 2>&1 | grep simplify >> log-td-accurate-E0-logir0.gappa.autocheck.mpl
+echo "printf(\"If you have seen only zeros up to now, everything's fine \\n\");" >> log-td-accurate-E0-logir0.gappa.autocheck.mpl
+
+
+
+echo "read \"log-td.gappa.autocheck.mpl\";" | maple
+echo "read \"log-td-E0.gappa.autocheck.mpl\";" | maple
+echo "read \"log-td-E0-logir0.gappa.autocheck.mpl\";" | maple
+echo "read \"log-td-accurate.gappa.autocheck.mpl\";" | maple
+echo "read \"log-td-accurate-E0.gappa.autocheck.mpl\";" | maple
+echo "read \"log-td-accurate-E0-logir0.gappa.autocheck.mpl\";" | maple
+
diff --git a/src/crlibm/maple/common-procedures.mpl b/src/crlibm/maple/common-procedures.mpl
new file mode 100644
index 0000000..2dbacda
--- /dev/null
+++ b/src/crlibm/maple/common-procedures.mpl
@@ -0,0 +1,1039 @@
+
+#####################################################################
+# Useful procedures for IEEE doubles
+
+
+#---------------------------------------------------------------------
+
+log2:=proc(x) evalf( log[2](x)) end proc:
+
+
+#---------------------------------------------------------------------
+# ieeedouble converts a number to IEEE double format.
+# returns sign (-1 or 1), exponent between -1022 and 1023, mantissa as a fraction between 0.5 and 1.
+ieeedouble:=proc(xx)
+local x, sgn, logabsx, exponent, mantissa, infmantissa,powermin,powermax,expmin,expmax,expmiddle,powermiddle;
+Digits := 100;
+x := evalf(xx);
+if (x=0) then sgn, exponent, mantissa := 1, -1022, 0
+else
+  if (x < 0) then sgn := -1
+  else sgn := 1
+  fi:
+  x := abs(x);
+  if x >=  2^(1023)*(2-2^(-53)) then mantissa := infinity; exponent := 1023
+  else if x <= 2^(-1075) then mantissa := 0; exponent := -1022
+      else
+         if x <= 2^(-1022) then exponent := -1022
+         else
+# x is between 2^(-1022) and 2^(1024)
+         powermin := 2^(-1022); expmin := -1022;
+         powermax := 2^1024; expmax := 1024;
+         while (expmax-expmin > 1) do
+            expmiddle := round((expmax+expmin)/2);
+            powermiddle := 2^expmiddle;
+            if x >= powermiddle then
+                powermin := powermiddle;
+                expmin := expmiddle
+            else
+                powermax := powermiddle;
+                expmax := expmiddle
+            fi
+          od;
+# now, expmax - expmin = 1 and powermin <= x < powermax,
+# powermin = 2^expmin and powermax = 2^expmax, so expmin is the exponent of x
+         exponent := expmin;
+         fi;
+         infmantissa := x*2^(52-exponent);
+	 if frac(infmantissa) <> 0.5 then mantissa := round(infmantissa)
+            else
+              mantissa := floor(infmantissa);
+               if type(mantissa,odd) then mantissa := mantissa+1 fi
+            fi;
+         mantissa := mantissa*2^(-52);
+      fi;
+  fi;
+fi;
+sgn,exponent,mantissa;
+end:
+
+#---------------------------------------------------------------------
+# ieeedoubleRU converts a number to IEEE double format rounding upwards.
+# returns sign (-1 or 1), exponent between -1022 and 1023, mantissa as a fraction between 0.5 and 1.
+ieeedoubleRU:=proc(xx)
+local x, sgn, logabsx, exponent, mantissa, infmantissa,powermin,powermax,expmin,expmax,expmiddle,powermiddle;
+Digits := 100;
+x := evalf(xx);
+if (x=0) then sgn, exponent, mantissa := 1, -1022, 0
+else
+  if (x < 0) then sgn := -1
+  else sgn := 1
+  fi:
+  x := abs(x);
+  if x >=  2^(1023)*(2-2^(-53)) then mantissa := infinity; exponent := 1023
+  else if x <= 2^(-1075) then mantissa := 0; exponent := -1022
+      else
+         if x <= 2^(-1022) then exponent := -1022
+         else
+# x is between 2^(-1022) and 2^(1024)
+         powermin := 2^(-1022); expmin := -1022;
+         powermax := 2^1024; expmax := 1024;
+         while (expmax-expmin > 1) do
+            expmiddle := round((expmax+expmin)/2);
+            powermiddle := 2^expmiddle;
+            if x >= powermiddle then
+                powermin := powermiddle;
+                expmin := expmiddle
+            else
+                powermax := powermiddle;
+                expmax := expmiddle
+            fi
+          od;
+# now, expmax - expmin = 1 and powermin <= x < powermax,
+# powermin = 2^expmin and powermax = 2^expmax, so expmin is the exponent of x
+         exponent := expmin;
+         fi;
+         infmantissa := x*2^(52-exponent);
+	 if frac(infmantissa) <> 0 then
+         if (sgn > 0) then
+             mantissa := ceil(infmantissa);
+         else
+             mantissa := floor(infmantissa);
+         fi;
+            else
+              mantissa := infmantissa;
+            fi;
+         mantissa := mantissa*2^(-52);
+      fi;
+  fi;
+fi;
+sgn,exponent,mantissa;
+end:
+
+#---------------------------------------------------------------------
+# ieeedoubleRD converts a number to IEEE double format rounding downwards.
+# returns sign (-1 or 1), exponent between -1022 and 1023, mantissa as a fraction between 0.5 and 1.
+ieeedoubleRD:=proc(xx)
+local x, sgn, logabsx, exponent, mantissa, infmantissa,powermin,powermax,expmin,expmax,expmiddle,powermiddle;
+Digits := 100;
+x := evalf(xx);
+if (x=0) then sgn, exponent, mantissa := 1, -1022, 0
+else
+  if (x < 0) then sgn := -1
+  else sgn := 1
+  fi:
+  x := abs(x);
+  if x >=  2^(1023)*(2-2^(-53)) then mantissa := infinity; exponent := 1023
+  else if x <= 2^(-1075) then mantissa := 0; exponent := -1022
+      else
+         if x <= 2^(-1022) then exponent := -1022
+         else
+# x is between 2^(-1022) and 2^(1024)
+         powermin := 2^(-1022); expmin := -1022;
+         powermax := 2^1024; expmax := 1024;
+         while (expmax-expmin > 1) do
+            expmiddle := round((expmax+expmin)/2);
+            powermiddle := 2^expmiddle;
+            if x >= powermiddle then
+                powermin := powermiddle;
+                expmin := expmiddle
+            else
+                powermax := powermiddle;
+                expmax := expmiddle
+            fi
+          od;
+# now, expmax - expmin = 1 and powermin <= x < powermax,
+# powermin = 2^expmin and powermax = 2^expmax, so expmin is the exponent of x
+         exponent := expmin;
+         fi;
+         infmantissa := x*2^(52-exponent);
+	 if frac(infmantissa) <> 0 then
+         if (sgn < 0) then
+             mantissa := ceil(infmantissa);
+         else
+             mantissa := floor(infmantissa);
+         fi;
+            else
+              mantissa := infmantissa;
+            fi;
+         mantissa := mantissa*2^(-52);
+      fi;
+  fi;
+fi;
+sgn,exponent,mantissa;
+end:
+
+
+
+
+#---------------------------------------------------------------------
+# pulp returns the precision of the ulp of x
+
+pulp:=proc(x)
+local flt, ulpy:
+flt:=ieeedouble(x):
+ulpy:=-52+flt[2]:
+end proc:
+
+
+
+#---------------------------------------------------------------------
+# ulp returns the absolute value of the ulp of x
+ulp:=proc(x)
+2**(pulp(x)):
+end proc:
+
+
+
+
+#---------------------------------------------------------------------
+# Returns nearest IEEE double:
+nearest := proc(x)
+  local sgn, exponent, mantissa:
+
+  sgn,exponent,mantissa := ieeedouble(x):
+  sgn*mantissa*2^(exponent):
+
+end:
+
+#---------------------------------------------------------------------
+# Returns RU IEEE double:
+roundUp := proc(x)
+  local sgn, exponent, mantissa:
+
+  sgn,exponent,mantissa := ieeedoubleRU(x):
+  sgn*mantissa*2^(exponent):
+
+end:
+
+#---------------------------------------------------------------------
+# Returns RD IEEE double:
+roundDown := proc(x)
+  local sgn, exponent, mantissa:
+
+  sgn,exponent,mantissa := ieeedoubleRD(x):
+  sgn*mantissa*2^(exponent):
+
+end:
+
+#---------------------------------------------------------------------
+# Returns RZ IEEE double:
+roundToZero := proc(x)
+    if evalf(x) > 0 then roundDown(x) else roundUp(x) fi:
+end:
+
+
+
+
+#---------------------------------------------------------------------
+# ieehexa returns a string containing the hexadecimal representation of the double nearest to input x.
+
+ieeehexa:= proc(x)
+local  hex2, xx, longint, expo, sgn, frac, resultat:
+    if(x=0) then resultat:=["00000000","00000000"]:
+    elif(x=-0) then resultat:=["80000000","00000000"]:   # nice try
+    else
+        xx:=ieeedouble(x):
+        sgn:=xx[1]:
+        expo:=xx[2]:
+        frac:=xx[3]:
+        if (expo = -1023) then
+            longint := (frac)*2^51 :   # subnormal
+        else
+            longint := (frac-1)*2^52 +   (expo+1023)*2^52:
+        fi:
+        if (sgn=-1) then
+            longint := longint + 2^63:
+        fi:
+        longint := longint + 2^64:  # to get all the hexadecimal digits when we'll convert to string
+        hex2:=convert(longint, hex):
+        hex2:=convert(hex2, string):
+
+        resultat:=[substring(hex2,2..9), substring(hex2,10..18)]:
+    fi:
+    resultat:
+end proc:
+
+ieeehexaString := proc(x)
+	local hex, result:
+	hex := ieeehexa(x):
+	result := cat(hex[1],hex[2]):
+	return result:
+end proc:
+
+
+
+#---------------------------------------------------------------------
+# reciprocal of the previous
+hexa2ieee:= proc(hexa)
+local dec, bin, expo, mantis, sgn, hex1, hex2, hexcat, res:
+
+    hex1:= op(1, hexa):
+    hex2:= op(2, hexa):
+    hexcat:= cat(hex1, hex2):
+    dec:= convert(hexcat, decimal, hex):
+
+    if(dec >= 2^63) then
+        dec := dec - 2^63:
+        sgn:= -1:
+    else
+        sgn:= 1:
+    fi:
+    expo:= trunc(dec/(2^52)) - 1023:
+    if(expo=-1023) then
+        mantis:= frac(dec/(2^51)): # denormal
+    else
+        mantis:= 1+frac(dec/(2^52)):
+    fi:
+    res:= evalf(sgn*2^(expo)*mantis):
+    res:
+end proc:
+
+#---------------------------------------------------------------------
+
+
+
+# Print a number x in Low or Big Endian representation in opened file "fd":
+printendian:=proc(fd,x,isbig)
+local xhl:
+xhl:=ieeehexa(x):
+
+if(isbig=0 or isbig=1) then
+  fprintf(fd,"{{0x%+0.8s,0x%+0.8s}} /* %+0.10e */", xhl[2-isbig], xhl[isbig+1], x):
+else
+  print("ERROR, isbig must be equal to 0 or 1"):
+end if:
+end proc:
+
+
+
+#---------------------------------------------------------------------
+# hi_lo takes an arbitrary precision number x and returns two doubles such that:
+# x ~ x_hi + x_lo
+hi_lo:= proc(x)
+local x_hi, x_lo, res:
+x_hi:= nearest(evalf(x)):
+res:=x-x_hi:
+if (res = 0) then
+  x_lo:=0:
+else
+  x_lo:=nearest(evalf(res)):
+end if:
+x_hi,x_lo:
+end:
+
+
+
+#---------------------------------------------------------------------
+# same as hi_lo, but returns hexadecimal strings
+ieeehexa2:=proc(x)
+local reshi, reslo, hexhi, hexlo:
+reshi:=nearest(x):
+hexhi:=ieee2hexa(reshi):
+reslo:= nearest(x-reshi):
+hexlo:=ieee2hexa(reslo):
+reshi, reslo:
+end proc:
+
+
+
+
+#---------------------------------------------------------------------
+# Computes the constant for the round-to-nearest test.
+# epsilon is the overall relative error of the approximation scheme
+# See the documentation for the explanation of these formulae
+compute_rn_constant := proc(epsilon)
+  local k, constGenCase, constPowerOf2:
+  k := trunc(-log[2](epsilon)) - 53:
+  (1 +     2**54*epsilon / (1 - epsilon - 2**(-k+1) ) )  / (1-2**(-53))
+end proc:
+
+
+
+#---------------------------------------------------------------------
+# Takes a real number, and prints the bits after the 53th of its nearest IEEE floating-point number
+
+showHowDifficultToRound:=proc(x)
+local xb,xs,s,e,m:
+    Digits:=200:
+    s,e,m := ieeedouble(x):
+    xb:=convert(evalf(x*2^(-e)),binary):
+    xs:=convert(xb, string):
+    substring(xs,55..153)
+end proc:
+
+#---------------------------------------------------------------------
+# Computes the floating point successor of x
+succDouble:=proc(x)
+local s,he,hexcat,hehi,helo,castx,shex,neg;
+he := ieeehexa(x);
+hehi:= op(1, he);
+helo:= op(2, he);
+hexcat := cat(hehi, helo);
+neg := 1;
+castx := convert(hexcat, decimal, hex);
+if (castx >= 2^(63)) then
+	castx := castx - 2^(63);
+	neg := -1;
+end if;
+castx := castx + neg;
+shex := convert(convert(castx, hex),string);
+s := neg * hexa2ieee([substring(shex,1..8), substring(shex,9..16)]);
+s;
+end proc:
+
+
+
+
+
+
+
+#####################################################################
+
+# Stuff about truncated polynomials
+
+# Truncate a polynomial
+
+#---------------------------------------------------------------------
+#poly_exact takes a polynomial in x with arbitrary precision
+# coefficients, and returns a truncated polynomial where coefficients
+# are IEEE doubles.
+
+poly_exact:=proc(P)
+local deg,i, coef, coef_t, Q:
+Q:= 0:
+convert(Q, polynom):
+deg:=degree(P,x):
+  for i from 0 to deg do
+    coef:=coeff(P,x,i):
+    coef_t:=nearest(coef):
+    Q:= Q + coef_t*x^i:
+  od:
+return(Q):
+end:
+
+
+#---------------------------------------------------------------------
+#Like poly_exact, but the n first coefficients are exactly
+# representable as the sum of two doubles.  (to actually get the two
+# doubles, use procedure hi_lo)
+
+poly_exact2:=proc(P,n)
+local deg,i, coef, coef_hi, coef_lo, Q:
+Q:= 0:
+convert(Q, polynom):
+deg:=degree(P,x):
+  for i from 0 to deg do
+    coef :=coeff(P,x,i):
+    coef_hi, coef_lo:=hi_lo(coef):
+    Q:= Q + coef_hi*x^i:
+    if(i<n) then
+        Q := Q + coef_lo*x^i:
+    fi:
+  od:
+  return(Q):
+end:
+
+
+#---------------------------------------------------------------------
+#  OBSOLETE use compute_horner_rounding_error below
+# Compute a bound on the accumulated rounding error caused by the Horner evaluation of a truncated polynomial
+# P is the polynomial.
+# xmax is the max value of |x|.
+# n is the degree when P is computed in double double. The first double-double operation is an addition.
+
+# returns max absolute error, min of the function, max of the function.
+
+# This procedure also checks on the fly that the fast (test-free) versions of the double-double addition can be used, i.e. that for all x, at each Horner step i computing ci+x*Si, we have |ci|>|x*Si|. It prints warnings if it not the case.
+
+compute_abs_rounding_error:=proc(poly,xmax, nn)
+local n, deg, delta, deltap, i, S, P, Snorm, Smin, Smax, prec:
+deltap:=0:
+delta:=0:
+deg:=degree(poly):
+
+prec:=53: # precision of the first iterations
+
+S:=coeff(poly, x, deg):
+Smax:=abs(S):
+Smin:=Smax:
+
+if nn<0 then n:=0: else n:=nn: fi:# sometimes called by compute_rel_rounding_error with n=-1
+
+for i from (deg-1) to 0 by -1 do
+  P:= convert(S*x, polynom):
+  Smin := abs(coeff(poly,x,i)) - xmax*Smax :
+  if(Smin<=0) then
+    printf("Warning! in compute_abs_rounding_error, Smin<=0 at iteration %d, consider decreasing xmax\n",i):
+  fi:
+  delta:= evalf(xmax*deltap + 2**(-prec)*xmax*Smax):
+  if i<n then
+    # fast Add22 ?
+    if abs(coeff(poly,x,i)) < xmax*Smax  # may be improved to xmax*Smax/2
+    then printf("WARNING Add22 cannot be used at step %d, use Add22Cond\n" , i  ):
+         printf("    coeff=%1.20e,  xmax*Smax=%1.20e"  ,  abs(coeff(poly,x,i)),  xmax*Smax ):
+    fi:
+  fi:
+  S:=convert(P+coeff(poly,x,i), polynom):
+  Snorm:=evalf(numapprox[infnorm](S, x=-xmax..xmax)):
+  if i=n-1 then prec:=100: fi:  # from the addition of the n-1-th iteration
+  deltap:= evalf(delta + 2**(-prec)*(delta + Snorm)):
+  Smax := Snorm + deltap:
+od:
+deltap, Smin, Smax:
+end proc:
+
+
+
+#---------------------------------------------------------------------
+#  OBSOLETE use compute_horner_rounding_error below
+# Computes the total relative rounding error
+compute_rel_rounding_error:=proc(poly,xmax, n)
+local deg, p, rho, deltap, Smin, Smax:
+
+deg:=degree(poly):
+if(n>0) then p:=100: else p:=53: fi:
+
+if coeff(poly,x, 0) = 0 then
+   deltap, Smin, Smax := compute_abs_rounding_error(poly/x,xmax, n-1):
+   rho :=  (2^(-p)*(Smax+deltap) +deltap ) / Smin :
+else
+   deltap, Smin, Smax := compute_abs_rounding_error(poly,xmax, n):
+   rho := deltap /  Smin:
+fi:
+rho:
+end proc:
+
+
+
+
+#---------------------------------------------------------------------
+#  OBSOLETE use compute_horner_rounding_error below
+# Computes the accumulated rounding error during the polynomial evaluation.
+# P is the polynomial.
+# xmax is the max value of |x|.
+# n is the degree when P is computed in double double. The first double-double operation is a multiplication (probably less useful).
+
+# returns max absolute error, min of the function, max of the function.
+
+# This procedure also checks on the fly that the fast (test-free) versions of the double-double addition can be used, i.e. that for all x, at each Horner step i computing ci+x*Si, we have |ci|>|x*Si|. It prints warnings if it not the case.
+
+compute_abs_rounding_error_firstmult:=proc(poly,xmax, nn)
+local n, deg, delta, deltap, i, S, P, Snorm, Smin, Smax, prec:
+deltap:=0:
+delta:=0:
+deg:=degree(poly):
+
+prec:=53: # precision of the first iterations
+
+S:=coeff(poly, x, deg):
+Smax:=abs(S):
+Smin:=Smax:
+
+if nn<0 then n:=0: else n:=nn: fi:# sometimes called by compute_rel_rounding_error with n=-1
+
+for i from (deg-1) to 0 by -1 do
+  if i=n-1 then prec:=100: fi:  # from the mult of the n-1-th iteration
+  P:= convert(S*x, polynom):
+  Smin := abs(coeff(poly,x,i)) - xmax*Smax :
+  if(Smin<=0) then
+    printf("Warning! in compute_abs_rounding_error, Smin<=0 at iteration %d, consider decreasing xmax\n",i):
+  fi:
+  delta:= evalf(xmax*deltap + 2**(-prec)*xmax*Smax):
+  if i<n then
+    # fast Add22 ?
+    if abs(coeff(poly,x,i)) < xmax*Smax  # may be improved to xmax*Smax/2
+    then printf("WARNING Add22 cannot be used at step %d, use Add22Cond\n" , i  ):
+         printf("    coeff=%1.20e,  xmax*Smax=%1.20e"  ,  abs(coeff(poly,x,i)),  xmax*Smax ):
+    fi:
+  fi:
+  S:=convert(P+coeff(poly,x,i), polynom):
+  Snorm:=evalf(numapprox[infnorm](S, x=-xmax..xmax)):
+  deltap:= evalf(delta + 2**(-prec)*(delta + Snorm)):
+  Smax := Snorm + deltap:
+od:
+deltap, Smin, Smax:
+end proc:
+
+
+
+
+#---------------------------------------------------------------------
+#  OBSOLETE use compute_horner_rounding_error below
+# Computes the total relative rounding error
+compute_rel_rounding_error_firstmult:=proc(poly,xmax, n)
+local deg, p, rho, deltap, Smin, Smax:
+
+deg:=degree(poly):
+if(n>0) then p:=100: else p:=53: fi:
+
+if coeff(poly,x, 0) = 0 then
+   deltap, Smin, Smax := compute_abs_rounding_error_firstmult(poly/x,xmax, n-1):
+   rho :=  (2^(-p)*(Smax+deltap) +deltap ) / Smin :
+else
+   deltap, Smin, Smax := compute_abs_rounding_error_firstmult(poly,xmax, n):
+   rho := deltap /  Smin:
+fi:
+rho:
+end proc:
+
+
+
+
+# Compute a good truncated polynomial approximation for a function
+# Computes an approximation to a function of x f, as a truncated polynomial of deegree deg with the n first coefficients exactly representable as double-double.
+# The function f(x) must have as input interval xmin..xmax
+# returns [ truncated polynomial, relative approx error of trunc. poly.  ,  infinite precision polynomial,   rel. error of inf. prec. poly ]
+poly_trunc_classic:=proc(f,deg,xmin,xmax,n)
+  local pe, repe, pt, ppe, rept, maxpt:
+  pe:=numapprox[minimax]( f,  x=xmin..xmax,  [deg,0],  1,  'err'):
+  pt := poly_exact2(pe,n):
+  rept := numapprox[infnorm]( 1-pt/f, x=xmin..xmax) :
+  maxpt := numapprox[infnorm]( pt, x=xmin..xmax) :
+  pt,rept, maxpt:
+end proc:
+
+
+
+#---------------------------------------------------------------------
+# Computes a truncated polynomial of degree deg with the two first coefficients stored as double-doubles.
+# The function f(x) must have as input interval xmin..xmax
+# returns [ truncated polynomial, relative error of trunc. poly.  ,  infinite precision polynomial,   rel. error of inf. prec. poly ]
+poly_trunc_f2d_2:=proc(f,deg,xmin,xmax)
+  local pe, repe, pt, c0, c1, c2, ppe, abserr, relerr, maxpt, err:
+  pe:=numapprox[minimax](  f,  x=xmin..xmax,  [deg,0],  1,  'err'):
+  pt := poly_exact2(pe,2):
+  c0:=coeff(pt,x,0):
+  c1:=coeff(pt,x,1):
+  c2:=coeff(pt,x,2):
+  ppe:=numapprox[minimax](  (f - c0 - c1 * x - c2*x*x) ,  x=xmin..xmax,  [deg,0],  1,  'err'):
+  ppe:=expand(ppe) - coeff(ppe,x,0) - coeff(ppe,x,1)*x- coeff(ppe,x,2)*x*x:
+  pt := poly_exact2(ppe,2) + c0 + c1*x + c2*x*x:
+  abserr := numapprox[infnorm]( pt-f, x=xmin..xmax) :
+  relerr := numapprox[infnorm]( 1-pt/f, x=xmin..xmax) :
+  maxpt := numapprox[infnorm]( pt, x=xmin..xmax) :
+  pt,abserr,relerr,maxpt:
+end proc:
+
+
+
+
+#---------------------------------------------------------------------
+# Computes a truncated polynomial of degree deg with the first coefficient stored as double-double.
+#  The function f(x) must have as input interval xmin..xmax
+# returns [ truncated polynomial, relative error of trunc. poly.  ,  infinite precision polynomial,   rel. error of inf. prec. poly ]
+poly_trunc_f2d_1:=proc(f,deg,xmin,xmax)
+  local pe, repe, pt, c0, c1, ppe, relerr, abserr, maxpt, err:
+  pe:=numapprox[minimax](  f ,  x=xmin..xmax,  [deg,0],  1,  'err'):
+  pt := poly_exact2(pe,1):
+  c0:=coeff(pt,x,0):
+  c1:=coeff(pt,x,1):
+  ppe:=numapprox[minimax](  (f - c0 - c1 * x) ,  x=xmin..xmax,  [deg,0],  1,  'err'):
+  ppe:=ppe - coeff(ppe,x,0) - coeff(ppe,x,1)*x:
+  pt := poly_exact2(ppe,1) + c0 + c1*x:
+  abserr := numapprox[infnorm]( pt-f, x=xmin..xmax) :
+  relerr := numapprox[infnorm]( 1-pt/f, x=xmin..xmax) :
+  maxpt := numapprox[infnorm]( pt, x=xmin..xmax) :
+  pt,abserr,relerr,maxpt:
+end proc:
+
+
+
+#---------------------------------------------------------------------
+#  compute_horner_rounding_error
+
+# Computes a bound on the accumulated rounding error caused by the Horner evaluation of a truncated polynomial
+# It is designed to allow evaluating the error for various schemes:
+#   - with or without an error on x
+#   - using SCS operators
+#   - using double and double-double operators.
+# Arguments:
+#   P is the polynomial.
+#   xmax is  the max value of |x|.
+#   errors is a list of size n where n is the degree of the polynomial.
+#      Each element of this list is a triple (epsx,epsmul,epsadd) where
+#        epsx is the relative error on x at each step,
+#        epsadd is the max relative error on the addition
+#        epsmul is the max relative error on the multiplication.
+#      This allows to handle SCS Horner, as well as evaluation starting in double and ending in double-double.
+#   check_dd is a flag, if set to 1 the procedure also checks on the fly that the fast (test-free) versions
+#       of the double-double addition can be used, i.e. that for all x, at each Horner step i computing ci+x*Si,
+#       we have |ci|>|x*Si|. It prints warnings if it not the case.
+# returns (epsprimek, deltak, minP, maxP) where (see the doc)
+#   epsprimek is the max rel error of the last multiplication (useful if the coeff of degree 0 is 0)
+#   deltak is the max absolute error of the last addition (useful if the reconstruction adds something to result of the polynomial)
+#   minP  min of the evaluated polynomial (useful to compute a relative error out of deltak)
+#   maxP  max of the evaluated polynomial.
+
+compute_horner_rounding_error:=proc(poly, x, xmax, errors, check_dd)
+local deg, Sk, maxSk, minSk, epsaddk, epsmulk, deltaaddk, k, ck, epsx, epsmul, epsadd, deltaadd, Pk, maxPk:
+
+  if assigned(x) then
+    printf("Error in compute_horner_rounding_error, polynomial variable is assigned\n"):
+    return 'procname(args)':
+  fi:
+
+  deg:=degree(poly,x):
+  if(deg<0) then  printf("ERROR: negative degree in compute_abs_rounding_error"): return 'procname(args)': fi:
+
+  Sk:=coeff(poly, x, deg):
+  maxSk:=abs(Sk):
+  minSk:=maxSk:
+  epsmulk:=0:
+  deltaaddk:=0:
+  epsaddk:=0:
+
+  for k from (deg) to 1 by -1 do
+
+    # the errors to consider for this step
+    epsx := errors[k][1]:
+    epsadd := errors[k][2]:
+    epsmul := errors[k][3]:
+
+    # multiplication operation
+    Pk:= convert(Sk*x, polynom):
+    maxPk:=numapprox[infnorm](Pk, x=-xmax..xmax):
+
+    ck:=coeff(poly,x,k-1):
+    epsmulk:=evalf( (1+epsx)*(1+epsaddk)*(1+epsmul)-1  + 10^(-Digits+2)   ):
+
+    #addition
+    if(ck=0)  then
+      Sk:=Pk:
+      maxSk := maxPk:
+      minSk:=0:
+      deltaaddk:= evalf(epsmulk*maxPk):
+      epsaddk:=epsmulk:
+    else
+      Sk:=convert(Pk+ck , polynom):
+      maxSk:=numapprox[infnorm](Sk, x=-xmax..xmax):
+      minSk:=minimize(abs(Sk), x=-xmax..xmax):
+      if(epsadd=2^(-53)) then   # compute deltadd exactly as the max half ulp of the result
+	deltaadd := 0.5*ulp(maxSk+epsmulk*maxSk):
+      else    # compute deltaadd out of the relative error
+        deltaadd := epsadd * (maxSk+epsmulk*maxSk):
+      fi:
+      deltaaddk := evalf(  epsmulk*maxPk + deltaadd  + 10^(-Digits+2)  ):
+      epsaddk := deltaaddk/minSk + 10^(-Digits+2) :
+      # warnings
+      if (minSk=0) then
+        printf("Warning! in compute_abs_rounding_error, minSk=0 at iteration %d, consider decreasing xmax\n",k):
+      fi:
+    fi:
+    printf("step %d   epsmulk=%1.4e  deltaaddk=%1.4e   minSk=%1.4e   maxSk=%1.4e\n", k, epsmulk, deltaaddk, minSk, maxSk):
+
+
+#  if (epsadd=2**(-103)) then
+#    # fast Add22 ?
+#    if abs(coeff(poly,x,k)) < xmax*maxSk  # may be improved to xmax*Smax/2
+#    then printf("WARNING Add22 cannot be used at step %d, use Add22Cond\n" , k  ):
+#         printf("    coeff=%1.20e,  xmax*Smax=%1.20e"  ,  abs(coeff(poly,x,i)),  xmax*maxSk ):
+#    fi:
+#  fi:
+
+od:
+
+return (epsmulk, deltaaddk, minSk, maxSk)
+end proc:
+
+
+#---------------------------------------------------------------------
+# An helper function to build an errlist for the previous procedure.
+# Arguments:
+#   n is the degree of the polynomial,
+#   ddadd, ddmul number of (final) double-double operations
+#   depsx  error on x in the double steps
+#   ddepsx error on x in the double-double steps (when x is represented by a double-double)
+
+errlist_quickphase_horner := proc(n,ddadd, ddmul,depsx, ddepsx)
+ local nddadd, epsadd, nddmul, epsmul, epsx:
+ if n=0
+  then []
+  else
+    if ddadd>0 then
+      nddadd:=ddadd-1:
+      epsadd:=2**(-103):
+    else
+      nddadd:=ddadd:
+      epsadd:=2**(-53):
+    fi:
+    if ddmul>0 then
+      nddmul:=ddmul-1:
+      epsmul:=2**(-102):
+      epsx:=ddepsx:
+    else
+      nddmul:=ddmul:
+      epsmul:=2**(-53):
+      epsx:=depsx:
+    fi:
+    [  [epsx,epsadd,epsmul] ,   op(errlist_quickphase_horner(n-1, nddadd, nddmul, depsx,ddepsx))]
+  fi:
+end proc:
+
+
+
+#---------------------------------------------------------------------
+# Finding the worst cases for additive range reduction
+# cut and paste from the web page of Muller's book
+# Much faster if called with Digits very large and an evalf() on C
+# but then check
+
+WorstCaseForAdditiveRangeReduction:=proc(B,n,emin,emax,C)
+  local epsilonmin,powerofBoverC,e,a,Plast,r,Qlast, Q,P,NewQ,NewP,epsilon, numbermin,expmin,l:
+  epsilonmin := 12345.0 :
+  powerofBoverC := B^(emin-n)/C:
+  for e from emin-n+1 to emax-n+1 do
+    powerofBoverC := B*powerofBoverC:
+    a := floor(powerofBoverC):
+    Plast := a:
+    r := 1/(powerofBoverC-a):
+    a := floor(r):
+    Qlast := 1:
+    Q := a:
+    P := Plast*a+1:
+    while Q < B^n-1 do
+      r := 1/(r-a):
+      a := floor(r):
+      NewQ := Q*a+Qlast:
+      NewP := P*a+Plast:
+      Qlast := Q:
+      Plast := P:
+      Q := NewQ:
+      P := NewP
+      od:
+   epsilon := evalf(C*abs(Plast-Qlast*powerofBoverC)):
+   if epsilon < epsilonmin then
+     epsilonmin := epsilon: numbermin := Qlast:
+     expmin := e
+     fi
+   od:
+  print('mantissa',numbermin):
+  print('exponent',expmin):
+  print('epsilon',epsilonmin):
+  l := evalf(log(epsilonmin)/log(B),10):
+  print(numberofdigits,l):
+  (numbermin, expmin, epsilonmin)
+end proc:
+
+
+
+
+
+
+
+#####################################################################
+
+# Stuff for SCS
+#####################################################################
+
+# Global parameters
+# Don�t forget to set all the parameters here
+SCS_NB_WORDS := 8:
+SCS_NB_BITS  := 30:
+
+
+
+
+
+#---------------------------------------------------------------------
+# This procedure convert a decimal number into it SCS representation.
+#        x : input number to convert into it SCS representation
+real_to_SCS := proc(x)
+        local exception, index, sgn, mantissa, nb, i:
+
+            if x <> 0 then
+                exception := 1:
+                if x > 0 then
+                    sgn  := 1:
+                    nb    := x:
+                elif x < 0 then
+                    sgn := -1:
+                    nb   := -x:
+                end if:
+
+                index := 0:
+
+                if nb >= 1 then
+                    for i from 0 while nb > (2^(SCS_NB_BITS+1)-1) do
+                        index := index+1:
+                        nb    := nb * 2^(-SCS_NB_BITS):
+                    end do:
+                else
+                    for i from 0 while nb < 1 do
+                        index := index-1:
+                        nb    := nb * 2^(SCS_NB_BITS):
+                    end do:
+                end if:
+
+                for i from 0 by 1 to (SCS_NB_WORDS-1) do
+                    mantissa[i] := trunc(nb):
+                    nb          := (nb - mantissa[i]) * 2^(SCS_NB_BITS):
+                end do:
+            else
+                for i from 0 by 1 to (SCS_NB_WORDS-1) do
+                    mantissa[i] := 0:
+                end do:
+
+                index     := 1:
+                exception := x:
+                sgn      := 1:
+            end if:
+            mantissa[SCS_NB_WORDS]   := exception:
+            mantissa[SCS_NB_WORDS+1] := index:
+            mantissa[SCS_NB_WORDS+2] := sgn:
+
+            return mantissa:
+        end proc:
+
+
+
+
+#---------------------------------------------------------------------
+# Convert an SCS number into a rational number
+
+SCS_to_real := proc(tab)
+       local res, i:
+
+           if (tab[SCS_NB_WORDS] <> 1) then
+               return tab[SCS_NB_WORDS]:
+           end if:
+
+           res := 0:
+           for i from (SCS_NB_WORDS-1) by -1 while i>=0 do
+               res := 2^(-SCS_NB_BITS)*res + tab[i]
+           end do:
+
+           res := tab[SCS_NB_WORDS+2]*(res * 2.^(SCS_NB_BITS * tab[SCS_NB_WORDS+1])):
+
+           return res:
+
+       end proc:
+
+
+
+#---------------------------------------------------------------------
+# This procedure truncates the coefficients of a polynomial to SCS
+# numbers, so that we can then evaluate its approximation error
+# (equivalent to poly_exact for the doubles)
+poly_exact_SCS:=proc(P)
+local deg,i, coef, coef_t, Q:
+Q:= 0:
+convert(Q, polynom):
+deg:=degree(P,x):
+  for i from 0 to deg do
+    coef:=coeff(P,x,i):
+    coef_t:=SCS_to_real(real_to_SCS(evalf(coef))):
+    Q:= Q + coef_t*x^i:
+  od:
+return(Q):
+end:
+
+
+
+#---------------------------------------------------------------------
+# Write Into file fd the SCSS number stored into the table tab where
+# tab[0..(SCS_NB_WORDS-1)] store the mantissa
+# tab[SCS_NB_WORDS] store the exception
+# tab[SCS_NB_WORDS+1] store the index
+# tab[SCS_NB_WORDS+2] store the sign
+# You probably want to use WriteSCS below !
+
+WriteSCS_from_table := proc(fd, tab)
+              local i:
+
+                  fprintf(fd,"{{"):
+
+                  fprintf(fd,"0x%+0.8x, ", tab[0]):
+                  for i from 1 by 1 to (SCS_NB_WORDS-2) do
+                      fprintf(fd,"0x%+0.8x, ", tab[i]):
+                      if (i mod 4 = 3) then
+                          fprintf(fd,"\n"):
+                      fi:
+                  end do:
+                  fprintf(fd,"0x%+0.8x},\n", tab[SCS_NB_WORDS-1]):
+                  if (tab[SCS_NB_WORDS]=1) then
+                      fprintf(fd,"DB_ONE, %3d, %3d ", tab[SCS_NB_WORDS+1], tab[SCS_NB_WORDS+2]):
+                  else
+                      # the only other possible value is 0 so ...
+                      fprintf(fd,"{0x00000000, 0x00000000}, %3d, %3d ", tab[SCS_NB_WORDS+1], tab[SCS_NB_WORDS+2]):
+                  end if:
+
+                  fprintf(fd, "} \n"):
+              end proc:
+
+
+#---------------------------------------------------------------------
+# Write a real number as an SCS array to a file
+
+WriteSCS := proc (fd,x)
+      WriteSCS_from_table(fd , real_to_SCS (x)):
+      end:
+
+
+
+#---------------------------------------------------------------------
+# A procedure to count the non-zero coefficients of a polynomial (to store it)
+
+get_nb_terms := proc(poly)
+       local i, deg_poly:
+
+           deg_poly := degree(poly):
+           for i from deg_poly by -1 while i>=0 do
+               if coeff(poly, x, i)=0 then
+                   deg_poly := deg_poly-1:
+               end if:
+           end do:
+
+           return deg_poly:
+       end proc:
+
+
+
+
+
+
+
+
+#---------------------------------------------------------------------
+#   Write a polynomial to an array of SCS coefficients
+
+# fd : file where to put the result
+# poly : input polynom
+# name : name of the array
+
+Write_SCS_poly := proc(fd,  name, poly)
+local i, deg:
+           #fclose(fd):
+           try
+           finally
+               fprintf(fd,"static const scs %s [%d]=\n", name, get_nb_terms(poly)+1):
+               deg := degree(poly):
+
+               fprintf(fd,"/* ~%1.50e */ \n{", coeff(poly, x, deg)):
+               WriteSCS(fd, coeff(poly, x, deg)):
+               for i from (deg-1) by (-1) while i>=0 do
+                   if (coeff(poly, x, i)<>0) then
+                       fprintf(fd,",\n/* ~%1.50e */ \n", coeff(poly, x, i)):
+                       WriteSCS(fd, coeff(poly, x, i), 0):
+                   end if:
+               end do:
+               fprintf(fd,"};\n"):
+            end try:
+          end proc:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/crlibm/maple/csh.mpl b/src/crlibm/maple/csh.mpl
new file mode 100644
index 0000000..d19a27a
--- /dev/null
+++ b/src/crlibm/maple/csh.mpl
@@ -0,0 +1,446 @@
+restart:
+Digits := 150;
+with (numapprox):with(orthopoly):
+interface(quiet=true);
+read "common-procedures.mpl";
+mkdir("TEMPCSH");
+
+
+#######################################################################
+# Some values to go to the .testdata
+# What is the first value that rounds to nearest to +inf ?
+ieeehexa(arcsinh(hexa2ieee(["7fefffff","ffffffff"])));
+
+# What is the first value that rounds to +inf to +inf ?
+
+
+######################################################################
+#First, some constants variables (used in the polynomial evaluations)
+n_double_ch := 11: # max degree for cosh's polynomial evaluation
+n_double_sh := 8:  # max degree for sinh's polynomial evaluation
+b_max := 2**(-9.): # max absolute input for polynomial evaluation
+
+######################################################################
+#some constants ...
+inv_ln_2 := 1/ln(2.):
+ln2_hi := hexa2ieee(["3FE62E42", "FEFA3800"]):
+ln2_lo := nearest(ln(2.)-ln2_hi):
+two_43_44 := 2^43 + 2^44:
+bias := convert(op(2,ieeehexa(ln(2.)/2.+two_43_44)),'decimal','hex'): #to get maximum index for the second range reduction ...
+
+
+######################################################################
+#Bounds of our evaluation
+max_input_ch := arccosh(hexa2ieee(["7FEFFFFF","FFFFFFFF"])):
+k_max_ch := ceil(max_input_ch / ln(2)):
+max_input_sh := arcsinh(hexa2ieee(["7FEFFFFF","FFFFFFFF"])):
+k_max_sh := ceil(max_input_sh / ln(2)):
+#towards +inf, we have cosh(x) = sinh(x) since exp(-x) is too small
+#so, we are sure of k_max_sh == k_max_ch
+k_max := k_max_ch;
+
+######################################################################
+# When can we ignore exp(-x) in front of exp(x) in the first step ?
+# We want the same error as in the general case
+k_max_csh_approx_exp := 35:
+tempxmax:=(k_max_csh_approx_exp-1)*log(2):
+eps_csh_approx_exp := exp(-tempxmax)/exp(tempxmax):
+log2(%);  #
+
+# When can we ignore exp(-x) in front of exp(x) in the second step ?
+# The worst case for exp for large arguments requires 115 bits
+k_max_csh_approx_exp_2 := 65:
+tempxmax:=(k_max_csh_approx_exp_2-1)*log(2):
+eps_csh_approx_exp_2 := exp(-tempxmax)/exp(tempxmax):
+log2(%); # 118
+
+
+######################################################################
+#The Taylor polynoms
+poly_ch :=series(cosh(x),x,n_double_ch):
+poly_ch := convert(poly_ch,polynom)-1;
+poly_sh :=series(sinh(x),x,n_double_sh):
+poly_sh := (convert(poly_sh,polynom))/x-1;
+
+
+
+
+
+
+####################################################################
+# secondary functions
+
+size_of_table := convert(op(2,ieeehexa(two_43_44+ln(2.)/2.)),decimal,hex);
+#returns the float which follow immediately the input
+next_float := proc(value)
+	local hex1,hex2,hexcat,result;
+	hex1:= op(1, value):
+	hex2:= op(2, value):
+	hexcat:= cat(hex1, hex2);
+	result := convert(convert(convert(hexcat,decimal,hex)+1+2**64,hex),string);
+	result := [substring(result,2..9), substring(result,10..18)];
+end:
+#compute the errors done in tabulated values for cosh
+delta_table_cosh_func := proc()
+	local result, i, value, temp, tmp, maxi;
+	value := ieeehexa(two_43_44-ln(2.)/2.);
+	result := 0;
+	maxi := 0;
+	for i from -size_of_table to size_of_table do
+		tmp := cosh(hexa2ieee(value)-two_43_44):
+		temp := nearest(tmp):
+		result := max(result, abs(tmp - temp - nearest(tmp-temp)));
+		maxi := max(maxi, abs(temp + nearest(tmp-temp)));
+		value:=next_float(value):
+	od:
+	result,maxi;
+end:
+#compute the error done in tabulated values for sinh
+delta_table_sinh_func := proc()
+	local result, i, value, temp, tmp, maxi;
+	value := ieeehexa(two_43_44-ln(2.)/2.);
+	result := 0;
+	maxi := 0;
+	for i from -size_of_table to size_of_table do
+		tmp := sinh(hexa2ieee(value)-two_43_44):
+		temp := nearest(tmp):
+		result := max(result, abs(tmp - temp - nearest(tmp-temp)));
+		maxi := max(maxi, abs(temp + nearest(tmp-temp)));
+		value:=next_float(value):
+	od:
+	result,maxi;
+end:
+
+
+#return the error on x_hi * y_lo
+Mul11_Error := proc(x,err_x, y, err_y)
+(2^(-53) * y + err_y) * (err_x + 1/2*ulp(x)) + x * err_y;
+end:
+
+
+#return the error on (x_hi * y_hi)_lo + x_lo * y_hi + x_hi * y_lo
+Mul43_Error := proc(x,err_x, y, err_y)
+1/2*ulp(3*2^(-53)* x * y) + 1/2*ulp(2*2^(-53) * x * y) + Mul11_Error(x, err_x, y, err_y) + Mul11_Error(y, err_y, x, err_x);
+end:
+
+
+
+cosh_0_35 := proc()
+local k, delta, maxi,epsilon, mini,cosh_0_35_max, delta_cosh_0_35:
+epsilon := 0; delta := 0:
+for k from -35 to -1 do
+delta_cosh_0_35 := 1/2*2^(-53)*ulp(1/(2^k)*(cosh_max + sinh_max)) + 1/(2^k)*(delta_sinh + delta_cosh):
+cosh_0_35_max := 1/(2^k)*(cosh_max + sinh_max):
+delta_cosh_0_35 :=  1/2*2^(-53)*ulp(cosh_0_35_max + 2^k * sinh_max) + delta_cosh_0_35 + 2^k  * delta_sinh:
+cosh_0_35_max := cosh_0_35_max + 2^k * sinh_max:
+delta_cosh_0_35 :=  1/2*2^(-53)*ulp(cosh_0_35_max + 2^k * cosh_max) + delta_cosh_0_35 + 2^k  * delta_cosh:
+cosh_0_35_max := cosh_0_35_max + 2^k * cosh_max:
+maxi := max(evalf(cosh((k-1/2)*ln(2))),evalf(cosh((k+1/2)*ln(2)))):
+mini := min(evalf(cosh((k-1/2)*ln(2))),evalf(cosh((k+1/2)*ln(2)))):
+
+epsilon := max(epsilon, delta_cosh_0_35/mini):
+delta := max(delta, delta_cosh_0_35):
+od;
+for k from 1 to 35 do
+delta_cosh_0_35 := 1/2*2^(-53)*ulp(1/(2^k)*(cosh_max + sinh_max)) + 1/(2^k)*(delta_sinh + delta_cosh):
+cosh_0_35_max := 1/(2^k)*(cosh_max + sinh_max):
+delta_cosh_0_35 :=  1/2*2^(-53)*ulp(cosh_0_35_max + 2^k * sinh_max) + delta_cosh_0_35 + 2^k  * delta_sinh:
+cosh_0_35_max := cosh_0_35_max + 2^k * sinh_max:
+delta_cosh_0_35 :=  1/2*2^(-53)*ulp(cosh_0_35_max + 2^k * cosh_max) + delta_cosh_0_35 + 2^k  * delta_cosh:
+cosh_0_35_max := cosh_0_35_max + 2^k * cosh_max:
+
+maxi := max(evalf(cosh((k-1/2)*ln(2))),evalf(cosh((k+1/2)*ln(2)))):
+mini := min(evalf(cosh((k-1/2)*ln(2))),evalf(cosh((k+1/2)*ln(2)))):
+epsilon := max(epsilon, delta_cosh_0_35/mini):
+delta := max(delta, delta_cosh_0_35):
+od;
+delta, epsilon;
+end:
+
+
+cosh_35_inf := proc()
+local k, delta, maxi,epsilon, mini,cosh_0_35_max, delta_cosh_0_35:
+epsilon := 0; delta := 0:
+for k from 35 to 1025 do
+delta_cosh_0_35 := 1/2*2^(-53)*ulp(2^k*(cosh_max + sinh_max)) + 2^k*(delta_sinh + delta_cosh) + 1/(2^k)*(cosh_max + sinh_max + delta_sinh + delta_cosh):
+cosh_0_35_max := 2^k*(cosh_max + sinh_max):
+
+maxi := max(evalf(cosh((k-1/2)*ln(2))),evalf(cosh((k+1/2)*ln(2)))):
+mini := min(evalf(cosh((k-1/2)*ln(2))),evalf(cosh((k+1/2)*ln(2)))):
+epsilon := max(epsilon, delta_cosh_0_35/mini):
+delta := max(delta, delta_cosh_0_35):
+od;
+delta, epsilon;
+end:
+#############################################################
+
+
+
+
+
+
+
+
+######################################################################
+#now we can begin the proof
+
+######################################################################
+#first, we must compute the error created by the first range reduction
+# CODY and WAITE  Argument reduction
+
+ln2 := ln(2.);
+invln2:= nearest(1/ln2);
+reminvln2 := evalf(1/ln2 - invln2);
+expln2:=ieeedouble(ln2)[2]:   #get the exponent of ln2 in its IEEE representation
+
+bits_ln2_hi_0 := ceil(log2(k_max));
+# 1/2 <= ln2/2^(expln2 + 1) <  1
+ln2_hi := round(evalf(ln2 * 2^(52 - bits_ln2_hi_0 - expln2)))/2^(52 - bits_ln2_hi_0 - expln2);#this trick is used to get a truncated mantissa for ln2_hi
+#ln2_hi is a now exactly representable in the IEEE format and bits_ln2_hi_0 last bits of its mantissa are set to 0
+#and bits_ln2_hi_0 is exactly the max number of bits to represent k
+#so the k * ln2_hi-product is exact :)
+ln2_lo:=nearest(ln2 - ln2_hi):
+
+# The error in this case (we need absolute error)
+delta_repr_ln2 := abs(ln2 - ln2_hi - ln2_lo);
+delta_round := evalf(1/2 * ulp(ln2_lo));
+delta_cody_waite := k_max * (delta_repr_ln2 + delta_round);
+
+delta_b := delta_repr_ln2 + delta_round + delta_cody_waite;
+
+#we have 2 cases:
+#  * k != 0 and we have an inexact range reduction
+#  * k == 0 and we have no range reduction and then delta_range_reduc = 0
+
+#the second range reduction is exact, so it doesn't introduce new error
+#after this second range reduction, we have a argument <= 2^(-9)
+#'mathematical' reductions:
+# x = k * ln(2) + y
+# y = a + b
+#'true' reductions:
+# x = k * (ln2_hi + ln2_lo) + (b_hi + b_lo) + table_index_float
+#   with table_index_float = table_index * 2^(-8)
+
+#we'll use the following mathematical formulaes :
+#cosh(a + b) = cosh(a) * cosh(b) + sinh(a) * sinh(b)
+#sinh(a + b) = sinh(a) * cosh(b) + sinh(b) * cosh(a)
+#sinh(a) and cosh(a) are tabulated as double double
+# and we use Taylor series to compute approximations of the sums
+
+#computation of the absolute error in the tabulated values :
+delta_ca := delta_table_cosh_func()[1];
+delta_sa := delta_table_sinh_func()[1];
+ca_max := delta_table_cosh_func()[2];
+sa_max := delta_table_sinh_func()[2];
+
+
+#now we must compute the error done in polynomial evaluation
+#we use   cosh(b) = 1 + sum(b^(2*k)/(2*k!), k > 0)
+#         sinh(b) = b * (1 + sum(b^(2*k)/(2*k+1!), k > 0))
+
+#both used polynoms are even (x�, x^4, x^6, ...) and we can use this fact
+y_max := b_max ^ 2;
+delta_y := 1/2*ulp(y_max) + delta_b^2;
+# remove the first x and compute the polynomial of y = x�
+poly_ch2 :=  subs(x=sqrt(y), expand(poly_ch));
+poly_sh2 :=  subs(x=sqrt(y), expand(poly_sh));
+errlist_cosh := errlist_quickphase_horner(degree(poly_ch2), 0, 0, 2^(-53), 2^(-70)):
+errlist_sinh := errlist_quickphase_horner(degree(poly_sh2), 0, 0, 2^(-53), 2^(-70)):
+
+#error between effective result and theorical polynomial result
+rounding_error_tcb := compute_horner_rounding_error(poly_ch2, y, y_max, errlist_cosh, true);
+rounding_error_tsb := compute_horner_rounding_error(poly_sh2, y, y_max, errlist_sinh, true);
+
+#error between therical polynomial result and cosh value
+approx_error_tcb := infnorm((cosh(x)-1-poly_ch)/(cosh(x)-1),x= -b_max..b_max);
+approx_error_tsb := infnorm((sinh(x)/x-1-poly_sh)/(sinh(x)/x-1),x= -b_max..b_max);
+
+delta_tcb := rounding_error_tcb[2] + approx_error_tcb;
+delta_tsb := rounding_error_tsb[2] + approx_error_tsb;
+tsb_max := rounding_error_tsb[4];
+tcb_max := rounding_error_tcb[4];
+
+#now we must do the first reconstruction, which correspond to cosh(a + b) = cosh(a) * cosh(b) + sinh(a) * sinh(b)
+#first case : sinh(a) = 0 = sa (= sa_hi + sa_lo in the C code)
+#             cosh(a) = 1 = ca (= ca_hi + ca_lo in the C code)
+#there is no error on sa and caj
+delta_cosh0 := delta_tcb;
+cosh0_max := 1+tcb_max;
+delta_sinh0 := delta_b:
+sinh0_max := b_max:
+delta_sinh0 := delta_sinh0 + (tsb_max + delta_tsb)*(b_max + delta_b + 1/2*ulp(b_max)) - b_max * tsb_max + 1/2*ulp(sinh0_max + tsb_max*b_max):
+sinh0_max := sinh0_max + tsb_max*b_max:
+delta_sinh0 := delta_sinh0 + 2^(-53)*1/2*ulp(sinh0_max + tsb_max*b_max);
+sinh0_max := sinh0_max + tsb_max*b_max;
+
+#second case : sinh(a) <> 0
+#there is a delta_table_cosh and delta_table_sinh absolute error on ca and sa.
+
+delta_cosh1 := delta_ca:
+cosh1_max := 2^(-53)*ca_max:
+delta_cosh1 := 1/2*ulp(cosh1_max + 3*2^(-53)*b_max * sa_max) + delta_cosh1 + Mul43_Error(b_max, delta_b, sa_max, delta_sa):
+cosh1_max := cosh1_max + 3 * 2^(-53) * b_max * sa_max:
+delta_cosh1 := 1/2*ulp(cosh1_max + b_max * sa_max * tsb_max) + delta_cosh1 + ((sa_max+1/2*ulp(sa_max)+delta_sa)*(b_max+ulp(b_max)+delta_b)*(tsb_max+delta_tsb)-tsb_max*sa_max*b_max):
+cosh1_max := cosh1_max + b_max * sa_max * tsb_max:
+delta_cosh1 := 1/2*ulp(cosh1_max + tcb_max*ca_max) + delta_cosh1 + ((ca_max + 1/2*ulp(ca_max) + delta_ca)*(tcb_max-delta_tcb)-ca_max*tcb_max):
+cosh11_max := cosh1_max + tcb_max*ca_max:
+delta_cosh1 := 1/2*ulp(cosh1_max + b_max * sa_max) + delta_cosh1:
+cosh11_max := cosh1_max + b_max * sa_max:
+delta_cosh1 := 1/2*2^(-53)*ulp(cosh1_max + ca_max) + delta_cosh1;
+cosh11_max := cosh1_max + ca_max;
+
+cosh_max := max(cosh0_max, cosh1_max);
+delta_cosh := max(delta_cosh0, delta_cosh1);
+
+delta_sinh1 := delta_sa:
+sinh1_max := 2^(-53)*sa_max:
+delta_sinh1 := 1/2*ulp(sinh1_max + 3*2^(-53)*ca_max * b_max) + delta_sinh1 + Mul43_Error(ca_max, delta_ca, b_max, delta_b):
+sinh1_max := sinh1_max + 3*2^(-53)*ca_max * b_max:
+delta_sinh1 := delta_sinh1 + 1/2*ulp(sinh1_max + sa_max * tcb_max):
+sinh1_max := sinh1_max + sa_max * tcb_max:
+delta_sinh1 := 1/2*ulp(sinh1_max + b_max * ca_max * tsb_max) + delta_sinh1 + ((ca_max+1/2*ulp(ca_max)+delta_ca)*(b_max+ulp(b_max)+delta_b)*(tsb_max+delta_tsb)-tsb_max*ca_max*b_max):
+sinh1_max := sinh1_max + b_max * sa_max * tsb_max:
+delta_sinh1 := delta_sinh1 + 1/2*2^(-53)*ulp(sinh1_max + b_max * ca_max):
+sinh1_max := sinh1_max + b_max * ca_max:
+delta_sinh1 := delta_sinh1 + 2^(-53)*1/2*ulp(sinh1_max + sa_max);
+sinh1_max := sinh1_max + sa_max;
+
+sinh_max := max(sinh1_max, sinh0_max);
+delta_sinh := max(delta_sinh0, delta_sinh1);
+#so we have the error done on cosh(y) and sinh(y)
+#now we must compute the error done on the last reconstruction
+#there are many cases
+#we begin by 0 < |k| < 35
+epsilon_cosh_0_35 := cosh_0_35()[2];
+#|k| > 35
+epsilon_cosh_35_inf := cosh_35_inf()[2];
+
+#rounding constant
+maxepsilon_csh := max(epsilon_cosh_35_inf, epsilon_cosh_0_35, delta_cosh):
+round_cst_csh := evalf(compute_rn_constant(maxepsilon_csh));;
+
+
+
+#################################################################################################"
+#now some functions used to build the .h header file.
+#################################################################################################"
+IEEE2db_number_BE := proc(ieee_number)
+local hex1, hex2, hexcat;
+hexcat=ieeehexa(ieee_number);
+hex1:= op(1, ieeehexa(ieee_number)):
+hex2:= op(2, ieeehexa(ieee_number)):
+cat(cat("{{0x"||hex1||",0x"||hex2||"}};     /*",sprintf("%.10e",ieee_number)),"*/  \n");
+end:
+IEEE2db_number_LE := proc(ieee_number)
+local hex1, hex2, hexcat;
+hexcat=ieeehexa(ieee_number);
+hex1:= op(2, ieeehexa(ieee_number)):
+hex2:= op(1, ieeehexa(ieee_number)):
+cat(cat("{{0x"||hex1||",0x"||hex2||"}};     /*",sprintf("%.10e",ieee_number)),"*/  \n");
+end:
+IEEE2db_number := proc(ieee_number, big_little)
+if (big_little = 1) then
+IEEE2db_number_BE(ieee_number):
+else
+IEEE2db_number_LE(ieee_number):
+fi;
+end:
+lo_part := proc(ieee_number)
+if (ieee_number <> 0) then
+ieee_number - nearest(ieee_number);
+else
+0;
+end if;
+end:
+IEEE2db_db_number_sinh := proc(number,big_little)
+local hexstring1,hexstring2, hex1,hex2,hex3,hex4;
+hexstring1 := ieeehexa(number);
+hexstring2 := ieeehexa(lo_part(number));
+if (big_little = 1) then
+hex1:= op(1, hexstring1):
+hex2:= op(2, hexstring1):
+hex3:= op(1, hexstring2):
+hex4:= op(2, hexstring2):
+else
+hex1:= op(2, hexstring1):
+hex2:= op(1, hexstring1):
+hex3:= op(2, hexstring2):
+hex4:= op(1, hexstring2):
+fi;
+"	  {{0x"||hex1||", 0x"||hex2||"}}, {{0x"||hex3||", 0x"||hex4||"}}},\n";
+end:
+
+IEEE2db_db_number_cosh := proc(number,big_little)
+local hexstring1,hexstring2, hex1,hex2,hex3,hex4;
+hexstring1 := ieeehexa(number);
+hexstring2 := ieeehexa(lo_part(number));
+if (big_little = 1) then
+hex1:= op(1, hexstring1):
+hex2:= op(2, hexstring1):
+hex3:= op(1, hexstring2):
+hex4:= op(2, hexstring2):
+else
+hex1:= op(2, hexstring1):
+hex2:= op(1, hexstring1):
+hex3:= op(2, hexstring2):
+hex4:= op(1, hexstring2):
+fi;
+"	{{{0x"||hex1||", 0x"||hex2||"}}, {{0x"||hex3||", 0x"||hex4||"}},\n";
+end:
+
+#####################################################################################
+
+
+
+#now, we can produce the header file !
+round_cst_cosh := 1.0020:
+round_cst_sinh := round_cst_cosh:
+filename := "TEMPCSH/csh_fast.h":
+fd := fopen(filename, WRITE, TEXT):
+fprintf(fd, "\n /* File generated by maple/csh.mpl */ \n"):
+fprintf(fd, "\n"):
+fprintf(fd, " static double maxepsilon_csh = %1.30e ;\n", maxepsilon_csh):
+fprintf(fd, " static double round_cst_csh  = %1.30e ;\n", round_cst_csh):
+fprintf(fd, "\n"):
+
+
+fprintf(fd, "#ifdef WORDS_BIGENDIAN  \n"):
+
+for big_little from 1 to 2 do
+	if (big_little = 2) then
+		fprintf(fd,                "#else  \n"):
+	fi:
+	fprintf(fd, cat(  "  static db_number const inv_ln_2 =     ",IEEE2db_number(inv_ln_2,big_little))):
+	fprintf(fd, cat(  "  static db_number const ln2_hi =       ",IEEE2db_number(ln2_hi,big_little))):
+	fprintf(fd, cat(  "  static db_number const ln2_lo =       ",IEEE2db_number(ln2_lo,big_little))):
+	fprintf(fd, cat(  "  static db_number const two_43_44 =    ", IEEE2db_number(two_43_44,big_little))):
+	fprintf(fd, cat(  "  static db_number const two_minus_30 = ", IEEE2db_number(2**(-40),big_little))):
+	fprintf(fd,       "  static int const bias = %d ;\n", bias):
+	fprintf(fd, "\n");
+
+	fprintf(fd,"/* some bounds */ \n"):
+	fprintf(fd, cat(  "  static db_number const max_input_csh =  ",IEEE2db_number(max_input_ch,big_little))):
+
+    fprintf(fd, "\n"):
+	fprintf(fd, cat(cat("  static const db_number cosh_sinh_table[",convert(2*size_of_table+1,string)),"][4] = { \n"));
+	vvalue := ieeehexa(two_43_44-ln(2.)/2.);
+	for i from -size_of_table to size_of_table do
+		fprintf(fd, IEEE2db_db_number_cosh(cosh(hexa2ieee(vvalue)-two_43_44),big_little));
+		fprintf(fd, IEEE2db_db_number_sinh(sinh(hexa2ieee(vvalue)-two_43_44),big_little));
+		vvalue:=next_float(vvalue):
+	od:
+	fprintf(fd,"}; \n");
+
+	fprintf(fd,"/* the coefficients for the cosh-approximations */ \n"):
+	for i from 1 to (n_double_ch/2) do
+		fprintf(fd, cat(cat(cat(  "  static const db_number c",convert(2*(i-1),string))," =   "),IEEE2db_number(coeff(poly_ch+1,x,2*(i-1)),big_little))):
+	od:
+
+	fprintf(fd,"/* the coefficients for the sinh-approximations */\n"):
+	for i from 1 to (n_double_sh/2) do
+		fprintf(fd, cat(cat(cat(  "  static  const db_number s",convert(2*i-1,string))," =   "),IEEE2db_number(coeff(poly_sh+1,x,2*(i-1)),big_little))):
+	od:
+od:
+fprintf(fd, "#endif  \n"):
+
+fclose(fd):
diff --git a/src/crlibm/maple/double-extended.mpl b/src/crlibm/maple/double-extended.mpl
new file mode 100644
index 0000000..db4a948
--- /dev/null
+++ b/src/crlibm/maple/double-extended.mpl
@@ -0,0 +1,151 @@
+
+#---------------------------------------------------------------------
+# ieeedouble converts a number to IEEE double extended format.
+# returns sign (-1 or 1), exponent between -16383 and 16383, mantissa as a fraction between 0.5 and 1.
+
+# TODO : use JMM procedure; check subnormals etc
+ieeedoubleExt:=proc(xx)
+local x, sign, logabsx, exponent, mantissa, infmantissa;
+    x:=evalf(xx):
+    if (x=0) then
+        sign,exponent,mantissa := 0,0,0;
+    else
+        if (x<0) then sign:=-1:
+        else sign:=1:
+        fi:
+        exponent := floor(log2(sign*x));
+        if (exponent>16383) then mantissa:=infinity: exponent:=16383:
+        elif (exponent< -16382) then
+            # denorm
+            exponent := -16383
+        fi:
+        infmantissa := sign*x*2^(63-exponent);
+        if frac(infmantissa) <> 0.5 then mantissa := round(infmantissa)
+        else
+            mantissa := floor(infmantissa);
+            if type(mantissa,odd) then mantissa := mantissa+1 fi;
+        fi;
+        mantissa := mantissa*2^(-63);
+    fi;
+    sign,exponent,mantissa;
+end:
+
+nearestExt := proc(x)
+    local sign, exponent, mantissa;
+
+    sign, exponent, mantissa := ieeedoubleExt(x);
+    sign*mantissa*2^(exponent);
+end:
+
+
+
+ieeehexaExt:= proc(x)
+local resultat, sign, exponent, mantissa, t;
+
+    if(x=0) then resultat:=["0000","0000","0000","0000","0000"];
+    elif(x=-0) then resultat:=["8000","0000","0000","0000","0000"];
+    else
+        sign,exponent,mantissa := ieeedoubleExt(x);
+        t := 2**80 +  (exponent+16383)*2^64 + mantissa*2^63;
+        if (sign=-1) then
+            t := t + 2**79;
+        fi:
+   t := convert(t, hex);
+   t:=convert(t, string):
+
+   resultat:=[substring(t, 2..5),
+              substring(t, 6..9 ),  substring(t, 10..13 ),
+              substring(t, 14..17 ),  substring(t, 18..21 )];
+
+    end if:
+    resultat;
+end proc:
+
+
+
+printDoubleAsShort:=proc(x)
+    local ss;
+    ss:=ieeehexa(x);
+    cat( "DOUBLE_HEX(",
+         substring(ss[1], 1..4),  ", " ,
+         substring(ss[1], 5..8),  ", " ,
+         substring(ss[2], 1..4),  ", " ,
+         substring(ss[2], 5..8)) ;
+end proc:
+
+printDoubleExtAsShort:=proc(x)
+    local ss;
+    ss:=ieeehexaExt(x);
+    cat( "LDOUBLE_HEX(", ss[1],  ", ", ss[2],  ", ",ss[3],  ", ", ss[4],  ", ", ss[5],  ")");
+end proc:
+
+printDoubleAsULL:=proc(x)
+    local ss;
+    ss:=ieeehexa(x);
+    cat( "ULL(", ss[1], ss[2],  ")");
+end proc:
+
+printDoubleAsHexInt:=proc(x)
+    local ss;
+    ss:=ieeehexa(x);
+    cat(ss[1], ss[2]);
+end proc:
+
+
+
+
+#---------------------------------------------------------------------
+# hi_lo takes an arbitrary precision number x and returns two doubles such that:
+# x ~ x_hi + x_lo
+hiloExt:= proc(x)
+local x_hi, x_lo, res:
+    x_hi:= nearestExt(evalf(x)):
+    res:=x-x_hi:
+    if (res = 0) then
+        x_lo:=0:
+    else
+        x_lo:=nearestExt(evalf(res)):
+    end if;
+    x_hi,x_lo;
+end:
+
+
+#---------------------------------------------------------------------
+# Like poly_exact, but the n first coefficients are exactly representable as the sum of two doubles.
+# (to actually get the two doubles, use procedure hi_lo)
+
+polyExact2Ext:=proc(P,n)
+local deg,i, coef, coef_hi, coef_lo, Q:
+    Q:= 0:
+    convert(Q, polynom):
+    deg:=degree(P,x):
+    for i from 0 to deg do
+        coef :=coeff(P,x,i):
+        coef_hi, coef_lo:=hiloExt(coef):
+        Q:= Q + coef_hi*x^i:
+        if(i<n) then
+            Q := Q + coef_lo*x^i:
+        fi:
+    od:
+    return(Q);
+end:
+
+printPolyExt := proc(fd,P,n, name_of_poly)
+local deg,i, coef, coef_hi, coef_lo;
+    convert(Q, polynom):
+    deg:=degree(P,x):
+    fprintf(fd, " static const long double %s[%d][2] = {\n", name_of_poly, deg+1);
+    for i from 0 to deg do
+        coef :=coeff(P,x,i):
+        coef_hi, coef_lo:=hiloExt(coef):
+
+        fprintf(fd,"{ %1.50eL, ",coef_hi);
+
+        if(i<n) then
+            fprintf(fd," %1.50eL},\n",coef_lo);
+        else
+            fprintf(fd,"0},\n");
+        fi:
+    od:
+    fprintf(fd,"}; \n");
+end:
diff --git a/src/crlibm/maple/exp-td.mpl b/src/crlibm/maple/exp-td.mpl
new file mode 100644
index 0000000..84cbba0
--- /dev/null
+++ b/src/crlibm/maple/exp-td.mpl
@@ -0,0 +1,237 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "exp-td.mpl";
+Digits := 120:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+mkdir("TEMPEXP"):
+
+L := 12:
+
+printf("   memory requirement for L = %d and two triple-double tables: %d bytes\n",L,48*2^(ceil(L/2)));
+
+rmax := log(2) / (2^(L+1)):
+
+printf("   maximal absolute value for rmax = 2^(%f)\n",log[2](rmax)):
+
+
+MsLog2Div2L := evalf(-log(2)/(2^L)):
+
+msLog2Div2Lh, msLog2Div2Lm, msLog2Div2Ll := hi_mi_lo(MsLog2Div2L):
+
+epsMsLog2Div2L := evalf(abs(((msLog2Div2Lh + msLog2Div2Lm + msLog2Div2Ll) - MsLog2Div2L)/MsLog2Div2L)):
+epsDDMsLog2Div2L := evalf(abs(((msLog2Div2Lh + msLog2Div2Lm) - MsLog2Div2L)/MsLog2Div2L)):
+
+printf("   error made by storing MsLog2Div2L as a double-double: 2^(%f)\n",log[2](epsDDMsLog2Div2L)):
+printf("   error made by storing MsLog2Div2L as a triple-double: 2^(%f)\n",log[2](epsMsLog2Div2L)):
+
+gap := -floor(-log[2](abs(msLog2Div2Lm/msLog2Div2Lh))):
+
+printf("   |msLog2Div2Lm| <= 2^(%f) * |msLog2Div2Lh|\n",gap):
+
+
+log2InvMult2L := nearest(2^L / (log(2))):
+
+shiftConst := 2^(52) + 2^(51):
+
+indexmask1 := 2^(L/2) - 1:
+indexmask2 := indexmask1 * 2^(L/2):
+
+largest := 2^(1023) * ((2^(53) - 1) / 2^(52)):
+smallest := 2^(-1023) * 1 * 2^(-51):
+
+overflowbound := nearest(log(largest)):
+
+overflowboundHex := ieeehexa(overflowbound):
+overflowSimplebound := convert(overflowboundHex[1],decimal,hex):
+
+underflowbound := nearest(log(2^(-1075))):
+
+denormbound := nearest(log(2^(-1022) * 1)):
+
+
+overUnderflowboundHex := ieeehexa(min(abs(underflowbound),min(abs(overflowbound),abs(denormbound)))):
+overUnderflowSimplebound := convert(overUnderflowboundHex[1],decimal,hex):
+
+twoPowerM1000 := 2^(-1000):
+twoPower1000 := 2^(1000):
+
+twoM52 := 2^(-52):
+mTwoM53 := - 2^(-53):
+
+for i from 0 to 2^(L/2) - 1 do
+	twoPowerIndex1hi[i], twoPowerIndex1mi[i], twoPowerIndex1lo[i] := hi_mi_lo(evalf(2^(i/(2^L)))):
+	twoPowerIndex2hi[i], twoPowerIndex2mi[i], twoPowerIndex2lo[i] := hi_mi_lo(evalf(2^(i/(2^(L/2))))):
+od: 
+
+
+
+PolyDegreeQuick:=4:
+printf("   degree of the polynomial used in the quick phase is %d\n",PolyDegreeQuick);
+
+
+
+polyQuick:= poly_exact(1 + x + 0.5*x^2 + x^3 * (numapprox[minimax](((exp(x) - (1 + x + 0.5*x^2))/x^3),  
+				x=-rmax..rmax, [PolyDegreeQuick-3,0], 1 ,  'deltaApprox'))):
+
+epsilonApproxQuick := numapprox[infnorm]( ((polyQuick-1)/(exp(x)-1))-1, x=-rmax..rmax):
+printf("   approximation rel error for the quick phase is 2^(%2f)\n", log2(epsilonApproxQuick) ) :
+deltaApproxQuick := numapprox[infnorm]( polyQuick-exp(x), x=-rmax..rmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(deltaApproxQuick) ) :
+
+	
+
+PolyDegreeAccurate:=7:
+
+printf("   degree of the polynomial used in the accurate phase is %d\n",PolyDegreeAccurate):
+
+DDNumberAccu:=5:
+
+
+printf("   number of double doubles used for the coefficients is %d\n",DDNumberAccu):
+
+
+
+polyAccurate:= poly_exact2(1 + x + 0.5*x^2 + x^3 * (numapprox[minimax](((exp(x) - (1 + x + 0.5*x^2))/x^3),  
+				x=-rmax..rmax, [PolyDegreeAccurate-3,0], 1 ,  'deltaApprox')), 
+				DDNumberAccu):	
+
+
+epsilonApproxAccurate := numapprox[infnorm]( ((polyAccurate-1)/(exp(x)-1))-1, x=-rmax..rmax):
+printf("   approximation rel error for the accurate phase is 2^(%2f)\n", log2(epsilonApproxAccurate) ) :
+deltaApproxAccurate := numapprox[infnorm]( polyAccurate-exp(x), x=-rmax..rmax):
+printf("   approximation abs error for the accurate phase is 2^(%2f)\n", log2(deltaApproxAccurate) ) :
+
+
+epsilonApproxRmAccurate := numapprox[infnorm]( (x/(exp(x)-1))-1, x=-rmax*2^(-52)..rmax*2^(-52)):
+epsilonApproxRlAccurate := numapprox[infnorm]( (x/(exp(x)-1))-1, x=-rmax*2^(-105)..rmax*2^(-105)):
+
+printf("   approximation rel error for approximating exp(rm) - 1 by rm is 2^(%2f)\n", log2(abs(epsilonApproxRmAccurate))):
+printf("   approximation rel error for approximating exp(rl) - 1 by rl is 2^(%2f)\n", log2(abs(epsilonApproxRlAccurate))):
+
+epsilonApproxAccurateSpecial := numapprox[infnorm]( ((polyAccurate-1)/(exp(x)-1))-1, x=-2^(-30)..2^(-30)):
+printf("   approximation rel error for the accurate phase in the special interval (|r| \\leq 2^(-30)) is 2^(%2f)\n", 
+log2(epsilonApproxAccurateSpecial) ) :
+
+epsilonApproxAccurateSpecial2 := numapprox[infnorm]( ((polyAccurate-1)/(exp(x)-1))-1, x=-2^(-18)..2^(-18)):
+printf("   approximation rel error for the accurate phase in the special interval (|r| \\leq 2^(-18)) is 2^(%2f)\n", 
+log2(epsilonApproxAccurateSpecial2) ) :
+
+
+
+epsilon_quick := 2^(-64): # The Gappa proof will show this bound
+
+
+
+
+
+#-------------------------------------------------------------------
+# Output
+
+filename:="TEMPEXP/exp-td.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/*File generated by maple/exp-td.mpl*/\n"):
+
+fprintf(fd, "\#define L %d\n",L):
+fprintf(fd, "\#define LHALF %d\n",L/2):
+fprintf(fd, "\#define log2InvMult2L %1.50e\n",log2InvMult2L):
+fprintf(fd, "\#define msLog2Div2Lh %1.50e\n",msLog2Div2Lh):
+fprintf(fd, "\#define msLog2Div2Lm %1.50e\n",msLog2Div2Lm):
+fprintf(fd, "\#define msLog2Div2Ll %1.50e\n",msLog2Div2Ll):
+fprintf(fd, "\#define shiftConst %1.50e\n",shiftConst):
+fprintf(fd, "\#define INDEXMASK1 0x%08x\n",indexmask1):
+fprintf(fd, "\#define INDEXMASK2 0x%08x\n",indexmask2):
+fprintf(fd, "\#define OVRUDRFLWSMPLBOUND 0x%08x\n",overUnderflowSimplebound):
+fprintf(fd, "\#define OVRFLWBOUND %1.50e\n",overflowbound):
+fprintf(fd, "\#define LARGEST %1.50e\n",largest):
+fprintf(fd, "\#define SMALLEST %1.50e\n",smallest):
+fprintf(fd, "\#define DENORMBOUND %1.50e\n",denormbound):
+fprintf(fd, "\#define UNDERFLWBOUND %1.50e\n",underflowbound):
+fprintf(fd, "\#define twoPowerM1000 %1.50e\n",twoPowerM1000):
+fprintf(fd, "\#define twoPower1000 %1.50e\n",twoPower1000):
+fprintf(fd, "\#define ROUNDCST %1.50e\n", compute_rn_constant(epsilon_quick)):   
+fprintf(fd, "\#define RDROUNDCST %1.50e\n", epsilon_quick):   
+fprintf(fd, "\#define twoM52 %1.50e\n", twoM52):   
+fprintf(fd, "\#define mTwoM53 %1.50e\n", mTwoM53):   
+
+fprintf(fd,"\n\n"):
+
+for i from 3 to PolyDegreeQuick do
+	fprintf(fd, "\#define c%d %1.50e\n",i,coeff(polyQuick,x,i)):
+od:
+
+
+for i from 3 to DDNumberAccu-1 do
+	(hi,lo) := hi_lo(coeff(polyAccurate,x,i)):
+	fprintf(fd, "\#define accPolyC%dh %1.50e\n",i,hi):
+	fprintf(fd, "\#define accPolyC%dl %1.50e\n",i,lo):
+od:
+
+for i from DDNumberAccu to PolyDegreeAccurate do
+	fprintf(fd, "\#define accPolyC%d %1.50e\n",i,coeff(polyAccurate,x,i)):
+od:
+
+fprintf(fd,"\n\n"):
+
+# Print the tables
+fprintf(fd, "typedef struct tPi_t_tag {double hi; double mi; double lo;} tPi_t;  \n"):
+fprintf(fd, "static const tPi_t twoPowerIndex1[%d] = {\n", 2^(L/2)):
+for i from 0 to 2^(L/2)-1 do
+      fprintf(fd, "  { \n"):      
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1hi[%d] */ \n", twoPowerIndex1hi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1mi[%d] */ \n", twoPowerIndex1mi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1lo[%d] */ \n", twoPowerIndex1lo[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^(L/2)-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+fprintf(fd, "static const tPi_t twoPowerIndex2[%d] = {\n", 2^(L/2)):
+for i from 0 to 2^(L/2)-1 do
+      fprintf(fd, "  { \n"):      
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2hi[%d] */ \n", twoPowerIndex2hi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2mi[%d] */ \n", twoPowerIndex2mi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2lo[%d] */ \n", twoPowerIndex2lo[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^(L/2)-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+
+fprintf(fd, "\n\n"):
+
+fclose(fd):
+
+filename:="TEMPEXP/exp-td-accurate.sed":
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, " s/_rhmax/%1.50e/g\n", rmax):
+fprintf(fd, " s/_rmmax/%1.50e/g\n", rmax*2^(-52)):
+fprintf(fd, " s/_rlmax/%1.50e/g\n", rmax*2^(-105)):
+fprintf(fd, " s/_epsilonApproxAccurate/%1.50e/g\n", epsilonApproxAccurate):
+fprintf(fd, " s/_epsilonApproxRmAccurate/%1.50e/g\n", epsilonApproxRmAccurate):
+fprintf(fd, " s/_epsilonApproxRlAccurate/%1.50e/g\n", epsilonApproxRlAccurate):
+fprintf(fd, " s/_epsilonApproxSpecial/%1.50e/g\n", epsilonApproxAccurateSpecial):
+
+for i from 3 to DDNumberAccu-1 do
+	(hi,lo) := hi_lo(coeff(polyAccurate,x,i)):
+	fprintf(fd, "s/_accPolyC%dh/%1.50e/g\n",i,hi):
+	fprintf(fd, "s/_accPolyC%dl/%1.50e/g\n",i,lo):
+od:
+
+for i from DDNumberAccu to PolyDegreeAccurate do
+	fprintf(fd, "s/_accPolyC%d/%1.50e/g\n",i,coeff(polyAccurate,x,i)):
+od:
+
+fclose(fd):
+
+
+
+printf("----DONE---\n") :
+
+
diff --git a/src/crlibm/maple/expm1.mpl b/src/crlibm/maple/expm1.mpl
new file mode 100644
index 0000000..73f4bb6
--- /dev/null
+++ b/src/crlibm/maple/expm1.mpl
@@ -0,0 +1,257 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "exp-td.mpl";
+Digits := 120:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+mkdir("TEMPEXPM1"):
+
+
+printPolynomialIntoFile := proc(fd,s,p) 
+local i, hi, mi, lo:
+for i from 0 to degree(p(x),x) do
+	(hi,mi,lo) := hi_mi_lo(coeff(p(x),x,i)):
+	if ((abs(hi) = 1.0) and (mi = 0) and (lo = 0)) then 
+		printf(
+		"Coefficient %d of the polynomial is exactly %f and will not be stored in the table\n",i,hi): 
+	else 
+	if ((abs(hi) = 0.5) and (mi = 0) and (lo = 0)) then 
+		printf(
+		"Coefficient %d of the polynomial is exactly %f and will not be stored in the table\n",i,hi): 
+	else 
+	if (hi <> 0) then
+ 		fprintf(fd,"#define %s%dh %1.50e\n",s,i,hi):
+	end if:
+	if (mi <> 0) then
+	 	fprintf(fd,"#define %s%dm %1.50e\n",s,i,mi):
+	end if:
+	if (lo <> 0) then
+	 	fprintf(fd,"#define %s%dl %1.50e\n",s,i,lo):
+	end if:
+	end if:
+	end if:
+od:
+end proc:
+
+
+# First, we compute special values 
+
+ReturnXBound := convert((ieeehexa(2^(-54)))[1],decimal,hex):
+
+Largest := 2^(1023) * ((2^(53) - 1) / 2^(52)):
+
+Smallest := 2^(-1023) * 1 * 2^(-51):
+
+OverflowBound := nearest(log(Largest + 1)):
+
+MinusOneBound := nearest(log(2^(-54))):
+
+SimpleOverflowBound := convert(ieeehexa(OverflowBound)[1],decimal,hex):
+
+DirectIntervalBound := convert((ieeehexa(0.25))[1],decimal,hex):
+
+MinusOnePlusOneUlp := -1 + 2^(-53): # Attention: it's 2^(-53) because we are at a binade boundary
+
+# Second, we have the computation of the values for the direct interval
+
+# The function, that we approximate is 
+
+directF := unapply(exp(x) - 1,x):
+
+# The domain is 
+
+directA := -2^(-5):
+directB := 2^(-5):
+
+# The polynomials are
+
+quickDirectpoly := X -> X+1/2*X^2+(3360682229480701/1180591620717411303424*X^6+3660136839517697/147573952589676412928*X^5+7320130809407439/36893488147419103232*X^4+3202559734508631/2305843009213693952*X^3+4803839602572223/576460752303423488*X^2+6004799503160665/144115188075855872*X+6004799503160661/36028797018963968)*X^3:
+
+accuDirectpoly := X -> X+1/2*X^2+(3786738884990361/4951760157141521099596496896*X^12+7100145222887513/618970019642690137449562112*X^11+6212541673969101/38685626227668133590597632*X^10+5047690109993399/2417851639229258349412352*X^9+3785767582868083/151115727451828646838272*X^8+5205430426443615/18889465931478580854784*X^7+29303968161043118891149009244865/10633823966279326983230456482242756608*X^6+65933928362347017505024866986963/2658455991569831745807614120560689152*X^5+6593392836234701750 [...]
+
+
+# Truncate the quick phase direct interval polynomial to degree specialDegree 
+# for special interval |x| <= specialBound (speed-up)
+
+specialDegree := 5:
+specialBound := 2^(-12):
+
+specialPoly := unapply(sum(coeff(quickDirectpoly(x),x,i) * x^i,i=0..specialDegree),x):
+
+printf("Special polynomial is the direct polynomial truncated to degree %d used in |x| < 2^(%f)\n",
+	specialDegree, evalf(log[2](specialBound))):
+
+# Compute the relative errors
+
+errDirectQuick := numapprox[infnorm](quickDirectpoly(x)/directF(x) -1,x=directA..directB):
+errDirectAccu := numapprox[infnorm](accuDirectpoly(x)/directF(x) -1,x=directA..directB):
+
+errSpecialPoly := numapprox[infnorm](specialPoly(x)/directF(x) -1,x=-specialBound..specialBound):
+
+errDirectAccuSpecial := numapprox[infnorm](accuDirectpoly(x)/directF(x) -1,x=2^(-12)..2^(-12)):
+
+printf("The relative approximation error of the direct interval quick polynomial is 2^(%f)\n",
+	evalf(log[2](abs(errDirectQuick)))):
+printf("The relative approximation error of the direct interval accurate polynomial is 2^(%f)\n",
+	evalf(log[2](abs(errDirectAccu)))):
+printf("The relative approximation error of the special interval special polynomial is 2^(%f)\n",
+	evalf(log[2](abs(errSpecialPoly)))):
+printf("The relative approximation error of the direct interval accurate polynomial in special domain is 2^(%f)\n",
+	evalf(log[2](abs(errDirectAccuSpecial)))):
+
+
+
+# Third, we have the computation of the values for the common interval
+
+# The function, that we approximate is 
+
+commonF := unapply(exp(x),x):
+
+# The domain is 
+
+commonA := -log(2)*2^(-12) * (1/2 + 2^(-19)):
+commonB := log(2)*2^(-12) * (1/2 + 2^(-19)):
+
+
+quickCommonpoly := X -> 1+X+1/2*X^2+(6004799504593679/144115188075855872*X+6004799504235425/36028797018963968)*X^3:
+
+accuCommonpoly := X -> 1+X+1/2*X^2+(3660068549402285/18446744073709551616*X^4+6405119471061623/4611686018427387904*X^3+4803839602528529/576460752303423488*X^2+54086425609737787796676993069745/1298074214633706907132624082305024*X+54086425609737787797192670135537/324518553658426726783156020576256)*X^3:
+
+# Compute the relative errors
+
+errCommonQuick := numapprox[infnorm](quickCommonpoly(x)/commonF(x) -1,x=commonA..commonB):
+errCommonAccu := numapprox[infnorm](accuCommonpoly(x)/commonF(x) -1,x=commonA..commonB):
+
+printf("The relative approximation error of the common interval quick polynomial is 2^(%f)\n",
+	evalf(log[2](abs(errCommonQuick)))):
+printf("The relative approximation error of the common interval accurate polynomial is 2^(%f)\n",
+	evalf(log[2](abs(errCommonAccu)))):
+
+epsilonApproxRmAccurate := numapprox[infnorm]( ((1+x)/(exp(x)))-1, x=commonA*2^(-52)..commonB*2^(-52)):
+epsilonApproxRlAccurate := numapprox[infnorm]( ((1+x)/(exp(x)))-1, x=commonA*2^(-105)..commonB*2^(-105)):
+
+printf("The approximation rel error for approximating exp(rm) by 1 + rm is 2^(%2f)\n", 
+	log2(abs(epsilonApproxRmAccurate))):
+printf("The approximation rel error for approximating exp(rl) by 1 + rl is 2^(%2f)\n", 
+	log2(abs(epsilonApproxRlAccurate))):
+
+
+
+# Compute the constants for argument reduction and the tables in the common path
+
+MsLog2Div2L := evalf(-log(2)/(2^(12))):
+
+msLog2Div2Lh, msLog2Div2Lm, msLog2Div2Ll := hi_mi_lo(MsLog2Div2L):
+
+epsMsLog2Div2L := evalf(abs(((msLog2Div2Lh + msLog2Div2Lm + msLog2Div2Ll) - MsLog2Div2L)/MsLog2Div2L)):
+epsDDMsLog2Div2L := evalf(abs(((msLog2Div2Lh + msLog2Div2Lm) - MsLog2Div2L)/MsLog2Div2L)):
+
+printf("The error made by storing MsLog2Div2L as a double-double is 2^(%f)\n",log[2](epsDDMsLog2Div2L)):
+printf("The error made by storing MsLog2Div2L as a triple-double is 2^(%f)\n",log[2](epsMsLog2Div2L)):
+
+gap := -floor(-log[2](abs(msLog2Div2Lm/msLog2Div2Lh))):
+
+printf("Information: |msLog2Div2Lm| <= 2^(%f) * |msLog2Div2Lh|\n",gap):
+
+
+log2InvMult2L := nearest(2^(12) / (log(2))):
+
+shiftConst := 2^(52) + 2^(51):
+
+indexmask1 := 2^((12)/2) - 1:
+indexmask2 := indexmask1 * 2^((12)/2):
+
+for i from 0 to 2^(12/2) - 1 do
+	twoPowerIndex1hi[i], twoPowerIndex1mi[i], twoPowerIndex1lo[i] := hi_mi_lo(evalf(2^(i/(2^12)))):
+	twoPowerIndex2hi[i], twoPowerIndex2mi[i], twoPowerIndex2lo[i] := hi_mi_lo(evalf(2^(i/(2^(12/2))))):
+od: 
+
+# Estimate the error of the two quick phases 
+
+# ATTENTION: C EST PIFOMETRIQUE POUR L INSTANT
+
+epsQuickDirectOverall := 2^(-62):
+epsQuickCommonOverall := 2^(-62):
+
+
+
+# Write the tables
+
+printf("Write tables...\n"):
+
+filename:="TEMPEXPM1/expm1.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/* File generated by maple/expm1.mpl */\n"):
+
+fprintf(fd, "\#define log2InvMult2L %1.50e\n",log2InvMult2L):
+fprintf(fd, "\#define msLog2Div2Lh %1.50e\n",msLog2Div2Lh):
+fprintf(fd, "\#define msLog2Div2Lm %1.50e\n",msLog2Div2Lm):
+fprintf(fd, "\#define msLog2Div2Ll %1.50e\n",msLog2Div2Ll):
+fprintf(fd, "\#define shiftConst %1.50e\n",shiftConst):
+fprintf(fd, "\#define INDEXMASK1 0x%08x\n",indexmask1):
+fprintf(fd, "\#define INDEXMASK2 0x%08x\n",indexmask2):
+fprintf(fd, "\#define RETURNXBOUND 0x%08x\n",ReturnXBound):
+fprintf(fd, "\#define OVERFLOWBOUND %1.50e\n",OverflowBound):
+fprintf(fd, "\#define LARGEST %1.50e\n",Largest): 
+fprintf(fd, "\#define SMALLEST %1.50e\n",Smallest): 
+fprintf(fd, "\#define MINUSONEBOUND %1.50e\n",MinusOneBound):
+fprintf(fd, "\#define SIMPLEOVERFLOWBOUND 0x%08x\n",SimpleOverflowBound):
+fprintf(fd, "\#define DIRECTINTERVALBOUND 0x%08x\n",DirectIntervalBound):
+fprintf(fd, "\#define SPECIALINTERVALBOUND 0x%08x\n",convert((ieeehexa(specialBound))[1],decimal,hex)):
+fprintf(fd, "\#define ROUNDCSTDIRECTRN %1.50e\n",compute_rn_constant(epsQuickDirectOverall)):
+fprintf(fd, "\#define ROUNDCSTDIRECTRD %1.50e\n",epsQuickDirectOverall):
+fprintf(fd, "\#define ROUNDCSTCOMMONRN %1.50e\n",compute_rn_constant(epsQuickCommonOverall)):
+fprintf(fd, "\#define ROUNDCSTCOMMONRD %1.50e\n",epsQuickCommonOverall):
+fprintf(fd, "\#define MINUSONEPLUSONEULP %1.50e\n",MinusOnePlusOneUlp):
+
+
+
+fprintf(fd,"\n\n"):
+
+printPolynomialIntoFile(fd,"quickDirectpolyC",quickDirectpoly):
+fprintf(fd,"\n"):
+printPolynomialIntoFile(fd,"accuDirectpolyC",accuDirectpoly):
+fprintf(fd,"\n"):
+printPolynomialIntoFile(fd,"quickCommonpolyC",quickCommonpoly):
+fprintf(fd,"\n"):
+printPolynomialIntoFile(fd,"accuCommonpolyC",accuCommonpoly):
+
+
+fprintf(fd,"\n\n"):
+
+# Print the tables
+fprintf(fd, "typedef struct tPi_t_tag {double hi; double mi; double lo;} tPi_t;  \n"):
+fprintf(fd, "static const tPi_t twoPowerIndex1[%d] = {\n", 2^(12/2)):
+for i from 0 to 2^(12/2)-1 do
+      fprintf(fd, "  { \n"):      
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1hi[%d] */ \n", twoPowerIndex1hi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1mi[%d] */ \n", twoPowerIndex1mi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1lo[%d] */ \n", twoPowerIndex1lo[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^(12/2)-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+fprintf(fd, "static const tPi_t twoPowerIndex2[%d] = {\n", 2^(12/2)):
+for i from 0 to 2^(12/2)-1 do
+      fprintf(fd, "  { \n"):      
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2hi[%d] */ \n", twoPowerIndex2hi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2mi[%d] */ \n", twoPowerIndex2mi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2lo[%d] */ \n", twoPowerIndex2lo[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^(12/2)-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+
+fprintf(fd, "\n\n"):
+
+fclose(fd):
+
+printf("               ...done\n"):
\ No newline at end of file
diff --git a/src/crlibm/maple/gal.mpl b/src/crlibm/maple/gal.mpl
new file mode 100644
index 0000000..7a19b97
--- /dev/null
+++ b/src/crlibm/maple/gal.mpl
@@ -0,0 +1,72 @@
+Digits := 120:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+
+
+#---------------------------------------------------------------------
+# Procedure gal computes a number x and a boolean such that 
+# 
+# if the boolean is true
+# - |x - xstart| is minimal 
+# - x = roundX(x) (x is a floating point number in format roundX)
+# - |(roundY(f(x)) - f(x)) / f(x)| <= eps
+#
+# and the boolean is false if no such x could be found in iter iterations
+#
+# Limitations:
+#
+# - floating point numbers xp such that f(xp) = 0 are not considered
+# 
+# Uses: 
+#
+# - The successor function succX for floating point numbers roundX(t)
+
+gal:=proc(xstart,roundX,f,roundY,epsi,succX,iter)
+local xleft, xright, i, err, ima, d, x, eps, b;
+d := Digits;
+Digits := 120;
+eps := abs(epsi);
+xleft := roundX(xstart);
+xright := roundX(succX(roundX(xstart)));
+x := 0;
+i := 0;
+err := eps * 2;
+while ((err > eps) and (i < iter)) do
+	i := i + 1;
+	if (type(i,odd)) then
+		x := xright;
+		xright := evalf(roundX(succX(roundX(xright))));
+	else
+		x := xleft;
+		xleft := evalf(roundX(-succX(roundX(-xleft))));
+	end if;
+	ima := evalf(f(x));
+	if (ima <> 0) then 
+		err := evalf(abs((ima - roundY(ima))/ima));
+	end if;
+end do;
+b := false;
+if (i < iter) then b := true; end if;
+Digits := d;
+(x,b);
+end proc:
+
+
+galDoubleToDouble:=proc(xstart,f,epsi,iter)
+local g,b,xn; 
+(g,b) := gal(xstart,nearest,f,nearest,epsi,succDouble,iter);
+if (b) then xn := g; else xn = xstart; end if; 
+xn;
+end proc:
+
+galDoubleToDoubleDouble:=proc(xstart,f,epsi,iter) 
+local g,b,xn; 
+(g,b) := gal(xstart,nearest,f,nearestDD,epsi,succDouble,iter);
+if (b) then xn := g; else xn = xstart; end if;
+xn;
+end proc:
+
+
diff --git a/src/crlibm/maple/log-de.mpl b/src/crlibm/maple/log-de.mpl
new file mode 100644
index 0000000..9704e23
--- /dev/null
+++ b/src/crlibm/maple/log-de.mpl
@@ -0,0 +1,359 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "log-de.mpl";
+#TODO output scripts for the Gappa proof out for Paterson/Stockmayer
+Digits := 100:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "double-extended.mpl":
+mkdir("TEMPLOG"):
+
+
+log2h,log2l := hiloExt(log(2)):
+
+
+L := 7: # number of bits used to address the table
+
+MAXINDEX    := round(2^L * (sqrt(2)-1)):
+
+for i from 0 to MAXINDEX-1 do
+    center[i] := 1 + i*2^(-L): # center[i] in [1, 2[
+    # We want it to fit on 11 bits of mantissa
+    r[i] :=  round(evalf(  (1/center[i]) * 2^(11)) ) / 2^(11) ;
+
+od:
+for i from MAXINDEX to 2^L do
+    # y has been divided by two, center[i] in [0.5, 1[
+    center[i]:=(1 + i*2^(-L)) / 2:
+    # We want it to fit on 11 bits of mantissa,
+    r[i] :=  round(evalf(  (1/center[i]) * 2^(10)) ) / 2^(10) ;
+od:
+
+# Note that we go up to 2^L although the case 2^L is wrapped to zero
+# in the C code. It could be important for zmax (but it turns out not).
+
+for i from 0 to 2^L do
+    (logirh[i], logirl[i]) := hiloExt(-log(r[i])):
+od:
+
+#Computation of ZMax.
+for i from 0 to MAXINDEX-1 do
+    t_x := center[i] + 2^(-L-1) :
+    zmax[i] := (t_x*r[i]-1) :
+    t_x := center[i] - 2^(-L-1) :
+    zmin[i] := (t_x*r[i]-1) :
+    zabsmax[i] := max(abs(zmin[i]), abs(zmax[i])):
+od:
+for i from MAXINDEX to 2^L do
+    t_x := center[i] + 2^(-L-2) :
+    zmax[i] := (t_x*r[i]-1) :
+    t_x := center[i] - 2^(-L-2) :
+    zmin[i] := (t_x*r[i]-1) :
+    zabsmax[i] := max(abs(zmin[i]), abs(zmax[i])):
+od:
+
+zmaxmax:=0:
+zminmin:=0:
+for i from 0 to 2^L do
+    if zmax[i] > zmaxmax then zmaxmax := zmax[i]: fi:
+    if zmin[i] < zminmin then zminmin := zmin[i]: fi:
+od:
+printf("zminmin = -2^(%2f)   zmaxmax = 2^(%2f)\n", log2(-zminmin), log2(zmaxmax) ) :
+
+
+PolyDegreeQuick:=7:
+
+#Keep -zmaxmax..zmaxmax to keep c1=1, which is useful in the proof
+
+if(1+1=3) then # The polynomial used to be computed here,
+polyQuick:= polyExact2Ext(x  * numapprox[minimax](  log(1+x)/x,  x=-zmaxmax..zmaxmax,  [PolyDegreeQuick-1,0], 1 ,  'deltaApprox'), 0):
+
+epsilonApproxQuick := numapprox[infnorm]( 1-polyQuick/log(1+x), x=zminmin..zmaxmax):
+deltaApproxQuick := numapprox[infnorm]( polyQuick-log(1+x), x=zminmin..zmaxmax):
+else
+# magical polynomial given by Sylvain's tool
+polyQuick := x * (1 + (x * ((-0.50000000000000000000000000000000000000000000000000000000000000e0) + (x * (0.33333333333333342585191871876304503530263900756835937500000000e0 + (x * ((-0.24999999998423708125194764306797878816723823547363281250000000e0) + (x * (0.19999999996748479835773082413652446120977401733398437500000000e0 + (x * ((-0.16666957260954737285452154083031928166747093200683593750000000e0) + (x * 0.14286056338555042088955815415829420089721679687500000000000000e0)))))))))))):
+
+# validated infinite norms given by Christoph's tool
+epsilonApproxQuick := 2^(-64.119667587221):
+deltaApproxQuick := 2^(-72.230387592107):
+fi:
+printf(" rel approximation error for the quick phase is 2^(%2f)\n", log2(epsilonApproxQuick) ) :
+printf(" abs approximation error for the quick phase is 2^(%2f)\n", log2(deltaApproxQuick) ) :
+
+# For the Paterson/Stockmayer method
+polyQuick0:= x  * numapprox[minimax](  log(1+x)/x,  x=-zmaxmax..zmaxmax,  [PolyDegreeQuick-1,0], 1 ,  'deltaApprox'):
+
+## Création des nouveaux coefficients
+polyQuick0:= x  * numapprox[minimax](  log(1+x)/x,  x=-zmaxmax..zmaxmax,  [PolyDegreeQuick-1,0], 1 ,  'deltaApprox'):
+
+## Création des nouveaux coefficients
+a7 := convert(coeff(polyQuick0,x,7),rational):
+a6 := convert(coeff(polyQuick0,x,6)/a7,rational):
+a5 := convert(coeff(polyQuick0,x,5)/a7,rational):
+a4 := convert(coeff(polyQuick0,x,4)/a7,rational):
+
+a3 := convert(coeff(polyQuick0,x,3),rational):
+a2 := convert(coeff(polyQuick0,x,2),rational):
+a1 := convert(coeff(polyQuick0,x,1),rational):
+a0 := convert(coeff(polyQuick0,x,0),rational):
+
+alpha0 := a5 - 1:
+alpha1 := a6:
+alpha2 := a4 - alpha0 * a6:
+
+##
+a7_hi,a7_lo         := hiloExt(a7):
+a3_hi,a3_lo         := hiloExt(a3):
+a2_hi,a2_lo         := hiloExt(a2):
+a0_hi,a0_lo         := hiloExt(a0):
+
+c_hi,c_lo         := hiloExt(alpha0):
+alpha_hi,alpha_lo := hiloExt(alpha1):
+beta_hi,beta_lo   := hiloExt(alpha2):
+
+#coef_c := c_hi + c_lo:
+#coef_alpha := alpha_hi + alpha_lo:
+#coef_beta := beta_hi + beta_lo:
+#coef_c7 := a7_hi + a7_lo:
+#coef_c3 := a3_hi + a3_lo:
+#coef_c2 := a2_hi + a2_lo:
+#coef_c0 := a0_hi + a0_lo:
+
+coef_c := c_hi:
+coef_alpha := alpha_hi:
+coef_beta := beta_hi:
+coef_c7 := a7_hi:
+coef_c3 := a3_hi:
+coef_c2 := a2_hi:
+coef_c0 := a0_hi:
+
+polyQuickPat := ((x^2 + coef_c)*(x + coef_alpha) + (x + coef_beta)) * (coef_c7*x^4) + ((coef_c3 * x + coef_c2)*x^2 + (x)):
+
+epsilonApproxQuickPat := numapprox[infnorm]( 1-polyQuickPat/log(1+x), x=zminmin..zmaxmax):
+printf("   approximation rel error for Paterson/Stockmayer in the quick phase is 2^(%2f)\n", log2(epsilonApproxQuickPat) ) :
+deltaApproxQuickPat := numapprox[infnorm]( polyQuickPat-log(1+x), x=zminmin..zmaxmax):
+printf("   approximation abs error for Paterson/Stockmayer in the quick phase is 2^(%2f)\n", log2(deltaApproxQuickPat) ) :
+
+
+
+PolyDegreeAccurate:=14:
+
+printf("Computing the polynomial for accurate phase (this may take some time...)\n"):
+pe:= x  * numapprox[minimax](  log(1+x)/x,  x=-zmaxmax..zmaxmax,  [PolyDegreeAccurate-1,0], 1 ,  'deltaApprox'):
+
+
+MaxDegreeDDE:=8:  #
+
+polyAccurate := polyExact2Ext(pe, MaxDegreeDDE):
+deltaApproxAccurate := numapprox[infnorm](polyAccurate-log(1+x), x=-zmaxmax..zmaxmax):
+epsilonApproxAccurate := numapprox[infnorm]( 1-polyAccurate/log(1+x), x=-zmaxmax..zmaxmax):
+printf("   approximation error for the accurate phase is 2^(%2f)\n", log2(epsilonApproxAccurate) ) :
+
+
+
+
+filename:="TEMPLOG/log-de.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "/*File generated by maple/log-de.mpl*/\n\n"):
+# some constants
+fprintf(fd, "#define L        %d\n", L):
+fprintf(fd, "#define MAXINDEX %d\n", MAXINDEX):
+fprintf(fd, "#define INDEXMASK %d\n", 2^L-1):
+fprintf(fd, "static const double two64 = %1.25e ;\n", evalf(2^64)):
+
+fprintf(fd, "#if 1\n#define ESTRIN\n#else\n#define PATERSON\n#endif\n"):
+
+fprintf(fd, "#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)\n\n"):
+
+fprintf(fd, "#ifdef PATERSON\n"):
+  #  polynomial for quick phase
+  fprintf(fd,"static const long double c7 = %1.50e;\n",coef_c7):
+  fprintf(fd,"static const long double c3 = %1.50e;\n",coef_c3):
+  fprintf(fd,"static const long double c2 = %1.50e;\n",coef_c2):
+  fprintf(fd,"static const long double ps_alpha = %1.50e;\n",coef_alpha):
+  fprintf(fd,"static const long double ps_beta = %1.50e;\n",coef_beta):
+  fprintf(fd,"static const long double ps_c = %1.50e;\n",coef_c):
+fprintf(fd, "#endif/* PATERSON*/\n\n"):
+
+fprintf(fd, "#ifdef ESTRIN\n"):
+ fprintf(fd, "  /* Coefficients are read directly from the array thanks to the following macros */ \n"):
+  for i from PolyDegreeQuick to 2 by -1 do
+    fprintf(fd, "#define c%d  c[%d]\n", i, PolyDegreeQuick-i):
+  od:
+   fprintf(fd, "static const double c[%d] =  {\n",PolyDegreeQuick):
+   for i from PolyDegreeQuick to 2 by -1 do
+     fprintf(fd, "   /* c%d  = */ %1.50eL, \n", i, coeff(polyQuick,x,i)):
+   od:
+  fprintf(fd, "}; \n \n"):
+fprintf(fd, "#endif/* ESTRIN */\n\n"):
+
+
+
+  for i from PolyDegreeAccurate to 1 by -1 do
+    fprintf(fd, "#define c%dh  ch[%d]\n", i, PolyDegreeAccurate-i):
+  od:
+
+  for i from MaxDegreeDDE-1 to 1 by -1 do
+    fprintf(fd, "#define c%dl  cl[%d]\n", i, MaxDegreeDDE-1-i):
+  od:
+  fprintf(fd, "#define PREFETCH_POLY_ACCURATE \n"):
+  fprintf(fd, "\n#else /* not(defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)),\n   assuming Itanium, otherwise we shouldn't be there */ \n\n"):
+  fprintf(fd, "#define PREFETCH_POLY_QUICK "):
+  for i from PolyDegreeQuick to 2 by -1 do
+    fprintf(fd, "c%d=c[%d]; ", i, PolyDegreeQuick-i):
+  od:
+  fprintf(fd, "\n#define PREFETCH_POLY_ACCURATE "):
+  for i from PolyDegreeAccurate to 1 by -1 do
+    fprintf(fd, "c%dh=ch[%d]; ", i, PolyDegreeAccurate-i):
+    if i mod 4 =0 then  fprintf(fd, "\\\n        "): fi:
+  od:
+  fprintf(fd, "\\\n        "):
+  for i from MaxDegreeDDE-1 to 1 by -1 do
+    fprintf(fd, "c%dl=cl[%d]; ", i, MaxDegreeDDE-1-i):
+  od:
+
+  fprintf(fd, "\n#endif /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */ \n\n"):
+
+  # Various constants
+  fprintf(fd, "static const long double log2H  = %1.50eL ;\n", log2h):
+  fprintf(fd, "static const long double log2L  = %1.50eL ;\n", log2l):
+
+  # The polynomials
+  #  polynomial for quick phase
+#  for i from PolyDegreeQuick to 1 by -1 do
+#    fprintf(fd, "static const long double c%d =    %1.50eL ;\n", i, coeff(polyQuick,x,i)):
+#  od:
+
+  #  polynomial for accurate phase
+  fprintf(fd, "static const long double ch[%d] =  {\n",PolyDegreeAccurate):
+   for i from PolyDegreeAccurate to 1 by -1 do
+     (ch, cl) := hiloExt(coeff(polyAccurate,x,i)):
+     fprintf(fd, "   /* ch%d  = */ %1.50eL, \n", i, ch):
+   od:
+  fprintf(fd, "}; \n \n"):
+
+  fprintf(fd, "static const long double cl[%d] =  {\n", MaxDegreeDDE):
+  for i from MaxDegreeDDE-1 to 1 by -1 do
+     (ch, cl) := hiloExt(coeff(polyAccurate,x,i)):
+     fprintf(fd, "   /* cl%d  = */ %1.50eL, \n", i, cl):
+   od:
+  fprintf(fd, "}; \n \n"):
+
+
+  # The tables
+
+
+  fprintf(fd, "typedef struct rri_tag {float r; long double logirh;  long double logirl; } rri ;  \n"):
+  fprintf(fd, "static const rri argredtable[%d] = {\n", 2^L):
+  for i from 0 to 2^L-1 do
+      fprintf(fd, "  { \n"):
+      fprintf(fd, "    %1.50eL,   /* r[%d] */ \n", r[i], i):
+      fprintf(fd, "    %1.50eL, /* logirh[%d] */ \n", logirh[i], i):
+      fprintf(fd, "    %1.50eL, /* logirl[%d] */ \n", logirl[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^L-1) then  fprintf(fd, ", \n"): fi
+  od:
+fprintf(fd, "}; \n \n"):
+
+fclose(fd):
+
+printf("\n************ DONE TEMPLOG/log-de.h ************\n");
+
+
+
+
+filename:="TEMPLOG/polynomials.sed":
+fd:=fopen(filename, WRITE, TEXT):
+for i from PolyDegreeAccurate to 1 by -1 do
+    (ch, cl) := hiloExt(coeff(polyAccurate,x,i)):
+    fprintf(fd, " s/_c%dh/%1.40e/g\n", i, ch):
+    if(i<MaxDegreeDDE) then
+        fprintf(fd, " s/_c%dl/%1.40e/g\n", i, cl):
+    fi:
+od:
+for i from PolyDegreeQuick to 1 by -1 do
+    fprintf(fd, " s/_c%d/%1.40e/g\n", i, coeff(polyQuick,x,i)):
+od:
+fprintf(fd, " s/_deltaApproxQuick/%1.40e/g\n", deltaApproxQuick):
+fprintf(fd, " s/_epsilonApproxQuick/%1.40e/g\n", epsilonApproxQuick):
+fprintf(fd, " s/_deltaApproxAccurate/%1.40e/g\n", deltaApproxAccurate):
+fprintf(fd, " s/_epsilonApproxAccurate/%1.40e/g\n", epsilonApproxAccurate):
+fprintf(fd, " s/_log2h/%1.40e/g\n", log2h):
+fprintf(fd, " s/_log2l/%1.40e/g\n", log2l):
+fclose(fd):
+
+printf("\n************ DONE TEMPLOG/polynomials.sed ************\n");
+
+for j from 0 to 2^L-1 do
+    filename:=cat("TEMPLOG/log-de_",j,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+    fprintf(fd, " s/_rval/%1.40e/g\n",     r[j]):
+    fprintf(fd, " s/_logirh/%1.40e/g\n", logirh[j]):
+    fprintf(fd, " s/_logirl/%1.40e/g\n", logirl[j]):
+    fprintf(fd, " s/_zabsmax/%1.40e/g\n", zabsmax[j]):
+    fclose(fd):
+  od:
+
+
+
+printf("\n************ DONE TEMPLOG/log-de*.sed ************\n");
+
+# A shell script to use them
+filename:="../gappa/log-de/run-log-de-proof.sh":
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, "#!/bin/sh\n"):
+fprintf(fd, "# You probably need to edit the path to the gappa executable\n"):
+fprintf(fd, "GAPPA=~/local/src/gappa/src/gappa\n"):
+fprintf(fd, "CRLIBMDIR=../..\n"):
+
+fprintf(fd, "echo Accurate phase, case E=0, index=0: 1>&2\n"):
+fprintf(fd, "sed  -f $CRLIBMDIR/maple/TEMPLOG/polynomials.sed  -f $CRLIBMDIR/maple/TEMPLOG/log-de_0.sed $CRLIBMDIR/gappa/log-de/log-de-acc-index0-E0.gappa | $GAPPA \n"):
+
+fprintf(fd, "echo Accurate phase, case E!=0, index=0 1>&2\n"):
+fprintf(fd, "sed  -f $CRLIBMDIR/maple/TEMPLOG/polynomials.sed  -f $CRLIBMDIR/maple/TEMPLOG/log-de_0.sed $CRLIBMDIR/gappa/log-de/log-de-acc-index0-E1N.gappa | $GAPPA \n"):
+
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Accurate phase, case E=0, index=$num 1>&2\n"):
+fprintf(fd, "  sed -f $CRLIBMDIR/maple/TEMPLOG/polynomials.sed  -f $CRLIBMDIR/maple/TEMPLOG/log-de_$num.sed $CRLIBMDIR/gappa/log-de/log-de-acc-index1N-E0.gappa | $GAPPA \n"):
+fprintf(fd, "  echo 1>&2\n"):
+fprintf(fd, "done\n"):
+
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Accurate phase, case E!=0, index = $num 1>&2 \n"):
+fprintf(fd, "  sed -f $CRLIBMDIR/maple/TEMPLOG/polynomials.sed  -f $CRLIBMDIR/maple/TEMPLOG/log-de_$num.sed $CRLIBMDIR/gappa/log-de/log-de-acc-index1N-E1N.gappa | $GAPPA \n"):
+fprintf(fd, "  echo 1>&2\n"):
+fprintf(fd, "done\n\n"):
+
+
+fprintf(fd, "echo Quick phase, case E=0, index=0  1>&2\n"):
+fprintf(fd, "sed  -f $CRLIBMDIR/maple/TEMPLOG/polynomials.sed  -f $CRLIBMDIR/maple/TEMPLOG/log-de_0.sed $CRLIBMDIR/gappa/log-de/log-de-index0-E0.gappa | $GAPPA \n"):
+fprintf(fd, "  echo 1>&2\n"):
+
+fprintf(fd, "echo Quick phase, case E!=0, index=0 1>&2 \n"):
+fprintf(fd, "sed  -f $CRLIBMDIR/maple/TEMPLOG/polynomials.sed  -f $CRLIBMDIR/maple/TEMPLOG/log-de_0.sed $CRLIBMDIR/gappa/log-de/log-de-index0-E1N.gappa | $GAPPA \n"):
+fprintf(fd, "  echo 1>&2\n"):
+
+
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Quick phase, for all E,  index=$num 1>&2\n"):
+fprintf(fd, "  sed  -f $CRLIBMDIR/maple/TEMPLOG/polynomials.sed  -f $CRLIBMDIR/maple/TEMPLOG/log-de_$num.sed $CRLIBMDIR/gappa/log-de/log-de-index1N-E0N.gappa | $GAPPA \n"):
+fprintf(fd, "  echo 1>&2\n"):
+fprintf(fd, "done\n"):
+
+fclose(fd):
+
+printf("\n************ DONE TEMPLOG/run-log-de-proof.sh ************\n"):
+printf("Now you should run \n"):
+printf(" sh ../../gappa/log-de/run-log-de-proof.sh  2> ../../maple/TEMPLOG/Gappa.out\n"):
+printf("  (You probably need to edit the path to the gappa executable within run-log-de-proof.sh)\n"):
+printf("Then look at TEMPLOG/Gappa.out. It shouldn't contain 'some enclosures were not satisfied'.\n If it does, report it !\n"):
+
+
+printf("----DONE---\n") :
+
diff --git a/src/crlibm/maple/log-de.patterson.mpl b/src/crlibm/maple/log-de.patterson.mpl
new file mode 100644
index 0000000..cee6a5c
--- /dev/null
+++ b/src/crlibm/maple/log-de.patterson.mpl
@@ -0,0 +1,305 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "log-de.mpl";
+Digits := 200:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "double-extended.mpl":
+mkdir("PATERSON"):
+
+
+log2h,log2l := hiloExt(log(2)):
+
+
+L := 7: # number of bits used to address the table
+
+MAXINDEX    := round(2^L * (sqrt(2)-1)):
+
+for i from 0 to MAXINDEX-1 do
+    center[i] := 1 + i*2^(-L): # center[i] in [1, 2[
+    # We want it to fit on 11 bits of mantissa
+    r[i] :=  round(evalf(  (1/center[i]) * 2^(11)) ) / 2^(11) ;
+
+od:
+for i from MAXINDEX to 2^L do
+    # y has been divided by two, center[i] in [0.5, 1[
+    center[i]:=(1 + i*2^(-L)) / 2:
+    # We want it to fit on 11 bits of mantissa,
+    r[i] :=  round(evalf(  (1/center[i]) * 2^(10)) ) / 2^(10) ;
+od:
+
+# Note that we go up to 2^L although the case 2^L is wrapped to zero
+# in the C code. It could be important for zmax (but it turns out not).
+
+for i from 0 to 2^L do
+    (logirh[i], logirl[i]) := hiloExt(-log(r[i])):
+od:
+
+#Computation of ZMax.
+for i from 0 to MAXINDEX-1 do
+    t_x := center[i] + 2^(-L-1) :
+    zmax[i] := (t_x*r[i]-1) :
+    t_x := center[i] - 2^(-L-1) :
+    zmin[i] := (t_x*r[i]-1) :
+    zabsmax[i] := max(abs(zmin[i]), abs(zmax[i])):
+od:
+for i from MAXINDEX to 2^L do
+    t_x := center[i] + 2^(-L-2) :
+    zmax[i] := (t_x*r[i]-1) :
+    t_x := center[i] - 2^(-L-2) :
+    zmin[i] := (t_x*r[i]-1) :
+    zabsmax[i] := max(abs(zmin[i]), abs(zmax[i])):
+od:
+
+zmaxmax:=0:
+zminmin:=0:
+for i from 0 to 2^L do
+    if zmax[i] > zmaxmax then zmaxmax := zmax[i]: fi:
+    if zmin[i] < zminmin then zminmin := zmin[i]: fi:
+od:
+printf("zminmin = -2^(%2f)   zmaxmax = 2^(%2f)\n", log2(-zminmin), log2(zmaxmax) ) :
+
+
+PolyDegreeQuick:=7:
+
+#Keep -zmaxmax..zmaxmax to keep c1=1, which is useful in the proof
+
+###### PHASE RAPIDE
+polyQuick0:= x  * numapprox[minimax](  log(1+x)/x,  x=-zmaxmax..zmaxmax,  [PolyDegreeQuick-1,0], 1 ,  'deltaApprox'):
+
+## Création des nouveaux coefficients
+a7 := convert(coeff(polyQuick0,x,7),rational):
+a6 := convert(coeff(polyQuick0,x,6)/a7,rational):
+a5 := convert(coeff(polyQuick0,x,5)/a7,rational):
+a4 := convert(coeff(polyQuick0,x,4)/a7,rational):
+
+a3 := convert(coeff(polyQuick0,x,3),rational):
+a2 := convert(coeff(polyQuick0,x,2),rational):
+a1 := convert(coeff(polyQuick0,x,1),rational):
+a0 := convert(coeff(polyQuick0,x,0),rational):
+
+alpha0 := a5 - 1:
+alpha1 := a6:
+alpha2 := a4 - alpha0 * a6:
+
+##
+a7_hi,a7_lo         := hiloExt(a7):
+a3_hi,a3_lo         := hiloExt(a3):
+a2_hi,a2_lo         := hiloExt(a2):
+a0_hi,a0_lo         := hiloExt(a0):
+
+c_hi,c_lo         := hiloExt(alpha0):
+alpha_hi,alpha_lo := hiloExt(alpha1):
+beta_hi,beta_lo   := hiloExt(alpha2):
+
+coef_c := c_hi + c_lo:
+coef_alpha := alpha_hi + alpha_lo:
+coef_beta := beta_hi + beta_lo:
+coef_c7 := a7_hi + a7_lo:
+coef_c3 := a3_hi + a3_lo:
+coef_c2 := a2_hi + a2_lo:
+coef_c0 := a0_hi + a0_lo:
+
+polyQuick := ((x^2 + coef_c)*(x + coef_alpha) + (x + coef_beta)) * (coef_c7*x^4) + ((coef_c3 * x + coef_c2)*x^2 + (x)):
+
+epsilonApproxQuick := numapprox[infnorm]( 1-polyQuick/log(1+x), x=zminmin..zmaxmax):
+printf("   approximation rel error for the quick phase is 2^(%2f)\n", log2(epsilonApproxQuick) ) :
+deltaApproxQuick := numapprox[infnorm]( polyQuick-log(1+x), x=zminmin..zmaxmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(deltaApproxQuick) ) :
+################################################################################################
+
+PolyDegreeAccurate:=14:
+
+printf("Computing the polynomial for accurate phase (this may take some time...)\n"):
+pe:= x  * numapprox[minimax](  log(1+x)/x,  x=-zmaxmax..zmaxmax,  [PolyDegreeAccurate-1,0], 1 ,  'deltaApprox'):
+
+
+MaxDegreeDDE:=8:  #
+
+polyAccurate := polyExact2Ext(pe, MaxDegreeDDE):
+deltaApproxAccurate := numapprox[infnorm](polyAccurate-log(1+x), x=-zmaxmax..zmaxmax):
+epsilonApproxAccurate := numapprox[infnorm]( 1-polyAccurate/log(1+x), x=-zmaxmax..zmaxmax):
+printf("   approximation error for the accurate phase is 2^(%2f)\n", log2(epsilonApproxAccurate) ) :
+
+
+
+
+filename:="PATERSON/log-de.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "/*File generated by maple/log-de.mpl*/\n\n"):
+
+  fprintf(fd, "#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)\n\n"):
+
+  fprintf(fd, "#ifndef PATERSON\n#define PATERSON\n#endif\n"):
+
+  for i from PolyDegreeAccurate to 1 by -1 do
+    fprintf(fd, "#define c%dh  ch[%d]\n", i, PolyDegreeAccurate-i):
+  od:
+
+  for i from MaxDegreeDDE-1 to 1 by -1 do
+    fprintf(fd, "#define c%dl  cl[%d]\n", i, MaxDegreeDDE-1-i):
+  od:
+  fprintf(fd, "#define PREFETCH_POLY_ACCURATE \n"):
+  fprintf(fd, "\n#else /* not(defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)),\n   assuming Itanium, otherwise we shouldn't be there */ \n\n"):
+
+  fprintf(fd, "\n#define PREFETCH_POLY_ACCURATE "):
+  for i from PolyDegreeAccurate to 1 by -1 do
+    fprintf(fd, "c%dh=ch[%d]; ", i, PolyDegreeAccurate-i):
+    if i mod 4 =0 then  fprintf(fd, "\\\n        "): fi:
+  od:
+  fprintf(fd, "\\\n        "):
+  for i from MaxDegreeDDE-1 to 1 by -1 do
+    fprintf(fd, "c%dl=cl[%d]; ", i, MaxDegreeDDE-1-i):
+  od:
+
+  fprintf(fd, "\n#endif /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */ \n\n"):
+
+  # Various constants
+  fprintf(fd, "#define L        %d\n", L):
+  fprintf(fd, "#define MAXINDEX %d\n", MAXINDEX):
+  fprintf(fd, "#define INDEXMASK %d\n", 2^L-1):
+  fprintf(fd, "static const long double log2h  = %1.50eL ;\n", log2h):
+  fprintf(fd, "static const long double log2l  = %1.50eL ;\n", log2l):
+  fprintf(fd, "static const long double two64 = %1.50eL ;\n", evalf(2^64)):
+
+  # The polynomials
+  #  polynomial for quick phase
+  fprintf(fd,"static const long double c7 = %1.50e;\n",coef_c7):
+  fprintf(fd,"static const long double c3 = %1.50e;\n",coef_c3):
+  fprintf(fd,"static const long double c2 = %1.50e;\n",coef_c2):
+  fprintf(fd,"static const long double ps_alpha = %1.50e;\n",coef_alpha):
+  fprintf(fd,"static const long double ps_beta = %1.50e;\n",coef_beta):
+  fprintf(fd,"static const long double ps_c = %1.50e;\n",coef_c):
+
+  #  polynomial for accurate phase
+  fprintf(fd, "static const long double ch[%d] =  {\n",PolyDegreeAccurate):
+   for i from PolyDegreeAccurate to 1 by -1 do
+     (ch, cl) := hiloExt(coeff(polyAccurate,x,i)):
+     fprintf(fd, "   /* ch%d  = */ %1.50eL, \n", i, ch):
+   od:
+  fprintf(fd, "}; \n \n"):
+
+  fprintf(fd, "static const long double cl[%d] =  {\n", MaxDegreeDDE):
+  for i from MaxDegreeDDE-1 to 1 by -1 do
+     (ch, cl) := hiloExt(coeff(polyAccurate,x,i)):
+     fprintf(fd, "   /* cl%d  = */ %1.50eL, \n", i, cl):
+   od:
+  fprintf(fd, "}; \n \n"):
+
+
+  # The tables
+  fprintf(fd, "typedef struct rri_tag {float r; long double logirh;  long double logirl; } rri ;  \n"):
+  fprintf(fd, "static const rri argredtable[%d] = {\n", 2^L):
+  for i from 0 to 2^L-1 do
+      fprintf(fd, "  { \n"):
+      fprintf(fd, "    %1.50eL,   /* r[%d] */ \n", r[i], i):
+      fprintf(fd, "    %1.50eL, /* logirh[%d] */ \n", logirh[i], i):
+      fprintf(fd, "    %1.50eL, /* logirl[%d] */ \n", logirl[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^L-1) then  fprintf(fd, ", \n"): fi
+  od:
+  fprintf(fd, "}; \n \n"):
+fclose(fd):
+
+printf("\n************ DONE PATERSON/log-de.h ************\n");
+
+
+
+
+filename:="PATERSON/polynomials.sed":
+fd:=fopen(filename, WRITE, TEXT):
+for i from PolyDegreeAccurate to 1 by -1 do
+    (ch, cl) := hiloExt(coeff(polyAccurate,x,i)):
+    fprintf(fd, " s/_c%dh/%1.40e/g\n", i, ch):
+    if(i<MaxDegreeDDE) then
+        fprintf(fd, " s/_c%dl/%1.40e/g\n", i, cl):
+    fi:
+od:
+
+fprintf(fd, " s/_c7/%1.40e/g\n", coef_c7):
+fprintf(fd, " s/_c3/%1.40e/g\n", coef_c3):
+fprintf(fd, " s/_c2/%1.40e/g\n", coef_c2):
+
+fprintf(fd, " s/_ps_alpha/%1.40e/g\n", coef_alpha):
+fprintf(fd, " s/_ps_beta/%1.40e/g\n", coef_beta):
+fprintf(fd, " s/_ps_c/%1.40e/g\n", coef_c):
+
+fprintf(fd, " s/_deltaApproxQuick/%1.40e/g\n", deltaApproxQuick):
+fprintf(fd, " s/_epsilonApproxQuick/%1.40e/g\n", epsilonApproxQuick):
+fprintf(fd, " s/_deltaApproxAccurate/%1.40e/g\n", deltaApproxAccurate):
+fprintf(fd, " s/_epsilonApproxAccurate/%1.40e/g\n", epsilonApproxAccurate):
+fprintf(fd, " s/_log2h/%1.40e/g\n", log2h):
+fprintf(fd, " s/_log2l/%1.40e/g\n", log2l):
+fclose(fd):
+
+printf("\n************ DONE PATERSON/polynomials.sed ************\n");
+
+for j from 0 to 2^L-1 do
+    filename:=cat("PATERSON/log-de_",j,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+    fprintf(fd, " s/_rval/%1.40e/g\n",     r[j]):
+    fprintf(fd, " s/_logirh/%1.40e/g\n", logirh[j]):
+    fprintf(fd, " s/_logirl/%1.40e/g\n", logirl[j]):
+    fprintf(fd, " s/_zabsmax/%1.40e/g\n", zabsmax[j]):
+    fclose(fd):
+  od:
+
+
+
+printf("\n************ DONE PATERSON/log-de*.sed ************\n");
+
+# A shell script to use them
+filename:="../gappa/run-log-de-proof.sh":
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, "#!/bin/sh\n"):
+fprintf(fd, "# You probably need to edit the path to the gappa executable\n"):
+fprintf(fd, "GAPPA=~/gappa/src/gappa\n"):
+
+fprintf(fd, "echo Accurate phase, case E=0, index=0:\n"):
+fprintf(fd, "sed  -f ../maple/PATERSON/polynomials.sed  -f ../maple/PATERSON/log-de_0.sed ../gappa/log-de-acc-index0-E0.gappa | $GAPPA \n"):
+
+fprintf(fd, "echo Accurate phase, case E!=0, index=0\n"):
+fprintf(fd, "sed  -f ../maple/PATERSON/polynomials.sed  -f ../maple/PATERSON/log-de_0.sed ../gappa/log-de-acc-index0-E1N.gappa | $GAPPA \n"):
+
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Accurate phase, case E=0, index=$num\n"):
+fprintf(fd, "  sed -f ../maple/PATERSON/polynomials.sed  -f ../maple/PATERSON/log-de_$num.sed ../gappa/log-de-acc-index1N-E0.gappa | $GAPPA \n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Accurate phase, case E!=0, index = $num\n"):
+fprintf(fd, "  sed -f ../maple/PATERSON/polynomials.sed  -f ../maple/PATERSON/log-de_$num.sed ../gappa/log-de-acc-index1N-E1N.gappa | $GAPPA \n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n\n"):
+
+
+fprintf(fd, "echo Quick phase, case E=0, index=0\n"):
+fprintf(fd, "sed  -f ../maple/PATERSON/polynomials.sed  -f ../maple/PATERSON/log-de_0.sed ../gappa/log-de-index0-E0.gappa | $GAPPA \n"):
+
+fprintf(fd, "echo Quick phase, case E!=0, index=0\n"):
+fprintf(fd, "sed  -f ../maple/PATERSON/polynomials.sed  -f ../maple/PATERSON/log-de_0.sed ../gappa/log-de-index0-E1N.gappa | $GAPPA \n"):
+
+
+fprintf(fd, "for num in `seq 0 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Quick phase, for all E,  index=$num \n"):
+fprintf(fd, "  sed  -f ../maple/PATERSON/polynomials.sed  -f ../maple/PATERSON/log-de_$num.sed ../gappa/log-de-index1N-E0N.gappa | $GAPPA \n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+
+fclose(fd):
+
+printf("\n************ DONE PATERSON/run-log-de-proof.sh ************\n"):
+printf("Now you should run \n"):
+printf(" sh ../gappa/run-log-de-proof.sh  2> ../maple/PATERSON/Gappa.out\n"):
+printf("  (You probably need to edit the path to the gappa executable within run-log-de-proof.sh)\n"):
+printf("Then look at PATERSON/Gappa.out. It shouldn't contain 'some enclosures were not satisfied'.\n If it does, report it !\n"):
+
+
+printf("----DONE---\n") :
+
diff --git a/src/crlibm/maple/log-de2.mpl b/src/crlibm/maple/log-de2.mpl
new file mode 100644
index 0000000..69c3235
--- /dev/null
+++ b/src/crlibm/maple/log-de2.mpl
@@ -0,0 +1,140 @@
+#######################################################################
+# To use:
+# restart; read "log.mpl";
+Digits := 100:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "double-extended.mpl":
+mkdir("TEMPLOG"):
+
+
+ln2h,ln2l := hiloExt(log(2)):
+
+L := 8: # number of bits used to address the table (imposed by frcpa)
+
+read"frcpa.mpl";
+for i from 0 to 2^L-1 do
+    (logirh[i], logirl[i]) := hiloExt(-log(r[i])):
+od:
+
+zmax:=2^(-8.886): # given by the doc of the frcpa
+
+minyfast:=(1-zmax)*(1+2^(-21)): # mult by 1+2^(-21) to ensure the bound computed below is valid
+MINYFAST:=ieeehexa(minyfast)[1]:
+
+maxyfast:=(1+zmax)*(1-2^(-21)): # mult by 1-2^(-21) to ensure the bound computed below is valid
+MAXYFAST:=ieeehexa(maxyfast)[1]:
+
+PolyDegreeAccurate:=13:
+
+printf("Computing the polynomial for accurate phase (this may take some time...)\n"):
+pe:= x  * numapprox[minimax](  log(1+x)/x,  x=-zmax..zmax,  [PolyDegreeAccurate-1,0], 1 ,  'delta_approx'):
+log2(delta_approx):
+# 123 bits
+
+
+
+MaxDegreeDDE:=8:  #
+
+polyAccurate := polyExact2Ext(pe, MaxDegreeDDE):
+#delta_approx := numapprox[infnorm](polyAccurate-log(1+x), x=-zmax..zmax):
+epsilon_approx_accurate := numapprox[infnorm]( 1-polyAccurate/log(1+x), x=-zmax..zmax):
+printf("   approximation error for the accurate phase is 2^(%2f)\n", log2(epsilon_approx_accurate) ) :
+
+
+PolyDegreeQuick:=6: # On peut faire 6 pour les grands exposants. A voir
+
+if(1+1=3) then
+# Here we tried to use the polynomial from the accurate phase for the
+# quick one.  This loses 7 bits of precision compared to a clean minimax, meaning
+# one degree more. Better do two polynomials. To investigate some day,
+# there must be a polynomial that does both.
+
+#truncated to PolyDegreeQuick and to DE. We use the fact that series(p)=p
+polyQuick := convert(series(polyExact2Ext(polyAccurate, 0), x=0, PolyDegreeQuick+1), polynom):
+#delta_approx := numapprox[infnorm](polyAccurate-log(1+x), x=-zmax..zmax):
+epsilon_approx := numapprox[infnorm]( 1-polyQuick/log(1+x), x=-zmax..zmax):
+printf("   approximation error for the quick phase is 2^(%2f)\n", log2(epsilon_approx) ) ;
+fi:
+
+
+polyQuick:= polyExact2Ext(x  * numapprox[minimax](  log(1+x)/x,  x=-zmax..zmax,  [PolyDegreeQuick-1,0], 1 ,  'delta_approx'), 0):
+epsilon_approx_quick := numapprox[infnorm]( 1-polyQuick/log(1+x), x=-zmax..zmax):
+printf("   approximation rel error for the quick phase is 2^(%2f)\n", log2(epsilon_approx_quick) ) :
+delta_approx_quick := numapprox[infnorm]( polyQuick-log(1+x), x=-zmax..zmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(delta_approx_quick) ) :
+
+
+
+
+
+filename:="TEMPLOG/log-de2.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "/*File generated by maple/log-de2.mpl*/\n\n"):
+
+  # Various constants
+  fprintf(fd, "#define L        %d\n", L):
+  fprintf(fd, "static const long double ln2h  = %1.50eL ;\n", ln2h):
+  fprintf(fd, "static const long double ln2l  = %1.50eL ;\n", ln2l):
+  fprintf(fd, "static const long double two64 = %1.50eL ;\n", evalf(2^64)):
+
+  fprintf(fd, "#define MINYFAST 0x%s\n", MINYFAST):
+  fprintf(fd, "#define MAXYFAST 0x%s\n", MAXYFAST):
+
+  # The polynomials
+  #  polynomial for quick phase
+#  for i from PolyDegreeQuick to 1 by -1 do
+#    fprintf(fd, "static const long double c%d =    %1.50eL ;\n", i, coeff(polyQuick,x,i)):
+#  od:
+   fprintf(fd, "static const long double c[%d] =  {\n",PolyDegreeQuick):
+   for i from PolyDegreeQuick to 1 by -1 do
+     fprintf(fd, "   /* c[%d]  = */ %1.50eL, \n", i, coeff(polyQuick,x,i)):
+   od:
+  fprintf(fd, "}; \n \n"):
+
+  #  polynomial for accurate phase
+  for i from PolyDegreeAccurate to MaxDegreeDDE by -1 do
+    fprintf(fd, "static const long double c%dh =    %1.50eL ;\n", i, coeff(polyAccurate,x,i)):
+  od:
+  for i from  MaxDegreeDDE-1 to 1 by -1 do
+    (ch, cl) := hiloExt(coeff(polyAccurate,x,i)):
+    fprintf(fd, "static const long double c%dh =    %1.50eL ;\n", i, ch):
+    fprintf(fd, "static const long double c%dl =    %1.50eL ;\n", i, cl):
+  od:
+
+  # The tables
+
+
+  fprintf(fd, "#if defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)\n"):
+  fprintf(fd, "typedef struct dde_tag {long double h; float r; long double l; } dde ;  \n"):
+  fprintf(fd, "static const dde argredtable[%d] = {\n", 2^L):
+  for i from 0 to 2^L-1 do
+      fprintf(fd, "  { \n"):
+      fprintf(fd, "    %1.50eL, /* logirh[%d] */ \n", logirh[i], i):
+      fprintf(fd, "    %1.10f,   /* frcpa[%d] */ \n", r[i], i):
+      fprintf(fd, "    %1.50eL, /* logirl[%d] */ \n", logirl[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^L-1) then  fprintf(fd, ", \n"): fi
+  od:
+fprintf(fd, "}; \n \n"):
+  fprintf(fd, "#else /* not(defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64)),\n   assuming Itanium, otherwise we shouldn't be there */ \n"):
+  fprintf(fd, "typedef struct dde_tag {long double h;  long double l; } dde ;  \n\n"):
+  fprintf(fd, "static const dde argredtable[%d] = {\n", 2^L):
+  for i from 0 to 2^L-1 do
+      fprintf(fd, "  { \n"):
+      fprintf(fd, "    %1.50eL, /* logirh[%d] */ \n", logirh[i], i):
+      fprintf(fd, "    %1.50eL, /* logirl[%d] */ \n", logirl[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^L-1) then  fprintf(fd, ", \n"): fi
+  od:
+fprintf(fd, "}; \n \n"):
+  fprintf(fd, "#endif /* defined(CRLIBM_TYPECPU_X86) || defined(CRLIBM_TYPECPU_AMD64) */ \n"):
+
+
+fclose(fd):
+
+printf("----DONE---\n") :
+
diff --git a/src/crlibm/maple/log-itanium.mpl b/src/crlibm/maple/log-itanium.mpl
new file mode 100644
index 0000000..e8243be
--- /dev/null
+++ b/src/crlibm/maple/log-itanium.mpl
@@ -0,0 +1,164 @@
+restart:
+Digits := 50:
+interface(quiet=true);
+
+read "double-extended.mpl";
+read "common-procedures.mpl";
+
+#  This file is not finished and currently unused
+
+
+# ln(2) as a double-double-ext, with 10 free bits in the higher part
+# so that the multiplication by the exponent is exact
+# useless thanks to FMA, sigh
+
+ln2hi:= round( ln(2.) * (2**54))    /    (2**54) ;
+r:=evalf(ln(2) - ln2hi):
+bits_log2hi:=1+log2(op(2,ieeedoubleExt(ln2hi)[3]));
+ln2lo:=nearestExt(ln(2.) - ln2hi);
+eps_ln2_cst:=abs( (ln2hi+ln2lo-ln(2.)) / ln(2.)):
+log2(eps_ln2_cst);
+
+
+# take bits from Aleksey's polynomial */
+# Converting the real polynomial may allow to stop at degree 4
+
+
+poly_aleksey:=polyExact2Ext(x - x^2/2 + x^3/3 -x^4/4 + x^5/5, 0);
+eps_approx := numapprox[infnorm](poly_aleksey/log(1+x) -1  , x=-2^(-13.72)..2^(-14.09));
+log2(eps_approx);
+
+
+# Find a good polynomial for approximating log(1+x) - x + x^2/2
+
+eps_frcpa:=2^(-8.8);
+# first try a Taylor series
+p:=convert(series(log(1+x), x=0, 8), polynom);
+eps_approx := numapprox[infnorm](p/log(1+x) -1 , x=-eps_frcpa..eps_frcpa);
+log2(eps_approx);
+
+# now for something more clever
+p:=numapprox[minimax](((log(1+x) -x)/x + x/2)/x, x=-eps_frcpa..eps_frcpa, [11,0], 1, 'err');
+poly_exact := expand( ((p-coeff(p,x,0))*x - x/2)*x +x );
+eps_approx := numapprox[infnorm](poly_exact/log(1+x) -1 , x=-eps_frcpa..eps_frcpa);
+log2(eps_approx);
+# we might win a degree here by being even more clever
+
+# OK so we have a polynomial of deg. 13, and only 7 to get 63 bits.
+# How many operations are required in DDE ?
+
+ddeops:=7;
+poly_accurate:=polyExact2Ext(poly_exact, ddeops);
+eps_approx := numapprox[infnorm](poly_accurate/log(1+x) -1 , x=-eps_frcpa..eps_frcpa);
+log2(eps_approx);
+
+e := 2^(-6.3):
+marge := 2^(-30);
+P19 := convert(series(arctan(x),x=0,20),polynom):
+P18 := (P19-x)/x;
+Q18 := polyExact2Ext(P18, 9);
+Q9 := -1/3 +1/5*x - 1/7*x^2 + 1/9*x^3 - 1/11*x^4 + 1/13*x^5 - 1/15*x^6 + 1/17*x^7- 1/19*x^8;
+Qprime := poly_exact( -x /3 + x^2/5 - x^3/7 + x^4 /9);
+#log2 (infnorm( (arctan(x)-x*(1+Q18))/x, x=0..e));
+
+#function taken from the "old" coef_atan to compute interval parameters.
+maxx := bi -> simplify( solve( (x-bi) / (1+x*bi) = e ,x) ):
+minx := bi -> simplify(solve( (x-bi) /(1+x*bi)=-e ,x)):
+nextbi := proc (x) evalf( max(solve( minx(bi) = x ,bi) )*(1-marge)); end:
+allbi := proc (n)
+local xi,nbi,x,i,j;
+global b,a, nbofai, nbofbi, valuefordicho;
+    x := e;
+    nbi := 0;
+    i := 0;
+    while(i<n and nbi < 1/e and nbi >= 0) do
+        nbi := nearest ( nextbi(x) );
+        b[i] := evalf( nbi );
+        a[i] := x;
+        x   := evalf(maxx(nbi));
+        i:=i+1;
+    od;
+    j:=0;
+    while ( 2^j < i ) do j:=j+1 od:
+    nbofai := i;
+    nbofbi := i;
+    b[i-1] := nearest(1/e+4):
+    valuefordicho := 2^j;
+    return i,b[0],b[i-1];
+end:
+allbi(100);
+#-------------
+
+#-----------------------
+#quick error calc :
+#-----Reduction:-------
+XredEpsilon := 2^(-64) + 2^(-64) + 2^(-64) + 2^(-64):
+Xred2Epsilon := 2*XredEpsilon + 2^(-64);
+log[2.](Xred2Epsilon);
+errlist:=errlist_quickphase_horner(degree(Qprime),0,0,Xred2Epsilon, 2^(-64));
+errorr := compute_horner_rounding_error(Qprime,x,e,errlist,true);
+qEpsilon := errorr[1]:
+log[2.](qEpsilon);
+deltaApprox := e^11/11:
+polyDelta := e^3*qEpsilon + 2^(-64)*e+ 3*2^(-64)*e^3:
+EpsilonFinal := polyDelta/arctan(e)+2*2^(-64)+deltaApprox/e:
+log[2.](EpsilonFinal);
+#------no reduction-------
+Errlist:=errlist_quickphase_horner(degree(Qprime),0,0,0, 2**(-64)):
+qEpsilon:= compute_horner_rounding_error(Qprime,x,e,errlist,true)[1]:
+deltaApprox := e^11/5:
+EpsilonFinalNoRed := infnorm( (qEpsilon.x^3+2^(-64).x+2^(-64).x^3)/arctan(x),x=2^(-27)..2^(-6) ) + deltaApprox + 2^(-64):
+log[2.](EpsilonFinalNoRed);
+#-----------------------
+
+# Output :
+
+doth:=proc()
+ local filename, fd, i, hi, lo;
+   filename := "TEMPLOG/log_ext.h":
+    fd := fopen (filename,WRITE,TEXT):
+    fprintf(fd,"/* file generated by log_itanium.mpl*/\n\n"):
+    fprintf(fd,"#include \"double_ext.h\"\n"):
+
+    fprintf(fd, "static const double  HALFPI = %1.50e;\n", nearest(Pi/2)):
+
+    fprintf(fd, "#define MIN_REDUCTION_NEEDED %s\n",  printDoubleAsHexInt(e)):
+    fprintf(fd,"#define A 0\n"):
+    fprintf(fd,"#define B 1\n"):
+    fprintf(fd,"#define ATAN_BHI 0\n"):
+    fprintf(fd,"#define ATAN_BLO 1\n"):
+
+    fprintf(fd,"#define epsilon %1.50e\n", EpsilonFinal):
+    fprintf(fd,"#define epsilon_no_red %1.50e\n",EpsilonFinalNoRed):
+    fprintf(fd,"#define TWO_M_64 %1.50e\n",2^(-64)):
+    fprintf(fd,"#define TWO_10 %1.50e\n",2^10):
+
+    fprintf(fd, "__declspec(align(16)) static const unsigned long long int ab_table[%d][2] = {\n", nbofai );
+
+    for i from 0 to nbofai - 1 do
+        fprintf(fd, " {  /*a[%d] ~= %1.20e   */ ",i,a[i]):
+        fprintf(fd, "  %s,\n", printDoubleAsULL(a[i]));
+        fprintf(fd, "      /*b[%d] ~= %1.20e   */ ",i,b[i]):
+        fprintf(fd, "  %s },\n", printDoubleAsULL(b[i]));
+    od:
+    fprintf(fd,"\n};\n"):
+
+
+    fprintf(fd, "#define atanb_table ((const XC_FLOAT_TYPE *)_atanb_table)\n");
+
+    fprintf(fd, "__declspec(align(16)) static const unsigned short _atanb_table[] = {\n", nbofai );
+    for i from 0 to nbofai - 1 do
+        fprintf(fd, " /*atan_b[%d] ~= %1.10e*/\n ",i, arctan(b[i])):
+        hi:=nearestExt(arctan(b[i]));
+        lo:=arctan(b[i])-nearestExt(arctan(b[i]));
+        fprintf(fd, " %s, \n", printDoubleExtAsShort(hi));
+        fprintf(fd, "   %s, \n", printDoubleExtAsShort(lo));
+    od:
+    fprintf(fd,"};\n"):
+
+    printPolyExt(fd,Q9,4,"coef_poly"):
+    fclose(fd):
+end proc;
+
+doth();
+
diff --git a/src/crlibm/maple/log-td.mpl b/src/crlibm/maple/log-td.mpl
new file mode 100644
index 0000000..595beac
--- /dev/null
+++ b/src/crlibm/maple/log-td.mpl
@@ -0,0 +1,316 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "log-de.mpl";
+Digits := 120:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+mkdir("TEMPLOG"):
+
+
+# We want log2h + log2m + log2l + delta = log(2) such that
+# log2h and log2m have at least 11 trailing zeros
+# in order to have an exact multiplication with E, which is lower than 1024 in
+# magnitude
+# The resting accuracy is enough for both quick and accurate phases.
+
+log2acc := log(2):
+log2h := round(log2acc * 2**(floor(-log[2](abs(log2acc))) + (53 - 11))) / 2**(floor(-log[2](abs(log2acc))) + (53 - 11)):
+log2m := round((log2acc - log2h) * 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11))) / 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11)):
+log2l := log2acc - (log2h + log2m):
+
+
+L := 7: # number of bits used to address the table
+
+MAXINDEX    := round(2^L * (sqrt(2)-1)):
+
+for i from 0 to MAXINDEX-1 do
+    center[i] := 1 + i*2^(-L): # center[i] in [1, 2[
+    t :=  evalf(1/center[i]):
+    r[i] := round(t * 2**(floor(-log[2](abs(t))) + 23)) / 2**(floor(-log[2](abs(t))) + 23):
+    (logih[i], logim[i], logil[i]) := hi_mi_lo(evalf(-log(r[i]))):
+od:
+for i from MAXINDEX to 2^L do
+    # y has been divided by two, center[i] in [0.5, 1[
+    center[i]:=(1 + i*2^(-L)) / 2:
+    t :=  evalf(1/center[i]):
+    r[i] := round(t * 2**(floor(-log[2](abs(t))) + 23)) / 2**(floor(-log[2](abs(t))) + 23):
+    (logih[i], logim[i], logil[i]) := hi_mi_lo(evalf(-log(r[i]))):
+od:
+
+
+
+
+#Computation of ZMax.
+for i from 0 to MAXINDEX-1 do
+    __x := center[i] + 2^(-L-1) :
+    zmax[i] := (__x*r[i]-1) :
+    __x := center[i] - 2^(-L-1) :
+    zmin[i] := (__x*r[i]-1) :
+od:
+for i from MAXINDEX to 2^L do
+    __x := center[i] + 2^(-L-2) :
+    zmax[i] := (__x*r[i]-1) :
+    __x := center[i] - 2^(-L-2) :
+    zmin[i] := (__x*r[i]-1) :
+od:
+
+zmaxmax:=0:
+zminmin:=0:
+for i from 0 to 2^L do
+    tabulated_value := logih[i] + logim[i] + logil[i]:
+    poly_approx_min := evalf(log(1+zmin[i])):
+    poly_approx_max := evalf(log(1+zmax[i])):
+
+    # Test if we have a case where we cancellate a lot
+    # i.e. the polynomial approximation value is greater than half the tabulated value
+    # the tabulated value is not exactly zero and we are of opposite sign
+
+    if ((abs(poly_approx_min) > 0.75*abs(tabulated_value)) and (tabulated_value <> 0.0) and (poly_approx_min * tabulated_value < 0)) then
+	printf("Polynomial approximation is greater in magnitude in zmin[%d] than half the tabluated value\n",i):
+
+	printf("The tabulated value is %1.50e\n",tabulated_value):
+	if (tabulated_value <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(tabulated_value)))) fi:
+	printf("The value of polynomial in zmin[%d] is %1.50e\n",i,poly_approx_min):
+        if (poly_approx_min <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(poly_approx_min)))) fi:
+
+	summe := poly_approx_min + tabulated_value:
+	printf("The exponent of the sum of both is %d\n",floor(log2(abs(summe)))):
+
+
+    fi:
+
+    if ((abs(poly_approx_max) > 0.75*abs(tabulated_value)) and (tabulated_value <> 0.0) and (poly_approx_max * tabulated_value <0)) then
+	printf("Polynomial approximation is greater in magnitude in zmax[%d] than half the tabluated value\n",i):
+
+	printf("The tabulated value is %1.50e\n",tabulated_value):
+	if (tabulated_value <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(tabulated_value)))) fi:
+	printf("The value of polynomial in zmax[%d] is %1.50e\n",i,poly_approx_max):
+        if (poly_approx_max <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(poly_approx_max)))) fi:
+
+	summe := poly_approx_max + tabulated_value:
+	printf("The exponent of the sum of both is %d\n",floor(log2(abs(summe)))):
+
+
+    fi:
+
+
+    if zmax[i] > zmaxmax then zmaxmax := zmax[i]: fi:
+    if zmin[i] < zminmin then zminmin := zmin[i]: fi:
+od:
+printf("zminmin = -2^(%2f)   zmaxmax = 2^(%2f)\n", log2(-zminmin), log2(zmaxmax) ) :
+
+PolyDegreeQuick:=7:
+
+printf("   degree of the polynomial used in the quick phase is %d\n",PolyDegreeQuick);
+
+DDNumberQuick:=3:
+
+printf("   number of double doubles used for the coefficients is %d\n",DDNumberQuick);
+
+#Keep -zmaxmax..zmaxmax to keep c1=1, which is useful in the proof
+#and constrain the first two coefficients to 1 and -1/2 in order to save up a full multiplication and a rounding error
+polyQuick:= poly_exact2(x*(1+x*(-0.5+x*(numapprox[minimax]((((log(1+x)/x)-1)/x+0.5)/x,
+			x=-zmaxmax..zmaxmax,  [PolyDegreeQuick-3,0], 1 ,  'deltaApprox')))), DDNumberQuick):
+
+#Try to verify the bound for using double double arithmetic.
+#Idea: compare the maximum absolute value of the polynomial in zmaxmax (the polynomial has its maxima at the limits)
+#with the maximum value of the first term which is calculated in double precision only
+
+p := unapply(polyQuick,x):
+printf("   using only %d double doubles should be fine since the hi z ulp should affect the result starting from bit %f\n",
+	DDNumberQuick,evalf(53 + log2(p(zmaxmax)) - log2(zmaxmax^(DDNumberQuick)),5)):
+
+
+epsilonApproxQuick := numapprox[infnorm]( 1-polyQuick/log(1+x), x=zminmin..zmaxmax):
+printf("   approximation rel error for the quick phase is 2^(%2f)\n", log2(epsilonApproxQuick) ) :
+deltaApproxQuick := numapprox[infnorm]( polyQuick-log(1+x), x=zminmin..zmaxmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(deltaApproxQuick) ) :
+
+
+PolyDegreeAccurate:=14:
+
+printf("   degree of the polynomial used in the accurate phase is %d\n",PolyDegreeAccurate);
+
+DDNumberAccu:=7:
+TDNumberAccu:=3:
+
+printf("   number of triple doubles used for the coefficients is %d\n",TDNumberAccu);
+printf("   number of double doubles used for the coefficients is %d\n",DDNumberAccu);
+
+
+#Keep -zmaxmax..zmaxmax to keep c1=1, which is useful in the proof
+polyAccurate:= poly_exact32(x*(1+x*(-0.5+x*(numapprox[minimax]((((log(1+x)/x)-1)/x+0.5)/x,
+				x=-zmaxmax..zmaxmax,  [PolyDegreeAccurate-3,0], 1 ,  'deltaApprox')))),
+				TDNumberAccu, DDNumberAccu):
+
+#Try to verify the bound for using double double arithmetic.
+#Idea: compare the maximum absolute value of the polynomial in zmaxmax (the polynomial has its maxima at the limits)
+#with the maximum value of the first term which is calculated in double precision only
+
+pp := unapply(polyAccurate,x):
+printf("   using only %d triple doubles should be fine since the mi z ulp should affect the result starting from bit %f\n",
+	TDNumberAccu,evalf(106 + log2(p(zmaxmax)) - log2(zmaxmax^(TDNumberAccu)),5)):
+printf("   using only %d double doubles should be fine since the hi z ulp should affect the result starting from bit %f\n",
+	DDNumberAccu,evalf(53 + log2(p(zmaxmax)) - log2(zmaxmax^(TDNumberAccu + DDNumberAccu)),5)):
+
+
+epsilonApproxAccurate := numapprox[infnorm]( 1-polyAccurate/log(1+x), x=zminmin..zmaxmax):
+printf("   approximation rel error for the accurate phase is 2^(%2f)\n", log2(epsilonApproxAccurate) ) :
+deltaApproxAccurate := numapprox[infnorm]( polyAccurate-log(1+x), x=zminmin..zmaxmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(deltaApproxAccurate) ) :
+
+
+
+#-------------------------------------------------------------------
+# Output
+
+
+filename:="TEMPLOG/log-td.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/*File generated by maple/log-td.mpl*/\n"):
+
+fprintf(fd, "\n\#define L %d\n\n",L):
+fprintf(fd, "\#define MAXINDEX %d\n\n", MAXINDEX):
+fprintf(fd, "\#define INDEXMASK %d\n", 2^L-1):
+fprintf(fd, "\#define two52 %1.50e\n", 2^(52)):
+fprintf(fd, "\#define log2h %1.50e\n", log2h):
+fprintf(fd, "\#define log2m %1.50e\n", log2m):
+fprintf(fd, "\#define log2l %1.50e\n", log2l):
+
+epsilon_quick_1 := 2^(-62.5): # The Gappa proof will show this bound
+epsilon_quick_2 := 2^(-62.5): # The Gappa proof will show this bound
+fprintf(fd, "\#define ROUNDCST1 %1.50e\n", compute_rn_constant(epsilon_quick_1)):
+fprintf(fd, "\#define ROUNDCST2 %1.50e\n", compute_rn_constant(epsilon_quick_2)):
+fprintf(fd, "\#define RDROUNDCST1 %1.50e\n", epsilon_quick_1):
+fprintf(fd, "\#define RDROUNDCST2 %1.50e\n", epsilon_quick_2):
+
+
+fprintf(fd, "\n\n"):
+
+
+# Print the defines for the define statements
+
+for i from 3 to PolyDegreeQuick do
+	fprintf(fd, "\#define c%d %1.50e\n",i,coeff(polyQuick,x,i)):
+od:
+
+fprintf(fd, "\n\n"):
+
+for i from 3 to (DDNumberAccu + TDNumberAccu -1) do
+	(hi,lo) := hi_lo(coeff(polyAccurate,x,i)):
+	fprintf(fd, "\#define accPolyC%dh %1.50e\n",i,hi):
+	fprintf(fd, "\#define accPolyC%dl %1.50e\n",i,lo):
+od:
+
+for i from (DDNumberAccu + TDNumberAccu) to PolyDegreeAccurate do
+	fprintf(fd, "\#define accPolyC%d %1.50e\n",i,coeff(polyAccurate,x,i)):
+od:
+
+fprintf(fd, "\n\n"):
+
+# Print the table
+fprintf(fd, "typedef struct rri_tag {float ri; double logih; double logim; double logil;} rri;  \n"):
+fprintf(fd, "static const rri argredtable[%d] = {\n", 2^L):
+for i from 0 to 2^L-1 do
+      fprintf(fd, "  { \n"):
+      fprintf(fd, "    %1.50e,   /* r[%d] */ \n", r[i], i):
+      fprintf(fd, "    %1.50e, /* logih[%d] */ \n", logih[i], i):
+      fprintf(fd, "    %1.50e, /* logim[%d] */ \n", logim[i], i):
+      fprintf(fd, "    %1.50e, /* logil[%d] */ \n", logil[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^L-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+
+fclose(fd):
+
+for j from 0 to 2^L-1 do
+    filename:=cat("TEMPLOG/log-td_",j,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+    fprintf(fd, " s/_log2h/%1.50e/g\n", log2h):
+    fprintf(fd, " s/_log2m/%1.50e/g\n", log2m):
+    fprintf(fd, " s/_log2l/%1.50e/g\n", log2l):
+    fprintf(fd, " s/_logih/%1.50e/g\n", logih[j]):
+    fprintf(fd, " s/_logim/%1.50e/g\n", logim[j]):
+    fprintf(fd, " s/_logil/%1.50e/g\n", logil[j]):
+    fprintf(fd, " s/_zmin/%1.50e/g\n", zmin[j]):
+    fprintf(fd, " s/_zmax/%1.50e/g\n", zmax[j]):
+    for i from 3 to PolyDegreeQuick do
+        fprintf(fd, " s/_c%d/%1.50e/g\n", i, coeff(polyQuick,x,i)):
+    od:
+    fprintf(fd, " s/_epsilonApproxQuick/%1.50e/g\n", epsilonApproxQuick):
+    fclose(fd):
+  od:
+
+for j from 0 to 2^L-1 do
+    filename:=cat("TEMPLOG/log-td-accurate_",j,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+    fprintf(fd, " s/_log2h/%1.50e/g\n", log2h):
+    fprintf(fd, " s/_log2m/%1.50e/g\n", log2m):
+    fprintf(fd, " s/_log2l/%1.50e/g\n", log2l):
+    fprintf(fd, " s/_logih/%1.50e/g\n", logih[j]):
+    fprintf(fd, " s/_logim/%1.50e/g\n", logim[j]):
+    fprintf(fd, " s/_logil/%1.50e/g\n", logil[j]):
+    fprintf(fd, " s/_zmin/%1.50e/g\n", zmin[j]):
+    fprintf(fd, " s/_zmax/%1.50e/g\n", zmax[j]):
+    for i from 3 to (DDNumberAccu + TDNumberAccu -1) do
+	(hi,lo) := hi_lo(coeff(polyAccurate,x,i)):
+        fprintf(fd, " s/_accPolyC%dh/%1.50e/g\n", i, hi):
+        fprintf(fd, " s/_accPolyC%dl/%1.50e/g\n", i, lo):
+    od:
+    for i from (DDNumberAccu + TDNumberAccu) to PolyDegreeAccurate do
+        fprintf(fd, " s/_accPolyC%d/%1.50e/g\n", i, coeff(polyAccurate,x,i)):
+    od:
+    fprintf(fd, " s/_epsilonApproxAccurate/%1.50e/g\n", epsilonApproxAccurate):
+    fclose(fd):
+  od:
+
+# A shell script to use them
+filename:="run-log-td-proof.sh":
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, "#!/bin/sh\n"):
+fprintf(fd, "# You probably need to edit the path to the gappa executable\n"):
+fprintf(fd, "GAPPA=~/sangria/gappa-0.4.7/src/gappa\n"):
+fprintf(fd, "# Test all the possible table value for E=1\n"):
+fprintf(fd, "for num in `seq 0 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=1:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log-td_$num.sed log-td.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# For the case E=0 we first handle the cases 0 and %d using log-td-E0-logir0.gappa\n", 2^L):
+fprintf(fd, "echo 0 and %d, E=0:\n", 2^L):
+fprintf(fd, "sed -f log-td_0.sed log-td-E0-logir0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "# then the other cases where logirh <> 0\n"):
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=0:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log-td_$num.sed log-td-E0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# Accurate phase: Test all the possible table value for E=1\n"):
+fprintf(fd, "for num in `seq 0 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Accurate phase: $num, E=1:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log-td-accurate_$num.sed log-td-accurate.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# Accurate phase: For the case E=0 we first handle the cases 0 and %d using log-td-accurate-E0-logir0.gappa\n", 2^L):
+fprintf(fd, "echo 0 and %d, E=0:\n", 2^L):
+fprintf(fd, "sed -f ./TEMPLOG/log-td-accurate_0.sed log-td-accurate-E0-logir0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "# Accurate phase: then the other cases where logirh <> 0\n"):
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=0:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log-td-accurate_$num.sed log-td-accurate-E0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fclose(fd):
+
+printf("----DONE---\n") :
+
+
diff --git a/src/crlibm/maple/log.mpl b/src/crlibm/maple/log.mpl
new file mode 100644
index 0000000..d39c375
--- /dev/null
+++ b/src/crlibm/maple/log.mpl
@@ -0,0 +1,380 @@
+#######################################################################
+# To use:
+# restart; read "log.mpl";
+Digits := 100:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+mkdir("TEMPLOG"):
+deg:=12:
+# Error, (in mkdir) directory exists and is not empty
+
+
+#######################################################################
+# First, quick phase
+
+# Approach for the first function:
+# log(x) = E*log(2) + P(R)
+# where P(R) is defined over such an interval [11/16; 12/16] ... [21/16; 23/16]
+# At all, there is 8 intervals, corresponding to 8 polynomials.
+
+# Computation of log(2) as a double-double
+# We want to compute E.log(2) where |E|<1024, and get the result as a double-double.
+# We store two double constants ln2hi and ln2lo, such that ln2hi has at most 43 non-zero bits in its mantissa,
+# such that
+# ln2hi+ln2lo = log(2) (1+2**-101) (see below log2(eps_ln2_cst) )
+# and the multiplication of ln2hi by E is exact. Then we use a Fast2Sum to compute E.log2 as a double-double.
+
+ln2hi:= round( ln(2.) * (2**43))    /    (2**43) :
+r:=evalf(ln(2) - ln2hi):
+bits_log2hi:=1+log2(op(2,ieeedouble(ln2hi)[3])):
+ln2lo:=nearest(ln(2.) - ln2hi):
+eps_ln2_cst:=abs( (ln2hi+ln2lo-ln(2.)) / ln(2.)):
+log2(eps_ln2_cst):
+
+
+
+# Performance parameters
+
+# Try adding one or removing one to bitsFastPath. This value is optimal for the Pentium IV
+bitsFastPath:=7:
+
+#idem for MedPath. Look at the proof for explanations.
+bitsMedPath:=4:
+
+minFastPath:=(2^bitsFastPath)+0.5: # such that   |Elog(2) + p(z)| > 2^bitsFastPath   where |p(z)| < 0.4
+EminFastPath:=floor(minFastPath/log(2)): # such that |E| > EminFastPath   => |Elog(2) + p(z)| > 2^bitsFastPath
+evalf((EminFastPath+1)*log(2)-0.4): # just checking
+
+minMedPath:=(2^bitsMedPath)+0.5: # such that   |Elog(2) + p(z)| > 2^bitsMedPath   where |p(z)| < 0.4
+EminMedPath:=floor(minMedPath/log(2)): # such that |E| > EminMedPath   => |Elog(2) + p(z)| > 2^bitsMedPath
+evalf((EminMedPath+1)*log(2)-0.4): # just checking
+
+
+
+# Interval parameters
+
+ymin := (1-2^(-50)) * sqrt(2)/2: # sqrt(2)/2 with margin for the FP comparison and for the computation of xmax
+ymax := (1+2^(-50)) * sqrt(2): # sqrt(2)/2 with margin for the FP comparison and for the computation of xmax
+
+Ilist:=[[ymin,12/16],[12/16,13/16],[13/16,14/16],[14/16,15/16],[15/16,17/16],[17/16,19/16],[19/16,21/16],[21/16,ymax]]:
+Xmax:=[(12/16-ymin)/2, 2**(-5), 2**(-5), 2**(-5), 2**(-4), 2**(-4), 2**(-4), (ymax - 21/16)/2]:
+midI:=[nearest((ymin+12/16)/2), 25/32, 27/32, 29/32, 1,18/16, 20/16, nearest((21/16+ymax)/2)]:
+
+
+# Computation of the polynomials
+
+# This is the function we use on all the intervals
+
+poly_log_2 := proc(i,deg)
+ local p, pe, e, pt, delta_approx, epsilon_approx, delta_rounding, minptr, err,
+       maxptr, maxpt, epsilon, miny, epsilonZero, epsilonEgtMed, ptFastPath,epsilonFastPath,
+       minptrFastPath, maxptrFastPath, errlist, epsilon_lastmult, maxEln2_lo,
+	s1, p1, maxres, c0h, c0l, maxP_hi, maxP_lo,delta_rounding_s1,maxp1,delta_rounding_p1:
+
+  printf("Interval %d  : ", i):
+  if(i=5) # special case around 1, we impose that coeff0 = 0
+  then
+    pe:=x * numapprox[minimax](  (log(1+x)/x),  x=-Xmax[i]..Xmax[i],  [deg-1,0], 1 ,  'delta_approx'):
+    pt := poly_exact2(pe, 2):
+    delta_approx := numapprox[infnorm](pt-log(1+x), x=-Xmax[i]..Xmax[i]):
+    epsilon_approx := numapprox[infnorm]( 1-pt/log(1+x), x=-Xmax[i]..Xmax[i]):
+    maxpt:= numapprox[infnorm]( pt, x=-Xmax[i]..Xmax[i]):
+  else
+    pt, delta_approx, epsilon_approx,  maxpt := poly_trunc_f2d_2( log(x+midI[i]) ,  deg, -Xmax[i], Xmax[i] ):
+  end if:
+
+  printf(" delta_approx = %3.2f, epsilon_approx = %3.2f, maxpt = %3.2f\n", -log2(delta_approx), -log2(epsilon_approx), maxpt):
+
+  #delta for E=0
+  errlist := errlist_quickphase_horner(deg, 2, 2, 0,0): # two dd adds, two dd mul, no error on x
+  epsilon_lastmult, delta_rounding, minptr, maxptr := compute_horner_rounding_error(pt, x, Xmax[i], errlist, true):
+  if i=5 then
+    epsilonZero := (1+epsilon_approx)  * (1 + epsilon_lastmult) - 1 :
+  else
+    epsilonZero := (delta_approx + delta_rounding)/minptr:
+  fi:
+
+  printf(" epsilonZero =  %3.2f ", -log2(epsilonZero)):
+
+
+  # For 0<E<= EminFastPath, the Horner evaluation ends in double-double
+  errlist := errlist_quickphase_horner(deg, 2, 1, 0,0): # two dd adds, one dd mul, no error on x
+  epsilon_lastmult, delta_rounding, minptr, maxptr := compute_horner_rounding_error(pt, x, Xmax[i], errlist, true):
+
+  # epsilon for 0<E<= EminMedPath
+
+  miny:=nearest(log(2.)) - maxptr:       #  worst-case miny
+  # and add to the absolute error that of computing Elog2 : 2**(-90)
+  epsilon:=evalf(  (delta_approx + delta_rounding + 2**(-90) )/miny  )  :
+  printf(" epsilon =  %3.2f ", -log2(epsilon)):
+
+  #delta for EminMedPath < E <= EminFastPath
+
+  miny := (EminMedPath+1)*log(2.) - maxptr:
+  epsilonEgtMed := (delta_approx + delta_rounding + 2**(-90) ) /miny:
+  printf(" epsilonEgtMed =  %3.2f ", -log2(epsilonEgtMed)):
+
+  #epsilon for the fast path : in this case the polynomial is rounded to double, and evaluated only in double
+  ptFastPath := poly_exact2(pt,1): # only coeff of degree 0 in double-double
+  delta_approx :=  numapprox[infnorm](ptFastPath-log(x+midI[i]), x=-Xmax[i]..Xmax[i]):
+  s1 := expand((ptFastPath - coeff(ptFastPath,x,0)) / x): # the polynomial computed in double
+  errlist := errlist_quickphase_horner(deg-1, 0, 0, 0,0): # no dd adds, no dd mul, no error on x
+  epsilon_lastmult, delta_rounding_s1, minptr, maxptrFastPath := compute_horner_rounding_error(s1, x, Xmax[i], errlist, true):
+  p1 := s1*x :
+  maxp1:=numapprox[infnorm](p1, x=-Xmax[i]..Xmax[i]):
+  delta_rounding_p1 := delta_rounding_s1*Xmax[i] + 0.5*ulp(maxp1):   # the last mult by z
+  c0h,c0l := hi_lo(coeff(ptFastPath, x, 0)):
+  maxP_hi := 1075*log(2) + c0h:
+  maxP_lo := maxP_hi*2^(-53):
+  maxEln2_lo := maxP_lo:
+  # the delta is that of the second argument of the last Add12.
+  delta_rounding := delta_rounding_p1
+                      +  0.5*ulp(maxp1 + c0l + maxEln2_lo + maxP_lo)
+                      +  0.5*ulp(c0l + maxEln2_lo + maxP_lo)     # these two last terms are zero in the case i=5
+                      +  0.5*ulp(maxEln2_lo + maxP_lo):          #  but it doesn't change much
+  miny := (EminFastPath+1)*log(2.) - maxp1 :
+  epsilonFastPath := (delta_approx + delta_rounding + 2**(-90) ) / miny :
+  printf(" epsilonFastPath = %3.2f\n", -log2(epsilonFastPath) ):
+  [pt, epsilon_approx, max(maxpt,maxptr), epsilonZero, epsilon, epsilonEgtMed, epsilonFastPath]
+end proc:
+
+
+
+
+
+
+printf("Calcul de PolyList\n"):
+
+PolyList:=[
+  poly_log_2(1,deg),
+  poly_log_2(2,deg),
+  poly_log_2(3,deg),
+  poly_log_2(4,deg),
+  poly_log_2(5,deg),
+  poly_log_2(6,deg),
+  poly_log_2(7,deg),
+  poly_log_2(8,deg)
+]:
+
+
+
+save PolyList, "TEMPLOG/PolyList.m":
+
+
+
+# Computation of constants for RN test
+# We have in PolyList epsilon the total error for polynomial approximation, build tabrndcst[] the table of "e" needed for round to nearest
+
+maxepsilonEZero:=0:
+maxepsilon:=0:
+maxepsilonEgtMed:=0:
+maxepsilonFastPath:=0:
+
+for i from 1 to 8 do
+  epsilonEZero:=evalf(PolyList[i][4]):
+  epsilon:=evalf(PolyList[i][5]):
+  epsilonEgtMed:=evalf(PolyList[i][6]):
+  epsilonFastPath:=evalf(PolyList[i][7]):
+  if epsilonEZero > maxepsilonEZero then maxepsilonEZero := epsilonEZero : fi :
+  if epsilon > maxepsilon then maxepsilon := epsilon : fi :
+  if epsilonEgtMed > maxepsilonEgtMed then maxepsilonEgtMed := epsilonEgtMed : fi :
+  if epsilonFastPath > maxepsilonFastPath then maxepsilonFastPath := epsilonFastPath : fi :
+od:
+rncstEZero := evalf(compute_rn_constant(maxepsilonEZero)):
+rncst := evalf(compute_rn_constant(maxepsilon)):
+rncstEgtMed := evalf(compute_rn_constant(maxepsilonEgtMed)):
+rncstFastPath := evalf(compute_rn_constant(maxepsilonFastPath)):
+
+
+
+
+
+
+
+#-------------------------------------------------------------------
+# Output
+
+
+filename:="TEMPLOG/log_fast.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/*File generated by maple/log.mpl*/\n"):
+
+fprintf(fd, "\n\#define SQRT_2 1.4142135623730950489e0 \n\n"):
+
+fprintf(fd, "#define DEGREE %d\n\n", deg):
+
+fprintf(fd,"#define EMIN_MEDIUMPATH %4.3f \n",EminMedPath ):
+fprintf(fd,"#define EMIN_FASTPATH %4.3f \n",EminFastPath ):
+
+fprintf(fd,"/* Constants for rounding  */\n"):
+
+fprintf(fd,"static const double epsilon[4] =\n{\n"):
+fprintf(fd,"  /* Case E=0  */\n"):
+fprintf(fd,"  %1.50e, \n",maxepsilonEZero):
+fprintf(fd,"  /* Middle case   */\n"):
+fprintf(fd,"  %1.50e, \n",maxepsilon):
+fprintf(fd,"  /* Case E>EminMedPath  */\n"):
+fprintf(fd,"  %1.50e, \n",maxepsilonEgtMed):
+fprintf(fd,"  /* And for the fast path  */\n"):
+fprintf(fd,"  %1.50e \n",maxepsilonFastPath):
+fprintf(fd,"\n};\n\n"):
+
+fprintf(fd,"static const double rncst[4] =\n{\n"):
+fprintf(fd,"  /* Case E=0  */\n"):
+fprintf(fd,"  %1.50e, \n",rncstEZero):
+fprintf(fd,"  /* Middle case   */\n"):
+fprintf(fd,"  %1.50e, \n",rncst):
+fprintf(fd,"  /* Case E>EminMedPath  */\n"):
+fprintf(fd,"  %1.50e, \n",rncstEgtMed):
+fprintf(fd,"  /* And for the fast path  */\n"):
+fprintf(fd,"  %1.50e \n",rncstFastPath):
+fprintf(fd,"};\n\n"):
+
+
+# THE POLYNOMIALS
+
+npol:=8:
+n:=2:  # the degree from which we want two doubles
+
+fprintf(fd,"#ifdef WORDS_BIGENDIAN\n"):
+for isbig from 1 to 0 by -1 do
+
+  if(isbig=0) then
+    fprintf(fd,"#else\n"):
+  fi:
+
+  # Various constants
+  fprintf(fd, "static const db_number ln2hi = "):
+  printendian(fd,ln2hi,isbig):
+  fprintf(fd, ";\n"):
+
+  fprintf(fd, "static const db_number ln2lo = "):
+  printendian(fd,ln2lo,isbig):
+  fprintf(fd, ";\n"):
+
+  fprintf(fd, "static const db_number two52 = "):
+  printendian(fd, nearest(2.**52),isbig):
+  fprintf(fd, ";\n"):
+
+
+  # Write middle table
+
+  fprintf(fd, "static const db_number middle[%d] =\n{\n",npol):
+  for i from 1 to 7 do
+    printendian(fd,midI[i],isbig):
+    fprintf(fd," ,\n"):
+  od:
+  printendian(fd,midI[8],isbig):
+  fprintf(fd, "\n};\n\n"):
+
+  #Write Poly_h
+
+  fprintf(fd,"static const db_number Poly_h[%d][%d] =\n{\n", npol, deg+1):
+  for k from 1 to 8 do
+    fprintf(fd," /* polynomial %d */\n",k):
+    fprintf(fd,"{\n"):
+    P:=PolyList[k][1]:
+    for j from 0 to deg do
+      coef:=hi_lo(coeff(P,x,j)):
+      printendian(fd, coef[1], isbig):
+      if j<deg then fprintf(fd," ,\n") fi:
+    od:
+    fprintf(fd, "\n}"):
+    if k<8 then fprintf(fd, ",\n") fi:
+  od:
+
+  fprintf(fd, "\n};\n\n"):
+
+  #Write Poly_fast_l
+
+  fprintf(fd,"static const db_number Poly_l[%d][%d] =\n{\n",8,n):
+  for k from 1 to 8 do
+    fprintf(fd," /* polynomial %d */\n",k):
+    fprintf(fd,"{\n"):
+    P:=PolyList[k][1]:
+    for j from 0 to n-1 do
+      coef:=hi_lo(coeff(P,x,j)):
+      printendian(fd, coef[2], isbig):
+      if j<deg then fprintf(fd," ,\n") fi:
+    od:
+    fprintf(fd, "\n}"):
+    if k<8 then fprintf(fd, ",\n") fi:
+  od:
+  fprintf(fd,"\n};\n\n"):
+
+od:
+fprintf(fd,"#endif\n\n\n"):
+
+
+
+fclose(fd):
+
+# Output of latex for the report
+
+printf("Polynomial & Relative Approximation Error \\\\\n"):
+   for k from 1 to 8 do
+     P:=PolyList[k]:
+     printf("P[%d] &  %2.2f \\\\ \n", k, -log2(P[2])):
+    od:
+
+
+   printf("Polynomial & Maxp  & Epsilon0 & Epsilon & EpsilonMed & EpsilonFast \\\\\n"):
+   for k from 1 to 8 do
+     P:=PolyList[k]:
+     printf("P[%d] & %2.3f & %2.2f & %2.2f& %2.2f  & %2.2f\\\\ \n",k, P[3]+0.0005, -log2(P[4]), -log2(P[5]), -log2(P[6]), -log2(P[7])):
+    od:
+
+
+
+
+
+
+######################################################################
+# Second, accurate phase in SCS
+# Approach for the scs function:
+
+
+#  Who wrote it ? Please comment and clean up.
+
+#  x=2^e (1+f)
+#  log(x) = e.log(2) + log(1+f)
+
+#   log(1+f) = log(w) + log(1+(1+f-w)/w)
+if(1+1=3) then
+W := 2^5:
+Poly_P := series((ln(1+x)/ln(2.))/x, x=0, 45):
+Poly_Q := convert(Poly_P,polynom):
+Poly_cheb := chebpade(Poly_Q, x=-1/W..1/W, [19,0]):
+Poly_Res  := sort(expand(x * Poly_cheb)):
+log2(numapprox[infnorm]((1-(expand(Poly_Res))/(ln(1+x)/ln(2.))), x=-1/W..1/W)):
+# This procedure gives under a polynom form value needed by tabular range reduction for the logarithm.
+# DON'T forget the zero !!!!
+
+Digits       := 50:
+table_ti     := 0:
+table_inv_wi := 0:
+N            := -4:
+break_point  := sqrt(2.):
+start_nb     := round((break_point/2) * 2.^(-N))*2.^(N):
+nb_turn      := round((break_point/2) * 2.^(-N)):
+
+for i from 0 to nb_turn do
+   table_ti := table_ti * x + log(start_nb):
+   table_inv_wi := table_inv_wi *x + 1./ start_nb:
+   start_nb := start_nb + 2.^(N):
+od:
+
+fi:
+
+# Tests and scratch
+
+
+
+
+
+
diff --git a/src/crlibm/maple/log10-td.mpl b/src/crlibm/maple/log10-td.mpl
new file mode 100644
index 0000000..330f592
--- /dev/null
+++ b/src/crlibm/maple/log10-td.mpl
@@ -0,0 +1,345 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "log2-td.mpl";
+Digits := 120:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+mkdir("TEMPLOG"):
+
+
+# We want log2h + log2m + log2l + delta = log(2) such that
+# log2h and log2m have at least 11 trailing zeros
+# in order to have an exact multiplication with E, which is lower than 1024 in
+# magnitude
+# The resting accuracy is enough for both quick and accurate phases.
+
+log2acc := log(2):
+log2h := round(log2acc * 2**(floor(-log[2](abs(log2acc))) + (53 - 11))) / 2**(floor(-log[2](abs(log2acc))) + (53 - 11)):
+log2m := round((log2acc - log2h) * 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11))) / 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11)):
+log2l := log2acc - (log2h + log2m):
+
+
+L := 7: # number of bits used to address the table
+
+MAXINDEX    := round(2^L * (sqrt(2)-1)):
+
+for i from 0 to MAXINDEX-1 do
+    center[i] := 1 + i*2^(-L): # center[i] in [1, 2[
+    t :=  evalf(1/center[i]):
+    r[i] := round(t * 2**(floor(-log[2](abs(t))) + 23)) / 2**(floor(-log[2](abs(t))) + 23):
+    (logih[i], logim[i], logil[i]) := hi_mi_lo(evalf(-log(r[i]))):
+od:
+for i from MAXINDEX to 2^L do
+    # y has been divided by two, center[i] in [0.5, 1[
+    center[i]:=(1 + i*2^(-L)) / 2:
+    t :=  evalf(1/center[i]):
+    r[i] := round(t * 2**(floor(-log[2](abs(t))) + 23)) / 2**(floor(-log[2](abs(t))) + 23):
+    (logih[i], logim[i], logil[i]) := hi_mi_lo(evalf(-log(r[i]))):
+od:
+
+
+
+
+#Computation of ZMax.
+for i from 0 to MAXINDEX-1 do
+    __x := center[i] + 2^(-L-1) :
+    zmax[i] := (__x*r[i]-1) :
+    __x := center[i] - 2^(-L-1) :
+    zmin[i] := (__x*r[i]-1) :
+od:
+for i from MAXINDEX to 2^L do
+    __x := center[i] + 2^(-L-2) :
+    zmax[i] := (__x*r[i]-1) :
+    __x := center[i] - 2^(-L-2) :
+    zmin[i] := (__x*r[i]-1) :
+od:
+
+zmaxmax:=0:
+zminmin:=0:
+for i from 0 to 2^L do
+    tabulated_value := logih[i] + logim[i] + logil[i]:
+    poly_approx_min := evalf(log(1+zmin[i])):
+    poly_approx_max := evalf(log(1+zmax[i])):
+
+    # Test if we have a case where we cancellate a lot
+    # i.e. the polynomial approximation value is greater than half the tabulated value
+    # the tabulated value is not exactly zero and we are of opposite sign
+
+    if ((abs(poly_approx_min) > 0.75*abs(tabulated_value)) and (tabulated_value <> 0.0) and (poly_approx_min * tabulated_value < 0)) then
+	printf("Polynomial approximation is greater in magnitude in zmin[%d] than half the tabluated value\n",i):
+
+	printf("The tabulated value is %1.50e\n",tabulated_value):
+	if (tabulated_value <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(tabulated_value)))) fi:
+	printf("The value of polynomial in zmin[%d] is %1.50e\n",i,poly_approx_min):
+        if (poly_approx_min <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(poly_approx_min)))) fi:
+
+	summe := poly_approx_min + tabulated_value:
+	printf("The exponent of the sum of both is %d\n",floor(log2(abs(summe)))):
+
+
+    fi:
+
+    if ((abs(poly_approx_max) > 0.75*abs(tabulated_value)) and (tabulated_value <> 0.0) and (poly_approx_max * tabulated_value <0)) then
+	printf("Polynomial approximation is greater in magnitude in zmax[%d] than half the tabluated value\n",i):
+
+	printf("The tabulated value is %1.50e\n",tabulated_value):
+	if (tabulated_value <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(tabulated_value)))) fi:
+	printf("The value of polynomial in zmax[%d] is %1.50e\n",i,poly_approx_max):
+        if (poly_approx_max <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(poly_approx_max)))) fi:
+
+	summe := poly_approx_max + tabulated_value:
+	printf("The exponent of the sum of both is %d\n",floor(log2(abs(summe)))):
+
+
+    fi:
+
+
+    if zmax[i] > zmaxmax then zmaxmax := zmax[i]: fi:
+    if zmin[i] < zminmin then zminmin := zmin[i]: fi:
+od:
+printf("zminmin = -2^(%2f)   zmaxmax = 2^(%2f)\n", log2(-zminmin), log2(zmaxmax) ) :
+
+PolyDegreeQuick:=7:
+
+printf("   degree of the polynomial used in the quick phase is %d\n",PolyDegreeQuick);
+
+DDNumberQuick:=3:
+
+printf("   number of double doubles used for the coefficients is %d\n",DDNumberQuick);
+
+#Keep -zmaxmax..zmaxmax to keep c1=1, which is useful in the proof
+#and constrain the first two coefficients to 1 and -1/2 in order to save up a full multiplication and a rounding error
+polyQuick:= poly_exact2(x*(1+x*(-0.5+x*(numapprox[minimax]((((log(1+x)/x)-1)/x+0.5)/x,
+			x=-zmaxmax..zmaxmax,  [PolyDegreeQuick-3,0], 1 ,  'deltaApprox')))), DDNumberQuick):
+
+#Try to verify the bound for using double double arithmetic.
+#Idea: compare the maximum absolute value of the polynomial in zmaxmax (the polynomial has its maxima at the limits)
+#with the maximum value of the first term which is calculated in double precision only
+
+p := unapply(polyQuick,x):
+printf("   using only %d double doubles should be fine since the hi z ulp should affect the result starting from bit %f\n",
+	DDNumberQuick,evalf(53 + log2(p(zmaxmax)) - log2(zmaxmax^(DDNumberQuick)),5)):
+
+
+epsilonApproxQuick := numapprox[infnorm]( 1-polyQuick/log(1+x), x=zminmin..zmaxmax):
+printf("   approximation rel error for the quick phase is 2^(%2f)\n", log2(epsilonApproxQuick) ) :
+deltaApproxQuick := numapprox[infnorm]( polyQuick-log(1+x), x=zminmin..zmaxmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(deltaApproxQuick) ) :
+
+
+PolyDegreeAccurate:=14:
+
+printf("   degree of the polynomial used in the accurate phase is %d\n",PolyDegreeAccurate);
+
+DDNumberAccu:=7:
+TDNumberAccu:=3:
+
+printf("   number of triple doubles used for the coefficients is %d\n",TDNumberAccu);
+printf("   number of double doubles used for the coefficients is %d\n",DDNumberAccu);
+
+
+#Keep -zmaxmax..zmaxmax to keep c1=1, which is useful in the proof
+polyAccurate:= poly_exact32(x*(1+x*(-0.5+x*(numapprox[minimax]((((log(1+x)/x)-1)/x+0.5)/x,
+				x=-zmaxmax..zmaxmax,  [PolyDegreeAccurate-3,0], 1 ,  'deltaApprox')))),
+				TDNumberAccu, DDNumberAccu):
+
+#Try to verify the bound for using double double arithmetic.
+#Idea: compare the maximum absolute value of the polynomial in zmaxmax (the polynomial has its maxima at the limits)
+#with the maximum value of the first term which is calculated in double precision only
+
+pp := unapply(polyAccurate,x):
+printf("   using only %d triple doubles should be fine since the mi z ulp should affect the result starting from bit %f\n",
+	TDNumberAccu,evalf(106 + log2(p(zmaxmax)) - log2(zmaxmax^(TDNumberAccu)),5)):
+printf("   using only %d double doubles should be fine since the hi z ulp should affect the result starting from bit %f\n",
+	DDNumberAccu,evalf(53 + log2(p(zmaxmax)) - log2(zmaxmax^(TDNumberAccu + DDNumberAccu)),5)):
+
+
+epsilonApproxAccurate := numapprox[infnorm]( 1-polyAccurate/log(1+x), x=zminmin..zmaxmax):
+printf("   approximation rel error for the accurate phase is 2^(%2f)\n", log2(epsilonApproxAccurate) ) :
+deltaApproxAccurate := numapprox[infnorm]( polyAccurate-log(1+x), x=zminmin..zmaxmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(deltaApproxAccurate) ) :
+
+
+
+#Compute now the inverse of ln(10) for the final multiplication of ln(x) with this constant for obtaining log10(x)
+#Compute also the relative error of the constant stored as a triple double.
+Log10inv := evalf(1 / log(10)):
+
+(log10invh, log10invm, log10invl) := hi_mi_lo(Log10inv):
+
+Log10invhml := log10invh + log10invm + log10invl:
+
+epsilonLog10invhml := evalf(abs((Log10invhml - Log10inv) / Log10inv)):
+
+printf("   Log10inv = 1 / ln(10) stored as a triple-double is exact with a relative error of 2^(%2f)\n",
+	evalf(log[2](epsilonLog10invhml))):
+
+
+#Compute now the constant needed for the unfiltered directed final rounding of the triple-double result
+#This constant is supposed to be the reciprocal of the critical accuracy of the function.
+#We suppose this critical accuracy to be 2^(-120) because the worst case (for RD) we know of is x = 403ce41d 8fa665fa
+#We can easily spend some guard bits since we want simply filter out cases with a theoretical worst case accuracy
+#of -infty (exact floating point images) and as we know that we are exact to at least 122 bits.
+
+wca := 2^(122):
+
+
+#-------------------------------------------------------------------
+# Output
+
+
+filename:="TEMPLOG/log10-td.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/*File generated by maple/log10-td.mpl*/\n"):
+
+fprintf(fd, "\n\#define L %d\n\n",L):
+fprintf(fd, "\#define MAXINDEX %d\n\n", MAXINDEX):
+fprintf(fd, "\#define INDEXMASK %d\n", 2^L-1):
+fprintf(fd, "\#define two52 %1.50e\n", 2^(52)):
+fprintf(fd, "\#define log2h %1.50e\n", log2h):
+fprintf(fd, "\#define log2m %1.50e\n", log2m):
+fprintf(fd, "\#define log2l %1.50e\n", log2l):
+fprintf(fd, "\#define log10invh %1.50e\n",log10invh):
+fprintf(fd, "\#define log10invm %1.50e\n",log10invm):
+fprintf(fd, "\#define log10invl %1.50e\n",log10invl):
+fprintf(fd, "\#define WORSTCASEACCURACY %1.50e\n",wca):
+
+epsilon_quick_1 := 2^(-61): # The Gappa proof will show this bound
+epsilon_quick_2 := 2^(-61): # The Gappa proof will show this bound
+fprintf(fd, "\#define ROUNDCST1 %1.50e\n", compute_rn_constant(epsilon_quick_1)):
+fprintf(fd, "\#define ROUNDCST2 %1.50e\n", compute_rn_constant(epsilon_quick_2)):
+fprintf(fd, "\#define RDROUNDCST1 %1.50e\n", epsilon_quick_1):
+fprintf(fd, "\#define RDROUNDCST2 %1.50e\n", epsilon_quick_2):
+
+
+fprintf(fd, "\n\n"):
+
+
+# Print the defines for the define statements
+
+for i from 3 to PolyDegreeQuick do
+	fprintf(fd, "\#define c%d %1.50e\n",i,coeff(polyQuick,x,i)):
+od:
+
+fprintf(fd, "\n\n"):
+
+for i from 3 to (DDNumberAccu + TDNumberAccu -1) do
+	(hi,lo) := hi_lo(coeff(polyAccurate,x,i)):
+	fprintf(fd, "\#define accPolyC%dh %1.50e\n",i,hi):
+	fprintf(fd, "\#define accPolyC%dl %1.50e\n",i,lo):
+od:
+
+for i from (DDNumberAccu + TDNumberAccu) to PolyDegreeAccurate do
+	fprintf(fd, "\#define accPolyC%d %1.50e\n",i,coeff(polyAccurate,x,i)):
+od:
+
+fprintf(fd, "\n\n"):
+
+# Print the table
+fprintf(fd, "typedef struct rri_tag {float ri; double logih; double logim; double logil;} rri;  \n"):
+fprintf(fd, "static const rri argredtable[%d] = {\n", 2^L):
+for i from 0 to 2^L-1 do
+      fprintf(fd, "  { \n"):
+      fprintf(fd, "    %1.50e,   /* r[%d] */ \n", r[i], i):
+      fprintf(fd, "    %1.50e, /* logih[%d] */ \n", logih[i], i):
+      fprintf(fd, "    %1.50e, /* logim[%d] */ \n", logim[i], i):
+      fprintf(fd, "    %1.50e, /* logil[%d] */ \n", logil[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^L-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+
+fclose(fd):
+
+for j from 0 to 2^L-1 do
+    filename:=cat("TEMPLOG/log10-td_",j,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+    fprintf(fd, " s/_log2h/%1.50e/g\n", log2h):
+    fprintf(fd, " s/_log2m/%1.50e/g\n", log2m):
+    fprintf(fd, " s/_log2l/%1.50e/g\n", log2l):
+    fprintf(fd, " s/_logih/%1.50e/g\n", logih[j]):
+    fprintf(fd, " s/_logim/%1.50e/g\n", logim[j]):
+    fprintf(fd, " s/_logil/%1.50e/g\n", logil[j]):
+    fprintf(fd, " s/_zmin/%1.50e/g\n", zmin[j]):
+    fprintf(fd, " s/_zmax/%1.50e/g\n", zmax[j]):
+    for i from 3 to PolyDegreeQuick do
+        fprintf(fd, " s/_c%d/%1.50e/g\n", i, coeff(polyQuick,x,i)):
+    od:
+    fprintf(fd, " s/_epsilonApproxQuick/%1.50e/g\n", epsilonApproxQuick):
+    fprintf(fd, " s/_epsilonLog10invhml/%1.50e/g\n", epsilonLog10invhml):
+    fclose(fd):
+  od:
+
+for j from 0 to 2^L-1 do
+    filename:=cat("TEMPLOG/log10-td-accurate_",j,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+    fprintf(fd, " s/_log2h/%1.50e/g\n", log2h):
+    fprintf(fd, " s/_log2m/%1.50e/g\n", log2m):
+    fprintf(fd, " s/_log2l/%1.50e/g\n", log2l):
+    fprintf(fd, " s/_logih/%1.50e/g\n", logih[j]):
+    fprintf(fd, " s/_logim/%1.50e/g\n", logim[j]):
+    fprintf(fd, " s/_logil/%1.50e/g\n", logil[j]):
+    fprintf(fd, " s/_zmin/%1.50e/g\n", zmin[j]):
+    fprintf(fd, " s/_zmax/%1.50e/g\n", zmax[j]):
+    for i from 3 to (DDNumberAccu + TDNumberAccu -1) do
+	(hi,lo) := hi_lo(coeff(polyAccurate,x,i)):
+        fprintf(fd, " s/_accPolyC%dh/%1.50e/g\n", i, hi):
+        fprintf(fd, " s/_accPolyC%dl/%1.50e/g\n", i, lo):
+    od:
+    for i from (DDNumberAccu + TDNumberAccu) to PolyDegreeAccurate do
+        fprintf(fd, " s/_accPolyC%d/%1.50e/g\n", i, coeff(polyAccurate,x,i)):
+    od:
+    fprintf(fd, " s/_epsilonApproxAccurate/%1.50e/g\n", epsilonApproxAccurate):
+    fprintf(fd, " s/_epsilonLog10invhml/%1.50e/g\n", epsilonLog10invhml):
+    fclose(fd):
+  od:
+
+# A shell script to use them
+filename:="run-log10-td-proof.sh":
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, "#!/bin/sh\n"):
+fprintf(fd, "# You probably need to edit the path to the gappa executable\n"):
+fprintf(fd, "GAPPA=~/ble/gappa-0.4.5/src/gappa\n"):
+fprintf(fd, "# Test all the possible table value for E=1\n"):
+fprintf(fd, "for num in `seq 0 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=1:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log10-td_$num.sed log10-td.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# For the case E=0 we first handle the cases 0 and %d using log10-td-E0-logir0.gappa\n", 2^L):
+fprintf(fd, "echo 0 and %d, E=0:\n", 2^L):
+fprintf(fd, "sed -f log10-td_0.sed log10-td-E0-logir0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "# then the other cases where logirh <> 0\n"):
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=0:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log10-td_$num.sed log10-td-E0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# Accurate phase: Test all the possible table value for E=1\n"):
+fprintf(fd, "for num in `seq 0 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Accurate phase: $num, E=1:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log10-td-accurate_$num.sed log10-td-accurate.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# Accurate phase: For the case E=0 we first handle the cases 0 and %d using log10-td-accurate-E0-logir0.gappa\n", 2^L):
+fprintf(fd, "echo 0 and %d, E=0:\n", 2^L):
+fprintf(fd, "sed -f ./TEMPLOG/log10-td-accurate_0.sed log10-td-accurate-E0-logir0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "# Accurate phase: then the other cases where logirh <> 0\n"):
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=0:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log10-td-accurate_$num.sed log10-td-accurate-E0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fclose(fd):
+
+printf("----DONE---\n") :
+
+
diff --git a/src/crlibm/maple/log2-td.mpl b/src/crlibm/maple/log2-td.mpl
new file mode 100644
index 0000000..c1f8f1d
--- /dev/null
+++ b/src/crlibm/maple/log2-td.mpl
@@ -0,0 +1,334 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "log2-td.mpl";
+Digits := 120:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+mkdir("TEMPLOG"):
+
+
+# We want log2h + log2m + log2l + delta = log(2) such that
+# log2h and log2m have at least 11 trailing zeros
+# in order to have an exact multiplication with E, which is lower than 1024 in
+# magnitude
+# The resting accuracy is enough for both quick and accurate phases.
+
+log2acc := log(2):
+log2h := round(log2acc * 2**(floor(-log[2](abs(log2acc))) + (53 - 11))) / 2**(floor(-log[2](abs(log2acc))) + (53 - 11)):
+log2m := round((log2acc - log2h) * 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11))) / 2**(floor(-log[2](abs((log2acc - log2h)))) + (53 - 11)):
+log2l := log2acc - (log2h + log2m):
+
+
+L := 7: # number of bits used to address the table
+
+MAXINDEX    := round(2^L * (sqrt(2)-1)):
+
+for i from 0 to MAXINDEX-1 do
+    center[i] := 1 + i*2^(-L): # center[i] in [1, 2[
+    t :=  evalf(1/center[i]):
+    r[i] := round(t * 2**(floor(-log[2](abs(t))) + 23)) / 2**(floor(-log[2](abs(t))) + 23):
+    (logih[i], logim[i], logil[i]) := hi_mi_lo(evalf(-log(r[i]))):
+od:
+for i from MAXINDEX to 2^L do
+    # y has been divided by two, center[i] in [0.5, 1[
+    center[i]:=(1 + i*2^(-L)) / 2:
+    t :=  evalf(1/center[i]):
+    r[i] := round(t * 2**(floor(-log[2](abs(t))) + 23)) / 2**(floor(-log[2](abs(t))) + 23):
+    (logih[i], logim[i], logil[i]) := hi_mi_lo(evalf(-log(r[i]))):
+od:
+
+
+
+
+#Computation of ZMax.
+for i from 0 to MAXINDEX-1 do
+    __x := center[i] + 2^(-L-1) :
+    zmax[i] := (__x*r[i]-1) :
+    __x := center[i] - 2^(-L-1) :
+    zmin[i] := (__x*r[i]-1) :
+od:
+for i from MAXINDEX to 2^L do
+    __x := center[i] + 2^(-L-2) :
+    zmax[i] := (__x*r[i]-1) :
+    __x := center[i] - 2^(-L-2) :
+    zmin[i] := (__x*r[i]-1) :
+od:
+
+zmaxmax:=0:
+zminmin:=0:
+for i from 0 to 2^L do
+    tabulated_value := logih[i] + logim[i] + logil[i]:
+    poly_approx_min := evalf(log(1+zmin[i])):
+    poly_approx_max := evalf(log(1+zmax[i])):
+
+    # Test if we have a case where we cancellate a lot
+    # i.e. the polynomial approximation value is greater than half the tabulated value
+    # the tabulated value is not exactly zero and we are of opposite sign
+
+    if ((abs(poly_approx_min) > 0.75*abs(tabulated_value)) and (tabulated_value <> 0.0) and (poly_approx_min * tabulated_value < 0)) then
+	printf("Polynomial approximation is greater in magnitude in zmin[%d] than half the tabluated value\n",i):
+
+	printf("The tabulated value is %1.50e\n",tabulated_value):
+	if (tabulated_value <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(tabulated_value)))) fi:
+	printf("The value of polynomial in zmin[%d] is %1.50e\n",i,poly_approx_min):
+        if (poly_approx_min <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(poly_approx_min)))) fi:
+
+	summe := poly_approx_min + tabulated_value:
+	printf("The exponent of the sum of both is %d\n",floor(log2(abs(summe)))):
+
+
+    fi:
+
+    if ((abs(poly_approx_max) > 0.75*abs(tabulated_value)) and (tabulated_value <> 0.0) and (poly_approx_max * tabulated_value <0)) then
+	printf("Polynomial approximation is greater in magnitude in zmax[%d] than half the tabluated value\n",i):
+
+	printf("The tabulated value is %1.50e\n",tabulated_value):
+	if (tabulated_value <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(tabulated_value)))) fi:
+	printf("The value of polynomial in zmax[%d] is %1.50e\n",i,poly_approx_max):
+        if (poly_approx_max <> 0.0) then printf("i.e. the value has the exponent %d\n",floor(log2(abs(poly_approx_max)))) fi:
+
+	summe := poly_approx_max + tabulated_value:
+	printf("The exponent of the sum of both is %d\n",floor(log2(abs(summe)))):
+
+
+    fi:
+
+
+    if zmax[i] > zmaxmax then zmaxmax := zmax[i]: fi:
+    if zmin[i] < zminmin then zminmin := zmin[i]: fi:
+od:
+printf("zminmin = -2^(%2f)   zmaxmax = 2^(%2f)\n", log2(-zminmin), log2(zmaxmax) ) :
+
+PolyDegreeQuick:=7:
+
+printf("   degree of the polynomial used in the quick phase is %d\n",PolyDegreeQuick);
+
+DDNumberQuick:=3:
+
+printf("   number of double doubles used for the coefficients is %d\n",DDNumberQuick);
+
+#Keep -zmaxmax..zmaxmax to keep c1=1, which is useful in the proof
+#and constrain the first two coefficients to 1 and -1/2 in order to save up a full multiplication and a rounding error
+polyQuick:= poly_exact2(x*(1+x*(-0.5+x*(numapprox[minimax]((((log(1+x)/x)-1)/x+0.5)/x,
+			x=-zmaxmax..zmaxmax,  [PolyDegreeQuick-3,0], 1 ,  'deltaApprox')))), DDNumberQuick):
+
+#Try to verify the bound for using double double arithmetic.
+#Idea: compare the maximum absolute value of the polynomial in zmaxmax (the polynomial has its maxima at the limits)
+#with the maximum value of the first term which is calculated in double precision only
+
+p := unapply(polyQuick,x):
+printf("   using only %d double doubles should be fine since the hi z ulp should affect the result starting from bit %f\n",
+	DDNumberQuick,evalf(53 + log2(p(zmaxmax)) - log2(zmaxmax^(DDNumberQuick)),5)):
+
+
+epsilonApproxQuick := numapprox[infnorm]( 1-polyQuick/log(1+x), x=zminmin..zmaxmax):
+printf("   approximation rel error for the quick phase is 2^(%2f)\n", log2(epsilonApproxQuick) ) :
+deltaApproxQuick := numapprox[infnorm]( polyQuick-log(1+x), x=zminmin..zmaxmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(deltaApproxQuick) ) :
+
+
+PolyDegreeAccurate:=14:
+
+printf("   degree of the polynomial used in the accurate phase is %d\n",PolyDegreeAccurate);
+
+DDNumberAccu:=7:
+TDNumberAccu:=3:
+
+printf("   number of triple doubles used for the coefficients is %d\n",TDNumberAccu);
+printf("   number of double doubles used for the coefficients is %d\n",DDNumberAccu);
+
+
+#Keep -zmaxmax..zmaxmax to keep c1=1, which is useful in the proof
+polyAccurate:= poly_exact32(x*(1+x*(-0.5+x*(numapprox[minimax]((((log(1+x)/x)-1)/x+0.5)/x,
+				x=-zmaxmax..zmaxmax,  [PolyDegreeAccurate-3,0], 1 ,  'deltaApprox')))),
+				TDNumberAccu, DDNumberAccu):
+
+#Try to verify the bound for using double double arithmetic.
+#Idea: compare the maximum absolute value of the polynomial in zmaxmax (the polynomial has its maxima at the limits)
+#with the maximum value of the first term which is calculated in double precision only
+
+pp := unapply(polyAccurate,x):
+printf("   using only %d triple doubles should be fine since the mi z ulp should affect the result starting from bit %f\n",
+	TDNumberAccu,evalf(106 + log2(p(zmaxmax)) - log2(zmaxmax^(TDNumberAccu)),5)):
+printf("   using only %d double doubles should be fine since the hi z ulp should affect the result starting from bit %f\n",
+	DDNumberAccu,evalf(53 + log2(p(zmaxmax)) - log2(zmaxmax^(TDNumberAccu + DDNumberAccu)),5)):
+
+
+epsilonApproxAccurate := numapprox[infnorm]( 1-polyAccurate/log(1+x), x=zminmin..zmaxmax):
+printf("   approximation rel error for the accurate phase is 2^(%2f)\n", log2(epsilonApproxAccurate) ) :
+deltaApproxAccurate := numapprox[infnorm]( polyAccurate-log(1+x), x=zminmin..zmaxmax):
+printf("   approximation abs error for the quick phase is 2^(%2f)\n", log2(deltaApproxAccurate) ) :
+
+
+
+#Compute now the inverse of ln(2) for the final addition of ln(x) with this constant for obtaining log2(x)
+#Compute also the relative error of the constant stored as a double double.
+Log2inv := evalf(1 / log(2)):
+
+(log2invh, log2invl) := hi_lo(Log2inv):
+
+Log2invhl := log2invh + log2invl:
+
+epsilonLog2invhl := evalf(abs((Log2invhl - Log2inv) / Log2inv)):
+
+printf("   Log2inv = 1 / ln(2) stored as a double-double is exact with a relative error of 2^(%2f)\n",
+	evalf(log[2](epsilonLog2invhl))):
+
+
+#-------------------------------------------------------------------
+# Output
+
+
+filename:="TEMPLOG/log2-td.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/*File generated by maple/log2-td.mpl*/\n"):
+
+fprintf(fd, "\n\#define L %d\n\n",L):
+fprintf(fd, "\#define MAXINDEX %d\n\n", MAXINDEX):
+fprintf(fd, "\#define INDEXMASK %d\n", 2^L-1):
+fprintf(fd, "\#define two52 %1.50e\n", 2^(52)):
+fprintf(fd, "\#define log2h %1.50e\n", log2h):
+fprintf(fd, "\#define log2m %1.50e\n", log2m):
+fprintf(fd, "\#define log2l %1.50e\n", log2l):
+fprintf(fd, "\#define log2invh %1.50e\n",log2invh):
+fprintf(fd, "\#define log2invl %1.50e\n",log2invl):
+
+epsilon_quick_1 := 2^(-61): # The Gappa proof will show this bound
+epsilon_quick_2 := 2^(-61): # The Gappa proof will show this bound
+fprintf(fd, "\#define ROUNDCST1 %1.50e\n", compute_rn_constant(epsilon_quick_1)):
+fprintf(fd, "\#define ROUNDCST2 %1.50e\n", compute_rn_constant(epsilon_quick_2)):
+fprintf(fd, "\#define RDROUNDCST1 %1.50e\n", epsilon_quick_1):
+fprintf(fd, "\#define RDROUNDCST2 %1.50e\n", epsilon_quick_2):
+
+
+fprintf(fd, "\n\n"):
+
+
+# Print the defines for the define statements
+
+for i from 3 to PolyDegreeQuick do
+	fprintf(fd, "\#define c%d %1.50e\n",i,coeff(polyQuick,x,i)):
+od:
+
+fprintf(fd, "\n\n"):
+
+for i from 3 to (DDNumberAccu + TDNumberAccu -1) do
+	(hi,lo) := hi_lo(coeff(polyAccurate,x,i)):
+	fprintf(fd, "\#define accPolyC%dh %1.50e\n",i,hi):
+	fprintf(fd, "\#define accPolyC%dl %1.50e\n",i,lo):
+od:
+
+for i from (DDNumberAccu + TDNumberAccu) to PolyDegreeAccurate do
+	fprintf(fd, "\#define accPolyC%d %1.50e\n",i,coeff(polyAccurate,x,i)):
+od:
+
+fprintf(fd, "\n\n"):
+
+# Print the table
+fprintf(fd, "typedef struct rri_tag {float ri; double logih; double logim; double logil;} rri;  \n"):
+fprintf(fd, "static const rri argredtable[%d] = {\n", 2^L):
+for i from 0 to 2^L-1 do
+      fprintf(fd, "  { \n"):
+      fprintf(fd, "    %1.50e,   /* r[%d] */ \n", r[i], i):
+      fprintf(fd, "    %1.50e, /* logih[%d] */ \n", logih[i], i):
+      fprintf(fd, "    %1.50e, /* logim[%d] */ \n", logim[i], i):
+      fprintf(fd, "    %1.50e, /* logil[%d] */ \n", logil[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^L-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+
+fclose(fd):
+
+for j from 0 to 2^L-1 do
+    filename:=cat("TEMPLOG/log2-td_",j,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+    fprintf(fd, " s/_log2h/%1.50e/g\n", log2h):
+    fprintf(fd, " s/_log2m/%1.50e/g\n", log2m):
+    fprintf(fd, " s/_log2l/%1.50e/g\n", log2l):
+    fprintf(fd, " s/_logih/%1.50e/g\n", logih[j]):
+    fprintf(fd, " s/_logim/%1.50e/g\n", logim[j]):
+    fprintf(fd, " s/_logil/%1.50e/g\n", logil[j]):
+    fprintf(fd, " s/_zmin/%1.50e/g\n", zmin[j]):
+    fprintf(fd, " s/_zmax/%1.50e/g\n", zmax[j]):
+    for i from 3 to PolyDegreeQuick do
+        fprintf(fd, " s/_c%d/%1.50e/g\n", i, coeff(polyQuick,x,i)):
+    od:
+    fprintf(fd, " s/_epsilonApproxQuick/%1.50e/g\n", epsilonApproxQuick):
+    fprintf(fd, " s/_epsilonLog2invhl/%1.50e/g\n", epsilonLog2invhl):
+    fclose(fd):
+  od:
+
+for j from 0 to 2^L-1 do
+    filename:=cat("TEMPLOG/log2-td-accurate_",j,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+    fprintf(fd, " s/_log2h/%1.50e/g\n", log2h):
+    fprintf(fd, " s/_log2m/%1.50e/g\n", log2m):
+    fprintf(fd, " s/_log2l/%1.50e/g\n", log2l):
+    fprintf(fd, " s/_logih/%1.50e/g\n", logih[j]):
+    fprintf(fd, " s/_logim/%1.50e/g\n", logim[j]):
+    fprintf(fd, " s/_logil/%1.50e/g\n", logil[j]):
+    fprintf(fd, " s/_zmin/%1.50e/g\n", zmin[j]):
+    fprintf(fd, " s/_zmax/%1.50e/g\n", zmax[j]):
+    for i from 3 to (DDNumberAccu + TDNumberAccu -1) do
+	(hi,lo) := hi_lo(coeff(polyAccurate,x,i)):
+        fprintf(fd, " s/_accPolyC%dh/%1.50e/g\n", i, hi):
+        fprintf(fd, " s/_accPolyC%dl/%1.50e/g\n", i, lo):
+    od:
+    for i from (DDNumberAccu + TDNumberAccu) to PolyDegreeAccurate do
+        fprintf(fd, " s/_accPolyC%d/%1.50e/g\n", i, coeff(polyAccurate,x,i)):
+    od:
+    fprintf(fd, " s/_epsilonApproxAccurate/%1.50e/g\n", epsilonApproxAccurate):
+    fprintf(fd, " s/_epsilonLog2invhl/%1.50e/g\n", epsilonLog2invhl):
+    fclose(fd):
+  od:
+
+# A shell script to use them
+filename:="run-log2-td-proof.sh":
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, "#!/bin/sh\n"):
+fprintf(fd, "# You probably need to edit the path to the gappa executable\n"):
+fprintf(fd, "GAPPA=~/ble/gappa-0.4.5/src/gappa\n"):
+fprintf(fd, "# Test all the possible table value for E=1\n"):
+fprintf(fd, "for num in `seq 0 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=1:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log2-td_$num.sed log2-td.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# For the case E=0 we first handle the cases 0 and %d using log2-td-E0-logir0.gappa\n", 2^L):
+fprintf(fd, "echo 0 and %d, E=0:\n", 2^L):
+fprintf(fd, "sed -f log2-td_0.sed log2-td-E0-logir0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "# then the other cases where logirh <> 0\n"):
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=0:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log2-td_$num.sed log2-td-E0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# Accurate phase: Test all the possible table value for E=1\n"):
+fprintf(fd, "for num in `seq 0 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo Accurate phase: $num, E=1:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log2-td-accurate_$num.sed log2-td-accurate.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fprintf(fd, "# Accurate phase: For the case E=0 we first handle the cases 0 and %d using log2-td-accurate-E0-logir0.gappa\n", 2^L):
+fprintf(fd, "echo 0 and %d, E=0:\n", 2^L):
+fprintf(fd, "sed -f ./TEMPLOG/log2-td-accurate_0.sed log2-td-accurate-E0-logir0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "# Accurate phase: then the other cases where logirh <> 0\n"):
+fprintf(fd, "for num in `seq 1 %d`; do\n", 2^L-1):
+fprintf(fd, "  echo $num, E=0:\n"):
+fprintf(fd, "  sed -f ./TEMPLOG/log2-td-accurate_$num.sed log2-td-accurate-E0.gappa | $GAPPA > /dev/null\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fclose(fd):
+
+printf("----DONE---\n") :
+
+
diff --git a/src/crlibm/maple/pow.mpl b/src/crlibm/maple/pow.mpl
new file mode 100755
index 0000000..31d2744
--- /dev/null
+++ b/src/crlibm/maple/pow.mpl
@@ -0,0 +1,321 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "exp-td.mpl";
+Digits := 120:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+
+mkdir("TEMPPOW"):
+
+# Some constants for special cases tests 
+
+two52 := 2^(52):
+two53 := 2^(53):
+twoM53 := 2^(-53):
+twoM54 := 2^(-54):
+twoM1021 := 2^(-1021):
+two1021 := 2^(1021):
+twoM1000 := 2^(-1000):
+two1000 := 2^(1000):
+two999 := 2^(999):
+two11 := 2^(11):
+two64 := 2^(64):
+twoM64 := 2^(-64):
+
+scale := 2^(12):
+rescale := 2^(-12):
+shiftConst := 2^(52) + 2^(51):
+
+largest := 2^(1023) * ((2^(53) - 1) / 2^(52)):
+smallest := 2^(-1023) * 1 * 2^(-51):
+
+# Logarithm log2_12 for power
+
+L := 7: # number of bits used to address the table
+
+MAXINDEX    := round(2^L * (sqrt(2)-1)):
+
+for i from 0 to MAXINDEX-1 do
+    center[i] := 1 + i*2^(-L): # center[i] in [1, 2[
+    t :=  evalf(1/center[i]):
+    r[i] := round(t * 2**(floor(-log[2](abs(t))) + 23)) / 2**(floor(-log[2](abs(t))) + 23):
+    (logih[i], logil[i], logill[i]) := hi_mi_lo(evalf(-log[2](r[i]))):
+od:
+for i from MAXINDEX to 2^L do
+    # y has been divided by two, center[i] in [0.5, 1[
+    center[i]:=(1 + i*2^(-L)) / 2:
+    t :=  evalf(1/center[i]):
+    r[i] := round(t * 2**(floor(-log[2](abs(t))) + 23)) / 2**(floor(-log[2](abs(t))) + 23):
+    (logih[i], logil[i], logill[i]) := hi_mi_lo(evalf(-log[2](r[i]))):
+od:
+
+
+
+
+#Computation of ZMax.
+for i from 0 to MAXINDEX-1 do
+    __x := center[i] + 2^(-L-1) :
+    zmax[i] := (__x*r[i]-1) :
+    __x := center[i] - 2^(-L-1) :
+    zmin[i] := (__x*r[i]-1) :
+od:
+for i from MAXINDEX to 2^L do
+    __x := center[i] + 2^(-L-2) :
+    zmax[i] := (__x*r[i]-1) :
+    __x := center[i] - 2^(-L-2) :
+    zmin[i] := (__x*r[i]-1) :
+od:
+
+zmaxmax:=0:
+zminmin:=0:
+for i from 0 to 2^L do
+    if zmax[i] > zmaxmax then zmaxmax := zmax[i]: fi:
+    if zmin[i] < zminmin then zminmin := zmin[i]: fi:
+od:
+printf("zminmin = -2^(%2f)   zmaxmax = 2^(%2f)\n", log2(-zminmin), log2(zmaxmax) ):
+
+pLogExact := unapply(-6497523352912697/36028797018963968*X^8+464105351149111/2251799813685248*X^7-4331547231022885/18014398509481984*X^6+324866042375467/1125899906842624*X^5-6497320848556805/18014398509481984*X^4+8460053188225/17592186044416*X^3-58522663504933901518104329421789/81129638414606681695789005144064*X^2+29261331752466950759073917813481/20282409603651670423947251286016*X,X):
+
+pLog := poly_exact2(pLogExact(x),3):
+
+epsLog := numapprox[infnorm](pLog/log[2](1+x)-1,x=zminmin..zmaxmax):
+
+printf("Relative error of pLog w.r.t log2(1+x) is 2^(%f)\n",log[2](abs(epsLog))):
+
+
+# Exponential exp2_12 for power 
+
+
+for i from 0 to 2^6 - 1 do
+	twoPowerIndex1hi[i], twoPowerIndex1lo[i], twoPowerIndex1lolo[i] := hi_mi_lo(evalf(2^(i/(2^6)))):
+	twoPowerIndex2hi[i], twoPowerIndex2lo[i], twoPowerIndex2lolo[i] := hi_mi_lo(evalf(2^(i/(2^(12))))):
+od: 
+
+pExpExact := unapply(2772236920359585/288230376151711744*X^4+1999746284130149/36028797018963968*X^3+8655072057804175/36028797018963968*X^2+6243314768165359/9007199254740992*X+1,X):
+
+pExp := poly_exact(pExpExact(x)):
+
+epsExp := numapprox[infnorm]((pExp/2^x)-1,x=-2^(-12)..2^(-12)):
+
+printf("Relative error of pExp w.r.t 2^x is 2^(%f)\n",log[2](abs(epsExp))):
+
+log2 := nearest(log(2)):
+
+
+# Exponential exp2_33 for power
+
+# Polynomial for approximating 2^x - 1 in x=-2^(-42)..2^(-42)
+
+pExpXM := unapply(poly_exact2(x * ((6243314768165359 * 2^(-53) + 29397410857115 * 2^(-100)) + (x * 8655072057804175 * 2^(-55))),2),x):
+
+epsExpXM := numapprox[infnorm](pExpXM(x)/(2^x-1)-1,x=-2^(-42)..2^(-42)):
+
+printf("The relative error of pExpXM w.r.t. 2^x - 1 is 2^(%f)\n",log[2](abs(epsExpXM))):
+
+
+# Polynomial for approximating 2^x - 1 in x=-2^(-95)..2^(-95)
+
+pExpXL := unapply(poly_exact(x * 6243314768165359 * 2^(-53)), x):
+
+epsExpXL := numapprox[infnorm](pExpXL(x)/(2^x-1)-1,x=-2^(-95)..2^(-95)):
+
+printf("The relative error of pExpXL w.r.t. 2^x - 1 is 2^(%f)\n",log[2](abs(epsExpXL))):
+
+# Polynomial for approximating 2^x in x=-2^(-12)..2^(-12)
+
+pExpXH := unapply(poly_exact32(x * (506517869649829535567849302923399275789356375957 * 2^(-159) + (x * (38978979294391673005692521213079 * 2^(-107) + (x * (36024226132016099441525232746301 * 2^(-109) + (x * (3121261346907607936312652866425 * 2^(-108) + (x * (55385433661433492776134419224183 * 2^(-115) + (x * (5682899659966205 * 2^(-65) + (x * (4501812434047971 * 2^(-68) + (x * 6240991224781291 * 2^(-72))))))))))))))),2,4),x):
+
+epsExpXH := numapprox[infnorm](pExpXH(x)/(2^x-1)-1,x=-2^(-12)..2^(-12)):
+
+printf("The relative error of pExpXH w.r.t. 2^x - 1 is 2^(%f)\n",log[2](abs(epsExpXH))):
+
+
+# Logarithm log2_13 for power
+
+pLog13 := unapply(poly_exact32(x * (65890661388387311068680317907364672336343222485 * 2^(-155) + (x * ((-263562645553549244274721271629458689351564598207 * 2^(-158)) + (x * (39015109003289267678766993386435 * 2^(-106) + (x * ((-29261331752466950759075245039823 * 2^(-106)) + (x * (11704532700986780303630098000775 * 2^(-105) + (x * ((-78030218006578535357533995772145 * 2^(-108)) + (x * (66883044005638744592219245028355 * 2^(-108) + (x * ((-14630665876233475378839909031845 * 2^(-106)) + (x  [...]
+
+epsLog13 := numapprox[infnorm](pLog13(x)/(log[2](1+x))-1,x=-2^(-8)..2^(-8)):
+
+printf("The relative error of pLog13 w.r.t. log2(1+x) is 2^(%f)\n",log[2](abs(epsLog13))):
+
+
+# exp2_30bits for exactness test 
+
+coeff_0 :=  9.99999999947486895024439945700578391551971435546875000000000000000000000000000000e-01:
+coeff_1 :=  6.93147180274189311788290979166049510240554809570312500000000000000000000000000000e-01:
+coeff_2 :=  2.40226513201275415632096610352164134383201599121093750000000000000000000000000000e-01:
+coeff_3 :=  5.55041194035996443556513213479775004088878631591796875000000000000000000000000000e-02:
+coeff_4 :=  9.61801251055323207228564541537707555107772350311279296875000000000000000000000000e-03:
+coeff_5 :=  1.33325640280455024258565721595459763193503022193908691406250000000000000000000000e-03:
+coeff_6 :=  1.54736006782907911617439000728779774362919852137565612792968750000000000000000000e-04:
+coeff_7 :=  1.55294506644329091183710789270122631933190859854221343994140625000000000000000000e-05:
+
+pExp2Exact := unapply(coeff_0 + X * (coeff_1 + X * (coeff_2 + X * (coeff_3 + X * (coeff_4 + X * (coeff_5 + X * (coeff_6 + X * coeff_7)))))),X):
+
+pExp2 := poly_exact(pExp2Exact(x)):
+
+epsExp2 := numapprox[infnorm]((pExp2/2^x)-1,x=-0.5..0.5):
+
+printf("Relative error of pExp2 w.r.t 2^x is 2^(%f)\n",log[2](abs(epsExp2))):
+
+# Overall accuracy estimate
+
+# C'est pifometrique
+epsOverall := 2^(-62):
+
+bi := floor(-log[2](abs(epsOverall))):
+approxBoundFactor := 2^(-(bi - 54)):
+
+epsOverallAccurate := 2^(-120):
+
+bi2 := floor(-log[2](abs(epsOverallAccurate))) - 1:
+approxBoundFactorAccurate := 2^(-(bi2 - 54)):
+
+
+# Print out of the .h file 
+
+filename:="TEMPPOW/pow.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/*File generated by maple/pow.mpl*/\n"):
+
+fprintf(fd, "\#define APPROXBOUNDFACTOR %1.50e\n", approxBoundFactor):   
+fprintf(fd, "\#define APPROXBOUNDFACTORACCURATE %1.50e\n", approxBoundFactorAccurate):   
+fprintf(fd, "\#define TWO52 %1.50e\n", two52):   
+fprintf(fd, "\#define TWO53 %1.50e\n", two53):   
+fprintf(fd, "\#define TWO11 %1.50e\n", two11):   
+fprintf(fd, "\#define TWOM53 %1.50e\n", twoM53):   
+fprintf(fd, "\#define TWOM54 %1.50e\n", twoM54):   
+fprintf(fd, "\#define TWOM1021 %1.50e\n", twoM1021):   
+fprintf(fd, "\#define TWO1021 %1.50e\n", two1021):   
+fprintf(fd, "\#define TWOM1000 %1.50e\n", twoM1000):   
+fprintf(fd, "\#define TWO999 %1.50e\n", two999):   
+fprintf(fd, "\#define TWO1000 %1.50e\n\n", two1000):   
+fprintf(fd, "\#define TWO64 %1.50e\n", two64):   
+fprintf(fd, "\#define TWOM64 %1.50e\n", twoM64):   
+fprintf(fd, "\#define SCALE %1.50e\n", scale):   
+fprintf(fd, "\#define RESCALE %1.50e\n", rescale):   
+fprintf(fd, "\#define SHIFTCONSTANT %1.50e\n", shiftConst):   
+fprintf(fd, "\#define LARGEST %1.50e\n",largest):
+fprintf(fd, "\#define SMALLEST %1.50e\n\n",smallest):
+
+
+(log2coeff1dh,log2coeff1dl) := hi_lo(coeff(pLog,x,1)):
+(log2coeff2dh,log2coeff2dl) := hi_lo(coeff(pLog,x,2)):
+fprintf(fd, "\#define log2coeff1h %1.50e\n",log2coeff1dh):	
+fprintf(fd, "\#define log2coeff1l %1.50e\n",log2coeff1dl):	
+fprintf(fd, "\#define log2coeff2h %1.50e\n",log2coeff2dh):	
+fprintf(fd, "\#define log2coeff2l %1.50e\n",log2coeff2dl):	
+for i from 3 to 8 do
+	fprintf(fd, "\#define log2coeff%d %1.50e\n",i,coeff(pLog,x,i)):
+od:
+fprintf(fd,"\n"):
+
+for i from 1 to 4 do
+	fprintf(fd, "\#define exp2coeff%d %1.50e\n",i,coeff(pExp,x,i)):
+od:
+fprintf(fd,"\n"):
+
+for i from 0 to 7 do 
+	fprintf(fd, "\#define exp2InaccuCoeff%d %1.50e\n",i,coeff(pExp2,x,i)):
+od:
+fprintf(fd,"\n"):
+
+(exp2XMcoeff1dh, exp2XMcoeff1dl) := hi_lo(coeff(pExpXM(x),x,1)):
+exp2XMcoeff2dh := nearest(coeff(pExpXM(x),x,2)):
+fprintf(fd, "\#define exp2XMcoeff1h %1.50e\n",exp2XMcoeff1dh):	
+fprintf(fd, "\#define exp2XMcoeff1l %1.50e\n",exp2XMcoeff1dl):	
+fprintf(fd, "\#define exp2XMcoeff2h %1.50e\n\n",exp2XMcoeff2dh):	
+
+exp2XLcoeff1dh := nearest(coeff(pExpXL(x),x,1)):
+fprintf(fd, "\#define exp2XLcoeff1h %1.50e\n\n",exp2XLcoeff1dh):	
+
+(exp2XHcoeff1dh,exp2XHcoeff1dm,exp2XHcoeff1dl) := hi_mi_lo(coeff(pExpXH(x),x,1)):
+fprintf(fd, "\#define exp2XHcoeff1h %1.50e\n",exp2XHcoeff1dh):	
+fprintf(fd, "\#define exp2XHcoeff1m %1.50e\n",exp2XHcoeff1dm):	
+fprintf(fd, "\#define exp2XHcoeff1l %1.50e\n",exp2XHcoeff1dl):	
+
+for i from 2 to 5 do
+	(exp2XHcoeffidh,exp2XHcoeffidl) := hi_lo(coeff(pExpXH(x),x,i)):
+	fprintf(fd, "\#define exp2XHcoeff%dh %1.50e\n",i,exp2XHcoeffidh):	
+	fprintf(fd, "\#define exp2XHcoeff%dm %1.50e\n",i,exp2XHcoeffidl):	
+od:
+
+for i from 6 to 8 do 
+	fprintf(fd, "\#define exp2XHcoeff%dh %1.50e\n",i,nearest(coeff(pExpXH(x),x,i))):		
+od:
+
+fprintf(fd,"\n"):
+
+(log213coeff1dh,log213coeff1dm,log213coeff1dl) := hi_mi_lo(coeff(pLog13(x),x,1)):
+fprintf(fd, "\#define log213coeff1h %1.50e\n",log213coeff1dh):	
+fprintf(fd, "\#define log213coeff1m %1.50e\n",log213coeff1dm):	
+fprintf(fd, "\#define log213coeff1l %1.50e\n",log213coeff1dl):	
+
+(log213coeff2dh,log213coeff2dm,log213coeff2dl) := hi_mi_lo(coeff(pLog13(x),x,2)):
+fprintf(fd, "\#define log213coeff2h %1.50e\n",log213coeff2dh):	
+fprintf(fd, "\#define log213coeff2m %1.50e\n",log213coeff2dm):	
+fprintf(fd, "\#define log213coeff2l %1.50e\n",log213coeff2dl):	
+
+for i from 3 to 8 do
+	(log213coeffidh, log213coeffidl) := hi_lo(coeff(pLog13(x),x,i)):
+	fprintf(fd, "\#define log213coeff%dh %1.50e\n",i,log213coeffidh):	
+	fprintf(fd, "\#define log213coeff%dm %1.50e\n",i,log213coeffidl):	
+od:
+
+for i from 9 to 15 do 
+	fprintf(fd, "\#define log213coeff%dh %1.50e\n",i,nearest(coeff(pLog13(x),x,i))):		
+od:
+
+
+fprintf(fd, "\n\#define LOG2 %1.50e\n\n", log2):   
+
+fprintf(fd, "typedef struct rri_tag {float ri; double logih; double logil; double logill;} rri;  \n"):
+fprintf(fd, "static const rri argredtable[%d] = {\n", 2^L):
+for i from 0 to 2^L-1 do
+      fprintf(fd, "  { \n"):
+      fprintf(fd, "    %1.50e,   /* r[%d] */ \n", r[i], i):
+      fprintf(fd, "    %1.50e, /* logih[%d] */ \n", logih[i], i):
+      fprintf(fd, "    %1.50e, /* logil[%d] */ \n", logil[i], i):
+      fprintf(fd, "    %1.50e, /* logill[%d] */ \n", logill[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^L-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+
+fprintf(fd, "typedef struct tPi_t_tag {double hi; double lo; double lolo;} tPi_t;  \n"):
+fprintf(fd, "static const tPi_t twoPowerIndex1[%d] = {\n", 2^(6)):
+for i from 0 to 2^(6)-1 do
+      fprintf(fd, "  { \n"):      
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1hi[%d] */ \n", twoPowerIndex1hi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1lo[%d] */ \n", twoPowerIndex1lo[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex1lolo[%d] */ \n", twoPowerIndex1lolo[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^(6)-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+fprintf(fd, "static const tPi_t twoPowerIndex2[%d] = {\n", 2^(6)):
+for i from 0 to 2^(6)-1 do
+      fprintf(fd, "  { \n"):      
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2hi[%d] */ \n", twoPowerIndex2hi[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2lo[%d] */ \n", twoPowerIndex2lo[i], i):
+      fprintf(fd, "    %1.50e, /* twoPowerIndex2lolo[%d] */ \n", twoPowerIndex2lolo[i], i):
+      fprintf(fd, "  } "):
+      if(i<2^(6)-1) then  fprintf(fd, ", \n"): fi
+od:
+fprintf(fd, "}; \n \n"):
+
+
+
+
+
+fclose(fd):
+
+printf("--------- DONE -----------\n");
\ No newline at end of file
diff --git a/src/crlibm/maple/sqrt.mpl b/src/crlibm/maple/sqrt.mpl
new file mode 100644
index 0000000..a681510
--- /dev/null
+++ b/src/crlibm/maple/sqrt.mpl
@@ -0,0 +1,59 @@
+#######################################################################
+# This file is part of the crlibm library, and is distributed under
+# the  LGPL.
+# To use:
+# restart; read "sqrt.mpl";
+Digits := 120:
+
+interface(quiet=true):
+
+read "common-procedures.mpl":
+read "triple-double.mpl":
+mkdir("TEMPSQRT"):
+
+polyDegree := 4:
+
+ERecSqrtmMin := 0.707:
+ERecSqrtmMax := 1.4143:
+
+xErrMin := evalf((1/(ERecSqrtmMax^2))):
+xErrMax := evalf((1/(ERecSqrtmMin^2))):
+
+printf("Using a %d degree polynomial for computing the iteration seed\n",polyDegree);
+
+polyExact := numapprox[minimax](1/sqrt(x),x=1/2..2,[polyDegree,0],1,'err'):
+poly := poly_exact(polyExact):
+eps := numapprox[infnorm]((poly*sqrt(x))-1,x=xErrMin..xErrMax):
+
+printf("Relative approximation error eps = 2^(%f)\n",log[2](abs(eps))):
+
+printf("Writing tables...\n");
+
+filename:="TEMPSQRT/sqrt.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "\n/* File generated by maple/sqrt.mpl */\n"):
+
+for i from 0 to polyDegree do
+	fprintf(fd, "\#define SQRTPOLYC%d %1.50e\n",i,coeff(poly,x,i)):
+od:
+fprintf(fd, "\#define TWO52 %1.50e\n",evalf(2^(52))):
+
+
+fclose(fd):
+
+filename:="TEMPSQRT/sqrt.sed":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "s/_epsilonApprox/%1.50e/g\n",eps):
+fprintf(fd, "s/_ERecSqrtmMin/%1.50e/g\n",ERecSqrtmMin):
+fprintf(fd, "s/_ERecSqrtmMax/%1.50e/g\n",ERecSqrtmMax):
+
+
+for i from 0 to polyDegree do
+   fprintf(fd, "s/_SQRTPOLYC%d/%1.50e/g\n",i,coeff(poly,x,i)):
+od:
+
+fclose(fd):
+
+printf("... done\n");
\ No newline at end of file
diff --git a/src/crlibm/maple/trigo.mpl b/src/crlibm/maple/trigo.mpl
new file mode 100644
index 0000000..f8d2bf7
--- /dev/null
+++ b/src/crlibm/maple/trigo.mpl
@@ -0,0 +1,728 @@
+
+Digits := 100:
+interface(quiet=true):
+read "common-procedures.mpl":
+with(orthopoly):
+
+
+mkdir("TEMPTRIG"):
+
+
+
+# - Evaluation scheme :
+# case 1 : return x
+# case 2 (or Fast) : compute a simple polynomial
+# case 3 : do an argument reduction...
+
+
+
+########################################################
+#  Case 1 : Small arguments
+# return x for sine and tan, return 1 for cos
+########################################################
+
+xmax_return_x_for_sin := 2^(-26):
+xmax_return_1_for_cos_RN := sqrt(2^(-53)):
+xmax_return_1_for_cos_RDIR:=2^(-26):
+one_rounded_down := evalf(1-ulp(1/2)):
+
+xmax_return_x_for_tan := 2^(-27):
+
+
+
+
+########################################################
+# Case 2 : simple polynomial approximation
+########################################################
+
+# We want to use the same polynomial in case 2 and 3.
+# So see after arg red
+
+#################################################
+#   Case 3 : Argument reduction
+#################################################
+
+
+
+#################################################
+# CODY and WAITE  Argument reduction
+
+
+C := Pi/256:
+invC:= nearest(1/C):
+reminvC := evalf(1/C - invC):
+expC:=ieeedouble(C)[2]:
+epsinvC := abs(reminvC*C):
+
+# There are three sets of constants :
+#  - split redC into two constants, for small values when we are concerned with absolute error
+#  - split redC into three constants, for larger values
+#  - split redC into three doubles, for the cases when we need
+#     good relative precision on the result and fear cancellation
+
+
+
+
+# Fastest reduction using two-part Cody and Waite (up to |k|=2^22)
+
+bitsCh_0:=34:
+
+# 1/2 <= C/2^(expC+1) <1
+Ch:= round(evalf(  C * 2^(bitsCh_0-expC-1))) / (2^(bitsCh_0-expC-1)):
+# recompute bitsCh in case we are lucky (and we are for bitsCh_0=32)
+bitsCh:=1+log2(op(2,ieeedouble(Ch)[3])) :  # this means the log of the denominator
+
+Cl:=nearest(C - Ch):
+# Cody and Waite argument reduction will work for |k|<kmax_cw2
+kmax_cw2:=2^(53-bitsCh):
+
+# The constants to move to the .h file
+RR_CW2_CH := Ch:
+RR_CW2_MCL := -Cl:
+XMAX_CODY_WAITE_2 := nearest(kmax_cw2*C):
+
+# The error in this case (we need absolute error)
+delta_repr_C_cw2   := abs(C-Ch-Cl):
+delta_round_cw2    := kmax_cw2* 1/2 * ulp(Cl) :
+delta_cody_waite_2 := kmax_cw2 * delta_repr_C_cw2 + delta_round_cw2:
+# This is the delta on y, the reduced argument
+
+#log2(%);
+
+
+
+# Slower reduction using three-part Cody and Waite, up to |k|=2^31
+
+bitsCh_0:=23: # 22 or 23
+Ch:= round(evalf(  C * 2^(bitsCh_0-expC-1))) / (2^(bitsCh_0-expC-1)):
+# recompute bitsCh in case we are lucky
+bitsCh:=1+log2(op(2,ieeedouble(Ch)[3])) :  # this means the log of the denominator
+
+r := C-Ch:
+Cmed := round(evalf(  r * 2^(2*bitsCh-expC-1))) / (2^(2*bitsCh-expC-1)):
+bitsCmed:=1+log2(op(2,ieeedouble(Cmed)[3])) :
+
+Cl:=nearest(C - Ch - Cmed):
+
+kmax_cw3 := 2^min(53-bitsCh, 53-bitsCmed, 31):# Otherwise we have integer overflow
+
+
+
+# The constants to move to the .h file
+RR_CW3_CH  := Ch:
+RR_CW3_CM  := Cmed:
+RR_CW3_MCL := -Cl:
+XMAX_CODY_WAITE_3 := nearest(kmax_cw3*C):
+
+# The error in this case (we need absolute error)
+delta_repr_C_cw3   := abs(C - Ch - Cmed - Cl):
+delta_round_cw3    := kmax_cw3 * 1/2 * ulp(Cl) :
+delta_cody_waite_3 := kmax_cw3 * delta_repr_C_cw3 + delta_round_cw3:
+# This is the delta on y, the reduced argument
+
+#log2(%);
+
+
+
+
+
+# Third range reduction, using double-double arithmetic, for |k| up to 2^51-1
+
+# This max int value can be produced by DOUBLE2LONGINT
+kmax:=2^46-1:
+XMAX_DDRR:=nearest(kmax*C):
+
+#in this case we have C stored as 3 doubles
+Ch   := nearest(C):
+Cmed := nearest(C-Ch):
+Cl   := nearest(C-Ch-Cmed):
+
+RR_DD_MCH := -Ch:
+RR_DD_MCM := -Cmed:
+RR_DD_CL  := Cl:
+
+delta_repr_C := abs(C - Ch - Cmed - Cl):
+
+# and we have only exact Add12 and Mul12  operations. The only place
+# with possible rounding errors is:
+#       Add22 (pyh, pyl,    (x + kch_h) , (kcm_l - kd*RR_DD_CL),   th, tl) ;
+# where (x + kch_h) is exact (Sterbenz) with up to kmax bits of cancellation
+# and the error is simply the error in  (kcm_l - kd*RR_DD_CL)
+# At the very worst :
+delta_round :=
+              kmax * 1/2 * ulp(Cl) # for   kd*RR_DD_CL
+              + kmax*ulp(Cl)         # for the subtraction
+              + 2^(-100) * Pi/512 :    # for the Add22
+delta_RR_DD :=  kmax * delta_repr_C + delta_round:
+
+#  the last case, Payne and Hanek reduction, gives a very small delta:
+#  red arg is on 9*30 bits, then rounded to a double-double (106 bits)
+# This should, of course, be optimized some day
+delta_PayneHanek := 2^(-100):
+
+# Finally the max delta on the reduced argument is
+delta_ArgRed := max(delta_cody_waite_2, delta_cody_waite_3,
+                    delta_RR_DD, delta_PayneHanek):
+
+#print("delta_ArgRed to move to the .gappa file = ",  evalf(delta_ArgRed)):
+#log2(delta_ArgRed);
+
+
+
+
+
+# Now we use the above absolute error when k mod 256 <> 0
+# otherwise we need to worry about relative accuracy of the result.
+
+# First, what is the worst case for cancellation ?
+
+emax := ieeedouble(XMAX_DDRR)[2] +1 :
+# above emax, we will use Payne and Hanek so we do not worry
+
+(wcn, wce, wceps) := WorstCaseForAdditiveRangeReduction(2,53,-8, emax, C):
+wcx := wcn * 2^wce:
+wck := round(wcx/C):
+wcy := wcx - wck*C:
+
+#log2(wcy);   # y > 2^(-67);
+
+# In these cases we use the double-double range reduction, for |k|<kmax_cw3
+# and the relative precision in the worst case is for wcy
+
+delta_round := kmax_cw3 * 1/2 * ulp(Cl)      # for   kd*RR_DD_CL
+              + kmax_cw3 * ulp(Cl) :         # for the subtraction
+
+delta_RR_DD :=  kmax_cw3 * delta_repr_C + delta_round:
+
+eps_ArgRed := (1+delta_RR_DD/wcy)*(1+2^(-100)) -1:
+
+#log2(eps_ArgRed);
+
+# In all the other cases we use Payne and Hanek, and eps_ArgRed is
+# much smaller, so this is the max.
+
+
+
+###########
+# Polynomials for do_sine and do_cos, and for the case 2
+degreeSin := 8:
+degreeCos := 7:
+
+maxepsk := (1+epsinvC)*(1+2^(-53))-1:
+
+ymaxCase3  := evalf(Pi/512 + XMAX_DDRR*maxepsk):
+#print("ymaxCase3 to move to the .gappa file = ",  ymaxCase3):
+
+
+y2maxCase3 := ymaxCase3^2:
+# These are the parameters that can be varied to fine-tune performance
+#   (they should always be larger than Pi/512
+xmaxCosCase2   := Pi/256:
+xmaxSinCase2   := Pi/256:
+
+
+x2maxSinCase2:= xmaxSinCase2^2:
+x2maxCosCase2:= xmaxCosCase2^2:
+
+# We had the difficulty here to find minimax polynomials which are good for case 2
+# as well as for case 3. A simple solution was to set xmaxCosCase2 =ymaxCase3...
+# However we found another answer: in the future we intend to use these polynomials for second
+# step, too. Therefore, no minimax, only Taylor.
+
+polySin:=  poly_exact(convert( series(sin(x), x=0, degreeSin+1), polynom)):
+polyTs := expand(polySin/x-1):
+polyTs2 := subs(x=sqrt(y), polyTs):
+
+polyCos  := poly_exact (convert( series(cos(x), x=0, degreeCos+1), polynom)):
+polyTc2 := subs(x=sqrt(y), polyCos - 1):
+
+epsApproxSinCase2 := numapprox[infnorm]((x*polyTs+x -sin(x))/sin(x), x=0..xmaxSinCase2):
+epsApproxSinCase3 := numapprox[infnorm]((x*polyTs +x -sin(x))/sin(x), x=0..ymaxCase3):
+
+deltaApproxSinCase2 := numapprox[infnorm]((x*polyTs+x -sin(x)), x=0..xmaxSinCase2):
+deltaApproxSinCase3 := numapprox[infnorm]((x*polyTs +x -sin(x)), x=0..ymaxCase3):
+
+deltaApproxCosCase2:= numapprox[infnorm](polyCos -  cos(x), x=0..xmaxCosCase2):
+deltaApproxCosCase3:= numapprox[infnorm](polyCos -  cos(x), x=0..ymaxCase3):
+
+#print("deltaApproxSinCase3 to move to the .gappa file = ",  deltaApproxSinCase3):
+#print("deltaApproxCosCase3 to move to the .gappa file = ",  deltaApproxCosCase3):
+
+
+########################## Case 2 for sine  ###########################
+
+
+
+# evaluate this polynomial in double. The error on x*x is at most half an ulp
+errlist:=errlist_quickphase_horner(degree(polyTs2),0,0,2^(-53), 0):
+(eps_rounding_Ts, delta_rounding_Ts, minTs, maxTs):=
+	compute_horner_rounding_error(polyTs2,y,x2maxSinCase2, errlist, true):
+
+eps_poly_TsCase2 := numapprox[infnorm]((x*polyTs)/(sin(x)-x) -1, x=0..xmaxSinCase2):
+maxeps2 := (1+eps_poly_TsCase2)*(1+eps_rounding_Ts)*(1+2^(-53))-1:
+
+maxepstotalSinCase2 := maxeps2 * numapprox[infnorm](1-x/sin(x), x=0..xmaxSinCase2):
+rnconstantSinCase2 := evalf(compute_rn_constant(maxepstotalSinCase2)):
+
+
+
+
+
+##################################### Case2 cos ###########################
+
+# evaluate this polynomial in double. The error on x*x is at most half an ulp
+errlist        := errlist_quickphase_horner(degree(polyTc2),0,0,2**(-53), 0):
+(eps_rounding_Tc, delta_rounding_Tc, minTc, maxTc):=
+              compute_horner_rounding_error(polyTc2,y,x2maxCosCase2, errlist, true):
+
+# Then we have an Add12 which is exact. The result is greater then cos(xmaxCosCase2):
+miny := cos(xmaxCosCase2):
+maxepstotalCosCase2 :=  (delta_rounding_Tc + deltaApproxCosCase2) / miny :
+#log2(%);
+rnconstantCosCase2 := evalf(compute_rn_constant(maxepstotalCosCase2)):
+
+
+
+
+######################## Case2 Tangent #########################
+#
+# Compute the Taylor series
+degreeTanCase2 := 12:
+xmaxTanCase2   := 2**(-4):
+xminTanCase2   := 2**(-30):
+
+Poly_P := convert(series(tan(sqrt(x))/(x^(3/2))-1/x, x=0, degreeTanCase2*4),polynom):
+Poly_cheb := numapprox[chebpade](Poly_P, x=xminTanCase2..xmaxTanCase2^2, [degreeTanCase2/2-2,0]):
+polyTanCase2 :=  poly_exact2(expand(x + x^3 * subs(x=x^2, Poly_cheb)), 4):
+
+#polyTanCase2 :=  poly_exact2(convert(series(tan(x), x=0, degreeTanCase2), polynom), 4):
+
+maxepsApproxTanCase2:=numapprox[infnorm](1 - polyTanCase2 / tan(x), x=xminTanCase2..xmaxTanCase2):
+
+maxepsOverXTanCase2 :=numapprox[infnorm]((1 - polyTanCase2 / tan(x))/x, x=xminTanCase2..xmaxTanCase2):
+# Now we pass these values to Gappa
+
+filename:="TEMPTRIG/TanCase2.sed":
+fd:=fopen(filename, WRITE, TEXT):
+  t3h, t3l := hi_lo(coeff(polyTanCase2,x,3)):
+  fprintf(fd, " s/_t3h/%1.40e/g\n", t3h):
+  fprintf(fd, " s/_t3l/%1.40e/g\n", t3l):
+  fprintf(fd, " s/_t5/%1.40e/g\n",  coeff(polyTanCase2,x,5)):
+  fprintf(fd, " s/_t7/%1.40e/g\n",  coeff(polyTanCase2,x,7)):
+  fprintf(fd, " s/_t9/%1.40e/g\n",  coeff(polyTanCase2,x,9)):
+  fprintf(fd, " s/_t11/%1.40e/g\n", coeff(polyTanCase2,x,11)):
+  fprintf(fd, " s/_xmax/%1.40e/g\n", xmaxTanCase2):
+  fprintf(fd, " s/_maxEpsApproxOverX/%1.40e/g\n", maxepsOverXTanCase2*1.00001):
+  fprintf(fd, " s/_maxEpsApprox/%1.40e/g\n", maxepsApproxTanCase2*1.00001):
+fclose(fd):
+
+printf("\n\n************ DONE TEMPTRIG/TanCase2.sed ************\n");
+printf("Now you should use  \n    sed -f TEMPTRIG/TanCase2.sed trigoTanCase2.gappa | gappa  > /dev/null \n");
+
+
+
+maxepstotalTanCase2:=4.59602e-19:  # Cut from Gappa output
+
+log2(maxepstotalTanCase2): # almost 61 bits
+
+
+
+
+
+
+###############################################################################
+#   Computing errors for Case3 : now we have an error due to arg red
+
+# First DoSinZero. The notations are those of the paper proof
+
+# Approximation error already computed above as epsApproxSinCase3;
+
+#  polynomial evaluation in double, with an error on  y*y of epsilonArgRed
+errlist:=errlist_quickphase_horner(degree(polyTs2),0,0,eps_ArgRed, 0):
+(epsRoundingTsSinZero, deltaRoundingTsSinZero, minTs, maxTs):=
+	compute_horner_rounding_error(polyTs2,y,y2maxCase3, errlist, true):
+
+# just as in the paper proof
+maxepsSinZero1 := (1+epsApproxSinCase3)*(1+epsRoundingTsSinZero)*(1+2^(-53))*(1+2^(-53))  - 1:
+
+# just as in the paper proof. For x>0 the absolute values are as given
+
+epstotalSinZero :=  ( (x-sin(x))*maxepsSinZero1 + x*eps_ArgRed + 2^(-53)*x^3/3 )  / sin(x):
+maxepstotalSinZero := numapprox[infnorm]( epstotalSinZero , x=2^(-30)..ymaxCase3):
+
+printf("\nMax rel error for DoSinZero is %1.5e, if it's smaller than 2^(-66) (%1.5e) then the proof is OK\n\n", maxepstotalSinZero, 2^(-66)):
+
+
+
+
+
+##############################SinCosCase3############################
+  SinCosSize:= 128: # size f the table
+
+
+# The Gappa files in TEMPTRIG
+for i from 1 to SinCosSize/2 do
+    filename:=cat("TEMPTRIG/SinACosA_",i,".sed"):
+    fd:=fopen(filename, WRITE, TEXT):
+
+    # The table values
+    s:=hi_lo(sin(i*Pi/(2*SinCosSize))):
+    c:=hi_lo(cos(i*Pi/(2*SinCosSize))):
+    fprintf(fd, " s/_cah/%1.40e/g\n", c[1]):
+    fprintf(fd, " s/_cal/%1.40e/g\n", c[2]):
+    fprintf(fd, " s/_sah/%1.40e/g\n", s[1]):
+    fprintf(fd, " s/_sal/%1.40e/g\n", s[2]):
+
+    # The polynomial coefficients
+    fprintf(fd, " s/_s3/%1.40e/g\n", coeff(polySin,x,3)):
+    fprintf(fd, " s/_s5/%1.40e/g\n", coeff(polySin,x,5)):
+    fprintf(fd, " s/_s7/%1.40e/g\n", coeff(polySin,x,7)):
+    fprintf(fd, " s/_s9/%1.40e/g\n", coeff(polySin,x,9)):
+    fprintf(fd, " s/_c2/%1.40e/g\n", coeff(polyCos,x,2)):
+    fprintf(fd, " s/_c4/%1.40e/g\n", coeff(polyCos,x,4)):
+    fprintf(fd, " s/_c6/%1.40e/g\n", coeff(polyCos,x,6)):
+    fprintf(fd, " s/_c8/%1.40e/g\n", coeff(polyCos,x,8)):
+
+    # The approximation errors
+    fprintf(fd, " s/_ymaxCase3/%1.40e/g\n", ymaxCase3*1.00001):
+    fprintf(fd, " s/_delta_ArgRed/%1.40e/g\n", delta_ArgRed*1.00001):
+    fprintf(fd, " s/_delta_approx_Sin_Case3/%1.40e/g\n", deltaApproxSinCase3*1.00001):
+    fprintf(fd, " s/_delta_approx_Cos_Case3/%1.40e/g\n", deltaApproxCosCase3*1.00001):
+
+    fclose(fd):
+od:
+
+
+printf("************ DONE TEMPTRIG/*.sed ************\n"):
+
+# A shell script to use them
+filename:="../gappa/run-trigo-proof.sh":
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, "#!/bin/sh\n"):
+fprintf(fd, "# You probably need to edit the path to the gappa executable\n"):
+fprintf(fd, "for file in ../maple/TEMPTRIG/SinACosA*.sed  \n"):
+fprintf(fd, "do\n"):
+fprintf(fd, "  echo $file:\n"):
+fprintf(fd, "  sed -f  $file  trigoSinCosCase3.gappa | ~/gappa/src/gappa\n"):
+fprintf(fd, "  echo\n"):
+fprintf(fd, "done\n"):
+fclose(fd):
+
+printf("************ DONE trigo_test.sh ************\n"):
+printf("To run the Gappa proof, you should go to the gappa directory and run\n"):
+printf(" sh run-trigo-proof.sh 2> ../maple/TEMPTRIG/Gappa.out\n"):
+
+printf("Then look at maple/TEMPTRIG/Gappa.out. It shouldn't contain 'No proof'.\n This means that everything is OK and the rounding constants in TEMPTRIG/trigo_fast.h are proven upper bounds.\n\n"):
+
+
+
+
+#  This value has been validated by Gappa (using all the previous)
+maxepstotalSinCosCase3:=3*2^(-66):
+rnconstantSinCosCase3 := evalf(compute_rn_constant(maxepstotalSinCosCase3)):
+
+
+# The error of sin, the error of cos, then the error of Div22
+maxepstotalTanCase3:= 2.1*maxepstotalSinCosCase3:
+rnconstantTanCase3 := evalf(compute_rn_constant(maxepstotalTanCase3)):
+
+
+
+
+
+##############################################
+## Compute constants for SCS arg red
+oldDigits:=Digits:
+Digits:=1000:
+# for 2/Pi:
+n:=round(2^(30*48)*evalf(2/Pi)):
+digitlist:=[]:
+for i from 1 to 48 do
+  r:=n mod (2^30):
+  n:=floor(n/(2^30)):
+  hexstring:= convert(convert(r,hex),string):
+  digitlist:=[hexstring, op(digitlist)]:
+end:
+digitlist:
+
+# for 256/Pi:
+n:=round(2^(30*47)*evalf(256/Pi)):
+digitlist:=[]:
+for i from 1 to 48 do
+  r:=n mod (2^30):
+  n:=floor(n/(2^30)):
+  hexstring:= convert(convert(r,hex),string):
+  digitlist:=[hexstring, op(digitlist)]:
+end:
+digitlist:
+Digits:=oldDigits:
+
+
+
+# an auxiliary output function:
+# Outputs the high part of a double, and the double in comment.
+# As all these high parts are used in code as
+# if(absxhi < XMAX_COS_CASE2)
+# we have to remove one LSB to the high part, or, divide var by
+# (1+2^(-20))
+# Now we have absxhi<highpart(var/(1+2^(-20))
+# => absxhi*(1+2^(-20))<var
+# => x<var
+outputHighPart:=proc(cvarname, var)
+  local varMinusLSB:
+  Digits:=8:
+  varMinusLSB:=var/(1+2^(-20)):
+  ("#define " || cvarname || " 0x" || (ieeehexa(varMinusLSB)[1])
+    ||  "        /* " || (convert(evalf(varMinusLSB),string)) ||  " */" )
+end proc:
+
+
+
+
+
+# Output:
+
+filename:="TEMPTRIG/trigo_fast.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+
+fprintf(fd, "\n/*File generated by maple/trigo.pl*/\n"):
+fprintf(fd, "\n"):
+
+
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_RETURN_X_FOR_SIN", xmax_return_x_for_sin) ):
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_SIN_CASE2        ", xmaxSinCase2) ):
+
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_RETURN_1_FOR_COS_RN", xmax_return_1_for_cos_RN) ):
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_RETURN_1_FOR_COS_RDIR", xmax_return_1_for_cos_RDIR) ):
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_COS_CASE2        ", xmaxCosCase2) ):
+
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_RETURN_X_FOR_TAN", xmax_return_x_for_tan) ):
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_TAN_CASE2        ", xmaxTanCase2) ):
+
+fprintf(fd, "\n"):
+fprintf(fd, "#define ONE_ROUNDED_DOWN  %1.25e \n", one_rounded_down):
+fprintf(fd, "\n"):
+
+fprintf(fd, "#define EPS_SIN_CASE2     %1.25e \n", maxepstotalSinCase2):
+fprintf(fd, "#define RN_CST_SIN_CASE2  %1.25f \n", rnconstantSinCase2):
+fprintf(fd, "\n"):
+fprintf(fd, "#define EPS_COS_CASE2     %1.25e \n", maxepstotalCosCase2):
+fprintf(fd, "#define RN_CST_COS_CASE2  %1.25f \n", rnconstantCosCase2):
+fprintf(fd, "\n"):
+fprintf(fd, "#define EPS_SINCOS_CASE3     %1.25e \n", maxepstotalSinCosCase3):
+fprintf(fd, "#define RN_CST_SINCOS_CASE3  %1.25f \n", rnconstantSinCosCase3):
+fprintf(fd, "\n"):
+fprintf(fd, "#define EPS_TAN_CASE2     %1.25e \n", maxepstotalTanCase2):
+fprintf(fd, "#define EPS_TAN_CASE3     %1.25e \n", maxepstotalTanCase3):
+fprintf(fd, "#define RN_CST_TAN_CASE3  %1.25f \n", rnconstantTanCase3):
+
+fprintf(fd, "\n"):
+
+fprintf(fd, "#define INV_PIO256        %1.25f \n", 1/C):
+fprintf(fd, "\n"):
+
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_CODY_WAITE_2", XMAX_CODY_WAITE_2) ):
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_CODY_WAITE_3", XMAX_CODY_WAITE_3) ):
+fprintf(fd,  "%s\n",  outputHighPart("XMAX_DDRR        ", XMAX_DDRR) ):
+#fprintf(fd,  "%s\n",  outputHighPart("", ) ):
+fprintf(fd, "\n"):
+
+fprintf(fd, "#define RR_CW2_CH  %1.25e\n", RR_CW2_CH):
+fprintf(fd, "#define RR_CW2_MCL %1.25e\n", RR_CW2_MCL):
+fprintf(fd, "\n"):
+
+fprintf(fd, "#define RR_CW3_CH  %1.25e\n", RR_CW3_CH):
+fprintf(fd, "#define RR_CW3_CM  %1.25e\n", RR_CW3_CM):
+fprintf(fd, "#define RR_CW3_MCL %1.25e\n", RR_CW3_MCL):
+fprintf(fd, "\n"):
+
+fprintf(fd, "#define RR_DD_MCH  %1.25e\n", RR_DD_MCH):
+fprintf(fd, "#define RR_DD_MCM  %1.25e\n", RR_DD_MCM):
+fprintf(fd, "#define RR_DD_CL   %1.25e\n", RR_DD_CL):
+fprintf(fd, "\n"):
+
+fprintf(fd, "\n"):
+
+  fprintf(fd, "\n\n"):
+
+  # The 256/Pi SCS array
+  fprintf(fd, "static const int digits_256_over_pi[] = \n{"):
+  for i from 0 to 11 do
+    for j from 1 to 4 do
+      fprintf(fd, " 0x%s,  \t",digitlist[4*i+j]):
+    end:
+    fprintf(fd, "\n "):
+  end:
+  fprintf(fd, "};\n\n"):
+
+  # The Pi/256 SCS constant
+  fprintf(fd, "static const scs Pio256=\n"):
+  WriteSCS(fd, evalf(C)):
+  fprintf(fd, ";\n#define Pio256_ptr  (scs_ptr)(& Pio256)\n\n"):
+
+fprintf(fd,"#ifdef WORDS_BIGENDIAN\n"):
+for isbig from 1 to 0 by -1 do
+
+  if(isbig=0) then
+    fprintf(fd,"#else\n"):
+  fi:
+
+  # The sine polynomial
+
+  fprintf(fd, "static db_number const s3 = "):
+  printendian(fd, coeff(polySin,x,3), isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const s5 = "):
+  printendian(fd, coeff(polySin,x,5), isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const s7 = "):
+  printendian(fd, coeff(polySin,x,7), isbig):
+  fprintf(fd, ";\n\n"):
+
+
+  # the cos polynomial
+
+  fprintf(fd, "static db_number const c2 = "):
+  printendian(fd, coeff(polyCos,x,2), isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const c4 = "):
+  printendian(fd, coeff(polyCos,x,4), isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const c6 = "):
+  printendian(fd, coeff(polyCos,x,6), isbig):
+  fprintf(fd, ";\n\n"):
+
+
+  # the tan polynomial
+
+  t3h, t3l := hi_lo(coeff(polyTanCase2,x,3)):
+  fprintf(fd, "static db_number const t3h = "):
+  printendian(fd, t3h, isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const t3l = "):
+  printendian(fd, t3l, isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const t5 = "):
+  printendian(fd, coeff(polyTanCase2,x,5), isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const t7 = "):
+  printendian(fd, coeff(polyTanCase2,x,7), isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const t9 = "):
+  printendian(fd, coeff(polyTanCase2,x,9), isbig):
+  fprintf(fd, ";\n"):
+  fprintf(fd, "static db_number const t11 = "):
+  printendian(fd, coeff(polyTanCase2,x,11), isbig):
+  fprintf(fd, ";\n\n"):
+
+
+  # The sincos table
+
+  fprintf(fd, "\n/*  sine and cos of kPi/256 in double-double */\n"):
+  fprintf(fd, "static db_number const sincosTable[%d] =\n{\n",  4*(SinCosSize/2+1)):
+  for i from 0 to SinCosSize/2 do
+      s:=hi_lo(sin(i*Pi/(2*SinCosSize))):
+      c:=hi_lo(cos(i*Pi/(2*SinCosSize))):
+      printendian(fd,s[1],isbig):
+      fprintf(fd," ,\n"):
+      printendian(fd,s[2],isbig):
+      fprintf(fd," ,\n"):
+      printendian(fd,c[1],isbig):
+      fprintf(fd," ,\n"):
+      printendian(fd,c[2],isbig):
+    if i<SinCosSize-1 then fprintf(fd," ,\n"): fi:
+  od:
+  fprintf(fd, "\n};\n\n"):
+
+
+od:
+fprintf(fd,"#endif /* WORDS_BIGENDIAN */\n\n\n"):
+
+fclose(fd):
+
+printf("\n\n************ DONE TEMPTRIG/trigo_fast.h ************\n Copy it to the crlibm source directory.\n\n");
+
+
+#################################################
+# Stuff for the accurate phase,
+#
+# Should very bad cases be found in the future, only the degrees below
+# should  be increased, then this script rerun. Everything should
+# compile OK with the newly generated trigo_accurate.h
+
+printf("\n-------------------------------------------------------\n"):
+printf("--------------------Accurate phase---------------------\n"):
+printf("-------------------------------------------------------\n"):
+
+xminSCS   := 0:
+xmaxSCS   := Pi/4:
+
+
+#-----------------Sine-----------------------
+degreeSinSCS := 26:
+Poly_P := convert(series(sin(sqrt(x))/(x^(3/2))-1/x, x=0, degreeSinSCS*4),polynom):
+Poly_cheb := numapprox[chebpade](Poly_P, x=xminSCS..xmaxSCS^2, [degreeSinSCS/2-2,0]):
+polySinSCS :=  poly_exact_SCS(expand(x + x^3 * subs(x=x^2, Poly_cheb))):
+
+DEGREE_SIN_SCS := degree(polySinSCS):
+maxepsApproxSinSCS:=numapprox[infnorm](1 - polySinSCS/sin(x), x=xminSCS..xmaxSCS):
+printf("The sine polynomial for the second phase (degree %d) is accurate to %f bits on O..Pi/4\n", DEGREE_SIN_SCS, -log2(maxepsApproxSinSCS)):
+# For the proof of the very bad cases, near zero
+maxepsApproxSinSCSNearZero:=numapprox[infnorm](1 - polySinSCS/sin(x), x=0..2^(-17)):
+printf("  ... and  accurate to %f bits on O..2^(-17)\n", -log2(maxepsApproxSinSCSNearZero)):
+
+
+#-----------------Cos-----------------------
+degreeCosSCS := 28:
+Poly_P := convert(series((cos(sqrt(x)) -1)/x, x=0, degreeCosSCS*4),polynom):
+Poly_cheb := numapprox[chebpade](Poly_P, x=xminSCS..xmaxSCS^2, [degreeCosSCS/2-2,0]):
+polyCosSCS :=  poly_exact_SCS(expand(1 + x^2 * subs(x=x^2, Poly_cheb))):
+DEGREE_COS_SCS := degree(polyCosSCS):
+
+maxepsApproxCosSCS:=numapprox[infnorm](1 - polyCosSCS/cos(x), x=xminSCS..xmaxSCS):
+printf("The cos polynomial for the second phase (degree %d) is accurate to %f bits on O..Pi/4\n", degree(polyCosSCS), -log2(maxepsApproxCosSCS)):
+# For the proof of the very bad cases, near zero
+maxepsApproxCosSCSNearZero:=numapprox[infnorm](1 - polyCosSCS/cos(x), x=0..2^(-18)):
+printf("  ... and  accurate to %f bits on O..2^(-18)\n", -log2(maxepsApproxCosSCSNearZero)):
+
+
+
+#-----------------Tan-----------------------
+degreeTanSCS := 70:
+Poly_P := convert(series(tan(sqrt(x))/(x^(3/2))-1/x, x=0, degreeTanSCS*4),polynom):
+Poly_cheb := numapprox[chebpade](Poly_P, x=xminSCS..xmaxSCS^2, [degreeTanSCS/2-2,0]):
+polyTanSCS :=  poly_exact_SCS(expand(x + x^3 * subs(x=x^2, Poly_cheb))):
+
+DEGREE_TAN_SCS := degree(polyTanSCS):
+maxepsApproxTanSCS:=numapprox[infnorm](1 - polyTanSCS/tan(x), x=xminSCS..xmaxSCS):
+printf("The tan polynomial for the second phase (degree %d) is accurate to %f bits on O..Pi/4\n", DEGREE_TAN_SCS, -log2(maxepsApproxTanSCS)):
+# For the proof of the very bad cases, near zero
+maxepsApproxTanSCSNearZero:=numapprox[infnorm](1 - polyTanSCS/tan(x), x=0..2^(-17)):
+printf("  ... and  accurate to %f bits on O..2^(-17)\n", -log2(maxepsApproxTanSCSNearZero)):
+
+
+filename:="TEMPTRIG/trigo_accurate.h":
+fd:=fopen(filename, WRITE, TEXT):
+fprintf(fd, "/*File generated by maple/trigo.mpl*/\n\n"):
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n\n"):
+fprintf(fd, "#define DEGREE_SIN_SCS  %d \n", DEGREE_SIN_SCS):
+fprintf(fd, "#define DEGREE_COS_SCS  %d \n", DEGREE_COS_SCS):
+fprintf(fd, "#define DEGREE_TAN_SCS  %d \n", DEGREE_TAN_SCS):
+fprintf(fd, "\n"):
+fprintf(fd, "#define  sin_scs_poly_ptr (scs_ptr)&sin_scs_poly \n"):
+fprintf(fd, "#define  cos_scs_poly_ptr (scs_ptr)&cos_scs_poly \n"):
+fprintf(fd, "#define  tan_scs_poly_ptr (scs_ptr)&tan_scs_poly \n"):
+fprintf(fd, "\n"):
+Write_SCS_poly(fd, sin_scs_poly, polySinSCS):
+fprintf(fd, "\n\n"):
+Write_SCS_poly(fd, cos_scs_poly, polyCosSCS):
+fprintf(fd, "\n\n"):
+Write_SCS_poly(fd, tan_scs_poly, polyTanSCS):
+fprintf(fd, "\n"):
+fclose(fd):
+
+printf("\n\n************ DONE TEMPTRIG/trigo_accurate.h ************\n Copy it to the crlibm source directory.\n\n");
+
+
diff --git a/src/crlibm/maple/trigpi.mpl b/src/crlibm/maple/trigpi.mpl
new file mode 100644
index 0000000..ff525f3
--- /dev/null
+++ b/src/crlibm/maple/trigpi.mpl
@@ -0,0 +1,95 @@
+Digits := 200:
+interface(quiet=true):
+read "common-procedures.mpl":
+read "triple-double.mpl":
+with(orthopoly):
+mkdir("TEMPTRIG"):
+
+smallest := 2^(-1023) * 1 * 2^(-51):
+
+pih, pim, pil := hi_mi_lo(Pi):
+
+# precompute Dekker decomposition of pih
+DekkerConst:=2^27+1:
+t:=nearest(pih*DekkerConst) :
+pihh:= nearest(pih-t) + t :
+pihm:= pih-pihh :
+
+
+
+
+
+SinCosSize:= 64: # size f the table
+
+
+
+outputHighPart:=proc(cvarname, var)
+  local varMinusLSB:
+  Digits:=8:
+  varMinusLSB:=var/(1+2^(-20)):
+  ("#define " || cvarname || " 0x" || (ieeehexa(varMinusLSB)[1])
+    ||  "        /* " || (convert(evalf(varMinusLSB),string)) ||  " */" )
+end proc:
+
+
+filename:="TEMPTRIG/trigpi.h":
+fd:=fopen(filename, WRITE, TEXT):
+
+fprintf(fd, "#include \"crlibm.h\"\n#include \"crlibm_private.h\"\n"):
+fprintf(fd, "\n/*File generated by maple/trigpi.pl*/\n"):
+fprintf(fd, "#define TWOTO42     %1.50e \n", 2^42):
+fprintf(fd, "\n"):
+fprintf(fd, "#define TWOTO52     %1.50e \n", 2^52):
+fprintf(fd, "\n"):
+fprintf(fd, "#define INV128      %1.50e \n", 1/128):
+fprintf(fd, "\n"):
+fprintf(fd, "#define TWOTO5251        %1.50e \n", 2^52+2^51):
+fprintf(fd, "\n"):
+fprintf(fd, "#define SMALLEST       %1.50e\n",smallest):
+fprintf(fd, "\n"):
+
+fprintf(fd, "#define PIH %1.50e\n", pih):
+fprintf(fd, "\n"):
+fprintf(fd, "#define PIM %1.50e\n", pim):
+fprintf(fd, "\n"):
+fprintf(fd, "#define PIL %1.50e\n", pil):
+fprintf(fd, "\n"):
+fprintf(fd, "#define PIHH %1.50e\n", pihh):
+fprintf(fd, "\n"):
+fprintf(fd, "#define PIHM %1.50e\n", pihm):
+fprintf(fd, "\n"):
+fprintf(fd, "#define PIX_RNCST_SIN %1.50e\n", compute_rn_constant(2^(-61))):
+fprintf(fd, "\n"):
+fprintf(fd, "#define PIX_EPS_SIN   %1.50e\n", 2^(-61)):
+fprintf(fd, "\n"):
+fprintf(fd, "#define PIX_RNCST_TAN %1.50e\n", compute_rn_constant(2^(-60))):
+fprintf(fd, "\n"):
+fprintf(fd, "#define PIX_EPS_TAN   %1.50e\n", 2^(-60)):
+fprintf(fd, "\n"):
+
+# The Pi SCS constant TODO: fuse with the Pi/256 in trigo.h
+  fprintf(fd, "static const scs PiSCS=\n"):
+  WriteSCS(fd, evalf(Pi)):
+  fprintf(fd, ";\n#define PiSCS_ptr  (scs_ptr)(& PiSCS)\n\n"):
+
+# Table
+fprintf(fd, "typedef struct tPi_t_tag {double sh; double ch; double sm; double cm; double sl; double cl;} tPi_t;\n");
+fprintf(fd, "static const tPi_t sincosTable[%d] =\n{\n",  SinCosSize):
+for i from 0 to SinCosSize-1 do
+    sh,sm,sl:=hi_mi_lo(sin(i*Pi/(2*SinCosSize))):
+    ch,cm,cl:=hi_mi_lo(cos(i*Pi/(2*SinCosSize))):
+    fprintf(fd, "  { /* sin/cos(%d*pi/%d) */\n", i, 2*SinCosSize):
+    fprintf(fd, "    %1.50e, /* sh */ \n", sh):
+    fprintf(fd, "    %1.50e, /* ch */ \n", ch):
+    fprintf(fd, "    %1.50e, /* sm */ \n", sm):
+    fprintf(fd, "    %1.50e, /* cm */ \n", cm):
+    fprintf(fd, "    %1.50e, /* sl */ \n", sl):
+    fprintf(fd, "    %1.50e, /* cl */ \n", cl):
+    fprintf(fd, "  } "):
+    fprintf(fd, ", \n"):
+od:
+fprintf(fd, "}; \n \n"):
+
+
+
+fclose(fd):
diff --git a/src/crlibm/maple/triple-double.mpl b/src/crlibm/maple/triple-double.mpl
new file mode 100644
index 0000000..f250f6a
--- /dev/null
+++ b/src/crlibm/maple/triple-double.mpl
@@ -0,0 +1,78 @@
+
+read "common-procedures.mpl":
+
+
+#---------------------------------------------------------------------
+# hi_mi_lo takes an arbitrary precision number x and returns three doubles such that:
+# x ~ x_hi + x_mi + x_lo
+hi_mi_lo:= proc(x)
+local x_hi, x_mi, x_lo, res:
+x_hi:= nearest(evalf(x)):
+res:=x-x_hi:
+if (res = 0) then
+  x_mi:=0:
+  x_lo:=0:
+else
+  x_mi:=nearest(evalf(res)):
+  res:=x-(x_hi+x_mi);
+  if (res = 0) then
+    x_lo:=0:
+  else
+    x_lo:=nearest(evalf(res)):
+  end if:
+end if:
+x_hi,x_mi,x_lo:
+end:
+
+
+#---------------------------------------------------------------------
+# same as hi_mi_lo, but returns hexadecimal strings
+ieeehexa3:=proc(x)
+local x_hi, x_mi, x_lo;
+  x_hi, x_mi, x_lo := hi_mi_lo(x):
+  ieeehexa(x_hi), ieeehexa(x_mi), ieeehexa(x_lo):
+end proc:
+
+
+#---------------------------------------------------------------------
+#Like poly_exact, but the first n coefficients as triple doubles, 
+#the next m coefiicients as double doubles and the rest as doubles
+#
+poly_exact32:=proc(P,n,m)
+local deg,i, coef, coef_hi, coef_mi, coef_lo, Q:
+Q:= 0:
+convert(Q, polynom):
+deg:=degree(P,x):
+  for i from 0 to deg do
+    coef :=coeff(P,x,i):
+    coef_hi, coef_mi, coef_lo:=hi_mi_lo(coef):
+    Q:= Q + coef_hi*x^i:
+    if(i<m+n) then
+        Q := Q + coef_mi*x^i:
+    fi: 
+    if(i<n) then
+	Q := Q + coef_lo*x^i:
+    fi:
+  od:
+  return(Q):
+end:
+
+
+#---------------------------------------------------------------------
+# Returns nearest double-double:
+nearestDD := proc(x)
+  local xh,xm:
+  xh := nearest(x);
+  xm := nearest(x - xh);
+  evalf(xh + xm);
+end:
+
+#---------------------------------------------------------------------
+# Returns nearest triple-double:
+nearestTD := proc(x)
+  local xh,xm,xl:
+  xh := nearest(x);
+  xm := nearest(x - xh);
+  xl := nearest(x - (xh + xm));
+  evalf(xh + xm + xl);
+end:
diff --git a/src/crlibm/missing b/src/crlibm/missing
new file mode 100755
index 0000000..db98974
--- /dev/null
+++ b/src/crlibm/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program 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 2, or (at your option)
+# any later version.
+
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try '$0 --help' for more information"
+  exit 1
+fi
+
+case $1 in
+
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
+
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'autom4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
+    ;;
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/crlibm/pow.c b/src/crlibm/pow.c
new file mode 100755
index 0000000..d6d684e
--- /dev/null
+++ b/src/crlibm/pow.c
@@ -0,0 +1,1396 @@
+ 
+#include <stdio.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "pow.h"
+
+
+/* Some macros for specific operations in power */
+
+#define USE_BUILTINS 0
+
+/* decompose
+
+   Decomposes a positive double precision 
+   variable x (normal or subnormal) such that
+
+   2^(resE) * resm = x 
+
+   where resm = 2 * k + 1 for integer k
+
+   resE is an integer variable pointer
+   resm is a double precision variable pointer
+   x is a double precision variable.
+
+*/
+
+#if USE_BUILTINS
+#define decompose(resm,resE,x)                                             \
+{                                                                          \
+   int __decompose_ex, __decompose_d;                                      \
+   int64_t __decompose_temp;                                               \
+   db_number __decompose_xdb;                                              \
+                                                                           \
+   __decompose_xdb.d = (x);                                                \
+   __decompose_ex = 0;                                                     \
+   if (!(__decompose_xdb.i[HI] & 0xfff00000)) {                            \
+     __decompose_xdb.d = (x) * 0.18014398509481984e17;                     \
+     __decompose_ex = -54;                                                 \
+   }                                                                       \
+   __decompose_ex += (__decompose_xdb.i[HI] >> 20) - 1023;                 \
+   __decompose_xdb.i[HI] &= 0x000fffff;                                    \
+   __decompose_temp = __decompose_xdb.l | 0x0010000000000000llu;           \
+   __decompose_d = __builtin_ctz(__decompose_temp);                        \
+   __decompose_xdb.i[HI] |= (1075 - __decompose_d) << 20;                  \
+   *(resE) = __decompose_d - 52 + __decompose_ex;                          \
+   *(resm) = __decompose_xdb.d;                                            \
+}
+#else
+#define decompose(resm,resE,x)                                             \
+{                                                                          \
+   int __decompose_ex, __decompose_d;                                      \
+   int64_t __decompose_temp;                                               \
+   db_number __decompose_xdb, __decompose_tempdb;                          \
+                                                                           \
+   __decompose_xdb.d = (x);                                                \
+   __decompose_ex = 0;                                                     \
+   if (!(__decompose_xdb.i[HI] & 0xfff00000)) {                            \
+     __decompose_xdb.d = (x) * 0.18014398509481984e17;                     \
+     __decompose_ex = -54;                                                 \
+   }                                                                       \
+   __decompose_ex += (__decompose_xdb.i[HI] >> 20) - 1023;                 \
+   __decompose_xdb.i[HI] &= 0x000fffff;                                    \
+   __decompose_temp = __decompose_xdb.l | 0x0010000000000000llu;           \
+   __decompose_temp = (~__decompose_temp & (__decompose_temp - 1)) + 1;    \
+   __decompose_tempdb.d = (double) __decompose_temp;                       \
+   __decompose_d = (__decompose_tempdb.i[HI] >> 20) - 1023;                \
+   __decompose_xdb.i[HI] |= (1075 - __decompose_d) << 20;                  \
+   *(resE) = __decompose_d - 52 + __decompose_ex;                          \
+   *(resm) = __decompose_xdb.d;                                            \
+}
+#endif
+
+
+/* isOddInteger 
+
+   Determines if a given double precision number x is an odd integer 
+
+*/
+
+#define isOddInteger(x) (ABS(((ABS(x) + 0.9007199254740992e16) - 0.9007199254740992e16) - ABS(x)) == 1.0)
+
+/* isInteger 
+
+   Determines if a given double precision number x is integer 
+
+*/
+
+#define isInteger(x) ((ABS(x) >= 0.4503599627370496e16) || (((ABS(x) + 0.4503599627370496e16) - 0.4503599627370496e16) == ABS(x)))
+
+
+/* log2_130
+
+   Approximates 
+
+   resh + resm + resl = (ed + log2(1 + (xh + xm)) + log2(r[index])) * (1 + eps)
+
+   where ||eps|| <= 2^(-130)
+
+
+*/
+static inline void log2_130(double *resh, double *resm, double *resl, 
+	                    int index, double ed, double xh, double xm) {
+
+  double p_t_1_0h;
+  double p_t_2_0h;
+  double p_t_3_0h;
+  double p_t_4_0h;
+  double p_t_5_0h;
+  double p_t_6_0h;
+  double p_t_7_0h;
+  double p_t_8_0h;
+  double p_t_9_0h, p_t_9_0m;
+  double p_t_10_0h, p_t_10_0m;
+  double p_t_11_0h, p_t_11_0m;
+  double p_t_12_0h, p_t_12_0m;
+  double p_t_13_0h, p_t_13_0m;
+  double p_t_14_0h, p_t_14_0m;
+  double p_t_15_0h, p_t_15_0m;
+  double p_t_16_0h, p_t_16_0m, p_t_16_0l;
+  double p_t_17_0h, p_t_17_0m, p_t_17_0l;
+  double p_t_18_0h, p_t_18_0m, p_t_18_0l;
+  double p_t_19_0h, p_t_19_0m, p_t_19_0l;
+  double p_t_20_0h, p_t_20_0m, p_t_20_0l;
+  double p_t_21_0h, p_t_21_0m, p_t_21_0l;
+  double p_t_21_1h, p_t_21_1m, p_t_21_1l;
+  double p_t_22_0h, p_t_22_0m, p_t_22_0l;
+  double p_t_23_0h, p_t_23_0m, p_t_23_0l;
+  double p_resh, p_resm, p_resl;
+  double log2yh, log2ym, log2yl;
+  double log2xh, log2xm, log2xl;
+  double logih, logim, logil;
+
+
+  p_t_1_0h = log2_130_p_coeff_13h;
+  p_t_2_0h = p_t_1_0h * xh;
+  p_t_3_0h = log2_130_p_coeff_12h + p_t_2_0h;
+  p_t_4_0h = p_t_3_0h * xh;
+  p_t_5_0h = log2_130_p_coeff_11h + p_t_4_0h;
+  p_t_6_0h = p_t_5_0h * xh;
+  p_t_7_0h = log2_130_p_coeff_10h + p_t_6_0h;
+  p_t_8_0h = p_t_7_0h * xh;
+  Add12(p_t_9_0h,p_t_9_0m,log2_130_p_coeff_9h,p_t_8_0h);
+  Mul22(&p_t_10_0h,&p_t_10_0m,p_t_9_0h,p_t_9_0m,xh,xm);
+  Add122(&p_t_11_0h,&p_t_11_0m,log2_130_p_coeff_8h,p_t_10_0h,p_t_10_0m);
+  MulAdd22(&p_t_12_0h,&p_t_12_0m,log2_130_p_coeff_7h,log2_130_p_coeff_7m,xh,xm,p_t_11_0h,p_t_11_0m);
+  MulAdd22(&p_t_13_0h,&p_t_13_0m,log2_130_p_coeff_6h,log2_130_p_coeff_6m,xh,xm,p_t_12_0h,p_t_12_0m);
+  MulAdd22(&p_t_14_0h,&p_t_14_0m,log2_130_p_coeff_5h,log2_130_p_coeff_5m,xh,xm,p_t_13_0h,p_t_13_0m);
+  Mul22(&p_t_15_0h,&p_t_15_0m,p_t_14_0h,p_t_14_0m,xh,xm);
+  Add23(&p_t_16_0h,&p_t_16_0m,&p_t_16_0l,log2_130_p_coeff_4h,log2_130_p_coeff_4m,p_t_15_0h,p_t_15_0m);
+  Mul233(&p_t_17_0h,&p_t_17_0m,&p_t_17_0l,xh,xm,p_t_16_0h,p_t_16_0m,p_t_16_0l);
+  Add233(&p_t_18_0h,&p_t_18_0m,&p_t_18_0l,log2_130_p_coeff_3h,log2_130_p_coeff_3m,p_t_17_0h,p_t_17_0m,p_t_17_0l);
+  Mul233(&p_t_19_0h,&p_t_19_0m,&p_t_19_0l,xh,xm,p_t_18_0h,p_t_18_0m,p_t_18_0l);
+  Add33(&p_t_20_0h,&p_t_20_0m,&p_t_20_0l,log2_130_p_coeff_2h,log2_130_p_coeff_2m,log2_130_p_coeff_2l,p_t_19_0h,p_t_19_0m,p_t_19_0l);
+  Mul233(&p_t_21_0h,&p_t_21_0m,&p_t_21_0l,xh,xm,p_t_20_0h,p_t_20_0m,p_t_20_0l);
+  Renormalize3(&p_t_21_1h,&p_t_21_1m,&p_t_21_1l,p_t_21_0h,p_t_21_0m,p_t_21_0l);
+  Add33(&p_t_22_0h,&p_t_22_0m,&p_t_22_0l,log2_130_p_coeff_1h,log2_130_p_coeff_1m,log2_130_p_coeff_1l,p_t_21_1h,p_t_21_1m,p_t_21_1l);
+  Mul233(&p_t_23_0h,&p_t_23_0m,&p_t_23_0l,xh,xm,p_t_22_0h,p_t_22_0m,p_t_22_0l);
+  p_resh = p_t_23_0h;
+  p_resm = p_t_23_0m;
+  p_resl = p_t_23_0l;
+
+  logih = argredtable[index].logih;
+  logim = argredtable[index].logim;
+  logil = argredtable[index].logil;
+
+  Add33(&log2yh,&log2ym,&log2yl,logih,logim,logil,p_resh,p_resm,p_resl);
+  Add133(&log2xh,&log2xm,&log2xl,ed,log2yh,log2ym,log2yl);
+  
+  Renormalize3(resh,resm,resl,log2xh,log2xm,log2xl);
+
+}
+
+/* exp2_120
+
+   Approximates 
+
+   2^H * (resh + resm + resl) = 2^(xh + xm + xl) * (1 + eps)
+
+   where ||eps|| <= 2^(-119.5)
+
+*/
+static inline void exp2_120(int *H, double *resh, double *resm, double *resl, 
+			    double xh, double xm, double xl) {
+  double xhMult2L, rhMult2L, r;
+  int k, index1, index2;
+  db_number shiftedxhMult2Ldb;
+  double rh, rm, rl;
+  double t1h, t1m, t1l, t2, t3;
+  double p_t_1_0h;
+  double p_t_2_0h;
+  double p_t_3_0h;
+  double p_t_4_0h;
+  double p_t_5_0h, p_t_5_0m;
+  double p_t_6_0h, p_t_6_0m;
+  double p_t_7_0h, p_t_7_0m;
+  double p_t_8_0h, p_t_8_0m;
+  double p_t_9_0h, p_t_9_0m, p_t_9_0l;
+  double p_t_10_0h, p_t_10_0m, p_t_10_0l;
+  double p_t_11_0h, p_t_11_0m, p_t_11_0l;
+  double p_resh, p_resm, p_resl;
+  double tbl1h, tbl1m, tbl1l, tbl2h, tbl2m, tbl2l;
+  double tablesh, tablesm, tablesl;
+  double exp2h, exp2m, exp2l;
+
+  /* Argument reduction 
+
+     Produce exactly
+
+     2^H * 2^(i1/2^8) * 2^(i2/2^13) * 2^(rh + rm + rl)
+
+  */
+
+  xhMult2L = xh * two13;
+  shiftedxhMult2Ldb.d = shiftConst + xhMult2L;
+  rhMult2L = xhMult2L - (shiftedxhMult2Ldb.d - shiftConst);
+  r = rhMult2L * twoM13;
+  k = shiftedxhMult2Ldb.i[LO];
+  *H = k >> 13;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> 5;
+  Add12Cond(t1h, t2, r, xm);
+  Add12Cond(t1m, t1l, t2, xl);
+  Add12(rh, t3, t1h, t1m);
+  Add12(rm, rl, t3, t1l);
+
+  /* Polynomial approximation of 2^(rh + rm + rl) */
+
+  p_t_1_0h = exp2_120_p_coeff_6h;
+  p_t_2_0h = p_t_1_0h * rh;
+  p_t_3_0h = exp2_120_p_coeff_5h + p_t_2_0h;
+  p_t_4_0h = p_t_3_0h * rh;
+  Add12(p_t_5_0h,p_t_5_0m,exp2_120_p_coeff_4h,p_t_4_0h);
+  MulAdd22(&p_t_6_0h,&p_t_6_0m,exp2_120_p_coeff_3h,exp2_120_p_coeff_3m,rh,rm,p_t_5_0h,p_t_5_0m);
+  MulAdd22(&p_t_7_0h,&p_t_7_0m,exp2_120_p_coeff_2h,exp2_120_p_coeff_2m,rh,rm,p_t_6_0h,p_t_6_0m);
+  Mul22(&p_t_8_0h,&p_t_8_0m,p_t_7_0h,p_t_7_0m,rh,rm);
+  Add23(&p_t_9_0h,&p_t_9_0m,&p_t_9_0l,exp2_120_p_coeff_1h,exp2_120_p_coeff_1m,p_t_8_0h,p_t_8_0m);
+  Mul33(&p_t_10_0h,&p_t_10_0m,&p_t_10_0l,rh,rm,rl,p_t_9_0h,p_t_9_0m,p_t_9_0l);
+  Add133(&p_t_11_0h,&p_t_11_0m,&p_t_11_0l,exp2_120_p_coeff_0h,p_t_10_0h,p_t_10_0m,p_t_10_0l);
+  Renormalize3(&p_resh,&p_resm,&p_resl,p_t_11_0h,p_t_11_0m,p_t_11_0l);
+
+  /* Table access */
+
+  tbl1h = twoPowerIndex1[index1].hi;
+  tbl1m = twoPowerIndex1[index1].mi;
+  tbl1l = twoPowerIndex1[index1].lo;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+  tbl2l = twoPowerIndex2[index2].lo;
+
+  /* Reconstruction */
+
+  Mul33(&tablesh,&tablesm,&tablesl,tbl1h,tbl1m,tbl1l,tbl2h,tbl2m,tbl2l);
+  Mul33(&exp2h,&exp2m,&exp2l,tablesh,tablesm,tablesl,p_resh,p_resm,p_resl);
+
+  Renormalize3(resh,resm,resl,exp2h,exp2m,exp2l);
+  
+}
+
+
+
+/* pow_120
+
+   Approximates 
+
+   2^H * (resh + resm + resl) = 2^(y * (ed + log2(1 + (zh + zm)) + log2(r[index]))) * (1 + eps)
+
+   where ||eps|| <= 2^(-118.5) if -1075 <= y * (ed + log2(1 + (zh + zm)) + log2(r[index])) <= 1024
+
+   Approximates further (ed + log2(1 + (zh + zm)) + log2(r[index))) by log2xh
+   where 
+
+   log2xh = (ed + log2(1 + (zh + zm)) + log2(r[index))) * (1 + eps2) 
+
+   where |eps2| <= 2^(-52) 
+   and log2xh is exact if 2^ed * ((1 + (zh + zm)) * r[index]) is an integer power of 2.
+
+*/
+void pow_120(int *H, double *resh, double *resm, double *resl, double *log2xh,
+	     double y, int index, double ed, double zh, double zm) {
+  double ylog2xh, ylog2xm, ylog2xl;
+  double log2xm, log2xl;
+
+  /* Compute log2(x) */
+  log2_130(log2xh,&log2xm,&log2xl,index,ed,zh,zm); 
+
+  /* Compute y * log2(x) */
+  Mul133(&ylog2xh,&ylog2xm,&ylog2xl,y,*log2xh,log2xm,log2xl);
+
+  /* Compute 2^(y * log2(x)) */
+  exp2_120(H,resh,resm,resl,ylog2xh,ylog2xm,ylog2xl);
+  
+}
+
+/* pow_round_and_check_rn 
+
+   Checks whether 
+
+   2^H * (powh + powm + powl) 
+
+   which is an approximate to x^y with a relative error or less than 2^(-118.5),
+   can be rounded correctly to double precision in round-to-nearest-ties-to-even 
+   mode or whether the Table Maker's Dilemma occurs or the case is exact.
+
+   Returns 1 if rounding is possible and affects pow with the rounding
+   Returns 0 if rounding is not possible or if the case is exact
+
+   If the returned value is 0, it affects
+
+   G, kh, kl 
+
+   such that 
+
+   2^G * (kh + kl) 
+   
+   is an approximate to x^y with an relative error of 2^(-117) 
+
+   and such that rounding 
+
+   2^G * kh 
+
+   to double precision is an exact operation.
+
+*/
+
+static inline int pow_round_and_check_rn(double *pow, 
+					 int H, double powh, double powm, double powl,
+					 int *G, double *kh, double *kl) {
+  double th, tm, tl;
+  int K, K1, K2;
+  db_number twodb, two2db;
+  double twoH1074powh, twoH1074powm, shiftedpowh, delta;
+  double scaledth;
+  double t1m, t1l;
+  
+  /* We start by bringing H and powh + powm + powl 
+     to a form such that
+
+     1 <= powh + powm + powl < 2
+  */
+  if ((powh < 1.0) ||
+      ((powh == 1.0) && (powm < 0.0))) {
+    powh *= 2.0;
+    powm *= 2.0;
+    powl *= 2.0;
+    H--;
+  }
+  if ((powh > 2.0) ||
+      ((powh == 2.0) && (powm >= 0.0))) {
+    powh *= 0.5;
+    powm *= 0.5;
+    powl *= 0.5;
+    H++;
+  }
+  
+  /* Check now whether we have normal or subnormal rounding 
+
+     The rounding is subnormal iff H <= -1023
+
+     In both cases, we bring H, powh + powm + powl to a form
+
+     2^K * (th + tm + tl) = 2^H * (powh + powm + powm) * (1 + eps)
+
+     where 
+     
+     (i)   |eps| <= 2^(-118 - 53) = 2^(-171)
+     (ii)  2^(-K) * ulp(2^K * th) = 1
+     (iii) the rounding of 2^K * th to double precision is exact
+           (or produces +inf)
+
+  */
+  if (H <= -1023) {
+    /* Subnormal rounding 
+
+       In this case, we can neglect powl
+       because the rounding bit of the RN rounding 
+       is in powh
+
+    */
+    twodb.i[HI] = (H + (1074 + 1023)) << 20;
+    twodb.i[LO] = 0;
+    
+    twoH1074powh = twodb.d * powh;
+    twoH1074powm = twodb.d * powm;
+    
+    shiftedpowh = two52 + twoH1074powh;
+    th = shiftedpowh - two52;
+    delta = twoH1074powh - th;
+    
+    Add12Cond(tm,tl,delta,twoH1074powm);
+
+    K = -1074;
+  } else {
+    /* Normal rounding 
+       
+       In this case, we have exactly:
+
+       2^K * (th + tm + tl) = 2^H * (powh + powm + powm)
+
+    */
+    th = powh * two52;
+    tm = powm * two52;
+    tl = powl * two52;
+    K = H - 52;
+  }
+
+  /* Return results for exactness case test */
+  *G = K;
+  *kh = th;
+  *kl = tm;
+
+  /* Compute now 
+
+     delta = ABS(0.5 - ABS(tm + tl)) * (1 + eps)
+
+     where |eps| <= 2^(-53)
+
+     The addition 0.5 + (-ABS(tm)) is exact by Sterbenz' lemma
+
+  */
+  if (tm > 0.0) {
+    t1m = - tm;
+    t1l = - tl;
+  } else {
+    t1m = tm;
+    t1l = tl;
+  }
+  delta = ABS((0.5 + t1m) - t1l);
+ 
+  /* We cannot decide the rounding or have an exact case 
+     iff 
+     
+     delta <= 2^(-118) * th
+     
+     We can see this in the following drawing:
+
+     result = round(
+
+            +-----------------+------+----------...----+------------
+     2^K *  | th              | +/-1 | 0               | delta        )
+            +-----------------+------+----------...----+------------
+            | <------------- 118 bits -------------> |
+
+  */
+
+  scaledth = th * PRECISEROUNDCST;
+
+  if (delta > scaledth) {
+    /* We can round exactly to nearest 
+       
+       We must correct th to the rounding of 
+       th + tm + tl iff tm is greater in 
+       absolute value than 0.5 
+       or if tm is equal to 0.5 in absolute value and 
+       the sign of tm and tl 
+       is equal:
+
+                |                 |
+       ...------|--------|--------|------...
+                |------->-->      |
+                ^   tm    tl      ^
+                th                round(th + tm + tl)
+
+       If tm is negative, we must correct th by decreasing it
+       otherwise we must correct th by increasing it.
+
+    */
+    if (ABS(tm) >= 0.5) {
+      if (ABS(tm) == 0.5) {
+	if (tm < 0.0) {
+	  if (tl < 0.0) {
+	    /* The same sign of tm and tl, tm is negative */
+	    th -= 1.0;
+	  }
+	} else {
+	  if (tl > 0.0) {
+	    /* The same sign of tm and tl, tm is positive */
+	    th += 1.0;
+	  }
+	}
+      } else {
+	/* tm > 0.5 */
+	if (tm < 0.0) {
+	  th -= 1.0;
+	} else {
+	  th += 1.0;
+	}
+      }
+    }
+
+    /* Perform now the multiplication 2^K * th 
+       
+       Note that we must be able to produce 
+      
+       (i)   0 if we have total underflow
+       (ii)  a subnormal result 
+       (iii) a normal result
+       (iv)  +inf if we have overflow in a TMD case
+
+       We produce K1 + K2 = K with K1 = floor(K/2)
+       and multiply in two steps.
+
+    */
+    K1 = K >> 1;
+    K2 = K - K1;
+
+    twodb.i[HI] = (K1 + 1023) << 20;
+    twodb.i[LO] = 0;
+    two2db.i[HI] = (K2 + 1023) << 20;
+    two2db.i[LO] = 0;
+    
+    *pow = two2db.d * (twodb.d * th);
+    
+    return 1;
+  } 
+  /* Otherwise we return 0 because we cannot round */
+
+  return 0;
+}
+
+
+/* pow_exact_case 
+
+   Checks whether x^y is an exact or half-ulp case for rounding 
+   into double precision.
+
+   This means the procedure checks whether x^y can be written on
+   not more than 54 bits.
+
+   The procedure uses 2^G * (kh + kl) supposing the following properties:
+
+   * kh + kl holds on at most 54 bits
+   * 2^G * kh is representable in double precision (even in the subnormal range)
+   * 2^G * (kh + kl) approximates x^y with an error eps less than 2^(-117), i.e. 
+   
+     2^G * (kh + kl) = x^y * (1 + eps) where |eps| <= 2^(-117)
+     
+   * log2xh approximates log2(x) with an accuracy equivalent to at least 52 bits
+     In particular log2xh is exact if x is an integer power of 2
+
+   Returns 1 if the case is exact or half-ulp
+   Returns 0 otherwise
+
+   If returning 1, affects pow with 2^G * (kh + kl) rounded to double precision
+
+*/
+int pow_exact_case(double *pow,
+		   double x, double y,
+		   int G, double kh, double kl, double log2xh) {
+  db_number xdb, ydb, tempdb, shiftedEydb, temp2db;
+  int E, F, G1, G2;
+  double m, n, yh, yl, Eyh, Eyl, ed, Ey;
+  double delta;
+  double nearestEy;
+  double value;
+
+  /* For testing whether x^y is an exact or half-ulp case,
+     we have two main cases: 
+
+     (i)  x is an integer power of 2
+     (ii) x is not an integer power of 2
+
+     We start by testing if x is an integer power of 2.
+
+  */
+
+  xdb.d = x;
+  if ((xdb.i[HI] & 0xfff00000) == 0) {
+    /* x is subnormal, scale by 2^52 */
+    xdb.d *= 0.4503599627370496e16;
+  }
+  if (((xdb.i[HI] & 0x000fffff) | xdb.i[LO]) == 0) {
+    /* x is an integer power of 2 
+
+       x^y is exact or midpoint iff log2(x) * y is integer
+
+       Since we know that x is an integer power of 2, 
+       log2xh is equal to this integer. Since the exponent
+       of the double precision number is bounded by the
+       exponent range, we know that log2xh is integer and
+       bounded by 2^11. It is therefore possible to
+       split y into two parts of 21 and 32 bits, to perform
+       the multiplication componentwise. Since the result
+       is bounded by 2^11, it suffices to compute the 
+       nearest integer to the higher word product, and to
+       compare the rounding difference to the low word product.
+       This splitting is faster than the usual Dekker splitting.
+
+    */
+    ydb.d = y;
+    ydb.i[LO] = 0;
+    yh = ydb.d;
+    yl = y - yh;
+    Eyh = log2xh * yh;
+    Eyl = log2xh * yl;
+    delta = ((0.6755399441055744e16 + Eyh) - 0.6755399441055744e16) - Eyh; /* addition rounds, subtractions exact */
+    
+    if (delta != Eyl) return 0;
+
+  } else {
+
+    /* x is not an integer power of 2 
+       
+       We have clearly an inexact case if y is negative
+       or if y is greater than 35
+    
+    */
+  
+    if ((y < 0.0) || (y > 35.0)) return 0;
+    
+    /* Decompose now y into 
+       
+       y = 2^F * n 
+
+       Checking F and n, we can then already decide
+       some cases using the fact that the worst-case
+       accuracy for x^n, n in [|0;35|], is less (in bits) 
+       than the accuracy of the approximation of x^y we have
+       already in 2^G * (kh + kl).
+
+    */
+    decompose(&n,&F,y);
+    
+    if ((n > 35.0) || (F < -5)) return 0;
+  
+    if (F < 0) {
+      /* Here, -5 <= F <= -1, 3 <= n <= 35, n an odd integer
+	 
+         We decompose x into 2^E * m where m is an odd integer 
+
+	 Let H, sh and sl such that 2^H * (sh + sl) = 2^G * (kh + kl) and
+	 sh + sl is an odd integer.
+
+	 If we have E * 2^F * n = H, we can apply the worst case argument 
+	 because we know the worst case for 
+    
+	 m^(2^F * n) with m odd integer, -5 <= F <= -1, 3 <= n <= 35
+    
+	 when rounding to 53 bits in both rounding modes.
+    
+	 E is bounded in magnitude by 2^11. 2^F * n is equal to y by 
+	 construction. Since n <= 35, y contains at most 6 significant bits. 
+	 The arithmetical multiplication E * y is therefore exact and less 
+	 than or equal to 2^17.
+
+	 We check first whether E * y is an integer. If this is the case,
+	 we compute sh + sl = 2^(G - E * y) * (kh + kl). Finally, 
+	 we check whether sh + sl is an odd integer.
+
+      */
+
+      decompose(&m,&E,x);
+    
+      ed = (double) E;
+    
+      Ey = ed * y; /* Exact */
+    
+
+      /* Check whether Ey is an integer using the simple shift technique
+	 The addition rounds, the substraction is exact by Sterbenz' lemma.
+	 If Ey is an integer, the low order word of shiftedEydb is equal to this
+	 integer.
+      */
+      shiftedEydb.d = 0.6755399441055744e16 + Ey;
+      nearestEy = shiftedEydb.d - 0.6755399441055744e16;
+
+      if (nearestEy != Ey) return 0; 
+      
+      /* Here E * y is integer. 
+	 Produce now 2^(G - E * y).
+      */
+      tempdb.i[HI] = (((G - shiftedEydb.i[LO]) + 1023) << 20);
+      tempdb.i[LO] = 0;
+
+      /* Check now if sh + sl = tempdb.d * (kh + kl) is an odd
+	 integer.
+       
+	 Since kh and kl are not overlapped, we have two cases:
+
+	 (i)  kl is equal to 0, in which case tempdb.d * kh must be an odd integer
+	 (ii) kl is not equal to 0, in which case tempdb.d * kl must be an odd integer
+
+      */
+      if (kl == 0.0) value = kh; else value = kl;
+    
+      value *= tempdb.d; /* Exact because multiplication by positive integer power of 2 */
+
+      if (!isOddInteger(value)) return 0;
+    
+      /* Here the case is exact by the worst-case argument */   
+    }
+  
+    /* Here, we have either F >= 0 or an exact case 
+       
+       If F >= 0, we also have an exact case because
+       2^F * n = y <= 35, y therefore integer and because
+       we can apply the worst case argument.
+
+    */       
+  }
+
+  /*
+       Here, the case is exact, affect pow with 2^G * (kh + kl) rounded to
+       nearest in double precision
+       
+       Since kh + kl holds on at most 54 bits, 2^G * kh produces
+       never any rounding error and kh and kl are not overlapping, 
+       2^G * kh is equal to the rounding if 
+       (i)  kl is equal to 0
+       (ii) kl is not equal to 0 and the mantissa of 2^G * kh is even
+       
+       If in condition (ii), kl is not equal to 0 and the mantissa of 
+       2^G * kh is not even, we correct it depending on the sign of kl.
+       
+       Remark that G can be such that 2^G is no longer a normal.
+       Produce therefore 2^(floor(G/2)) and 2^(G - floor(G/2)) and
+       multiply in two steps.
+
+  */
+
+  G1 = G >> 1;
+  G2 = G - G1;
+  
+  tempdb.i[HI] = (G1 + 1023) << 20;
+  tempdb.i[LO] = 0;
+  temp2db.i[HI] = (G2 + 1023) << 20;
+  temp2db.i[LO] = 0;
+  
+  tempdb.d *= (kh * temp2db.d);
+  
+  if ((kl != 0.0) && ((tempdb.i[LO] & 1) != 0)) {
+    /* We must correct the rounding to the rounding to nearest ties to even */
+    if (kl > 0.0) {
+      tempdb.l++;
+    } else {
+      tempdb.l++;
+    }
+  }
+  *pow = tempdb.d;
+  
+  return 1;
+}
+
+
+double pow_exact_rn(double x, double y, double sign, 
+		    int index, double ed, double zh, double zm) {
+  int H, G;
+  double powh, powm, powl;
+  double pow;
+  double kh, kl;
+  double log2xh;
+
+  pow_120(&H, &powh, &powm, &powl, &log2xh, y, index, ed, zh, zm);
+
+  if (pow_round_and_check_rn(&pow,H,powh,powm,powl,&G,&kh,&kl)) 
+    return sign * pow;
+
+  if (pow_exact_case(&pow,x,y,G,kh,kl,log2xh)) 
+    return sign * pow;
+
+  //  printf("Could not decide the rounding to nearest of power.\n");
+
+  return -5.0;
+}
+
+
+double pow_rn(double x, double y) {
+  db_number xdb, ydb, yhdb, shiftedylog2xhMult2Ldb, powdb, twodb;
+  double sign;
+  int E, index;
+  double log2FastApprox, ed, ylog2xFast, f;
+  double yh, yl, ri, logih, logim, yrih, yril, th, zh, zm;
+  double p_t_1_0h;
+  double p_t_2_0h;
+  double p_t_3_0h;
+  double p_t_4_0h;
+  double p_t_5_0h;
+  double p_t_9_0h;
+  double p_t_10_0h;
+  double p_t_11_0h, p_t_11_0m;
+  double p_t_12_0h, p_t_12_0m;
+  double log2zh, log2zm;
+  double log2yh, log2ym;
+  double log2xh, log2xm;
+  double ylog2xh, ylog2xm;
+  double rh, r;
+  int k, index1, index2, H;
+  double tbl1, tbl2h, tbl2m;
+  double ph;
+  double powh, powm;
+  double twoH1074powh, twoH1074powm;
+  double shiftedpowh, nearestintpowh, delta, deltaint;
+  double rest;
+  double lowerTerms;
+  double temp1;
+  double zhSq, zhFour, p35, p46, p36, p7;
+  double xSq;
+  
+  /* Fast rejection of special cases */
+  xdb.d = x;
+  ydb.d = y;
+
+  if (((((xdb.i[HI] >> 20) + 1) & 0x3ff) <= 1) ||
+      ((((ydb.i[HI] >> 20) + 1) & 0x3ff) <= 1)) {
+
+    /* Handle special cases before handling NaNs and Infinities */
+    if (x == 1.0)  return 1.0;
+    if (y == 0.0)  return 1.0;
+    if (y == 1.0)  return x;
+    if (y == 2.0)  return x * x; /* Remark: may yield uncorrect rounding on x86 for subnormal results */
+    if (y == -1.0) return 1 / x;
+    
+    if ((x == 0.0) && ((ydb.i[HI] & 0x7ff00000) != 0x7ff00000)) {
+      /* x = +/-0 and y is neither NaN nor Infinity
+	 
+      We have four cases 
+      (i)  y < 0:
+      (a) y odd integer: return +/- Inf and raise divide-by-zero 
+      (b) y not odd integer: return + Ind and raise divide-by-zero
+      (ii) (a) y odd integer: return +/- 0
+      (b) y not odd integer: return +0
+      
+      Note that y = 0.0 has already been filtered out.
+      */
+      if (y < 0.0) {
+	if (isOddInteger(y)) 
+	  return 1/x;
+	else 
+	  return 1/(x * x);
+      } else {
+	if (isOddInteger(y))
+	  return x;
+	else 
+	  return x * x;
+      }
+    }
+    
+    /* Handle NaNs and Infinities
+       
+    Note: the cases (x,y) = (1,NaN) and (x,y) = (NaN,0) have already been handled.
+    
+    */
+    if ((ydb.i[HI] & 0x7ff00000) == 0x7ff00000) {
+      /* Here y is NaN or Inf */
+      if (((ydb.i[HI] & 0x000fffff) | ydb.i[LO]) != 0) {
+	/* Here y is NaN, we return NaN */
+	return y;
+      } 
+      /* Here y is +/- Inf 
+	 
+      There are three main cases:
+      (i)   x = -1: return 1
+      (ii)  abs(x) > 1: 
+      (a) y = +Inf: return +Inf
+      (b) y = -Inf: return +0
+      (iii) abs(x) < 1: 
+      (a) y = +Inf: return +0
+      (b) y = -Inf: return +Inf
+      
+      Note: the case x = 1 has already been filtered out 
+      */
+      if (x == -1.0) 
+	return 1.0;
+      
+      /* Here x != 1, x != -1 */
+      if ((ABS(x) > 1.0) ^ ((ydb.i[HI] & 0x80000000) == 0)) {
+	/* abs(x) > 1 and y = -Inf or abs(x) < 1 and y = +Inf */
+	return 0.0;
+      } else {
+	/* abs(x) > 1 and y = +Inf or abs(x) < 1 and y = -Inf */
+	return ABS(y);
+      }
+    }
+    
+    /* Here y is neither Inf nor NaN */
+    
+    if ((xdb.i[HI] & 0x7ff00000) == 0x7ff00000) {
+      /* Here x is NaN or Inf */
+      if (((xdb.i[HI] & 0x000fffff) | xdb.i[LO]) != 0) {
+	/* Here x is NaN, we return NaN */
+	return x;
+      } 
+      /* Here x is +/- Inf 
+	 
+      There are two main cases:
+      
+      (i)  x is +Inf 
+      (ii) x is -Inf
+      */
+      if ((xdb.i[HI] & 0x80000000) == 0) {
+	/* x is +Inf 
+	   
+	(a) y > 0: return +Inf
+	(b) y < 0: return +0
+	
+	Note: y = 0 has already been filtered out
+	*/
+	if (y > 0.0) {
+	  return x;
+	} else {
+	  return 0.0;
+	}
+      } else {
+	/* x is -Inf 
+	   
+	There are four cases:
+	
+	(a) y > 0: 
+	(*)  y is an odd integer: return -Inf
+	(**) y is not an odd integer: return +Inf 
+	(b) y < 0:
+	(*)  y is an odd integer: return -0
+	(**) y is not an odd integer: return +0
+	
+	Note: y = 0 has already been filtered out
+	*/
+	if (y > 0.0) {
+	  if (isOddInteger(y)) {
+	    return x;
+	  } else {
+	    return -x;
+	  }
+	} else {
+	  if (isOddInteger(y)) {
+	    return -0.0;
+	  } else {
+	    return 0.0;
+	  }
+	}
+      }
+    } 
+  }
+  /* Here both x and y are finite numbers */
+  
+  /* Test now whether we have the case 
+
+     (-x)^y = (-1)^y * x^y 
+
+     where x is positive
+
+  */
+
+  sign = 1.0;
+  if (x < 0.0) {
+    /* x is negative
+       x^y is defined only if y is integer
+    */
+    if (!isInteger(y)) {
+      /* y is not integer 
+
+         return NaN and raise invalid exception
+      */
+      return 0.0/0.0;
+    }
+    /* Here y is integer 
+       
+       Remove the sign of x and put (-1)^y in sign
+
+    */
+    x = -x; xdb.i[HI] &= 0x7fffffff;
+    if (isOddInteger(y)) {
+      sign = -sign;
+    }
+  }
+
+  /* Here x is strictly positive and finite */
+
+  /* Test now if abs(y) is in a range giving finite, non-trivial results x^y 
+
+     We have 
+
+     x^y = 2^(y * log2(x)) = 2^(y * log2(2^E * m)) = 2^(y * (E + log2(1 + f)))
+
+     We have overflow iff x^y >= 2^(1024), i.e. y * (E + log2(1 + f)) >= 1024
+     We have underflow (flush to zero) iff x^y <= 2^(-1076), i.e. y * (E + log2(1 + f)) <= - 1076
+     We round to 1.0 iff abs(y * (E + log2(1 + f))) <= 2^(-54) 
+
+     We approximate log2(1 + f) as
+
+     log2(1 + f) = c * f * alpha(f)  
+
+     where c is a constant and  0.853 < alpha(f) < 1.21
+
+     So we have surely 
+     (i)  overflow or underflow if abs(y * (E + c * f)) >= ceil(1076/0.853) = 1261
+     (ii) trivial rounding to 1.0 if abs(y * (E + c * f)) <= 2^(-55) <= 2^(-54)/1.21 
+
+  */
+
+  /* We start the computation of the logarithm of x */
+
+  E = 0;
+  if ((xdb.i[HI] & 0xfff00000) == 0) {
+    /* x is subnormal, make it normal */
+    xdb.d *= two52;
+    E = -52;
+  }
+
+  E += (xdb.i[HI]>>20)-1023;             /* extract the exponent */
+  index = (xdb.i[HI] & 0x000fffff);
+  xdb.i[HI] =  index | 0x3ff00000;	/* do exponent = 0 */
+  index = (index + (1<<(20-L-1))) >> (20-L);
+ 
+  /* reduce  such that sqrt(2)/2 < xdb.d < sqrt(2) */
+  if (index >= MAXINDEX) { /* corresponds to xdb>sqrt(2)*/
+    xdb.i[HI] -= 0x00100000; 
+    E++;
+  }
+
+  ed = (double) E;
+
+  /* Continue with the exact range reduction of the logarithm of x */
+
+  yhdb.i[HI] = xdb.i[HI];
+  yhdb.i[LO] = 0;
+  yh = yhdb.d;
+  yl = xdb.d - yh;
+
+  
+  /* Special handling for y = 3 or y = 4 and x on not more than 21 bits (without subnormals) */
+  if ((yl == 0) && ((y == 3.0) || (y == 4.0)) && (E > -255)) {
+    if (y == 3.0) 
+      return sign * (x * (x * x));
+    else {
+      xSq = x * x;
+      return sign * (xSq * xSq);
+    }
+  }
+
+  index = index & INDEXMASK;
+
+  /* Now we have 
+
+     log2(x) = E + log2(xdb.d)
+
+     with sqrt(2)/2 < xdb.d < sqrt(2)
+
+     Compute now f such that 1 + f = xdb.d and 
+     approximate 
+
+     log2(1 + f) = logFastCoeff * f
+
+  */
+
+  f = xdb.d - 1.0;
+  log2FastApprox = ed + logFastCoeff * f;
+  ylog2xFast = y * log2FastApprox;
+
+  if (ABS(ylog2xFast) >= 1261.0) {
+    if (ylog2xFast > 0.0) {
+      /* y * log2(x) is positive, i.e. we overflow */
+      return (sign * LARGEST) * LARGEST;
+    } else {
+      /* y * log2(x) is negative, i.e. we underflow */
+      return (sign * SMALLEST) * SMALLEST;
+    }    
+  }
+
+  if (ABS(ylog2xFast) <= twoM55) {
+    /* abs(y * log2(x)) <= 2^(-55), 
+       we return 1.0 and set the inexact flag 
+    */
+    return sign * (1.0 + SMALLEST);
+  }
+
+  /* Now, we may still overflow or underflow but on some inputs only */
+  
+  /* 
+     Read tables:
+     Read one float for ri
+     Read the first two doubles for -log(r_i) (out of three)
+     
+     Organization of the table:
+     
+     one struct entry per index, the struct entry containing 
+     r, logih, logim and logil in this order
+  */
+ 
+  ri = argredtable[index].ri;
+  /* 
+     Actually we don't need the logarithm entries now
+     Move the following two lines to the eventual reconstruction
+     As long as we don't have any if in the following code, we can overlap 
+     memory access with calculations 
+  */
+  logih = argredtable[index].logih;
+  logim = argredtable[index].logim;
+  
+  /* Do range reduction:
+     
+     zh + zm = y * ri - 1.0 correctly
+  
+     Correctness is assured by use of two part yh + yl and 21 bit ri and Add12
+  
+     Discard zl for higher monome degrees
+  */
+  
+  yrih = yh * ri;
+  yril = yl * ri;
+  th = yrih - 1.0; 
+  Add12Cond(zh, zm, th, yril); 
+  
+  /* Polynomial approximation of log2(1 + (zh + zm)) */
+
+  zhSq = zh * zh;
+
+  p35 = log2_70_p_coeff_3h + zhSq * log2_70_p_coeff_5h; 
+  p46 = log2_70_p_coeff_4h + zhSq * log2_70_p_coeff_6h;
+  zhFour = zhSq * zhSq;
+
+  p36 = p35 + zh * p46;
+  p7 = log2_70_p_coeff_7h * zhFour;
+
+  p_t_9_0h = p36 + p7;
+
+  p_t_10_0h = p_t_9_0h * zh;
+  Add212(&p_t_11_0h,&p_t_11_0m,log2_70_p_coeff_2h,log2_70_p_coeff_2m,p_t_10_0h);
+  MulAdd22(&p_t_12_0h,&p_t_12_0m,log2_70_p_coeff_1h,log2_70_p_coeff_1m,zh,zm,p_t_11_0h,p_t_11_0m);
+  Mul22(&log2zh,&log2zm,p_t_12_0h,p_t_12_0m,zh,zm);
+
+  /* Reconstruction */
+
+  Add122(&log2yh,&log2ym,ed,logih,logim);
+  Add22(&log2xh,&log2xm,log2yh,log2ym,log2zh,log2zm);
+
+  /* Produce ylog2xh + ylog2xm approximating y * log2(x) 
+
+     Note: neither y nor y * log2(x) may not be subnormal and non-zero 
+     because of the fast overflow/underflow/trivial rounding test.
+
+  */
+
+  Mul12(&ylog2xh,&temp1,y,log2xh);
+  ylog2xm = temp1 + y * log2xm;
+ 
+  /* Approximate now 2^(y * log2(x)) 
+
+     We have
+
+     2^(ylog2xh + ylog2xm) 
+          = 2^ylog2xh * 2^ylog2xm
+          = 2^H * 2^(ylog2xh - H) * 2^ylog2xm
+	  = 2^H * 2^(i2/2^8) * 2^(i1/2^13) * 2^(ylog2xh - H - i2/2^8 - i1/2^13) * 2^ylog2xm
+	  = 2^H * tbl2[i2] * (1 + tbl1[i1]) * (1 + p(rh)) + delta
+	  where rh \approx ylog2xh - H - i1/2^7 - i2/2^13 + ylog2xm
+  */
+
+  shiftedylog2xhMult2Ldb.d = shiftConstTwoM13 + ylog2xh;
+  r = ylog2xh - (shiftedylog2xhMult2Ldb.d - shiftConstTwoM13);
+  k = shiftedylog2xhMult2Ldb.i[LO];
+  H = k >> 13;
+  index1 = k & INDEXMASK1;
+  index2 = (k & INDEXMASK2) >> 5;
+
+  /* Renormalize reduced argument 
+
+     This operation produces an error 
+     
+     2^(z * (1 + eps)) = 2^z * (1 + eps') 
+
+     where |eps| <= 2^(-53) and |eps'| <= 2^(-65)
+
+  */
+  rh = r + ylog2xm;
+
+  /* Table reads */
+  tbl1 = twoPowerIndex1[index1].hiM1;
+  tbl2h = twoPowerIndex2[index2].hi;
+  tbl2m = twoPowerIndex2[index2].mi;
+
+  /* Polynomial approximation */
+  p_t_1_0h = exp2_p_coeff_3h;
+  p_t_2_0h = p_t_1_0h * rh;
+  p_t_3_0h = exp2_p_coeff_2h + p_t_2_0h;
+  p_t_4_0h = p_t_3_0h * rh;
+  p_t_5_0h = exp2_p_coeff_1h + p_t_4_0h;
+  ph = p_t_5_0h * rh;
+
+  /* Reconstruction */
+  
+  lowerTerms = tbl1 + (ph + tbl1 * ph);
+
+  Add212(&powh,&powm,tbl2h,tbl2m,tbl2h * lowerTerms);
+
+  /* Here we have 
+
+     2^H * (powh + powm) = x^y * (1 + eps) 
+
+     with ||eps|| <= 2^(-60)
+
+     Check first if we overflow or underflow.
+
+     Check then if we can perform normal rounding or 
+     if we must perhaps perform subnormal rounding.
+     We are sure that
+
+     0.5 <= powh + powm <= 4.0
+
+  */
+
+  if (H >= 1025) {
+    /* Here, we surely overflow 
+       Return sign * inf
+    */
+    return (sign * LARGEST) * LARGEST;
+  }
+
+  if (H <= -1077) {
+    /* Here, we surely underflow 
+       Return sign * 0 and set inexact flag
+    */
+    return (sign * SMALLEST) * SMALLEST;
+  } 
+
+  if (H > -1022) {
+    /* We are sure to be able to perform normal rounding 
+       We must still be aware of the fact that the final
+       result may overflow 
+    */
+    if(powh == (powh + (powm * RNROUNDCST))) {
+      powdb.d = powh;
+      if (H < 1023) {
+	powdb.i[HI] += H << 20;
+	return sign * powdb.d;
+      } else {
+	/* May overflow: multiply by 2^H in two steps */
+	powdb.i[HI] += (H - 3) << 20;
+	return sign * powdb.d * 8.0;
+      }
+    }
+  } else {
+    /* We must perhaps perform subnormal rounding 
+
+       We start by renormalizing the double-double
+       powh + powm such that 
+
+       1 <= powh + powm < 2
+
+    */
+
+    if ((powh < 1.0) || ((powh == 1.0) && (powm < 0.0))) {
+      powh *= 2.0;
+      powm *= 2.0;
+      H--;
+    }
+    if ((powh > 2.0) || ((powh == 2.0) && (powm >= 0.0))) {
+      powh *= 0.5;
+      powm *= 0.5;
+      H++;
+    }
+
+    /* Here we know that 1 <= powh + powm < 2 
+
+       2^H * (powh + powm) is subnormal or equal to the least normal
+       iff H <= -1023
+
+    */
+    if (H > -1023) {
+      /* We have nevertheless normal rounding */
+      if(powh == (powh + (powm * RNROUNDCST))) {
+	powdb.d = powh;
+	powdb.i[HI] += H << 20;
+	return sign * powdb.d;
+      }
+      /* Here we have normal rounding but could not decide the rounding */
+    } else {
+      /* We have surely denormal rounding
+
+         This means
+
+	 round(2^H * (powh + powm)) = 2^(-1074) * nearestint(2^(+1074) * 2^H * (powh + powm))
+
+	 We compute the rounding (and test its TMD) of 
+	 
+	 nearestint(2^(H + 1074) * (powh + powm))
+
+	 by computing first 
+
+	 nearestint(2^(H + 1074) * powh) 
+	 
+	 and then the absolute error
+
+	 delta = 2^(H + 1074) * powh - nearestint(2^(H + 1074) * powh) + 2^(H + 1074) * powl
+
+	 We can then refute or correct the rounding by tests on delta.
+
+	 We know that 2^(H + 1074) <= 2^(51) and powh <= 2.0. Thus 2^(H + 1074) * powh <= 2^(52)
+	 We can hence compute nearestint using the shift trick.
+	 
+	 We start by constructing 2^(H + 1074)
+      */
+      
+      twodb.i[HI] = (H + (1074 + 1023)) << 20;
+      twodb.i[LO] = 0;
+
+      twoH1074powh = twodb.d * powh;
+      twoH1074powm = twodb.d * powm;
+
+      shiftedpowh = two52 + twoH1074powh;
+      nearestintpowh = shiftedpowh - two52;
+      deltaint = twoH1074powh - nearestintpowh;
+
+      /* The next addition produces a very small 
+	 rounding error we must account for in the rounding test.
+      */
+      delta = deltaint + twoH1074powm;
+
+      /* Correct now the rounding */
+
+      if (ABS(delta) > 0.5) {
+	/* ABS(delta) > 0.5 */
+	if (delta > 0.0) {
+	  /* nearestintpowh is too small by 1.0 */
+	  nearestintpowh += 1.0; /* exact */
+	  delta -= 1.0; /* exact */
+	} else {
+	  /* nearestintpowh is too great by 1.0 */
+	  nearestintpowh -= 1.0; /* exact */
+	  delta += 1.0; /* exact */
+	}
+      }
+
+      /* Perform now the rounding test 
+
+         This test filters out also half-ulp exact cases.
+	 Exact cases are not filtered out because C99 allows
+	 setting the underflow and/or inexact flags also
+	 for exact cases.
+
+         Compute first 
+
+	 rest = abs(0.5 - abs(delta)) * (1 + eps) 
+
+	 where abs(eps) <= 2^(-53)
+
+	 We cannot decide the rounding if 
+
+	 rest <= 2^(H + 1074) * epsmax * 2
+
+	 where epsmax is the bound for the approximating polynomials,
+	 
+	 here epsmax = 2^(-60)
+
+	 as follows by the following drawing
+
+	 2^52                2^(H + 1074)     2^0            2^(H + 1074) * epsmax
+	 +-------------------+----------------+---+------... |
+	 | 0 ...           0 | nearestintpowh | 1 |          rest
+         +-------------------+----------------+---+------... |
+                             | <---- 60 bits approx. ------->|
+
+	 This means that we cannot decide the rounding if 
+	 
+	 rest * 1/epsmax * 0.5 <= 2^(H + 1074)
+
+	 We store 1/epsmax * 0.5 on SUBNORMROUNDCST
+      */
+      
+      rest = ABS(0.5 - ABS(delta));
+
+      if (rest * SUBNORMROUNDCST > twodb.d) {
+	/* Here we could decide the rounding 
+
+	   The result to return is
+
+	   sign * 2^(-1074) * nearestintpowh 
+
+	   which is either subnormal or equal to the 
+	   least normal.
+
+	   Since we know that the multiplication
+	   does not imply any rounding error, we can
+	   perform it using the shift trick and a mask.
+
+	   This trick yields to a 200 cycle speed-up on Athlon.
+
+	*/
+
+	twodb.d = nearestintpowh + two52;
+	twodb.i[HI] = (twodb.i[HI] + (1 << 20)) & 0x001fffff;
+
+	return sign * twodb.d;	
+      }
+    }
+  }
+  
+  /* If we are here, we could not decide the rounding or are half-ulp 
+
+     Launch now exacter phases and exact and half-ulp testing
+  
+  */
+
+  return pow_exact_rn(x,y,sign,index,ed,zh,zm);
+
+}
+
diff --git a/src/crlibm/pow.h b/src/crlibm/pow.h
new file mode 100755
index 0000000..3108e46
--- /dev/null
+++ b/src/crlibm/pow.h
@@ -0,0 +1,3101 @@
+
+
+#define L 8
+#define MAXINDEX 106
+#define INDEXMASK 255
+#define two52 4.50359962737049600000000000000000000000000000000000e+15
+#define twoM55 0.277555756156289135105907917022705078125e-16
+#define logFastCoeff 0.14142135623730951454746218587388284504413604736328125e1
+#define LARGEST 0.898846567431157953864652595394512366808988489471153286e308
+#define SMALLEST 0.222507385850720138309023271733240406421921598046233183e-307
+#define shiftConst 6.75539944105574400000000000000000000000000000000000e+15
+#define shiftConstTwoM13 0.824633720832e12
+#define two13 8192.0
+#define twoM13 0.1220703125e-3
+#define INDEXMASK1 0x1f
+#define INDEXMASK2 0x1fe0
+#define RNROUNDCST 1.01587301587301598581442042834326647273327977070694e+00
+#define RDROUNDCST 8.67361737988403547205962240695953369140625000000000e-19
+#define SUBNORMROUNDCST 0.576460752303423488e18
+#define PRECISEROUNDCST 0.300926553810505602039996553528894893521578382533654405506e-35
+#define twoM1000 0.933263618503218878990089544723817169617091446371708024622e-301
+#define twoM74 0.5293955920339377119177015629247762262821197509765625e-22
+
+#define log2_70_p_coeff_1h 1.44269504088896338700465094007086008787155151367187500000000000000000000000000000e+00
+#define log2_70_p_coeff_1m 2.03552810625246160186433312051638360278748036817121624952875436065369285643100739e-17
+#define log2_70_p_coeff_2h -7.21347520444481693502325470035430043935775756835937500000000000000000000000000000e-01
+#define log2_70_p_coeff_2m -1.12725594936749318924493788526353267792267647960831322695440803727251477539539337e-17
+#define log2_70_p_coeff_3h 4.80898346962987777164499902937677688896656036376953125000000000000000000000000000e-01
+#define log2_70_p_coeff_4h -3.60673760219944627980481755002983845770359039306640625000000000000000000000000000e-01
+#define log2_70_p_coeff_5h 2.88539008191916690471146011987002566456794738769531250000000000000000000000000000e-01
+#define log2_70_p_coeff_6h -2.40450377363966349975044067832641303539276123046875000000000000000000000000000000e-01
+#define log2_70_p_coeff_7h 2.06097743969525126761510591677506454288959503173828125000000000000000000000000000e-01
+
+#define log2_130_p_coeff_1h 1.44269504088896338700465094007086008787155151367187500000000000000000000000000000e+00
+#define log2_130_p_coeff_1m 2.03552737409310331110210900522069120325603861485809498166332787150167860090732574e-17
+#define log2_130_p_coeff_1l -1.06146602236896146263026926064664797993065100369094413909960470044754680755528179e-33
+#define log2_130_p_coeff_2h -7.21347520444481693502325470035430043935775756835937500000000000000000000000000000e-01
+#define log2_130_p_coeff_2m -1.01776368704655165555105450261034560162801930742904749083166393575083930045366287e-17
+#define log2_130_p_coeff_2l 5.34511411595447028630249611725927839300757516466699521565482986252038599158936192e-34
+#define log2_130_p_coeff_3h 4.80898346962987777164499902937677688896656036376953125000000000000000000000000000e-01
+#define log2_130_p_coeff_3m 2.52888083240629533774008911522493092191867953828603166055444262383389286696910858e-17
+#define log2_130_p_coeff_4h -3.60673760222240846751162735017715021967887878417968750000000000000000000000000000e-01
+#define log2_130_p_coeff_4m -5.08881843525388804036113375504277575334378429174238267496122034572181291878223419e-18
+#define log2_130_p_coeff_5h 2.88539008177792655196469695511041209101676940917968750000000000000000000000000000e-01
+#define log2_130_p_coeff_5m 2.62755152398073847756639381346527463413965059531741258469494937344279605895280838e-17
+#define log2_130_p_coeff_6h -2.40449173481493888582249951468838844448328018188476562500000000000000000000000000e-01
+#define log2_130_p_coeff_6m -1.26443692756777278172382591559880426333181716128670549204038309198949718847870827e-17
+#define log2_130_p_coeff_7h 2.06099291555566194178439332063135225325822830200195312500000000000000000000000000e-01
+#define log2_130_p_coeff_7m 6.87383539895312875323064204102239130058263040989538494862642892258008942008018494e-18
+#define log2_130_p_coeff_8h -1.80336880111120451131156983137771021574735641479492187500000000000000000000000000e-01
+#define log2_130_p_coeff_9h 1.60299448987662213061966554050741251558065414428710937500000000000000000000000000e-01
+#define log2_130_p_coeff_10h -1.44269504079917953998091206813114695250988006591796875000000000000000000000000000e-01
+#define log2_130_p_coeff_11h 1.31154094707513962925204964449221733957529067993164062500000000000000000000000000e-01
+#define log2_130_p_coeff_12h -1.20226134447525057069583453994709998369216918945312500000000000000000000000000000e-01
+#define log2_130_p_coeff_13h 1.10970553702962271280796358041698113083839416503906250000000000000000000000000000e-01
+
+
+#define exp2_p_coeff_0h 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+#define exp2_p_coeff_1h 6.93147180559945286226763982995180413126945495605468750000000000000000000000000000e-01
+#define exp2_p_coeff_2h 2.40226506988959309651932017004583030939102172851562500000000000000000000000000000e-01
+#define exp2_p_coeff_3h 5.55041161373122232669530262683110777288675308227539062500000000000000000000000000e-02
+
+#define exp2_120_p_coeff_0h 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+#define exp2_120_p_coeff_1h 6.93147180559945286226763982995180413126945495605468750000000000000000000000000000e-01
+#define exp2_120_p_coeff_1m 2.31904681384630849473271303648771975481164951834144039022334027322358451783657074e-17
+#define exp2_120_p_coeff_2h 2.40226506959100721827482516346208285540342330932617187500000000000000000000000000e-01
+#define exp2_120_p_coeff_2m -9.49393125283880586293948324833484500178580834723511897021985816991218598559498787e-18
+#define exp2_120_p_coeff_3h 5.55041086648215831189645541599020361900329589843750000000000000000000000000000000e-02
+#define exp2_120_p_coeff_3m -3.16600969138004600291955060443412194788085531170366074271704803777538472786545753e-18
+#define exp2_120_p_coeff_4h 9.61812910762847687873300372984886053018271923065185546875000000000000000000000000e-03
+#define exp2_120_p_coeff_5h 1.33335581474269999902038108530177851207554340362548828125000000000000000000000000e-03
+#define exp2_120_p_coeff_6h 1.54035356831810422203327126666749791183974593877792358398437500000000000000000000e-04
+
+#define exp2_82_coeff_0h 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+#define exp2_82_coeff_1h 6.93147180559945286226763982995180413126945495605468750000000000000000000000000000e-01
+#define exp2_82_coeff_1m 2.31846856407130082392820712925655671368021772333137264787694675760576501488685608e-17
+#define exp2_82_coeff_2h 2.40226506959100721827482516346208285540342330932617187500000000000000000000000000e-01
+#define exp2_82_coeff_3h 5.55041086710304984452868382049928186461329460144042968750000000000000000000000000e-02
+#define exp2_82_coeff_4h 9.61812619551964329001059184065525187179446220397949218750000000000000000000000000e-03
+
+
+typedef struct rri_tag {float ri; double logih; double logim; double logil;} rri;  
+static const rri argredtable[256] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00,   /* r[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logih[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logim[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* logil[0] */ 
+  } , 
+  { 
+    9.96109008789062500000000000000000000000000000000000e-01,   /* r[1] */ 
+    5.62446320255523789233276232835123664699494838714600e-03, /* logih[1] */ 
+    3.64310694089194558034258095993109791807285384624700e-19, /* logim[1] */ 
+    -1.96284275232340525914596195720627417731891367064553e-35, /* logil[1] */ 
+  } , 
+  { 
+    9.92248535156250000000000000000000000000000000000000e-01,   /* r[2] */ 
+    1.12265674928146846900389732581970747560262680053711e-02, /* logih[2] */ 
+    -2.01837061736057419181201412747877981301873905342571e-19, /* logim[2] */ 
+    -8.76276359130307718472217510144964999205167740057366e-36, /* logil[2] */ 
+  } , 
+  { 
+    9.88416671752929687500000000000000000000000000000000e-01,   /* r[3] */ 
+    1.68087498900021219128131377829049597494304180145264e-02, /* logih[3] */ 
+    3.96046463581792988288086065543694985501952808182690e-19, /* logim[3] */ 
+    -7.50175900227718281636157827566620605518389361772661e-36, /* logil[3] */ 
+  } , 
+  { 
+    9.84615325927734375000000000000000000000000000000000e-01,   /* r[4] */ 
+    2.23678990197825021402078249366240925155580043792725e-02, /* logih[4] */ 
+    2.72546008943383898172980491432198212129681766980967e-19, /* logim[4] */ 
+    8.65193903240721388373038654840463886141894144823057e-36, /* logil[4] */ 
+  } , 
+  { 
+    9.80842590332031250000000000000000000000000000000000e-01,   /* r[5] */ 
+    2.79064695222518803496836170552342082373797893524170e-02, /* logih[5] */ 
+    -1.06035466460511973857716476431794431849741915846778e-18, /* logim[5] */ 
+    1.40399476841784981797309256958923855448288750735528e-35, /* logil[5] */ 
+  } , 
+  { 
+    9.77099418640136718750000000000000000000000000000000e-01,   /* r[6] */ 
+    3.34227328145833349481996776830783346667885780334473e-02, /* logih[6] */ 
+    -2.30264185180544573536858875991075869298703226281026e-18, /* logim[6] */ 
+    -1.54328657939112637118099481931192082521169355752646e-34, /* logil[6] */ 
+  } , 
+  { 
+    9.73383903503417968750000000000000000000000000000000e-01,   /* r[7] */ 
+    3.89191773983389929791876227227476192638278007507324e-02, /* logih[7] */ 
+    2.25448778888568193693198665534250833992067200909314e-18, /* logim[7] */ 
+    -1.66706958554093095538277426422752915572221541711786e-35, /* logil[7] */ 
+  } , 
+  { 
+    9.69696998596191406250000000000000000000000000000000e-01,   /* r[8] */ 
+    4.43940763627913639877142770728823961690068244934082e-02, /* logih[8] */ 
+    -1.35148268469329738787933054025463561212703774709647e-18, /* logim[8] */ 
+    -9.30542106567779590725369440921408781707570437070629e-36, /* logil[8] */ 
+  } , 
+  { 
+    9.66037750244140625000000000000000000000000000000000e-01,   /* r[9] */ 
+    4.98485279527303287716577528954076115041971206665039e-02, /* logih[9] */ 
+    6.99684078718519819164474461192556823314757766482007e-19, /* logim[9] */ 
+    -2.43070079250460900406108506315855413208920069880071e-35, /* logil[9] */ 
+  } , 
+  { 
+    9.62406158447265625000000000000000000000000000000000e-01,   /* r[10] */ 
+    5.52822205228920421360427894796885084360837936401367e-02, /* logih[10] */ 
+    -2.28041829375459011783136992188608860381451027094727e-18, /* logim[10] */ 
+    2.92509524765364940130250242310369777453156638429065e-35, /* logil[10] */ 
+  } , 
+  { 
+    9.58801269531250000000000000000000000000000000000000e-01,   /* r[11] */ 
+    6.06962756528966682068038096531381597742438316345215e-02, /* logih[11] */ 
+    -2.30575104391021062016554403718699744533879233050506e-18, /* logim[11] */ 
+    -7.17933773994063224992733787486043953294734193934224e-35, /* logil[11] */ 
+  } , 
+  { 
+    9.55224037170410156250000000000000000000000000000000e-01,   /* r[12] */ 
+    6.60889539816468807309490784973604604601860046386719e-02, /* logih[12] */ 
+    -3.43531319808022917726081135288707689815983878236052e-18, /* logim[12] */ 
+    -1.33537440950953098282350657111014906210298802453012e-34, /* logil[12] */ 
+  } , 
+  { 
+    9.51672554016113281250000000000000000000000000000000e-01,   /* r[13] */ 
+    7.14628301345319461024274687588331289589405059814453e-02, /* logih[13] */ 
+    2.85019564755822761568469835817513709577072221641996e-18, /* logim[13] */ 
+    -9.19067891131942166039810480616019695600822882350246e-37, /* logil[13] */ 
+  } , 
+  { 
+    9.48147773742675781250000000000000000000000000000000e-01,   /* r[14] */ 
+    7.68161667434743566929000735399313271045684814453125e-02, /* logih[14] */ 
+    -1.06503850285483291664763275879140215046738161101689e-18, /* logim[14] */ 
+    -7.65539408485798958761020119630194135239837477350922e-35, /* logil[14] */ 
+  } , 
+  { 
+    9.44649696350097656250000000000000000000000000000000e-01,   /* r[15] */ 
+    8.21486597674154217507691555510973557829856872558594e-02, /* logih[15] */ 
+    1.05949179068992293701743882962947866868089440388204e-18, /* logim[15] */ 
+    -8.01871606400843361947793952324428287361058018241436e-35, /* logil[15] */ 
+  } , 
+  { 
+    9.41176414489746093750000000000000000000000000000000e-01,   /* r[16] */ 
+    8.74629272416674041767947755943168886005878448486328e-02, /* logih[16] */ 
+    -1.77710701464998942664649859987232463493014273104014e-18, /* logim[16] */ 
+    -1.80956122292284222227087580389487512155443759846534e-35, /* logil[16] */ 
+  } , 
+  { 
+    9.37728881835937500000000000000000000000000000000000e-01,   /* r[17] */ 
+    9.27572269111804487140560127045318949967622756958008e-02, /* logih[17] */ 
+    -5.27591334713426660094475417460021043346056467758629e-18, /* logim[17] */ 
+    -1.53175520932242863184799310580698131125491486503283e-34, /* logil[17] */ 
+  } , 
+  { 
+    9.34306144714355468750000000000000000000000000000000e-01,   /* r[18] */ 
+    9.80327386445321302677058383778785355389118194580078e-02, /* logih[18] */ 
+    -5.93734060789694089615179387615749478380374593921383e-19, /* logim[18] */ 
+    3.22072168497817739835267264564341161078059188303423e-35, /* logil[18] */ 
+  } , 
+  { 
+    9.30909156799316406250000000000000000000000000000000e-01,   /* r[19] */ 
+    1.03287706297326614679477074787428136914968490600586e-01, /* logih[19] */ 
+    1.33325264360904317354548306659732409559419348498273e-18, /* logim[19] */ 
+    3.31890629684034024636090527929623831396401127155796e-36, /* logil[19] */ 
+  } , 
+  { 
+    9.27536010742187500000000000000000000000000000000000e-01,   /* r[20] */ 
+    1.08524800743511784517636442615184932947158813476562e-01, /* logih[20] */ 
+    -1.28671557844966439678563543759408610236814325233478e-18, /* logim[20] */ 
+    -2.56854731168380358630388572766888073135733818319681e-35, /* logil[20] */ 
+  } , 
+  { 
+    9.24187660217285156250000000000000000000000000000000e-01,   /* r[21] */ 
+    1.13742268163890894450140933713555568829178810119629e-01, /* logih[21] */ 
+    -8.77036301522305748474920477842609739773359932085098e-19, /* logim[21] */ 
+    8.57410843683479675757388920826360661070052891897777e-35, /* logil[21] */ 
+  } , 
+  { 
+    9.20863151550292968750000000000000000000000000000000e-01,   /* r[22] */ 
+    1.18941319948589224742008241264557000249624252319336e-01, /* logih[22] */ 
+    4.19531239651888390161555205120491536470911709375714e-18, /* logim[22] */ 
+    -2.32937303080172707430415739969539325535648073239647e-34, /* logil[22] */ 
+  } , 
+  { 
+    9.17562484741210937500000000000000000000000000000000e-01,   /* r[23] */ 
+    1.24121688041285385684098230285599129274487495422363e-01, /* logih[23] */ 
+    9.00256823026971617398245077356557223480847847208472e-19, /* logim[23] */ 
+    6.70088260119589436198762199150551511628184558421695e-35, /* logil[23] */ 
+  } , 
+  { 
+    9.14285659790039062500000000000000000000000000000000e-01,   /* r[24] */ 
+    1.29283102936294441720477266244415659457445144653320e-01, /* logih[24] */ 
+    7.73743323061072771474411865735142118226773038589797e-18, /* logim[24] */ 
+    7.00151503950389057387088983272314894406637587361574e-34, /* logil[24] */ 
+  } , 
+  { 
+    9.11031723022460937500000000000000000000000000000000e-01,   /* r[25] */ 
+    1.34426803922212734221375285414978861808776855468750e-01, /* logih[25] */ 
+    2.87442943483450917166131039871184389070859209874820e-18, /* logim[25] */ 
+    1.07418394159169377416152150989201926752424104438080e-34, /* logil[25] */ 
+  } , 
+  { 
+    9.07801628112792968750000000000000000000000000000000e-01,   /* r[26] */ 
+    1.39551019182446001121178369430708698928356170654297e-01, /* logih[26] */ 
+    -1.30334047193679924727952135062206194795888829424720e-17, /* logim[26] */ 
+    7.66296121586659828803741925222999984250452285658724e-34, /* logil[26] */ 
+  } , 
+  { 
+    9.04593467712402343750000000000000000000000000000000e-01,   /* r[27] */ 
+    1.44658516929258157412974128419591579586267471313477e-01, /* logih[27] */ 
+    1.38592310231888602734839275401641903151588210621318e-17, /* logim[27] */ 
+    7.04204624169239561960113974223630631428167482568361e-34, /* logil[27] */ 
+  } , 
+  { 
+    9.01408195495605468750000000000000000000000000000000e-01,   /* r[28] */ 
+    1.49747527963535687067775370451272465288639068603516e-01, /* logih[28] */ 
+    -4.63121585254300608564541809516560465960812790456487e-18, /* logim[28] */ 
+    -2.38375164082682849282198954173370103452053181545581e-34, /* logil[28] */ 
+  } , 
+  { 
+    8.98245811462402343750000000000000000000000000000000e-01,   /* r[29] */ 
+    1.54817791959126344059072266645671334117650985717773e-01, /* logih[29] */ 
+    -1.97608219816229633690476653766429513925576435617957e-18, /* logim[29] */ 
+    -7.29293250516190589410842756372025648233179264971183e-35, /* logil[29] */ 
+  } , 
+  { 
+    8.95105361938476562500000000000000000000000000000000e-01,   /* r[30] */ 
+    1.59870584354488087797108164522796869277954101562500e-01, /* logih[30] */ 
+    1.38164327179219532318047293404835044148743773120749e-17, /* logim[30] */ 
+    2.60902789861922854258976768649749081077445016828227e-34, /* logil[30] */ 
+  } , 
+  { 
+    8.91985893249511718750000000000000000000000000000000e-01,   /* r[31] */ 
+    1.64907200773063644660965110233519226312637329101562e-01, /* logih[31] */ 
+    6.40258479048132435575035617265253227017927489659503e-18, /* logim[31] */ 
+    -3.13994360424306793167722791429686820377012800164626e-36, /* logil[31] */ 
+  } , 
+  { 
+    8.88889312744140625000000000000000000000000000000000e-01,   /* r[32] */ 
+    1.69924313511872926429902008749195374548435211181641e-01, /* logih[32] */ 
+    6.27897206252693367521427657669679268044418008293354e-19, /* logim[32] */ 
+    -1.84662823838719713889061260700783214693984580501609e-35, /* logil[32] */ 
+  } , 
+  { 
+    8.85812759399414062500000000000000000000000000000000e-01,   /* r[33] */ 
+    1.74926316686843275061136182557675056159496307373047e-01, /* logih[33] */ 
+    -1.28095711942361950784467450834305264934252560279915e-17, /* logim[33] */ 
+    6.15728414357675841500352304615531898144676821521735e-34, /* logil[33] */ 
+  } , 
+  { 
+    8.82759094238281250000000000000000000000000000000000e-01,   /* r[34] */ 
+    1.79908316093213171971143538030446507036685943603516e-01, /* logih[34] */ 
+    -4.05669244508450884106169713651948436101460999171934e-18, /* logim[34] */ 
+    -2.73456623470470858112008354603047232113150522790287e-34, /* logil[34] */ 
+  } , 
+  { 
+    8.79725456237792968750000000000000000000000000000000e-01,   /* r[35] */ 
+    1.84874735594675820848920011485461145639419555664062e-01, /* logih[35] */ 
+    7.83038695439828504402955103668931677062328445957555e-18, /* logim[35] */ 
+    6.50239128030890104986149271144609240438163759169796e-34, /* logil[35] */ 
+  } , 
+  { 
+    8.76712799072265625000000000000000000000000000000000e-01,   /* r[36] */ 
+    1.89823784958295938007921677126432769000530242919922e-01, /* logih[36] */ 
+    -8.81954617013802931471562955085007459413223371703754e-18, /* logim[36] */ 
+    4.68176162545611138840109682829353162004456293635899e-34, /* logil[36] */ 
+  } , 
+  { 
+    8.73720169067382812500000000000000000000000000000000e-01,   /* r[37] */ 
+    1.94756800677670482979664257072727195918560028076172e-01, /* logih[37] */ 
+    -2.00670924345318825647424200264947046592235601474052e-18, /* logim[37] */ 
+    1.23510776676180725049881134754892221509956109351828e-34, /* logil[37] */ 
+  } , 
+  { 
+    8.70748519897460937500000000000000000000000000000000e-01,   /* r[38] */ 
+    1.99671979373277602709535472058632876724004745483398e-01, /* logih[38] */ 
+    -3.35041803578082878314072229510113791314884693559175e-19, /* logim[38] */ 
+    2.19585849692745582866688760428854814221266519680553e-36, /* logil[38] */ 
+  } , 
+  { 
+    8.67796897888183593750000000000000000000000000000000e-01,   /* r[39] */ 
+    2.04570665922535199765519564607529900968074798583984e-01, /* logih[39] */ 
+    -1.04751553531138287440354969580963337427221634013275e-17, /* logim[39] */ 
+    -4.69171037663777474441792299191703931076443660125798e-34, /* logil[39] */ 
+  } , 
+  { 
+    8.64865303039550781250000000000000000000000000000000e-01,   /* r[40] */ 
+    2.09452634702868761840122147077636327594518661499023e-01, /* logih[40] */ 
+    1.10703702929617688876102394158665802371341635353943e-17, /* logim[40] */ 
+    -7.14976977668988171404204188299765278177460282467036e-34, /* logil[40] */ 
+  } , 
+  { 
+    8.61952781677246093750000000000000000000000000000000e-01,   /* r[41] */ 
+    2.14319255162218030852372407935035880655050277709961e-01, /* logih[41] */ 
+    1.29702313007778250478283769152847492223363745647243e-17, /* logim[41] */ 
+    5.73068113001992288619079890329675696690665640594386e-34, /* logil[41] */ 
+  } , 
+  { 
+    8.59060287475585937500000000000000000000000000000000e-01,   /* r[42] */ 
+    2.19168713942656773197015240839391481131315231323242e-01, /* logih[42] */ 
+    -7.04698144913766631623882809355752075602951087972227e-18, /* logim[42] */ 
+    -6.81063628416184547095854182554280736255034389907768e-34, /* logil[42] */ 
+  } , 
+  { 
+    8.56186866760253906250000000000000000000000000000000e-01,   /* r[43] */ 
+    2.24002389001174750937650514970300719141960144042969e-01, /* logih[43] */ 
+    9.77089146727803082940117001653944079518215379270970e-18, /* logim[43] */ 
+    -5.15654043774815198603423123107750339552695455461599e-34, /* logil[43] */ 
+  } , 
+  { 
+    8.53333473205566406250000000000000000000000000000000e-01,   /* r[44] */ 
+    2.28818454019755312955908266303595155477523803710938e-01, /* logih[44] */ 
+    8.60482840827231531693211061331421783325499374269103e-18, /* logim[44] */ 
+    4.62159649315070967905902800219645706522346592477674e-34, /* logil[44] */ 
+  } , 
+  { 
+    8.50498199462890625000000000000000000000000000000000e-01,   /* r[45] */ 
+    2.33619913235866366596482635031861718744039535522461e-01, /* logih[45] */ 
+    -3.17603438795656722833659731362733461077382072175793e-18, /* logim[45] */ 
+    -1.14190998511637372945280226124717188573979535104549e-34, /* logil[45] */ 
+  } , 
+  { 
+    8.47681999206542968750000000000000000000000000000000e-01,   /* r[46] */ 
+    2.38404943554491266510808600287418812513351440429688e-01, /* logih[46] */ 
+    -4.91919207875165757062252476472896320156113810759041e-18, /* logim[46] */ 
+    -1.65774202516213266221949772053971269011961846039958e-34, /* logil[46] */ 
+  } , 
+  { 
+    8.44884872436523437500000000000000000000000000000000e-01,   /* r[47] */ 
+    2.43173327789243498564530909789027646183967590332031e-01, /* logih[47] */ 
+    4.93306440425329257306593810775031695904319815014754e-18, /* logim[47] */ 
+    -1.13614580751390656792590805859574652593001401554151e-34, /* logil[47] */ 
+  } , 
+  { 
+    8.42104911804199218750000000000000000000000000000000e-01,   /* r[48] */ 
+    2.47928115382989089354737188841681927442550659179688e-01, /* logih[48] */ 
+    -1.37712103635557072032234153365222440536782865715083e-18, /* logim[48] */ 
+    9.75493887073081889286766097804801019201793778479461e-36, /* logil[48] */ 
+  } , 
+  { 
+    8.39344024658203125000000000000000000000000000000000e-01,   /* r[49] */ 
+    2.52665840909102268341257513384334743022918701171875e-01, /* logih[49] */ 
+    -2.29689231346274680410439539616369605449817860326088e-17, /* logim[49] */ 
+    -5.60202341060166161523536551099252965521444882693529e-34, /* logil[49] */ 
+  } , 
+  { 
+    8.36601257324218750000000000000000000000000000000000e-01,   /* r[50] */ 
+    2.57387928683979749777677170641254633665084838867188e-01, /* logih[50] */ 
+    1.55294884781987048139059464306453784663352757128198e-17, /* logim[50] */ 
+    1.01380707456162023479965432916465584034071816674502e-33, /* logil[50] */ 
+  } , 
+  { 
+    8.33876609802246093750000000000000000000000000000000e-01,   /* r[51] */ 
+    2.62094173563105881097357041653594933450222015380859e-01, /* logih[51] */ 
+    -8.55713950348344689585298731473352525543751015890334e-18, /* logim[51] */ 
+    5.48763060317488000144168502344734048354142056565485e-34, /* logil[51] */ 
+  } , 
+  { 
+    8.31169128417968750000000000000000000000000000000000e-01,   /* r[52] */ 
+    2.66786024747041050630969039048068225383758544921875e-01, /* logih[52] */ 
+    -1.67542241678008684495879286127707515841429324510332e-17, /* logim[52] */ 
+    -1.84450647715786516704590189681050172449564734674026e-34, /* logil[52] */ 
+  } , 
+  { 
+    8.28478813171386718750000000000000000000000000000000e-01,   /* r[53] */ 
+    2.71463291252832750188872523722238838672637939453125e-01, /* logih[53] */ 
+    -1.82861289604292083819624352321660587975949022128451e-17, /* logim[53] */ 
+    1.41344704609359941327335627738873295910710446946318e-33, /* logil[53] */ 
+  } , 
+  { 
+    8.25806617736816406250000000000000000000000000000000e-01,   /* r[54] */ 
+    2.76124115053543395248425440513528883457183837890625e-01, /* logih[54] */ 
+    2.16585493379379121431927795059778160498079515320280e-17, /* logim[54] */ 
+    8.60215787486055402643372799849720707717258614661468e-34, /* logil[54] */ 
+  } , 
+  { 
+    8.23151588439941406250000000000000000000000000000000e-01,   /* r[55] */ 
+    2.80769958587697043839170873980037868022918701171875e-01, /* logih[55] */ 
+    -7.49945068305251944743518556464975251268962220130981e-18, /* logim[55] */ 
+    -3.35683654241982931982204205181485008542845495662437e-34, /* logil[55] */ 
+  } , 
+  { 
+    8.20512771606445312500000000000000000000000000000000e-01,   /* r[56] */ 
+    2.85402304853576316290286740695592015981674194335938e-01, /* logih[56] */ 
+    1.97058866076428412478768008134629487975209602250437e-17, /* logim[56] */ 
+    1.06837698553508766117432923132263183155168973782721e-33, /* logil[56] */ 
+  } , 
+  { 
+    8.17891120910644531250000000000000000000000000000000e-01,   /* r[57] */ 
+    2.90019293012687973121188633740530349314212799072266e-01, /* logih[57] */ 
+    2.56668340633873322360015168072740173815474168247740e-19, /* logim[57] */ 
+    1.32070461247422232763959137046376896815849857773214e-35, /* logil[57] */ 
+  } , 
+  { 
+    8.15286636352539062500000000000000000000000000000000e-01,   /* r[58] */ 
+    2.94620727393795800441722576579195447266101837158203e-01, /* logih[58] */ 
+    8.28856253528690669390956178529769851637375900355867e-18, /* logim[58] */ 
+    9.21060163289173545842870657414802261911841193726753e-35, /* logil[58] */ 
+  } , 
+  { 
+    8.12698364257812500000000000000000000000000000000000e-01,   /* r[59] */ 
+    2.99208104378606787321359661291353404521942138671875e-01, /* logih[59] */ 
+    2.50440287234594231108545303202106361171199143807143e-17, /* logim[59] */ 
+    5.76496224108896237321806536123506494667013214131283e-34, /* logil[59] */ 
+  } , 
+  { 
+    8.10126304626464843750000000000000000000000000000000e-01,   /* r[60] */ 
+    3.03781242627308878390124391444260254502296447753906e-01, /* logih[60] */ 
+    7.26236946156037909713854903168533397481837663535236e-18, /* logim[60] */ 
+    -5.13832288823633829539789242568260267295555917557936e-34, /* logil[60] */ 
+  } , 
+  { 
+    8.07571411132812500000000000000000000000000000000000e-01,   /* r[61] */ 
+    3.08338256217685957594198953302111476659774780273438e-01, /* logih[61] */ 
+    -3.91862830506871787886277655283277883335703800578341e-18, /* logim[61] */ 
+    -1.80287911307734040041601196733261985968717764792270e-34, /* logil[61] */ 
+  } , 
+  { 
+    8.05031776428222656250000000000000000000000000000000e-01,   /* r[62] */ 
+    3.12882364094114129304813332055346108973026275634766e-01, /* logih[62] */ 
+    2.00566095640240859030080760939632903054042270806498e-17, /* logim[62] */ 
+    -1.20548577698548841142520422108638918923500554048039e-33, /* logil[62] */ 
+  } , 
+  { 
+    8.02507400512695312500000000000000000000000000000000e-01,   /* r[63] */ 
+    3.17413398435927307517090412147808820009231567382812e-01, /* logih[63] */ 
+    1.92917962412721060884664265681098014687881777581369e-17, /* logim[63] */ 
+    -5.60605040615516964419678016739265374372709613799588e-34, /* logil[63] */ 
+  } , 
+  { 
+    8.00000190734863281250000000000000000000000000000000e-01,   /* r[64] */ 
+    3.21927750922101629793559141035075299441814422607422e-01, /* logih[64] */ 
+    -3.68777572337715973775586041884209304585818249254945e-18, /* logim[64] */ 
+    2.42378345855852981194379769493259763563573896470280e-34, /* logil[64] */ 
+  } , 
+  { 
+    7.97508239746093750000000000000000000000000000000000e-01,   /* r[65] */ 
+    3.26428670204942816823745488363783806562423706054688e-01, /* logih[65] */ 
+    1.45984677103376311105171213886420877499189566989355e-18, /* logim[65] */ 
+    8.54804091592753412940247017733822117449065792260507e-35, /* logil[65] */ 
+  } , 
+  { 
+    7.95030593872070312500000000000000000000000000000000e-01,   /* r[66] */ 
+    3.30917716530283567699655122851254418492317199707031e-01, /* logih[66] */ 
+    -1.10914470017120619152208446527819480613105503270278e-17, /* logim[66] */ 
+    7.68957589367645155571847946740580012038237827888475e-35, /* logil[66] */ 
+  } , 
+  { 
+    7.92570114135742187500000000000000000000000000000000e-01,   /* r[67] */ 
+    3.35389527027655065527511624168255366384983062744141e-01, /* logih[67] */ 
+    -2.68905140673031160753055547019515200860581054595347e-17, /* logim[67] */ 
+    1.12312306509581200028305457580071181488591082452267e-33, /* logil[67] */ 
+  } , 
+  { 
+    7.90122985839843750000000000000000000000000000000000e-01,   /* r[68] */ 
+    3.39850862798135311404479352859198115766048431396484e-01, /* logih[68] */ 
+    2.67578448800166743621563940564181619384497916823689e-18, /* logim[68] */ 
+    -4.08593208106915232849113978946102464404769851005264e-36, /* logil[68] */ 
+  } , 
+  { 
+    7.87692070007324218750000000000000000000000000000000e-01,   /* r[69] */ 
+    3.44296343246967506690481286568683572113513946533203e-01, /* logih[69] */ 
+    2.61985729966483159298053143855013667206513518139355e-17, /* logim[69] */ 
+    -1.43317776294076914943494562393727319237442460573694e-33, /* logil[69] */ 
+  } , 
+  { 
+    7.85276412963867187500000000000000000000000000000000e-01,   /* r[70] */ 
+    3.48727530794102902333975180226843804121017456054688e-01, /* logih[70] */ 
+    -2.34058128233080475834922834476410669486100635732851e-17, /* logim[70] */ 
+    -1.19495530307809197006632618244668279768915361517721e-33, /* logil[70] */ 
+  } , 
+  { 
+    7.82875061035156250000000000000000000000000000000000e-01,   /* r[71] */ 
+    3.53146008580722203795687619276577606797218322753906e-01, /* logih[71] */ 
+    2.51020933081373096955654998109339846738212697870377e-17, /* logim[71] */ 
+    3.85467771988000503348528260185321311042188078683671e-35, /* logil[71] */ 
+  } , 
+  { 
+    7.80488014221191406250000000000000000000000000000000e-01,   /* r[72] */ 
+    3.57551617657171139086358380154706537723541259765625e-01, /* logih[72] */ 
+    8.26026920265729456320682991301405499549392385594867e-18, /* logim[72] */ 
+    -4.82409659516332608730700682966909062399273519559205e-34, /* logil[72] */ 
+  } , 
+  { 
+    7.78115272521972656250000000000000000000000000000000e-01,   /* r[73] */ 
+    3.61944198317473264658872267318656668066978454589844e-01, /* logih[73] */ 
+    9.35251240570409658369637671707393177323119533170476e-18, /* logim[73] */ 
+    7.65402247015393379174811496478109595932454697550257e-34, /* logil[73] */ 
+  } , 
+  { 
+    7.75757789611816406250000000000000000000000000000000e-01,   /* r[74] */ 
+    3.66321816535990496532804172602482140064239501953125e-01, /* logih[74] */ 
+    -1.26283763367166791971668084210111644172264929234222e-17, /* logim[74] */ 
+    -5.18175152989954334710733729135724747368463044348133e-34, /* logil[74] */ 
+  } , 
+  { 
+    7.73413658142089843750000000000000000000000000000000e-01,   /* r[75] */ 
+    3.70687852887287339065380820102291181683540344238281e-01, /* logih[75] */ 
+    -2.26426578076002335190700377100879173906840093029931e-18, /* logim[75] */ 
+    9.39919422448895887884207901501396710115618070243006e-35, /* logil[75] */ 
+  } , 
+  { 
+    7.71084785461425781250000000000000000000000000000000e-01,   /* r[76] */ 
+    3.75038592931745407010879489462240599095821380615234e-01, /* logih[76] */ 
+    1.36478878694725594397668899630117789175518936328670e-17, /* logim[76] */ 
+    -7.42102285102582603712767861440251383531360222023193e-34, /* logil[76] */ 
+  } , 
+  { 
+    7.68768310546875000000000000000000000000000000000000e-01,   /* r[77] */ 
+    3.79379226984772721653627058913116343319416046142578e-01, /* logih[77] */ 
+    1.13769630716652922583152930707043643780239195343403e-17, /* logim[77] */ 
+    -5.71497157206590541051326347759309167725971873915619e-34, /* logil[77] */ 
+  } , 
+  { 
+    7.66467094421386718750000000000000000000000000000000e-01,   /* r[78] */ 
+    3.83704238729474844671329947232152335345745086669922e-01, /* logih[78] */ 
+    -1.37569501553533684673235058090995964600109755003945e-17, /* logim[78] */ 
+    -8.19419663933668791519024676445202574794121365195595e-35, /* logil[78] */ 
+  } , 
+  { 
+    7.64179229736328125000000000000000000000000000000000e-01,   /* r[79] */ 
+    3.88017048869009228972970504401018843054771423339844e-01, /* logih[79] */ 
+    -3.80701519449449765873708863588277305202153361708738e-18, /* logim[79] */ 
+    1.41209082306365988413846146208806553569817267206609e-34, /* logil[79] */ 
+  } , 
+  { 
+    7.61904716491699218750000000000000000000000000000000e-01,   /* r[80] */ 
+    3.92317508770088307912260461307596415281295776367188e-01, /* logih[80] */ 
+    -2.48709304499940275271685524139705487487812483329234e-17, /* logim[80] */ 
+    1.51913530740466505110972004119148045675527858280419e-33, /* logil[80] */ 
+  } , 
+  { 
+    7.59643554687500000000000000000000000000000000000000e-01,   /* r[81] */ 
+    3.96605469112625952377015892125200480222702026367188e-01, /* logih[81] */ 
+    -2.05409584188905648894008644042627621347744841311892e-17, /* logim[81] */ 
+    2.22145444790121064274793819131004556765772287126498e-35, /* logil[81] */ 
+  } , 
+  { 
+    7.57396697998046875000000000000000000000000000000000e-01,   /* r[82] */ 
+    4.00878963329971971241150185960577800869941711425781e-01, /* logih[82] */ 
+    -2.66817967026326825523345579536420301974049078445688e-19, /* logim[82] */ 
+    -1.05363633967249486254042597699490314094813255836572e-35, /* logil[82] */ 
+  } , 
+  { 
+    7.55162239074707031250000000000000000000000000000000e-01,   /* r[83] */ 
+    4.05141468510801738833748686374747194349765777587891e-01, /* logih[83] */ 
+    4.12013026738107642301137843414110630137096547313805e-19, /* logim[83] */ 
+    2.33575446522787458311195104600075869808876514799442e-35, /* logil[83] */ 
+  } , 
+  { 
+    7.52941131591796875000000000000000000000000000000000e-01,   /* r[84] */ 
+    4.09391022129029724663240585869061760604381561279297e-01, /* logih[84] */ 
+    2.56067666045646563728399935742968282460993394682039e-17, /* logim[84] */ 
+    -5.13721066726803690112726682214076449553351301368597e-34, /* logil[84] */ 
+  } , 
+  { 
+    7.50733375549316406250000000000000000000000000000000e-01,   /* r[85] */ 
+    4.13627472195328416137982685540919192135334014892578e-01, /* logih[85] */ 
+    2.18808337792321329482011871274589564814328341663075e-17, /* logim[85] */ 
+    1.02540355629315485391150379093592950725836019876557e-33, /* logil[85] */ 
+  } , 
+  { 
+    7.48538017272949218750000000000000000000000000000000e-01,   /* r[86] */ 
+    4.17852504136982216831341929719201289117336273193359e-01, /* logih[86] */ 
+    9.86946871873695851969756471738566369665379660554619e-19, /* logim[86] */ 
+    6.29612486797528483220726516137805747359270884942425e-35, /* logil[86] */ 
+  } , 
+  { 
+    7.46356010437011718750000000000000000000000000000000e-01,   /* r[87] */ 
+    4.22064137361382152313638016494223847985267639160156e-01, /* logih[87] */ 
+    -1.05922076934284027175745907413659282941993793826139e-17, /* logim[87] */ 
+    -6.12299960012078338449376466647955436587104734540624e-34, /* logil[87] */ 
+  } , 
+  { 
+    7.44186401367187500000000000000000000000000000000000e-01,   /* r[88] */ 
+    4.26264066771658511889597775734728202223777770996094e-01, /* logih[88] */ 
+    -8.85513480816040453945742392800672953193458312727256e-18, /* logim[88] */ 
+    -5.24714106986727460487580275593262691651180525370791e-34, /* logil[88] */ 
+  } , 
+  { 
+    7.42029190063476562500000000000000000000000000000000e-01,   /* r[89] */ 
+    4.30452153955706073862330640622531063854694366455078e-01, /* logih[89] */ 
+    2.61368823927001457998555167240062922142140611089746e-17, /* logim[89] */ 
+    1.44680766060028701358746313826017052885573936570807e-33, /* logil[89] */ 
+  } , 
+  { 
+    7.39884376525878906250000000000000000000000000000000e-01,   /* r[90] */ 
+    4.34628259883472034541540551799698732793331146240234e-01, /* logih[90] */ 
+    -4.65804559835565790738625882506228255266947860929998e-18, /* logim[90] */ 
+    3.50162107860052357002426832774093849420181199400792e-34, /* logil[90] */ 
+  } , 
+  { 
+    7.37751960754394531250000000000000000000000000000000e-01,   /* r[91] */ 
+    4.38792244913736528832970407165703363716602325439453e-01, /* logih[91] */ 
+    6.54435041067844518638349922716293820410138082918974e-18, /* logim[91] */ 
+    1.66288117681168517806253799205003056056005048205360e-34, /* logil[91] */ 
+  } , 
+  { 
+    7.35631942749023437500000000000000000000000000000000e-01,   /* r[92] */ 
+    4.42943968801095711018689371485379524528980255126953e-01, /* logih[92] */ 
+    -1.31830993629830820106422084359785358736815996728614e-17, /* logim[92] */ 
+    4.61053576482372100205685418524847218246553128543631e-34, /* logil[92] */ 
+  } , 
+  { 
+    7.33524322509765625000000000000000000000000000000000e-01,   /* r[93] */ 
+    4.47083290703147728795130433354643173515796661376953e-01, /* logih[93] */ 
+    1.69077329042533132659710418879288890988542117042696e-17, /* logim[93] */ 
+    9.64412076794160463494531210530587642610119179701767e-34, /* logil[93] */ 
+  } , 
+  { 
+    7.31428146362304687500000000000000000000000000000000e-01,   /* r[94] */ 
+    4.51211950247995374763121390060405246913433074951172e-01, /* logih[94] */ 
+    5.29157734589489879989241042345888795815986344495564e-18, /* logim[94] */ 
+    4.05922256458861404459677801513180982129072332853957e-35, /* logil[94] */ 
+  } , 
+  { 
+    7.29344367980957031250000000000000000000000000000000e-01,   /* r[95] */ 
+    4.55327935107630421551760946385911665856838226318359e-01, /* logih[95] */ 
+    1.12238496235431997950024540898660473611218791584296e-17, /* logim[95] */ 
+    2.53810412167217662475589577599465754868617140018869e-34, /* logil[95] */ 
+  } , 
+  { 
+    7.27272987365722656250000000000000000000000000000000e-01,   /* r[96] */ 
+    4.59431102689436932084987574853585101664066314697266e-01, /* logih[96] */ 
+    -5.65021202083821658568979172094850503702023051443232e-18, /* logim[96] */ 
+    2.66729880996649709196382536663439201060959304794017e-34, /* logil[96] */ 
+  } , 
+  { 
+    7.25212097167968750000000000000000000000000000000000e-01,   /* r[97] */ 
+    4.63525104197631598879070224938914179801940917968750e-01, /* logih[97] */ 
+    1.64015018050273811377058500937130036591871213663913e-17, /* logim[97] */ 
+    -2.37668158047196530099123034685246144103569462059140e-35, /* logil[97] */ 
+  } , 
+  { 
+    7.23163604736328125000000000000000000000000000000000e-01,   /* r[98] */ 
+    4.67606023035364859463669517936068587005138397216797e-01, /* logih[98] */ 
+    -2.35404459021293530100419612489692369296536941011139e-17, /* logim[98] */ 
+    8.65686412848735892137131700314774245266762617410743e-34, /* logil[98] */ 
+  } , 
+  { 
+    7.21126556396484375000000000000000000000000000000000e-01,   /* r[99] */ 
+    4.71675622850898035309796796354930847883224487304688e-01, /* logih[99] */ 
+    -5.00291784895727418193570650071413020227423422230627e-18, /* logim[99] */ 
+    -3.48814629702810911815080058632968938255265704317182e-34, /* logil[99] */ 
+  } , 
+  { 
+    7.19100952148437500000000000000000000000000000000000e-01,   /* r[100] */ 
+    4.75733774931740460711893092593527399003505706787109e-01, /* logih[100] */ 
+    2.37354207292015831848317508817743592416645271551013e-17, /* logim[100] */ 
+    3.75220251398787236762445752605220099123667359652946e-34, /* logil[100] */ 
+  } , 
+  { 
+    7.17086791992187500000000000000000000000000000000000e-01,   /* r[101] */ 
+    4.79780350020427681645429629497812129557132720947266e-01, /* logih[101] */ 
+    9.64996639262616277761997731342311958042765881278166e-18, /* logim[101] */ 
+    -1.45917791984963879526832989164269922466650870970319e-34, /* logil[101] */ 
+  } , 
+  { 
+    7.15084075927734375000000000000000000000000000000000e-01,   /* r[102] */ 
+    4.83815218320749418356996329748653806746006011962891e-01, /* logih[102] */ 
+    -2.26055495552680496488915066271475591152753444344542e-17, /* logim[102] */ 
+    1.15943477520296400421924802163066587581164941504239e-33, /* logil[102] */ 
+  } , 
+  { 
+    7.13091850280761718750000000000000000000000000000000e-01,   /* r[103] */ 
+    4.87840178933420298701406636610045097768306732177734e-01, /* logih[103] */ 
+    9.95061561880808777250662218784807296295756393896643e-18, /* logim[103] */ 
+    -2.70730037505675842458176336457886940782026608863071e-34, /* logil[103] */ 
+  } , 
+  { 
+    7.11111068725585937500000000000000000000000000000000e-01,   /* r[104] */ 
+    4.91853182321002724286529428354697301983833312988281e-01, /* logih[104] */ 
+    -1.93631103608357505056849606827194505159750296147429e-17, /* logim[104] */ 
+    -5.13067202688456219222003091599945986652944064972985e-34, /* logil[104] */ 
+  } , 
+  { 
+    7.09141731262207031250000000000000000000000000000000e-01,   /* r[105] */ 
+    4.95854097106264379846152223763056099414825439453125e-01, /* logih[105] */ 
+    -8.97253997785747359550285084120100354068920818555134e-18, /* logim[105] */ 
+    4.48985852964966878119016366112985893401143906248048e-34, /* logil[105] */ 
+  } , 
+  { 
+    1.41436386108398437500000000000000000000000000000000e+00,   /* r[106] */ 
+    -5.00153317496815130738241350627504289150238037109375e-01, /* logih[106] */ 
+    6.38652340493840901898261226024177907291121978480765e-18, /* logim[106] */ 
+    -1.50115709371786842001778403725543006667379544298665e-34, /* logil[106] */ 
+  } , 
+  { 
+    1.41046905517578125000000000000000000000000000000000e+00,   /* r[107] */ 
+    -4.96175014428150595868771688401466235518455505371094e-01, /* logih[107] */ 
+    -2.52613980927368683904892283975420623567633947857171e-17, /* logim[107] */ 
+    -2.78172233261534782496122526419959911999891480999118e-34, /* logil[107] */ 
+  } , 
+  { 
+    1.40659332275390625000000000000000000000000000000000e+00,   /* r[108] */ 
+    -4.92205273809975751841960800447850488126277923583984e-01, /* logih[108] */ 
+    1.38263645220702992115908316962406899116133433250055e-17, /* logim[108] */ 
+    -9.13478810114964638432169273750765158178251684940645e-35, /* logil[108] */ 
+  } , 
+  { 
+    1.40274047851562500000000000000000000000000000000000e+00,   /* r[109] */ 
+    -4.88248120154341713750056896969908848404884338378906e-01, /* logih[109] */ 
+    -9.19124816655229741100591795639860013679834003477893e-18, /* logim[109] */ 
+    3.57736696925483033542993216894623988952660296440587e-34, /* logil[109] */ 
+  } , 
+  { 
+    1.39890670776367187500000000000000000000000000000000e+00,   /* r[110] */ 
+    -4.84299753257103948733686138439225032925605773925781e-01, /* logih[110] */ 
+    2.76894400316545187895597055836412754062515893165117e-17, /* logim[110] */ 
+    -1.28196249311567885024568784724802925800328520582323e-33, /* logil[110] */ 
+  } , 
+  { 
+    1.39509582519531250000000000000000000000000000000000e+00,   /* r[111] */ 
+    -4.80364220108999595559851059078937396407127380371094e-01, /* logih[111] */ 
+    1.60772577856827581149848485565219950146355948388194e-17, /* logim[111] */ 
+    -6.33909180037348533226128939381564653515346318497266e-34, /* logil[111] */ 
+  } , 
+  { 
+    1.39130401611328125000000000000000000000000000000000e+00,   /* r[112] */ 
+    -4.76437699977644402160592562722740694880485534667969e-01, /* logih[112] */ 
+    3.93777448294044466045455458211156033645576475025704e-18, /* logim[112] */ 
+    3.61421668039083688240729461133241002751658704802140e-35, /* logil[112] */ 
+  } , 
+  { 
+    1.38753318786621093750000000000000000000000000000000e+00,   /* r[113] */ 
+    -4.72522279136534217869325402716640383005142211914062e-01, /* logih[113] */ 
+    1.96035568196414967372784793032251967173332695653211e-18, /* logim[113] */ 
+    -1.17747583658959694655352427302025069169526418930102e-34, /* logil[113] */ 
+  } , 
+  { 
+    1.38378334045410156250000000000000000000000000000000e+00,   /* r[114] */ 
+    -4.68618077280239631043912140739848837256431579589844e-01, /* logih[114] */ 
+    -6.21887814563789414007506165242075506645450300833460e-18, /* logim[114] */ 
+    2.85091055480350088234477660182894618899479782600553e-34, /* logil[114] */ 
+  } , 
+  { 
+    1.38005447387695312500000000000000000000000000000000e+00,   /* r[115] */ 
+    -4.64725214569437938827434209088096395134925842285156e-01, /* logih[115] */ 
+    1.41770874784515407852341959571636665299319020447279e-17, /* logim[115] */ 
+    7.16277267487504881902108530195699095867171533372599e-34, /* logil[115] */ 
+  } , 
+  { 
+    1.37634468078613281250000000000000000000000000000000e+00,   /* r[116] */ 
+    -4.60841812328943278842530162364710122346878051757812e-01, /* logih[116] */ 
+    -4.53322590938932589383322662851218023838002020827810e-18, /* logim[116] */ 
+    -3.00474404192043520651451236027633906276066461510596e-34, /* logil[116] */ 
+  } , 
+  { 
+    1.37265396118164062500000000000000000000000000000000e+00,   /* r[117] */ 
+    -4.56967975515349844606305396155221387743949890136719e-01, /* logih[117] */ 
+    -2.33094358634200721377135368497958427964300301497283e-17, /* logim[117] */ 
+    9.88425626506853222061479506529364782400408771511375e-34, /* logil[117] */ 
+  } , 
+  { 
+    1.36898422241210937500000000000000000000000000000000e+00,   /* r[118] */ 
+    -4.53105819584143920675245453821844421327114105224609e-01, /* logih[118] */ 
+    2.01510616322289821386139052884185780607827719984300e-18, /* logim[118] */ 
+    6.02181671552856437268832796139799348494799893689780e-35, /* logil[118] */ 
+  } , 
+  { 
+    1.36533355712890625000000000000000000000000000000000e+00,   /* r[119] */ 
+    -4.49253451092882338802070307792746461927890777587891e-01, /* logih[119] */ 
+    8.23312641185804722064182220776569229058888742494964e-18, /* logim[119] */ 
+    3.51720183694942905373021695760046871719134069706073e-34, /* logil[119] */ 
+  } , 
+  { 
+    1.36170196533203125000000000000000000000000000000000e+00,   /* r[120] */ 
+    -4.45410976339701503157186834869207814335823059082031e-01, /* logih[120] */ 
+    -1.08977418015840362022538949472279372016122627370204e-17, /* logim[120] */ 
+    6.97295970316695053124005231434035931338517048339577e-34, /* logil[120] */ 
+  } , 
+  { 
+    1.35808944702148437500000000000000000000000000000000e+00,   /* r[121] */ 
+    -4.41578502060277766627649498332175426185131072998047e-01, /* logih[121] */ 
+    -2.36601424071700836766138911811129382339795814666297e-18, /* logim[121] */ 
+    -8.33576574128057056240434241376128274787476967696058e-35, /* logil[121] */ 
+  } , 
+  { 
+    1.35449790954589843750000000000000000000000000000000e+00,   /* r[122] */ 
+    -4.37758166969168582838278780400287359952926635742188e-01, /* logih[122] */ 
+    2.32683708630670947650076997142659873229215752583714e-17, /* logim[122] */ 
+    -4.15560143754890940120352265317471333960877272565937e-34, /* logil[122] */ 
+  } , 
+  { 
+    1.35092353820800781250000000000000000000000000000000e+00,   /* r[123] */ 
+    -4.33946020947943322809692290320526808500289916992188e-01, /* logih[123] */ 
+    -6.30929577529820412721860253954307086992044476041831e-19, /* logim[123] */ 
+    3.79819606716958067883014408281063348020187639876938e-35, /* logil[123] */ 
+  } , 
+  { 
+    1.34736824035644531250000000000000000000000000000000e+00,   /* r[124] */ 
+    -4.30144198188556980966268383781425654888153076171875e-01, /* logih[124] */ 
+    1.71683205857569655573934637457594450429113050785555e-17, /* logim[124] */ 
+    7.29043201113051662805038181720083419974138092701628e-34, /* logil[124] */ 
+  } , 
+  { 
+    1.34383201599121093750000000000000000000000000000000e+00,   /* r[125] */ 
+    -4.26352807132220124053390009066788479685783386230469e-01, /* logih[125] */ 
+    8.26061049860036128096500446845868042685767901578105e-18, /* logim[125] */ 
+    4.84223346776956637948090236698054613852109689623963e-35, /* logil[125] */ 
+  } , 
+  { 
+    1.34031486511230468750000000000000000000000000000000e+00,   /* r[126] */ 
+    -4.22571956634882506254058398553752340376377105712891e-01, /* logih[126] */ 
+    2.21190566670722703461840612616380011243743333737306e-17, /* logim[126] */ 
+    1.14896204572710075326698165510345911361717606050114e-33, /* logil[126] */ 
+  } , 
+  { 
+    1.33681488037109375000000000000000000000000000000000e+00,   /* r[127] */ 
+    -4.18799697546823501692614399871672503650188446044922e-01, /* logih[127] */ 
+    3.41599526072994406508033857887135558854814373525867e-18, /* logim[127] */ 
+    1.61801446193077496556464113278472787123475795694267e-34, /* logil[127] */ 
+  } , 
+  { 
+    1.33333396911621093750000000000000000000000000000000e+00,   /* r[128] */ 
+    -4.15038187209283260248326996588730253279209136962891e-01, /* logih[128] */ 
+    5.85238726764280271365110933546070366526501739862427e-18, /* logim[128] */ 
+    -2.45528134121210933969132173699021927099228584364359e-34, /* logil[128] */ 
+  } , 
+  { 
+    1.32987022399902343750000000000000000000000000000000e+00,   /* r[129] */ 
+    -4.11285466532431642772138502550660632550716400146484e-01, /* logih[129] */ 
+    1.83565181086895727239354318438705255980398036076305e-17, /* logim[129] */ 
+    -1.44829162356744238484324099870150480074671457391215e-34, /* logil[129] */ 
+  } , 
+  { 
+    1.32642555236816406250000000000000000000000000000000e+00,   /* r[130] */ 
+    -4.07543704406910789472817668865900486707687377929688e-01, /* logih[130] */ 
+    7.10235884116823704612718576916821308079422777996548e-18, /* logim[130] */ 
+    -3.80158777039570620950910438941465328615623287437883e-34, /* logil[130] */ 
+  } , 
+  { 
+    1.32299804687500000000000000000000000000000000000000e+00,   /* r[131] */ 
+    -4.03810931786029114753944213589420542120933532714844e-01, /* logih[131] */ 
+    -1.93041149309406226539378039674180224095823991324562e-17, /* logim[131] */ 
+    -6.48369386828220195024391999791810414893637949753662e-34, /* logil[131] */ 
+  } , 
+  { 
+    1.31958770751953125000000000000000000000000000000000e+00,   /* r[132] */ 
+    -4.00087243804195191732020475683384574949741363525391e-01, /* logih[132] */ 
+    2.89502375830776532785152499054923847834329794887170e-18, /* logim[132] */ 
+    3.93222273610552470790411012589691255020379298257710e-35, /* logil[132] */ 
+  } , 
+  { 
+    1.31619453430175781250000000000000000000000000000000e+00,   /* r[133] */ 
+    -3.96372735981224799672872904920950531959533691406250e-01, /* logih[133] */ 
+    3.60172691524424563925914502416059579856197691514466e-18, /* logim[133] */ 
+    -1.20158940511610546308573928507645976530296896406609e-34, /* logil[133] */ 
+  } , 
+  { 
+    1.31282043457031250000000000000000000000000000000000e+00,   /* r[134] */ 
+    -3.92669600259061335467691833400749601423740386962891e-01, /* logih[134] */ 
+    1.93341846112285731515865124079144232548548539073023e-17, /* logim[134] */ 
+    9.57937519914959684169918849813293673245644163903024e-34, /* logil[134] */ 
+  } , 
+  { 
+    1.30946350097656250000000000000000000000000000000000e+00,   /* r[135] */ 
+    -3.88975847627444304421828746853861957788467407226562e-01, /* logih[135] */ 
+    3.58737691022243699966445076948412264467756073807198e-18, /* logim[135] */ 
+    -6.34256172069676302574983465348800715277257535337860e-35, /* logil[135] */ 
+  } , 
+  { 
+    1.30612182617187500000000000000000000000000000000000e+00,   /* r[136] */ 
+    -3.85289467954024300588855567184509709477424621582031e-01, /* logih[136] */ 
+    -1.78035364405942478618622742807600593390557301297535e-17, /* logim[136] */ 
+    1.17850158702046574289759352582101206794867193878284e-33, /* logil[136] */ 
+  } , 
+  { 
+    1.30279922485351562500000000000000000000000000000000e+00,   /* r[137] */ 
+    -3.81614766464260513068040836515137925744056701660156e-01, /* logih[137] */ 
+    2.71673376063405867104437219707745590226184712176125e-17, /* logim[137] */ 
+    1.69029691017588123460454883011389181316638787275286e-34, /* logil[137] */ 
+  } , 
+  { 
+    1.29949188232421875000000000000000000000000000000000e+00,   /* r[138] */ 
+    -3.77947621599900140942907000862760469317436218261719e-01, /* logih[138] */ 
+    -1.23014367483561633748866777916981619679184303004036e-17, /* logim[138] */ 
+    6.08355261096735838824466189133147806184918981423043e-34, /* logil[138] */ 
+  } , 
+  { 
+    1.29620170593261718750000000000000000000000000000000e+00,   /* r[139] */ 
+    -3.74290237902951461457234927365789189934730529785156e-01, /* logih[139] */ 
+    5.12028570979627947467233714003700900250465944855234e-18, /* logim[139] */ 
+    -7.18774911143147425103526075484104021221318133467838e-35, /* logil[139] */ 
+  } , 
+  { 
+    1.29292869567871093750000000000000000000000000000000e+00,   /* r[140] */ 
+    -3.70642713487464359189971219166181981563568115234375e-01, /* logih[140] */ 
+    -3.62882160448161069817531404328334713231193347048715e-18, /* logim[140] */ 
+    3.44993361798375847334078483327966754606152885070616e-34, /* logil[140] */ 
+  } , 
+  { 
+    1.28967285156250000000000000000000000000000000000000e+00,   /* r[141] */ 
+    -3.67005146822302952269723164135939441621303558349609e-01, /* logih[141] */ 
+    1.65005650962521207026407651865843985133165811425788e-17, /* logim[141] */ 
+    5.91047470268282047973730611955174472735945862101340e-34, /* logil[141] */ 
+  } , 
+  { 
+    1.28643226623535156250000000000000000000000000000000e+00,   /* r[142] */ 
+    -3.63375497694418791994053208327386528253555297851562e-01, /* logih[142] */ 
+    7.55315421152055178681914500647362519327258619048632e-18, /* logim[142] */ 
+    4.21306551291527090995179817572489429320996105009542e-34, /* logil[142] */ 
+  } , 
+  { 
+    1.28320884704589843750000000000000000000000000000000e+00,   /* r[143] */ 
+    -3.59755993558560860368089606708963401615619659423828e-01, /* logih[143] */ 
+    2.63438906908873597795987370422038765478538518071631e-17, /* logim[143] */ 
+    -5.30377956355563946242119261708497493118965065157578e-34, /* logil[143] */ 
+  } , 
+  { 
+    1.28000068664550781250000000000000000000000000000000e+00,   /* r[144] */ 
+    -3.56144584146996623363889966640272177755832672119141e-01, /* logih[144] */ 
+    1.84288871644476152525450190682980250615827933483764e-17, /* logim[144] */ 
+    -2.68882850166617068062129216508822868733174909720115e-34, /* logil[144] */ 
+  } , 
+  { 
+    1.27680778503417968750000000000000000000000000000000e+00,   /* r[145] */ 
+    -3.52541353192291462281815483947866596281528472900391e-01, /* logih[145] */ 
+    6.10296193683269704536448210556558136989473744080234e-18, /* logim[145] */ 
+    2.08807753798353788586668668478566842671399016888175e-34, /* logil[145] */ 
+  } , 
+  { 
+    1.27363204956054687500000000000000000000000000000000e+00,   /* r[146] */ 
+    -3.48948545297196932590821916164713911712169647216797e-01, /* logih[146] */ 
+    -8.65980325947033784931501249514555272578815826796687e-18, /* logim[146] */ 
+    -5.80551069749146700308305149939969738912023055923091e-34, /* logil[146] */ 
+  } , 
+  { 
+    1.27047157287597656250000000000000000000000000000000e+00,   /* r[147] */ 
+    -3.45364095084557620740639549694606103003025054931641e-01, /* logih[147] */ 
+    -2.20359930641039442061906126368732543917103383835287e-17, /* logim[147] */ 
+    5.25544112497915932563320135615380577517633877609112e-34, /* logil[147] */ 
+  } , 
+  { 
+    1.26732635498046875000000000000000000000000000000000e+00,   /* r[148] */ 
+    -3.41788087291514053323027155784075148403644561767578e-01, /* logih[148] */ 
+    1.60590761637741619238785912450262223376577693103413e-17, /* logim[148] */ 
+    6.20932254992098893431701251479794933091514543510527e-34, /* logil[148] */ 
+  } , 
+  { 
+    1.26419830322265625000000000000000000000000000000000e+00,   /* r[149] */ 
+    -3.38222783638829349595056328325881622731685638427734e-01, /* logih[149] */ 
+    -7.25934908657137387104187166197193711352219562279959e-19, /* logim[149] */ 
+    -7.33518955628645774542681475658185145551343791889460e-36, /* logil[149] */ 
+  } , 
+  { 
+    1.26108360290527343750000000000000000000000000000000e+00,   /* r[150] */ 
+    -3.34663921581079604194997045851778239011764526367188e-01, /* logih[150] */ 
+    2.58775470575103710441675607573318821075159943052076e-17, /* logim[150] */ 
+    2.52692281388567773158078403820428589058070685814554e-35, /* logil[150] */ 
+  } , 
+  { 
+    1.25798606872558593750000000000000000000000000000000e+00,   /* r[151] */ 
+    -3.31115945514659559822945311680086888372898101806641e-01, /* logih[151] */ 
+    -1.88333140638890303027893990821579263359866325365640e-17, /* logim[151] */ 
+    -2.42862233896785521070263301233188993094792416528478e-34, /* logil[151] */ 
+  } , 
+  { 
+    1.25490188598632812500000000000000000000000000000000e+00,   /* r[152] */ 
+    -3.27574572037176436900551834696670994162559509277344e-01, /* logih[152] */ 
+    2.07539785395888161822620697150340485723327148173244e-17, /* logim[152] */ 
+    -1.23548121878231629330640725541259206553802467565088e-33, /* logil[152] */ 
+  } , 
+  { 
+    1.25183296203613281250000000000000000000000000000000e+00,   /* r[153] */ 
+    -3.24042069523512776818563452252419665455818176269531e-01, /* logih[153] */ 
+    -2.19005007906502743142091460775759087075823478365805e-17, /* logim[153] */ 
+    -9.37037260965326332974189985014675959956434500415796e-34, /* logil[153] */ 
+  } , 
+  { 
+    1.24878120422363281250000000000000000000000000000000e+00,   /* r[154] */ 
+    -3.20520728160823831220938018304877914488315582275391e-01, /* logih[154] */ 
+    8.84664087846507870804592874874264782111036297675925e-18, /* logim[154] */ 
+    -2.79501394783314300402799429396176544077241557582655e-34, /* logil[154] */ 
+  } , 
+  { 
+    1.24574279785156250000000000000000000000000000000000e+00,   /* r[155] */ 
+    -3.17006233235677392645612826527212746441364288330078e-01, /* logih[155] */ 
+    -2.11397414280339689746407608887976410350376395394685e-17, /* logim[155] */ 
+    3.03479113171805714055168835565789961369331896831913e-34, /* logil[155] */ 
+  } , 
+  { 
+    1.24271774291992187500000000000000000000000000000000e+00,   /* r[156] */ 
+    -3.13498655898958755727790048695169389247894287109375e-01, /* logih[156] */ 
+    2.26105586296044525095947242798100200767794657136581e-17, /* logim[156] */ 
+    2.60892976305499386383284257219701588877405462281587e-34, /* logil[156] */ 
+  } , 
+  { 
+    1.23970985412597656250000000000000000000000000000000e+00,   /* r[157] */ 
+    -3.10002506907223029930520397101645357906818389892578e-01, /* logih[157] */ 
+    -2.12074655036622140523873009541587371919611130881289e-17, /* logim[157] */ 
+    7.30831854753703044634898432991347385046726141750071e-34, /* logil[157] */ 
+  } , 
+  { 
+    1.23671531677246093750000000000000000000000000000000e+00,   /* r[158] */ 
+    -3.06513440210500087701461779943201690912246704101562e-01, /* logih[158] */ 
+    2.12840943277243056092775928647435125404474364580951e-17, /* logim[158] */ 
+    7.25047508544774410393782565061654912871065991425794e-34, /* logil[158] */ 
+  } , 
+  { 
+    1.23373413085937500000000000000000000000000000000000e+00,   /* r[159] */ 
+    -3.03031527860823046705007755008409731090068817138672e-01, /* logih[159] */ 
+    -1.17964490716782890686396740199564245489484684608012e-17, /* logim[159] */ 
+    -2.32059444003387543097602750801495580204955378385700e-34, /* logil[159] */ 
+  } , 
+  { 
+    1.23077011108398437500000000000000000000000000000000e+00,   /* r[160] */ 
+    -2.99561313754444002999122176333912648260593414306641e-01, /* logih[160] */ 
+    2.11014025619190086202004124493478829824043549375509e-17, /* logim[160] */ 
+    5.40038404420639021176237530552511419095691650926683e-34, /* logil[160] */ 
+  } , 
+  { 
+    1.22781753540039062500000000000000000000000000000000e+00,   /* r[161] */ 
+    -2.96096179330254616335338369026430882513523101806641e-01, /* logih[161] */ 
+    2.67263979507576883549661537337697767383852090911653e-17, /* logim[161] */ 
+    -2.94764943000919117463056963543943525405460259854793e-34, /* logil[161] */ 
+  } , 
+  { 
+    1.22488021850585937500000000000000000000000000000000e+00,   /* r[162] */ 
+    -2.92640674438622072628390924364794045686721801757812e-01, /* logih[162] */ 
+    1.71594867435767387701491785234936424743342309564339e-17, /* logim[162] */ 
+    -1.31007554480643933015058741413754044981377681619902e-33, /* logil[162] */ 
+  } , 
+  { 
+    1.22195625305175781250000000000000000000000000000000e+00,   /* r[163] */ 
+    -2.89192636519142565187934224013588391244411468505859e-01, /* logih[163] */ 
+    -2.18230480089953441152115749431697227603316223085319e-19, /* logim[163] */ 
+    -8.85466907005428204234103766898640792692944423628476e-36, /* logil[163] */ 
+  } , 
+  { 
+    1.21904754638671875000000000000000000000000000000000e+00,   /* r[164] */ 
+    -2.85754396342549343845718112788745202124118804931641e-01, /* logih[164] */ 
+    -2.52426324464082956234588408195190742914473546506648e-17, /* logim[164] */ 
+    1.40869584178453690304836821378162094545489911118516e-33, /* logil[164] */ 
+  } , 
+  { 
+    1.21615219116210937500000000000000000000000000000000e+00,   /* r[165] */ 
+    -2.82323781162987341719627920610946603119373321533203e-01, /* logih[165] */ 
+    -2.26062338879282363134318310278758951570998177822355e-17, /* logim[165] */ 
+    -2.68106389298437671467414029735971090503255483828766e-34, /* logil[165] */ 
+  } , 
+  { 
+    1.21327018737792968750000000000000000000000000000000e+00,   /* r[166] */ 
+    -2.78900865037392253764636507185059599578380584716797e-01, /* logih[166] */ 
+    -5.63339187198014524317590270324119375314418005110616e-18, /* logim[166] */ 
+    5.21040627963337134602368749859442018659641934000068e-35, /* logil[166] */ 
+  } , 
+  { 
+    1.21040153503417968750000000000000000000000000000000e+00,   /* r[167] */ 
+    -2.75485722297818480530651186199975199997425079345703e-01, /* logih[167] */ 
+    1.00075444298865318738580890792735678874884353310639e-17, /* logim[167] */ 
+    -4.47816459623451897434280578394151285127126954784303e-34, /* logil[167] */ 
+  } , 
+  { 
+    1.20754623413085937500000000000000000000000000000000e+00,   /* r[168] */ 
+    -2.72078427549137136232104694499867036938667297363281e-01, /* logih[168] */ 
+    2.72560475587786773498503956757053623040042693331146e-17, /* logim[168] */ 
+    1.45218948063688621997250686619739825113781997475216e-33, /* logil[168] */ 
+  } , 
+  { 
+    1.20470619201660156250000000000000000000000000000000e+00,   /* r[169] */ 
+    -2.68681339812479158535296619447763077914714813232422e-01, /* logih[169] */ 
+    5.70669740727466907072711072058064597445179109382518e-19, /* logim[169] */ 
+    3.22286121745779380928448151900341840625477392480707e-35, /* logil[169] */ 
+  } , 
+  { 
+    1.20187759399414062500000000000000000000000000000000e+00,   /* r[170] */ 
+    -2.65289971315308126253995624210801906883716583251953e-01, /* logih[170] */ 
+    -9.85570591393311591325758586976559232082321294112761e-18, /* logim[170] */ 
+    4.70169173751465081907550999286196624093375291125429e-34, /* logil[170] */ 
+  } , 
+  { 
+    1.19906234741210937500000000000000000000000000000000e+00,   /* r[171] */ 
+    -2.61906676236464963647421200221288017928600311279297e-01, /* logih[171] */ 
+    2.11725501817603632855204088733430972661848669245281e-17, /* logim[171] */ 
+    -4.34447783947526009842327436452242187031752585481265e-34, /* logil[171] */ 
+  } , 
+  { 
+    1.19626235961914062500000000000000000000000000000000e+00,   /* r[172] */ 
+    -2.58533830516213369854483516974141821265220642089844e-01, /* logih[172] */ 
+    6.68433683242387216829190215856985521381580367248536e-18, /* logim[172] */ 
+    1.47308049080021740635607084979003827052572897235269e-34, /* logil[172] */ 
+  } , 
+  { 
+    1.19347381591796875000000000000000000000000000000000e+00,   /* r[173] */ 
+    -2.55166914924355725524662830139277502894401550292969e-01, /* logih[173] */ 
+    8.59194265653184494493651707567219919844164634345398e-18, /* logim[173] */ 
+    -5.71296827813717896996055631958626046207607829073074e-34, /* logil[173] */ 
+  } , 
+  { 
+    1.19069862365722656250000000000000000000000000000000e+00,   /* r[174] */ 
+    -2.51808300544058893954968425532570108771324157714844e-01, /* logih[174] */ 
+    -1.41914360009177510586369575931064612468930448614148e-17, /* logim[174] */ 
+    -1.62403247278609196179609602276489322075073469608800e-34, /* logil[174] */ 
+  } , 
+  { 
+    1.18793487548828125000000000000000000000000000000000e+00,   /* r[175] */ 
+    -2.48455747430406659326251883612712845206260681152344e-01, /* logih[175] */ 
+    -1.01487704576317129292387756236812830284397429666783e-17, /* logim[175] */ 
+    -2.33655220085162222996740706004887790768032744693521e-34, /* logil[175] */ 
+  } , 
+  { 
+    1.18518447875976562500000000000000000000000000000000e+00,   /* r[176] */ 
+    -2.45111637923020875273749652478727512061595916748047e-01, /* logih[176] */ 
+    7.90027454939177726382780718024180385506006420479963e-18, /* logim[176] */ 
+    -7.12630269915217131628005874908549382719132579907736e-34, /* logil[176] */ 
+  } , 
+  { 
+    1.18244743347167968750000000000000000000000000000000e+00,   /* r[177] */ 
+    -2.41776048972363183375833273203170392662286758422852e-01, /* logih[177] */ 
+    -1.37983625208326204093508338414984840931706541381331e-17, /* logim[177] */ 
+    7.20097580628563544454377572306403550061149741436607e-34, /* logil[177] */ 
+  } , 
+  { 
+    1.17972373962402343750000000000000000000000000000000e+00,   /* r[178] */ 
+    -2.38449057776214834447614521195646375417709350585938e-01, /* logih[178] */ 
+    1.09262391873895283755849310197040950453513559131684e-17, /* logim[178] */ 
+    5.19474724393747239275281177964830169009947097965027e-34, /* logil[178] */ 
+  } , 
+  { 
+    1.17701148986816406250000000000000000000000000000000e+00,   /* r[179] */ 
+    -2.35128403889451498276486063332413323223590850830078e-01, /* logih[179] */ 
+    -2.20620458531834175679580996316363151867859051514489e-18, /* logim[179] */ 
+    9.83810838200669124655236613392658820366639819033369e-35, /* logil[179] */ 
+  } , 
+  { 
+    1.17431259155273437500000000000000000000000000000000e+00,   /* r[180] */ 
+    -2.31816492140433955126965770432434510439634323120117e-01, /* logih[180] */ 
+    2.57100775389850524221489812836912330014517778962947e-18, /* logim[180] */ 
+    1.00374417119546455021964629408545038692958060180549e-34, /* logil[180] */ 
+  } , 
+  { 
+    1.17162513732910156250000000000000000000000000000000e+00,   /* r[181] */ 
+    -2.28511051821717880994100369207444600760936737060547e-01, /* logih[181] */ 
+    9.92032628735403930510124467196382166156697723468760e-18, /* logim[181] */ 
+    6.81523716295691040818680683845702798454513605818654e-35, /* logil[181] */ 
+  } , 
+  { 
+    1.16894912719726562500000000000000000000000000000000e+00,   /* r[182] */ 
+    -2.25212144978847061960181008544168435037136077880859e-01, /* logih[182] */ 
+    -1.16073487380474294909629845428878875053786683626167e-17, /* logim[182] */ 
+    1.99595089821539122107001863565030748851109328863471e-34, /* logil[182] */ 
+  } , 
+  { 
+    1.16628646850585937500000000000000000000000000000000e+00,   /* r[183] */ 
+    -2.21922193282795110480520861528930254280567169189453e-01, /* logih[183] */ 
+    -3.05125287362116491328592101654681002471500301574214e-18, /* logim[183] */ 
+    1.83193994791768071092494646800366992102561399372769e-34, /* logil[183] */ 
+  } , 
+  { 
+    1.16363716125488281250000000000000000000000000000000e+00,   /* r[184] */ 
+    -2.18641275375243943068781504734943155199289321899414e-01, /* logih[184] */ 
+    8.35804667506368175331097204734558341794896033630962e-18, /* logim[184] */ 
+    -6.76361847971404643554720269553322140862967487333475e-34, /* logil[184] */ 
+  } , 
+  { 
+    1.16099739074707031250000000000000000000000000000000e+00,   /* r[185] */ 
+    -2.15364729860247627879488163671339862048625946044922e-01, /* logih[185] */ 
+    6.95092875909142621207400674633981711651172609645792e-20, /* logim[185] */ 
+    -2.69634411814059745570417391670366760873171411634907e-36, /* logil[185] */ 
+  } , 
+  { 
+    1.15837097167968750000000000000000000000000000000000e+00,   /* r[186] */ 
+    -2.12097354617240441143621865194290876388549804687500e-01, /* logih[186] */ 
+    3.94012228039531281835195940112690671816259833936964e-18, /* logim[186] */ 
+    2.35523503821099524557043963050386917863396604377712e-34, /* logil[186] */ 
+  } , 
+  { 
+    1.15575599670410156250000000000000000000000000000000e+00,   /* r[187] */ 
+    -2.08836848096523530760038056541816331446170806884766e-01, /* logih[187] */ 
+    7.10684410301031817893241287396550439057323196953174e-18, /* logim[187] */ 
+    4.17638182387052934717199646329356631335921484531446e-34, /* logil[187] */ 
+  } , 
+  { 
+    1.15315246582031250000000000000000000000000000000000e+00,   /* r[188] */ 
+    -2.05583273736383437269026330795895773917436599731445e-01, /* logih[188] */ 
+    -1.11541224825735129654072863667548382180433494970388e-17, /* logim[188] */ 
+    2.60702460469050167439470691373935621310497497561972e-34, /* logil[188] */ 
+  } , 
+  { 
+    1.15056228637695312500000000000000000000000000000000e+00,   /* r[189] */ 
+    -2.02339086834303488737774046057893428951501846313477e-01, /* logih[189] */ 
+    -8.06133178191867723913541186137675666224522328881259e-18, /* logim[189] */ 
+    4.69018902441109377621277031182321899995757079990517e-34, /* logil[189] */ 
+  } , 
+  { 
+    1.14798164367675781250000000000000000000000000000000e+00,   /* r[190] */ 
+    -1.99099573382730848924992983484116848558187484741211e-01, /* logih[190] */ 
+    -7.82936742512703344110788328637397546846483342009157e-18, /* logim[190] */ 
+    5.23473869269106466321035297990759170076861208106171e-34, /* logil[190] */ 
+  } , 
+  { 
+    1.14541435241699218750000000000000000000000000000000e+00,   /* r[191] */ 
+    -1.95869586130290290748590109615179244428873062133789e-01, /* logih[191] */ 
+    1.12134985887404327493969118908772924959105352074790e-17, /* logim[191] */ 
+    1.66886450547656745631907524196364853864087335213403e-34, /* logil[191] */ 
+  } , 
+  { 
+    1.14285659790039062500000000000000000000000000000000e+00,   /* r[192] */ 
+    -1.92644390011628419134837031378992833197116851806641e-01, /* logih[192] */ 
+    -6.69952429363159445722018187914913034715067412521068e-18, /* logim[192] */ 
+    8.89381602231133611911957806790376785637357399200603e-35, /* logil[192] */ 
+  } , 
+  { 
+    1.14031219482421875000000000000000000000000000000000e+00,   /* r[193] */ 
+    -1.89428859708889563151501533866394311189651489257812e-01, /* logih[193] */ 
+    5.59630837119075206491413698162738631266398718359305e-18, /* logim[193] */ 
+    -4.99136387936431477565418774749623903558226749832454e-35, /* logil[193] */ 
+  } , 
+  { 
+    1.13777732849121093750000000000000000000000000000000e+00,   /* r[194] */ 
+    -1.86218239090319481743307505894335918128490447998047e-01, /* logih[194] */ 
+    3.78774956212100823689526329408930405128821433232626e-18, /* logim[194] */ 
+    -3.17758760986685144372998527475489364873340117319014e-34, /* logil[194] */ 
+  } , 
+  { 
+    1.13525581359863281250000000000000000000000000000000e+00,   /* r[195] */ 
+    -1.83017424763517094765674642076191958039999008178711e-01, /* logih[195] */ 
+    5.87157335095818829027440258888705251018885949838258e-18, /* logim[195] */ 
+    -2.54192655149641158852181857283167049817204136167821e-34, /* logil[195] */ 
+  } , 
+  { 
+    1.13274383544921875000000000000000000000000000000000e+00,   /* r[196] */ 
+    -1.79821639523964738049954803500440903007984161376953e-01, /* logih[196] */ 
+    8.22302301209080640417647229353398001438134544835098e-19, /* logim[196] */ 
+    -2.52039332892153569817641206709892948549663624549042e-35, /* logil[196] */ 
+  } , 
+  { 
+    1.13024330139160156250000000000000000000000000000000e+00,   /* r[197] */ 
+    -1.76633367267372942688297143831732682883739471435547e-01, /* logih[197] */ 
+    -1.91571353469448596640611671435274648642190311723695e-18, /* logim[197] */ 
+    -1.21134793249841109085003066519453210454870699339190e-34, /* logil[197] */ 
+  } , 
+  { 
+    1.12775421142578125000000000000000000000000000000000e+00,   /* r[198] */ 
+    -1.73452673591511286055322216270724311470985412597656e-01, /* logih[198] */ 
+    5.21283885301191031368646131342662533975361117947090e-18, /* logim[198] */ 
+    -1.01368643659769709343563840800327590720656486827318e-34, /* logil[198] */ 
+  } , 
+  { 
+    1.12527465820312500000000000000000000000000000000000e+00,   /* r[199] */ 
+    -1.70277178922613403599939374544192105531692504882812e-01, /* logih[199] */ 
+    1.34546625256560311153005432906921643689472370072641e-17, /* logim[199] */ 
+    -2.01787346631624515685039191465892766058891822659738e-34, /* logil[199] */ 
+  } , 
+  { 
+    1.12280654907226562500000000000000000000000000000000e+00,   /* r[200] */ 
+    -1.67109383895854723967033805820392444729804992675781e-01, /* logih[200] */ 
+    -6.60161109774567977756253155335787084419173665974265e-18, /* logim[200] */ 
+    -5.20727010500155857942441424119648973967213145273875e-35, /* logil[200] */ 
+  } , 
+  { 
+    1.12034988403320312500000000000000000000000000000000e+00,   /* r[201] */ 
+    -1.63949354721177775751073113497113808989524841308594e-01, /* logih[201] */ 
+    -1.59075426091945659534123359515275496742329136677793e-18, /* logim[201] */ 
+    -8.80061355388662086427482764107757767132081769249868e-35, /* logil[201] */ 
+  } , 
+  { 
+    1.11790466308593750000000000000000000000000000000000e+00,   /* r[202] */ 
+    -1.60797157807325702405520928550686221569776535034180e-01, /* logih[202] */ 
+    -1.27882485432659989407998658585334380471532522122288e-17, /* logim[202] */ 
+    -1.78908761080882243046115883816432632406586944308380e-34, /* logil[202] */ 
+  } , 
+  { 
+    1.11546897888183593750000000000000000000000000000000e+00,   /* r[203] */ 
+    -1.57650392886728163421850013037328608334064483642578e-01, /* logih[203] */ 
+    5.48897678434671628772441349557697552667538441741952e-19, /* logim[203] */ 
+    -6.79258603184423299240762713680989948394024184442684e-36, /* logil[203] */ 
+  } , 
+  { 
+    1.11304283142089843750000000000000000000000000000000e+00,   /* r[204] */ 
+    -1.54509110639958202604304915439570322632789611816406e-01, /* logih[204] */ 
+    -3.59136851163677714278758679380160119258917626559671e-19, /* logim[204] */ 
+    -1.56974154580554013761421709836383374626199071205828e-35, /* logil[204] */ 
+  } , 
+  { 
+    1.11062812805175781250000000000000000000000000000000e+00,   /* r[205] */ 
+    -1.51375839568216624675400794330926146358251571655273e-01, /* logih[205] */ 
+    1.85511636793595219210186133192591461270305721253330e-18, /* logim[205] */ 
+    -1.91794182494587047847453803902174963816836368421214e-34, /* logil[205] */ 
+  } , 
+  { 
+    1.10822486877441406250000000000000000000000000000000e+00,   /* r[206] */ 
+    -1.48250646865354079873000614497868809849023818969727e-01, /* logih[206] */ 
+    -1.01653072428705486842585428998216576160196054521775e-17, /* logim[206] */ 
+    5.31584010431656413312485980487520698550209333197199e-34, /* logil[206] */ 
+  } , 
+  { 
+    1.10583114624023437500000000000000000000000000000000e+00,   /* r[207] */ 
+    -1.45131111540638235712918913122848607599735260009766e-01, /* logih[207] */ 
+    -1.37520535926702420814491655344493331500786583007547e-17, /* logim[207] */ 
+    -3.12537587519576338142297025257101128398882620659901e-34, /* logil[207] */ 
+  } , 
+  { 
+    1.10344886779785156250000000000000000000000000000000e+00,   /* r[208] */ 
+    -1.42019778794149176270877887873211875557899475097656e-01, /* logih[208] */ 
+    -3.68499044867024074477140873097095881834850367397794e-18, /* logim[208] */ 
+    -1.63017157850342774197009569405883228185646262806831e-34, /* logil[208] */ 
+  } , 
+  { 
+    1.10107612609863281250000000000000000000000000000000e+00,   /* r[209] */ 
+    -1.38914217265857425909203470837383065372705459594727e-01, /* logih[209] */ 
+    -6.17799701560862884451695448882239750612348592334350e-18, /* logim[209] */ 
+    -2.34837262732331600500907295169491998103701955922085e-34, /* logil[209] */ 
+  } , 
+  { 
+    1.09871292114257812500000000000000000000000000000000e+00,   /* r[210] */ 
+    -1.35814478782694425529342652225750498473644256591797e-01, /* logih[210] */ 
+    -1.10878202856006564968015298269391791178600779503105e-17, /* logim[210] */ 
+    -6.34363946747343426901749776771284987530057524263824e-34, /* logil[210] */ 
+  } , 
+  { 
+    1.09635925292968750000000000000000000000000000000000e+00,   /* r[211] */ 
+    -1.32720615355253201972374199613113887608051300048828e-01, /* logih[211] */ 
+    5.00671269578839009481340541432441710674698094423168e-18, /* logim[211] */ 
+    5.65638829687757042763410955571684820831086486484696e-35, /* logil[211] */ 
+  } , 
+  { 
+    1.09401702880859375000000000000000000000000000000000e+00,   /* r[212] */ 
+    -1.29635194425267469275908638337568845599889755249023e-01, /* logih[212] */ 
+    -1.32741790693761805495822031536188642314117707435772e-17, /* logim[212] */ 
+    2.36177367859446952683532192189387042515220366349614e-34, /* logil[212] */ 
+  } , 
+  { 
+    1.09168434143066406250000000000000000000000000000000e+00,   /* r[213] */ 
+    -1.26555763872087861932058672209677752107381820678711e-01, /* logih[213] */ 
+    5.61175210355060094496565624276228808645454542333958e-18, /* logim[213] */ 
+    2.47905722889287266912955785312024516940886239709541e-34, /* logil[213] */ 
+  } , 
+  { 
+    1.08936119079589843750000000000000000000000000000000e+00,   /* r[214] */ 
+    -1.23482376253153572354115397047280566766858100891113e-01, /* logih[214] */ 
+    -5.24860550833652446049807047479312960894536533343032e-18, /* logim[214] */ 
+    1.57303914080610683083254197080760577504337194439462e-34, /* logil[214] */ 
+  } , 
+  { 
+    1.08704948425292968750000000000000000000000000000000e+00,   /* r[215] */ 
+    -1.20417615674669478686986678894754732027649879455566e-01, /* logih[215] */ 
+    4.98589250874990455590729277739610886330195529901588e-19, /* logim[215] */ 
+    -2.77483656505407014767190386581182627944876838144956e-35, /* logil[215] */ 
+  } , 
+  { 
+    1.08474540710449218750000000000000000000000000000000e+00,   /* r[216] */ 
+    -1.17356477685791341092347295216313796117901802062988e-01, /* logih[216] */ 
+    -4.43816803292478642713439762323399536218860906455113e-18, /* logim[216] */ 
+    1.57142075014587982329499427592772686845625881951589e-34, /* logil[216] */ 
+  } , 
+  { 
+    1.08245277404785156250000000000000000000000000000000e+00,   /* r[217] */ 
+    -1.14304083489448829458190459718025522306561470031738e-01, /* logih[217] */ 
+    -2.44497503421640839485178934251442732595447798838524e-18, /* logim[217] */ 
+    9.13177011131237596027512825680515711244107356781889e-35, /* logil[217] */ 
+  } , 
+  { 
+    1.08016967773437500000000000000000000000000000000000e+00,   /* r[218] */ 
+    -1.11257954979794640437695818491192767396569252014160e-01, /* logih[218] */ 
+    3.65465035573521902378371256352169641526181202186019e-18, /* logim[218] */ 
+    3.01033668355988911672661379284389721222632837445285e-34, /* logil[218] */ 
+  } , 
+  { 
+    1.07789421081542968750000000000000000000000000000000e+00,   /* r[219] */ 
+    -1.08215592727541040640737435296614421531558036804199e-01, /* logih[219] */ 
+    -6.38939331108877749140470530072612418291901128036500e-18, /* logim[219] */ 
+    -1.57977443005077752334576053495157374607253022139958e-34, /* logil[219] */ 
+  } , 
+  { 
+    1.07563018798828125000000000000000000000000000000000e+00,   /* r[220] */ 
+    -1.05182150700728491155011568025656742975115776062012e-01, /* logih[220] */ 
+    9.96668646201815079564771481993512113001566815373477e-19, /* logim[220] */ 
+    -8.40901520642174694941917655898657225968386843551730e-35, /* logil[220] */ 
+  } , 
+  { 
+    1.07337570190429687500000000000000000000000000000000e+00,   /* r[221] */ 
+    -1.02155135184729670139169854792271507903933525085449e-01, /* logih[221] */ 
+    9.54331694819518742321529152057292821145759268608888e-19, /* logim[221] */ 
+    8.08375441648303398276921573613512412447286382908005e-35, /* logil[221] */ 
+  } , 
+  { 
+    1.07112884521484375000000000000000000000000000000000e+00,   /* r[222] */ 
+    -9.91320311358910577492764559792703948915004730224609e-02, /* logih[222] */ 
+    -1.15319697956815851305646410589057158513062401209409e-19, /* logim[222] */ 
+    -7.40284620248563691684694048738117565554761996111872e-36, /* logil[222] */ 
+  } , 
+  { 
+    1.06889343261718750000000000000000000000000000000000e+00,   /* r[223] */ 
+    -9.61180252768258497342301893695548642426729202270508e-02, /* logih[223] */ 
+    6.85171092643411485272954560328117638640557421326159e-18, /* logim[223] */ 
+    -1.67824770393390632739991704456259895006309663742546e-34, /* logil[223] */ 
+  } , 
+  { 
+    1.06666755676269531250000000000000000000000000000000e+00,   /* r[224] */ 
+    -9.31106082695352110789599464624188840389251708984375e-02, /* logih[224] */ 
+    -2.26105242874531783782517748931571159031922191193177e-18, /* logim[224] */ 
+    -2.03783945271517638711748368885966194474657481104373e-35, /* logil[224] */ 
+  } , 
+  { 
+    1.06444931030273437500000000000000000000000000000000e+00,   /* r[225] */ 
+    -9.01072494463056178348736580119293648749589920043945e-02, /* logih[225] */ 
+    -5.44728555823394356142980742937673446468666963750632e-18, /* logim[225] */ 
+    1.97413590011115023111162093321380372124491875850575e-34, /* logil[225] */ 
+  } , 
+  { 
+    1.06224060058593750000000000000000000000000000000000e+00,   /* r[226] */ 
+    -8.71105777787103824350012359900574665516614913940430e-02, /* logih[226] */ 
+    -4.43564406369389579389284215323972775263708137166154e-18, /* logim[226] */ 
+    1.70779313126122225936135094173405768955565424909277e-34, /* logil[226] */ 
+  } , 
+  { 
+    1.06004142761230468750000000000000000000000000000000e+00,   /* r[227] */ 
+    -8.41206480365157827083777419829857535660266876220703e-02, /* logih[227] */ 
+    -3.14792226986980839484335841464619768591703354318294e-18, /* logim[227] */ 
+    1.52657062057281535176853536917634594017181918735262e-34, /* logil[227] */ 
+  } , 
+  { 
+    1.05785179138183593750000000000000000000000000000000e+00,   /* r[228] */ 
+    -8.11375151493067964247885015538486186414957046508789e-02, /* logih[228] */ 
+    -6.15912022353230257795364252670116201168948678312527e-18, /* logim[228] */ 
+    -2.16344593340788372463481302845555712130079294383972e-34, /* logil[228] */ 
+  } , 
+  { 
+    1.05566978454589843750000000000000000000000000000000e+00,   /* r[229] */ 
+    -7.81586275943592923010072581746499054133892059326172e-02, /* logih[229] */ 
+    -3.25085161347353548036706096407758727333265699647547e-18, /* logim[229] */ 
+    1.63920542914931230587405015453230564450059005459335e-34, /* logil[229] */ 
+  } , 
+  { 
+    1.05349731445312500000000000000000000000000000000000e+00,   /* r[230] */ 
+    -7.51866364807085019172916418028762564063072204589844e-02, /* logih[230] */ 
+    -2.54870557338844162102455061406383024497892883435493e-18, /* logim[230] */ 
+    -6.59135720018155570156029431794739322327869508222348e-35, /* logil[230] */ 
+  } , 
+  { 
+    1.05133438110351562500000000000000000000000000000000e+00,   /* r[231] */ 
+    -7.22215972120476834561486612074077129364013671875000e-02, /* logih[231] */ 
+    -6.64425227252169993584924920404020380947983762424339e-18, /* logim[231] */ 
+    2.91013479660203574471829316747093985065960871705841e-34, /* logil[231] */ 
+  } , 
+  { 
+    1.04918098449707031250000000000000000000000000000000e+00,   /* r[232] */ 
+    -6.92635653457482070027850795668200589716434478759766e-02, /* logih[232] */ 
+    -4.17058903808438561260436396327171311252509638555115e-18, /* logim[232] */ 
+    3.30755248525805832232280848513964707004463090388921e-34, /* logil[232] */ 
+  } , 
+  { 
+    1.04703521728515625000000000000000000000000000000000e+00,   /* r[233] */ 
+    -6.63099684847409387433714300641440786421298980712891e-02, /* logih[233] */ 
+    -8.74727269069244478292642836141302714118531385326008e-19, /* logim[233] */ 
+    9.13680180722266849670406326820143717312677461406295e-35, /* logil[233] */ 
+  } , 
+  { 
+    1.04489707946777343750000000000000000000000000000000e+00,   /* r[234] */ 
+    -6.33608463694464163484809660076280124485492706298828e-02, /* logih[234] */ 
+    4.88853992059804485610361972971949389543857070116405e-18, /* logim[234] */ 
+    3.59584991557930488620611395470856240222060784881851e-34, /* logil[234] */ 
+  } , 
+  { 
+    1.04277038574218750000000000000000000000000000000000e+00,   /* r[235] */ 
+    -6.04215166113879487141957724816165864467620849609375e-02, /* logih[235] */ 
+    3.24424348086874445666593409656049253578069669395260e-18, /* logim[235] */ 
+    -1.60277475491901208789005491794898884020948020845008e-34, /* logil[235] */ 
+  } , 
+  { 
+    1.04065132141113281250000000000000000000000000000000e+00,   /* r[236] */ 
+    -5.74867630322526829145246551888703834265470504760742e-02, /* logih[236] */ 
+    3.76759687947251899896914839649469366487490379203479e-19, /* logim[236] */ 
+    -2.21494568010334432329216609802290865335331834512200e-35, /* logil[236] */ 
+  } , 
+  { 
+    1.03853988647460937500000000000000000000000000000000e+00,   /* r[237] */ 
+    -5.45566258253886229856455258868663804605603218078613e-02, /* logih[237] */ 
+    -2.65946239302500951789232143661643591976491541288433e-18, /* logim[237] */ 
+    -1.53785481060545545279952344255193134903777587882504e-34, /* logil[237] */ 
+  } , 
+  { 
+    1.03643798828125000000000000000000000000000000000000e+00,   /* r[238] */ 
+    -5.16338003108584853162454919583979062736034393310547e-02, /* logih[238] */ 
+    -2.78795469954967100989074401097287044599854944339982e-18, /* logim[238] */ 
+    -1.49163921524354280847709876358289989763104855468257e-34, /* logil[238] */ 
+  } , 
+  { 
+    1.03434371948242187500000000000000000000000000000000e+00,   /* r[239] */ 
+    -4.87156827428533376056485337812773650512099266052246e-02, /* logih[239] */ 
+    2.96381531361489610816411758109172878093342204001504e-18, /* logim[239] */ 
+    1.90369184844193639243251585798972318425548902746587e-34, /* logil[239] */ 
+  } , 
+  { 
+    1.03225898742675781250000000000000000000000000000000e+00,   /* r[240] */ 
+    -4.58049794824296474526903466539806686341762542724609e-02, /* logih[240] */ 
+    1.62105752345434014647769506007451291849983142737970e-18, /* logim[240] */ 
+    -9.20867893989873723178504588707200553003761945783565e-35, /* logil[240] */ 
+  } , 
+  { 
+    1.03018188476562500000000000000000000000000000000000e+00,   /* r[241] */ 
+    -4.28990763245113357338134107976657105609774589538574e-02, /* logih[241] */ 
+    -6.34003512301982273340105213426264835291352971908960e-19, /* logim[241] */ 
+    -3.19233228551439316201562934283596212957829301138982e-35, /* logil[241] */ 
+  } , 
+  { 
+    1.02811241149902343750000000000000000000000000000000e+00,   /* r[242] */ 
+    -3.99980141873396699558895761583698913455009460449219e-02, /* logih[242] */ 
+    3.46776145155773436838304619563053637896412152479204e-18, /* logim[242] */ 
+    1.18249199307224204078322468557405538276307569138571e-35, /* logil[242] */ 
+  } , 
+  { 
+    1.02605247497558593750000000000000000000000000000000e+00,   /* r[243] */ 
+    -3.71045159850557013103689030231180367991328239440918e-02, /* logih[243] */ 
+    -1.51254314986204784019866874830661020957859050088050e-18, /* logim[243] */ 
+    -4.62897721796816023188344967819483871559574158072420e-35, /* logil[243] */ 
+  } , 
+  { 
+    1.02400016784667968750000000000000000000000000000000e+00,   /* r[244] */ 
+    -3.42159518140385116025115053162153344601392745971680e-02, /* logih[244] */ 
+    -4.20171334566300044079146136535848239242167490849902e-19, /* logim[244] */ 
+    -1.97864138714387435136379874705706366605172130727980e-35, /* logil[244] */ 
+  } , 
+  { 
+    1.02195549011230468750000000000000000000000000000000e+00,   /* r[245] */ 
+    -3.13323630146640427773796488963853335008025169372559e-02, /* logih[245] */ 
+    -1.60932497177386839267872885266206616652634543879907e-18, /* logim[245] */ 
+    -6.28817851293024240545936211571266012891885359494453e-35, /* logil[245] */ 
+  } , 
+  { 
+    1.01992034912109375000000000000000000000000000000000e+00,   /* r[246] */ 
+    -2.84564890448900827124578682969513465650379657745361e-02, /* logih[246] */ 
+    -1.32743413787410314281579343321838041020056743726823e-18, /* logim[246] */ 
+    2.04618286866463010251865131532183144563010428890917e-35, /* logil[246] */ 
+  } , 
+  { 
+    1.01789283752441406250000000000000000000000000000000e+00,   /* r[247] */ 
+    -2.55856842917966814665575725484814029186964035034180e-02, /* logih[247] */ 
+    -1.49154860937761055001848142233043312841087530311649e-18, /* logim[247] */ 
+    2.02599394521852446744073942371740628593627411196085e-35, /* logil[247] */ 
+  } , 
+  { 
+    1.01587295532226562500000000000000000000000000000000e+00,   /* r[248] */ 
+    -2.27199905087555366345331009370056563057005405426025e-02, /* logih[248] */ 
+    1.12960205619839265574985374116680854623969773242666e-18, /* logim[248] */ 
+    -8.34362880258700413677035364508655979450149223832712e-35, /* logil[248] */ 
+  } , 
+  { 
+    1.01386070251464843750000000000000000000000000000000e+00,   /* r[249] */ 
+    -1.98594495836460112336840921898328815586864948272705e-02, /* logih[249] */ 
+    -1.65424881469239763312059082975380380550401132087393e-20, /* logim[249] */ 
+    -1.17360571247672971463309448698886739285461152534205e-36, /* logil[249] */ 
+  } , 
+  { 
+    1.01185798645019531250000000000000000000000000000000e+00,   /* r[250] */ 
+    -1.70068230155151732529983377162352553568780422210693e-02, /* logih[250] */ 
+    1.27516044327499840806046149901955205004460778589711e-19, /* logim[250] */ 
+    -8.52710691967735804583223211101678334615958045143104e-37, /* logil[250] */ 
+  } , 
+  { 
+    1.00986099243164062500000000000000000000000000000000e+00,   /* r[251] */ 
+    -1.41567193815739632983818907518980267923325300216675e-02, /* logih[251] */ 
+    8.65690356839925383828965885125235491000373622359337e-19, /* logim[251] */ 
+    -1.64494399168713442766339462748988626277364551873170e-35, /* logil[251] */ 
+  } , 
+  { 
+    1.00787353515625000000000000000000000000000000000000e+00,   /* r[252] */ 
+    -1.13146252970666803122634647138511354569345712661743e-02, /* logih[252] */ 
+    3.15936714773135871052341883744882960982174189853601e-19, /* logim[252] */ 
+    2.39659922006639309827564391487460990569975332009368e-35, /* logil[252] */ 
+  } , 
+  { 
+    1.00589370727539062500000000000000000000000000000000e+00,   /* r[253] */ 
+    -8.47786370355218220351556368541423580609261989593506e-03, /* logih[253] */ 
+    -9.75735845129809026777533412359789145867559613642986e-20, /* logim[253] */ 
+    -6.04717464355893048249602969326230504905195484152609e-37, /* logil[253] */ 
+  } , 
+  { 
+    1.00392150878906250000000000000000000000000000000000e+00,   /* r[254] */ 
+    -5.64647714981406870921043505973102583084255456924438e-03, /* logih[254] */ 
+    4.32956569441265152083688702413498400247673690133916e-19, /* logim[254] */ 
+    2.23027666862069486060936208535887094361283857129620e-36, /* logil[254] */ 
+  } , 
+  { 
+    1.00195693969726562500000000000000000000000000000000e+00,   /* r[255] */ 
+    -2.82050831346294375231997797470739897107705473899841e-03, /* logih[255] */ 
+    2.66775679488942854129723744389995508483544623376680e-20, /* logim[255] */ 
+    -8.80338525383831336492192061402657740638778525161937e-37, /* logil[255] */ 
+  } }; 
+
+ 
+typedef struct tPi1_t_tag {double hiM1; double hi; double mi; double lo;} tPi1_t;  
+typedef struct tPi2_t_tag {double hi; double mi; double lo;} tPi2_t;  
+static const tPi1_t twoPowerIndex1[32] = {
+  { 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1MOne[0] */ 
+    1.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1hi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1mi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex1lo[0] */ 
+  } , 
+  { 
+    8.46162726943132067255332051658456293807830661535263e-05, /* twoPowerIndex1MOne[1] */ 
+    1.00008461627269440441523329354822635650634765625000e+00, /* twoPowerIndex1hi[1] */ 
+    -9.12125999627646384986052256665186572875345252060450e-17, /* twoPowerIndex1mi[1] */ 
+    3.36755111543914781718517640651013480155414711472518e-33, /* twoPowerIndex1lo[1] */ 
+  } , 
+  { 
+    1.69239705302231071594454281381558757857419550418854e-04, /* twoPowerIndex1MOne[2] */ 
+    1.00016923970530213772178740327944979071617126464844e+00, /* twoPowerIndex1hi[2] */ 
+    9.33618533547846199388179470637929281332443150415515e-17, /* twoPowerIndex1mi[2] */ 
+    3.77297954885090084710073756456287936644477196404411e-33, /* twoPowerIndex1lo[2] */ 
+  } , 
+  { 
+    2.53870298429598856802813511279737213044427335262299e-04, /* twoPowerIndex1MOne[3] */ 
+    1.00025387029842960373571258969604969024658203125000e+00, /* twoPowerIndex1hi[3] */ 
+    -4.89064911953409381305925724006739962094640351616807e-18, /* twoPowerIndex1mi[3] */ 
+    8.69701308333596579376838706167199696373572491739592e-35, /* twoPowerIndex1lo[3] */ 
+  } , 
+  { 
+    3.38508052682312944679093869027042273955885320901871e-04, /* twoPowerIndex1MOne[4] */ 
+    1.00033850805268231809463941317517310380935668945312e+00, /* twoPowerIndex1hi[4] */ 
+    -5.14133393131895706530678267769194263660821897510018e-18, /* twoPowerIndex1mi[4] */ 
+    3.65532984508913994275805274025238001612209382982528e-34, /* twoPowerIndex1lo[4] */ 
+  } , 
+  { 
+    4.23152968666321135839808453837918023054953664541244e-04, /* twoPowerIndex1MOne[5] */ 
+    1.00042315296866624052540828415658324956893920898438e+00, /* twoPowerIndex1hi[5] */ 
+    8.06180631495321395718653515232725600012433502276551e-17, /* twoPowerIndex1mi[5] */ 
+    2.27756032119564512217610282919955584270974037720845e-33, /* twoPowerIndex1lo[5] */ 
+  } , 
+  { 
+    5.07805046987622405244011680736093694576993584632874e-04, /* twoPowerIndex1MOne[6] */ 
+    1.00050780504698755279946453811135143041610717773438e+00, /* twoPowerIndex1hi[6] */ 
+    6.96242402202057255168575283120383384543281723609229e-17, /* twoPowerIndex1mi[6] */ 
+    5.20646484360987194687938744912769762301408608274186e-34, /* twoPowerIndex1lo[6] */ 
+  } , 
+  { 
+    5.92464288252267119033733777655470476020127534866333e-04, /* twoPowerIndex1MOne[7] */ 
+    1.00059246428825221464364858547924086451530456542969e+00, /* twoPowerIndex1hi[7] */ 
+    5.24358776284676541346649133871799377889330385550410e-17, /* twoPowerIndex1mi[7] */ 
+    -1.16401717083964875595275373190622641096721208508067e-33, /* twoPowerIndex1lo[7] */ 
+  } , 
+  { 
+    6.77130693066356655063220415513569605536758899688721e-04, /* twoPowerIndex1MOne[8] */ 
+    1.00067713069306640782940576173132285475730895996094e+00, /* twoPowerIndex1hi[8] */ 
+    -5.11512329768566763581175858027414623025077801052578e-17, /* twoPowerIndex1mi[8] */ 
+    6.98198098827029289611306311409722598417652045670746e-34, /* twoPowerIndex1lo[8] */ 
+  } , 
+  { 
+    7.61804262036044053420236199514192776405252516269684e-04, /* twoPowerIndex1MOne[9] */ 
+    1.00076180426203609208357647730736061930656433105469e+00, /* twoPowerIndex1hi[9] */ 
+    -4.80106395281352797253594357274293799083867247600929e-17, /* twoPowerIndex1mi[9] */ 
+    1.60659089499355510094934148076620501547799589638472e-33, /* twoPowerIndex1lo[9] */ 
+  } , 
+  { 
+    8.46484995767533420114869802119983432930894196033478e-04, /* twoPowerIndex1MOne[10] */ 
+    1.00084648499576744917760606767842546105384826660156e+00, /* twoPowerIndex1hi[10] */ 
+    8.42299002458648658027371639395540881533737558365359e-17, /* twoPowerIndex1mi[10] */ 
+    2.36970468083963275494383447607242933566525306383712e-33, /* twoPowerIndex1lo[10] */ 
+  } , 
+  { 
+    9.31172894867080143919968460153313571936450898647308e-04, /* twoPowerIndex1MOne[11] */ 
+    1.00093117289486710497214971837820485234260559082031e+00, /* twoPowerIndex1hi[11] */ 
+    -2.48518461029926794844540008382519256098178534001306e-17, /* twoPowerIndex1mi[11] */ 
+    1.46302367831163072138631641353266395843931006446965e-33, /* twoPowerIndex1lo[11] */ 
+  } , 
+  { 
+    1.01586795994099100479135522334672714350745081901550e-03, /* twoPowerIndex1MOne[12] */ 
+    1.00101586795994101919404783984646201133728027343750e+00, /* twoPowerIndex1hi[12] */ 
+    -2.82452207477616780689379931990767172214919031737312e-17, /* twoPowerIndex1mi[12] */ 
+    -1.95728551891328398835983018867545661396300096090192e-33, /* twoPowerIndex1lo[12] */ 
+  } , 
+  { 
+    1.10057019159562384860717720869160984875634312629700e-03, /* twoPowerIndex1MOne[13] */ 
+    1.00110057019159559565935069258557632565498352050781e+00, /* twoPowerIndex1hi[13] */ 
+    2.82746405249917066780441808454827762565634907210646e-17, /* twoPowerIndex1mi[13] */ 
+    2.84963022949056029094282669604361292342636089091009e-33, /* twoPowerIndex1lo[13] */ 
+  } , 
+  { 
+    1.18527959043738845452964358884173634578473865985870e-03, /* twoPowerIndex1MOne[14] */ 
+    1.00118527959043746022871346212923526763916015625000e+00, /* twoPowerIndex1hi[14] */ 
+    -7.18042456559213166577815896739695813826899291527385e-17, /* twoPowerIndex1mi[14] */ 
+    -4.76259460142737667571053552520587169925041399888400e-33, /* twoPowerIndex1lo[14] */ 
+  } , 
+  { 
+    1.26999615707274501712198411240706263924948871135712e-03, /* twoPowerIndex1MOne[15] */ 
+    1.00126999615707279467358148394851014018058776855469e+00, /* twoPowerIndex1hi[15] */ 
+    -4.95925540000318718201054702131568017537484907271764e-17, /* twoPowerIndex1mi[15] */ 
+    1.38114240085784279494535821521711378076084168967947e-33, /* twoPowerIndex1lo[15] */ 
+  } , 
+  { 
+    1.35471989210820577265170783221037709154188632965088e-03, /* twoPowerIndex1MOne[16] */ 
+    1.00135471989210822485460994357708841562271118164062e+00, /* twoPowerIndex1hi[16] */ 
+    -1.89737284167929933536294189134998232481318340155287e-17, /* twoPowerIndex1mi[16] */ 
+    -1.14644761608474571162584330231223616391499645510675e-34, /* twoPowerIndex1lo[16] */ 
+  } , 
+  { 
+    1.43945079615033413172886511688375321682542562484741e-03, /* twoPowerIndex1MOne[17] */ 
+    1.00143945079615037663245402654865756630897521972656e+00, /* twoPowerIndex1hi[17] */ 
+    -4.25104299595813332360330451324069867137771018561227e-17, /* twoPowerIndex1mi[17] */ 
+    -1.57361794708548262075721650186677311111593370726069e-33, /* twoPowerIndex1lo[17] */ 
+  } , 
+  { 
+    1.52418886980574446246561315376766287954524159431458e-03, /* twoPowerIndex1MOne[18] */ 
+    1.00152418886980565382316399336559697985649108886719e+00, /* twoPowerIndex1hi[18] */ 
+    9.06044106726912172835402556659442028244667434824268e-17, /* twoPowerIndex1mi[18] */ 
+    -9.28795936877474030548429956901821606468166518236870e-34, /* twoPowerIndex1lo[18] */ 
+  } , 
+  { 
+    1.60893411368110274099751944021363669889979064464569e-03, /* twoPowerIndex1MOne[19] */ 
+    1.00160893411368112637660487962421029806137084960938e+00, /* twoPowerIndex1hi[19] */ 
+    -2.36264836237383004793138962370023654775211297571300e-17, /* twoPowerIndex1mi[19] */ 
+    8.71910060549436570048152399632583363263947185973970e-34, /* twoPowerIndex1lo[19] */ 
+  } , 
+  { 
+    1.69368652838312633464312728648337724735029041767120e-03, /* twoPowerIndex1MOne[20] */ 
+    1.00169368652838319810882694582687690854072570800781e+00, /* twoPowerIndex1hi[20] */ 
+    -7.17327634990031997530849131951948428542423257707819e-17, /* twoPowerIndex1mi[20] */ 
+    6.07647560689104755979568262152596670382288431776872e-33, /* twoPowerIndex1lo[20] */ 
+  } , 
+  { 
+    1.77844611451858400190395581574875905062071979045868e-03, /* twoPowerIndex1MOne[21] */ 
+    1.00177844611451849488048537750728428363800048828125e+00, /* twoPowerIndex1hi[21] */ 
+    8.90494708260750700506643975752906510626799035262348e-17, /* twoPowerIndex1mi[21] */ 
+    -1.07254669154255875107094381902285900913374960884151e-33, /* twoPowerIndex1lo[21] */ 
+  } , 
+  { 
+    1.86321287269429545878363096989005498471669852733612e-03, /* twoPowerIndex1MOne[22] */ 
+    1.00186321287269430868605013529304414987564086914062e+00, /* twoPowerIndex1hi[22] */ 
+    -1.33071962467226606689858482393149015112554043251841e-17, /* twoPowerIndex1mi[22] */ 
+    -3.85443386097781554341108465500150047004226523597749e-34, /* twoPowerIndex1lo[22] */ 
+  } , 
+  { 
+    1.94798680351713202930918900079859668039716780185699e-03, /* twoPowerIndex1MOne[23] */ 
+    1.00194798680351704334157147968653589487075805664062e+00, /* twoPowerIndex1hi[23] */ 
+    8.86950831931357794861851693306328605666305931343879e-17, /* twoPowerIndex1mi[23] */ 
+    2.75565261371873441737709070275465061950835621245478e-33, /* twoPowerIndex1lo[23] */ 
+  } , 
+  { 
+    2.03276790759401642869064197327588772168383002281189e-03, /* twoPowerIndex1MOne[24] */ 
+    1.00203276790759399084151937131537124514579772949219e+00, /* twoPowerIndex1hi[24] */ 
+    2.57269259432211179649018725316354562817431777421067e-17, /* twoPowerIndex1mi[24] */ 
+    6.79751255613789265201334995370535043187556454092516e-34, /* twoPowerIndex1lo[24] */ 
+  } , 
+  { 
+    2.11755618553192319700184675923537724884226918220520e-03, /* twoPowerIndex1MOne[25] */ 
+    1.00211755618553199909115392074454575777053833007812e+00, /* twoPowerIndex1hi[25] */ 
+    -7.60963076154928660009367289085332496679920703482915e-17, /* twoPowerIndex1mi[25] */ 
+    4.75753257695507842037160015079808278438391224582425e-33, /* twoPowerIndex1lo[25] */ 
+  } , 
+  { 
+    2.20235163793787653077616006669359194347634911537170e-03, /* twoPowerIndex1MOne[26] */ 
+    1.00220235163793791599573523853905498981475830078125e+00, /* twoPowerIndex1hi[26] */ 
+    -3.92993778548451720552933864302152846562830407163222e-17, /* twoPowerIndex1mi[26] */ 
+    2.22740945016647607963332576015739728975193247400334e-33, /* twoPowerIndex1lo[26] */ 
+  } , 
+  { 
+    2.28715426541895461981512838178787205833941698074341e-03, /* twoPowerIndex1MOne[27] */ 
+    1.00228715426541903354973328532651066780090332031250e+00, /* twoPowerIndex1hi[27] */ 
+    -7.91320298680023160041154790353287334442969086934633e-17, /* twoPowerIndex1mi[27] */ 
+    4.30154033931455305578282137055178652288667345721532e-33, /* twoPowerIndex1lo[27] */ 
+  } , 
+  { 
+    2.37196406858228422617762554125420138007029891014099e-03, /* twoPowerIndex1MOne[28] */ 
+    1.00237196406858219965840817167190834879875183105469e+00, /* twoPowerIndex1hi[28] */ 
+    8.46137724799471749932697856411684097253648908880386e-17, /* twoPowerIndex1mi[28] */ 
+    -1.15795350476069740873680647805085951983720786847012e-33, /* twoPowerIndex1lo[28] */ 
+  } , 
+  { 
+    2.45678104803504588835028066284849046496674418449402e-03, /* twoPowerIndex1MOne[29] */ 
+    1.00245678104803515040543970826547592878341674804688e+00, /* twoPowerIndex1hi[29] */ 
+    -1.04659436381151501919178287379323678295958386394535e-16, /* twoPowerIndex1mi[29] */ 
+    5.63489769746205416541081978104590942612321060930815e-33, /* twoPowerIndex1lo[29] */ 
+  } , 
+  { 
+    2.54160520438446958443878820332884060917422175407410e-03, /* twoPowerIndex1MOne[30] */ 
+    1.00254160520438451165148308064090088009834289550781e+00, /* twoPowerIndex1hi[30] */ 
+    -4.19488324163994025318330321149973224973566383682287e-17, /* twoPowerIndex1mi[30] */ 
+    -1.10867727371575753136248480661711257993643946476249e-33, /* twoPowerIndex1lo[30] */ 
+  } , 
+  { 
+    2.62643653823783820161485991206973267253488302230835e-03, /* twoPowerIndex1MOne[31] */ 
+    1.00262643653823779743561317445710301399230957031250e+00, /* twoPowerIndex1hi[31] */ 
+    4.09516010415381254633240310888754218841825131705667e-17, /* twoPowerIndex1mi[31] */ 
+    4.18651539196539390512773521751259041499174185767385e-34, /* twoPowerIndex1lo[31] */ 
+  } }; 
+ 
+static const tPi2_t twoPowerIndex2[256] = {
+  { 
+    1.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2hi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2mi[0] */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* twoPowerIndex2lo[0] */ 
+  } , 
+  { 
+    1.00271127505020252179690487537300214171409606933594e+00, /* twoPowerIndex2hi[1] */ 
+    -3.63661592869226394431650732319448247819940912156384e-17, /* twoPowerIndex2mi[1] */ 
+    -6.58076018413558386665763067745208065096307047224855e-34, /* twoPowerIndex2lo[1] */ 
+  } , 
+  { 
+    1.00542990111280272635951860138447955250740051269531e+00, /* twoPowerIndex2hi[2] */ 
+    9.49918653545503175702165599813853704096085691656846e-17, /* twoPowerIndex2mi[2] */ 
+    2.69197614795285565383714012654266434015814803945559e-33, /* twoPowerIndex2lo[2] */ 
+  } , 
+  { 
+    1.00815589811841754830368245166027918457984924316406e+00, /* twoPowerIndex2hi[3] */ 
+    -3.25205875608430806088583499076669170064325943797327e-17, /* twoPowerIndex2mi[3] */ 
+    2.46355206137317856028163445564386882918089954604456e-33, /* twoPowerIndex2lo[3] */ 
+  } , 
+  { 
+    1.01088928605170047525518839393043890595436096191406e+00, /* twoPowerIndex2hi[4] */ 
+    -1.52347786033685771762884896542837070154735103108242e-17, /* twoPowerIndex2mi[4] */ 
+    -1.20527773363982029579667170059568717373235495431222e-33, /* twoPowerIndex2lo[4] */ 
+  } , 
+  { 
+    1.01363008495148942955665916088037192821502685546875e+00, /* twoPowerIndex2hi[5] */ 
+    9.28359976818356758749022147678502506693759778650960e-18, /* twoPowerIndex2mi[5] */ 
+    4.13890589104247114331738780166693451804305210832799e-34, /* twoPowerIndex2lo[5] */ 
+  } , 
+  { 
+    1.01637831491095309566219384578289464116096496582031e+00, /* twoPowerIndex2hi[6] */ 
+    -5.77217007319966002765782626628372138987895927390512e-17, /* twoPowerIndex2mi[6] */ 
+    -3.01819186434481667596632332663816426794401961980022e-34, /* twoPowerIndex2lo[6] */ 
+  } , 
+  { 
+    1.01913399607773791366582827322417870163917541503906e+00, /* twoPowerIndex2hi[7] */ 
+    3.60190498225966172216609531722640706381960474006480e-17, /* twoPowerIndex2mi[7] */ 
+    -3.04390025916336453718381303520593752766892414197373e-33, /* twoPowerIndex2lo[7] */ 
+  } , 
+  { 
+    1.02189714865411662714222984504885971546173095703125e+00, /* twoPowerIndex2hi[8] */ 
+    5.10922502897344389358977529484899213711118891193073e-17, /* twoPowerIndex2mi[8] */ 
+    7.88422656496927442160138555121324022911581088833303e-34, /* twoPowerIndex2lo[8] */ 
+  } , 
+  { 
+    1.02466779289713572076436776114860549569129943847656e+00, /* twoPowerIndex2hi[9] */ 
+    -7.56160786848777943963602624934464667278197265594918e-17, /* twoPowerIndex2mi[9] */ 
+    3.82829708640966874425497233807001672128855640186408e-33, /* twoPowerIndex2lo[9] */ 
+  } , 
+  { 
+    1.02744594911876374609960294037591665983200073242188e+00, /* twoPowerIndex2hi[10] */ 
+    -4.95607417464537044048053918668002938932966613516228e-17, /* twoPowerIndex2mi[10] */ 
+    1.52647285191522534623240430678753798210498111737407e-33, /* twoPowerIndex2lo[10] */ 
+  } , 
+  { 
+    1.03023163768604097967340749164577573537826538085938e+00, /* twoPowerIndex2hi[11] */ 
+    3.31983004108081294376648458695381123964530598047240e-17, /* twoPowerIndex2mi[11] */ 
+    -6.05948719060829591517581519609021946982655246308260e-34, /* twoPowerIndex2lo[11] */ 
+  } , 
+  { 
+    1.03302487902122841489926940994337201118469238281250e+00, /* twoPowerIndex2hi[12] */ 
+    7.60083887402708848935418174694583720224989620170520e-18, /* twoPowerIndex2mi[12] */ 
+    4.17547660336499599627565312970423748685953776150432e-34, /* twoPowerIndex2lo[12] */ 
+  } , 
+  { 
+    1.03582569360195719809780712239444255828857421875000e+00, /* twoPowerIndex2hi[13] */ 
+    -7.80678239133763616702426510222438085291507518120348e-17, /* twoPowerIndex2mi[13] */ 
+    4.83798199689382054315888822530184564936218864541054e-34, /* twoPowerIndex2lo[13] */ 
+  } , 
+  { 
+    1.03863410196137873064969880942953750491142272949219e+00, /* twoPowerIndex2hi[14] */ 
+    5.99627378885251061843052226928644856972739702249617e-17, /* twoPowerIndex2mi[14] */ 
+    -3.95663704958043112614113186183111724364471056517376e-33, /* twoPowerIndex2lo[14] */ 
+  } , 
+  { 
+    1.04145012468831610341624127613613381981849670410156e+00, /* twoPowerIndex2hi[15] */ 
+    3.78483048028757620965705119578257297756469464729973e-17, /* twoPowerIndex2mi[15] */ 
+    -2.78990868974053264987416432056918863121352708112718e-33, /* twoPowerIndex2lo[15] */ 
+  } , 
+  { 
+    1.04427378242741375480306942336028441786766052246094e+00, /* twoPowerIndex2hi[16] */ 
+    8.55188970553796489217080231819249267647451456689049e-17, /* twoPowerIndex2mi[16] */ 
+    -4.33079108057472301914865017639792677602990877842667e-33, /* twoPowerIndex2lo[16] */ 
+  } , 
+  { 
+    1.04710509587928979335913481918396428227424621582031e+00, /* twoPowerIndex2hi[17] */ 
+    7.27707724310431474860740275908141293488900903214077e-17, /* twoPowerIndex2mi[17] */ 
+    4.72214361830876717418601268670474261741247234406534e-34, /* twoPowerIndex2lo[17] */ 
+  } , 
+  { 
+    1.04994408580068721015265964524587616324424743652344e+00, /* twoPowerIndex2hi[18] */ 
+    5.59293784812700258637018360670823030304395274991437e-17, /* twoPowerIndex2mi[18] */ 
+    5.88211594754600857675576658960991674898106235024158e-33, /* twoPowerIndex2lo[18] */ 
+  } , 
+  { 
+    1.05279077300462642341472019325010478496551513671875e+00, /* twoPowerIndex2hi[19] */ 
+    -9.62948289902693573941616400549765121885820038033846e-17, /* twoPowerIndex2mi[19] */ 
+    -1.08761347818786776096507022683126915318078909071327e-33, /* twoPowerIndex2lo[19] */ 
+  } , 
+  { 
+    1.05564517836055715704901558638084679841995239257812e+00, /* twoPowerIndex2hi[20] */ 
+    1.75932573877209198413667791203269037000656546957040e-18, /* twoPowerIndex2mi[20] */ 
+    -1.30396724977978376996223394717384715710429730879060e-34, /* twoPowerIndex2lo[20] */ 
+  } , 
+  { 
+    1.05850732279451276163229067606152966618537902832031e+00, /* twoPowerIndex2hi[21] */ 
+    -7.15265185663778073796145114756001119612383138085358e-17, /* twoPowerIndex2mi[21] */ 
+    -5.64149549927303480417353705471376517000863783007238e-33, /* twoPowerIndex2lo[21] */ 
+  } , 
+  { 
+    1.06137722728926209292410476336954161524772644042969e+00, /* twoPowerIndex2hi[22] */ 
+    -1.19735370853656575649342301877145101231593191394554e-17, /* twoPowerIndex2mi[22] */ 
+    -3.24019009642435813881917735260705206101901086389479e-34, /* twoPowerIndex2lo[22] */ 
+  } , 
+  { 
+    1.06425491288446449900106927088927477598190307617188e+00, /* twoPowerIndex2hi[23] */ 
+    5.07875419861123039357382102421174755425792834691388e-17, /* twoPowerIndex2mi[23] */ 
+    1.50895958491701564197395322903064350349289305322861e-33, /* twoPowerIndex2lo[23] */ 
+  } , 
+  { 
+    1.06714040067682369716806078940862789750099182128906e+00, /* twoPowerIndex2hi[24] */ 
+    -7.89985396684158212226333428391940791349522867645719e-17, /* twoPowerIndex2mi[24] */ 
+    2.48773924323047906697979838020484860096229450391065e-33, /* twoPowerIndex2lo[24] */ 
+  } , 
+  { 
+    1.07003371182024187291403904964681714773178100585938e+00, /* twoPowerIndex2hi[25] */ 
+    -9.93716271128891938111903502484820565662793756924256e-17, /* twoPowerIndex2mi[25] */ 
+    2.31962344798684261201922994500766835313211720477486e-34, /* twoPowerIndex2lo[25] */ 
+  } , 
+  { 
+    1.07293486752597555522470429423265159130096435546875e+00, /* twoPowerIndex2hi[26] */ 
+    -3.83966884335882380671154732420037314658136257342221e-18, /* twoPowerIndex2mi[26] */ 
+    -1.99249094904898757254369089814013323079830118271091e-34, /* twoPowerIndex2lo[26] */ 
+  } , 
+  { 
+    1.07584388906279104780594479962019249796867370605469e+00, /* twoPowerIndex2hi[27] */ 
+    -1.00027161511441361124926436161855303296586383555652e-17, /* twoPowerIndex2mi[27] */ 
+    6.88586299535442828962527763656910379336185001641212e-34, /* twoPowerIndex2lo[27] */ 
+  } , 
+  { 
+    1.07876079775711986030728439800441265106201171875000e+00, /* twoPowerIndex2hi[28] */ 
+    -6.65666043605659260344452997720816205593857378631714e-17, /* twoPowerIndex2mi[28] */ 
+    -3.65812580131923690564246115619834327696213789275798e-33, /* twoPowerIndex2lo[28] */ 
+  } , 
+  { 
+    1.08168561499321524976835462439339607954025268554688e+00, /* twoPowerIndex2hi[29] */ 
+    -4.78262390299708626555704566711052721844264408750016e-17, /* twoPowerIndex2mi[29] */ 
+    -2.29832484759747593833858703400029440154531888955339e-33, /* twoPowerIndex2lo[29] */ 
+  } , 
+  { 
+    1.08461836221330920615457671374315395951271057128906e+00, /* twoPowerIndex2hi[30] */ 
+    3.16615284581634611576111879942615084172431708553659e-17, /* twoPowerIndex2mi[30] */ 
+    -7.75514267549291199158161695245488815392525791097983e-34, /* twoPowerIndex2lo[30] */ 
+  } , 
+  { 
+    1.08755906091776965993744852312374860048294067382812e+00, /* twoPowerIndex2hi[31] */ 
+    5.40934930782029075923173884363871219691387098941733e-18, /* twoPowerIndex2mi[31] */ 
+    3.48154867584145263827432069924110927169603001776988e-34, /* twoPowerIndex2lo[31] */ 
+  } , 
+  { 
+    1.09050773266525768967483145388541743159294128417969e+00, /* twoPowerIndex2hi[32] */ 
+    -3.04678207981247114696551170541257032193091359539676e-17, /* twoPowerIndex2mi[32] */ 
+    2.01705487848848619150139275849815038703452970938356e-33, /* twoPowerIndex2lo[32] */ 
+  } , 
+  { 
+    1.09346439907288583981426199898123741149902343750000e+00, /* twoPowerIndex2hi[33] */ 
+    1.44139581472692093419513384462869463509260880619035e-17, /* twoPowerIndex2mi[33] */ 
+    4.08630093857659572006798113947020484158367259206261e-34, /* twoPowerIndex2lo[33] */ 
+  } , 
+  { 
+    1.09642908181637688258547314035240560770034790039062e+00, /* twoPowerIndex2hi[34] */ 
+    -5.91993348444931582404791974798026685003551623353440e-17, /* twoPowerIndex2mi[34] */ 
+    1.11454498034154926063604046797188107791920045228203e-33, /* twoPowerIndex2lo[34] */ 
+  } , 
+  { 
+    1.09940180263022191375910097121959552168846130371094e+00, /* twoPowerIndex2hi[35] */ 
+    7.17045959970192322482531070995357544666158025777059e-17, /* twoPowerIndex2mi[35] */ 
+    2.13409756277809587478782727047623660463701953626949e-33, /* twoPowerIndex2lo[35] */ 
+  } , 
+  { 
+    1.10238258330784089089604549371870234608650207519531e+00, /* twoPowerIndex2hi[36] */ 
+    5.26603687157069438656191942579725322612448063343618e-17, /* twoPowerIndex2mi[36] */ 
+    6.45805397536721410708490440561131106837447579889036e-34, /* twoPowerIndex2lo[36] */ 
+  } , 
+  { 
+    1.10537144570174117319538709125481545925140380859375e+00, /* twoPowerIndex2hi[37] */ 
+    8.23928876050021358995335359335922723831311179076842e-17, /* twoPowerIndex2mi[37] */ 
+    -1.04774466610247815442874156330747491506292900514778e-33, /* twoPowerIndex2lo[37] */ 
+  } , 
+  { 
+    1.10836841172367872587756210123188793659210205078125e+00, /* twoPowerIndex2hi[38] */ 
+    -8.78681384518052661557648698444116835232371902158176e-17, /* twoPowerIndex2mi[38] */ 
+    -1.93068861306745460990089493247099606865877523423866e-33, /* twoPowerIndex2lo[38] */ 
+  } , 
+  { 
+    1.11137350334481754821069898753194138407707214355469e+00, /* twoPowerIndex2hi[39] */ 
+    5.56394502666969764310655992493514019038185064989534e-17, /* twoPowerIndex2mi[39] */ 
+    -1.17769877519864439845431603912093657619994388212320e-33, /* twoPowerIndex2lo[39] */ 
+  } , 
+  { 
+    1.11438674259589243220602838846389204263687133789062e+00, /* twoPowerIndex2hi[40] */ 
+    1.04102784568455709549461912557590544266030834754874e-16, /* twoPowerIndex2mi[40] */ 
+    1.47570167344000313963428137759389241586071635800536e-33, /* twoPowerIndex2lo[40] */ 
+  } , 
+  { 
+    1.11740815156736927882263898936798796057701110839844e+00, /* twoPowerIndex2hi[41] */ 
+    -7.97680590262822045600561531634368139010993610472575e-17, /* twoPowerIndex2mi[41] */ 
+    -3.13386648600120619264244700150043196400877518036064e-33, /* twoPowerIndex2lo[41] */ 
+  } , 
+  { 
+    1.12043775240960674643986294540809467434883117675781e+00, /* twoPowerIndex2hi[42] */ 
+    -6.20108590655417874997850240693143539763038270522938e-17, /* twoPowerIndex2mi[42] */ 
+    5.83820205528528388698845434843840374410554175693809e-33, /* twoPowerIndex2lo[42] */ 
+  } , 
+  { 
+    1.12347556733301989773110562964575365185737609863281e+00, /* twoPowerIndex2hi[43] */ 
+    -9.69973758898704299543613376480429793851537956846792e-17, /* twoPowerIndex2mi[43] */ 
+    -2.26554127979727181051674177007680355310974340445620e-33, /* twoPowerIndex2lo[43] */ 
+  } , 
+  { 
+    1.12652161860824184813623105583246797323226928710938e+00, /* twoPowerIndex2hi[44] */ 
+    5.16585675879545673703180814711785602957687143067887e-17, /* twoPowerIndex2mi[44] */ 
+    -5.65916686170716220063974592097473710424342945964456e-34, /* twoPowerIndex2lo[44] */ 
+  } , 
+  { 
+    1.12957592856628807886920640157768502831459045410156e+00, /* twoPowerIndex2hi[45] */ 
+    6.71280585872625658757968769071561199197683972848295e-17, /* twoPowerIndex2mi[45] */ 
+    -1.07820162799000302104084759726971168076450417442143e-33, /* twoPowerIndex2lo[45] */ 
+  } , 
+  { 
+    1.13263851959871919561351205629762262105941772460938e+00, /* twoPowerIndex2hi[46] */ 
+    3.23735616673800026374280491083711282285071512434226e-17, /* twoPowerIndex2mi[46] */ 
+    -2.17410428198276732317664547375555516673086011902827e-33, /* twoPowerIndex2lo[46] */ 
+  } , 
+  { 
+    1.13570941415780546357439106941455975174903869628906e+00, /* twoPowerIndex2hi[47] */ 
+    5.06659992612615585870979493424241383844326077647274e-17, /* twoPowerIndex2mi[47] */ 
+    -1.32541787182048387837370885885176434849571625344055e-33, /* twoPowerIndex2lo[47] */ 
+  } , 
+  { 
+    1.13878863475669156457570352358743548393249511718750e+00, /* twoPowerIndex2hi[48] */ 
+    8.91281267602540777782023808215740339330966556723006e-17, /* twoPowerIndex2mi[48] */ 
+    -2.00741463283249448727846279877956608996968961458494e-33, /* twoPowerIndex2lo[48] */ 
+  } , 
+  { 
+    1.14187620396956157620138583297375589609146118164062e+00, /* twoPowerIndex2hi[49] */ 
+    4.65109117753141238740817792833606106064264488933295e-17, /* twoPowerIndex2mi[49] */ 
+    1.16876708285186516119099627711493197934208124175159e-33, /* twoPowerIndex2lo[49] */ 
+  } , 
+  { 
+    1.14497214443180417298151496652280911803245544433594e+00, /* twoPowerIndex2hi[50] */ 
+    4.64128989217001065651476858937308428660295061803434e-17, /* twoPowerIndex2mi[50] */ 
+    2.12613258776789922762135782566899992944567171074898e-34, /* twoPowerIndex2lo[50] */ 
+  } , 
+  { 
+    1.14807647884017893780139729642542079091072082519531e+00, /* twoPowerIndex2hi[51] */ 
+    6.89774023662719177044119892069339989513569982425983e-17, /* twoPowerIndex2mi[51] */ 
+    4.18470834663834509017799649540704770686179227316921e-33, /* twoPowerIndex2lo[51] */ 
+  } , 
+  { 
+    1.15118922995298267331065744656370952725410461425781e+00, /* twoPowerIndex2hi[52] */ 
+    3.25071021886382721197741051783883831627922464835734e-17, /* twoPowerIndex2mi[52] */ 
+    8.89091931637927159755660842958283684863470887791663e-34, /* twoPowerIndex2lo[52] */ 
+  } , 
+  { 
+    1.15431042059021593537693206599215045571327209472656e+00, /* twoPowerIndex2hi[53] */ 
+    1.04171289462732661865012882394503754385710309711063e-16, /* twoPowerIndex2mi[53] */ 
+    -5.36004208703313921208161123405733997004096829869921e-33, /* twoPowerIndex2lo[53] */ 
+  } , 
+  { 
+    1.15744007363375112085179807763779535889625549316406e+00, /* twoPowerIndex2hi[54] */ 
+    -9.12387123113440028710214564331695285968225139034901e-17, /* twoPowerIndex2mi[54] */ 
+    4.33323257285343273028953697402398811817365345749781e-33, /* twoPowerIndex2lo[54] */ 
+  } , 
+  { 
+    1.16057821202749877897986152675002813339233398437500e+00, /* twoPowerIndex2hi[55] */ 
+    -3.26104020541739372182753051431941352277362975722267e-17, /* twoPowerIndex2mi[55] */ 
+    7.11357834451307044066628553966351937724582011421575e-35, /* twoPowerIndex2lo[55] */ 
+  } , 
+  { 
+    1.16372485877757747552152522985124960541725158691406e+00, /* twoPowerIndex2hi[56] */ 
+    3.82920483692409349872159816102110059722238312159091e-17, /* twoPowerIndex2mi[56] */ 
+    7.19709831987676327409679245188515478735702972651365e-34, /* twoPowerIndex2lo[56] */ 
+  } , 
+  { 
+    1.16688003695248165847431209840578958392143249511719e+00, /* twoPowerIndex2hi[57] */ 
+    -8.79187957999916974198229633672296429647404899187201e-17, /* twoPowerIndex2mi[57] */ 
+    -2.87626642494823975790958872496361075697324563663418e-33, /* twoPowerIndex2lo[57] */ 
+  } , 
+  { 
+    1.17004376968325018992800323758274316787719726562500e+00, /* twoPowerIndex2hi[58] */ 
+    -1.84774420179000469437829606444460290025923861011560e-18, /* twoPowerIndex2mi[58] */ 
+    9.95026324026540894110632007684038501192747054873613e-35, /* twoPowerIndex2lo[58] */ 
+  } , 
+  { 
+    1.17321608016363732041043022036319598555564880371094e+00, /* twoPowerIndex2hi[59] */ 
+    -7.28756258658499447915217361810881652407443644873380e-17, /* twoPowerIndex2mi[59] */ 
+    -5.80514434850720922900022428546053614526438490706197e-33, /* twoPowerIndex2lo[59] */ 
+  } , 
+  { 
+    1.17639699165028122074261318630306050181388854980469e+00, /* twoPowerIndex2hi[60] */ 
+    5.55420325421807896276684328889766000203735373777665e-17, /* twoPowerIndex2mi[60] */ 
+    -1.48842929343368511961710849782815827921712348302943e-33, /* twoPowerIndex2lo[60] */ 
+  } , 
+  { 
+    1.17958652746287584456297281576553359627723693847656e+00, /* twoPowerIndex2hi[61] */ 
+    1.00923127751003904353623199255548893172824487848155e-16, /* twoPowerIndex2mi[61] */ 
+    2.56907593214680284136128623025833045419367581735075e-33, /* twoPowerIndex2lo[61] */ 
+  } , 
+  { 
+    1.18278471098434101449470290390308946371078491210938e+00, /* twoPowerIndex2hi[62] */ 
+    1.54297543007907605845327903967313855640292420619590e-17, /* twoPowerIndex2mi[62] */ 
+    7.09719727836492954234152192412259750112212179635692e-34, /* twoPowerIndex2lo[62] */ 
+  } , 
+  { 
+    1.18599156566099384058077248482732102274894714355469e+00, /* twoPowerIndex2hi[63] */ 
+    -9.20950683529310590495224568572832186256763277535644e-18, /* twoPowerIndex2mi[63] */ 
+    4.45938700163758066851795410125927948023388255302655e-34, /* twoPowerIndex2lo[63] */ 
+  } , 
+  { 
+    1.18920711500272102689734765590401366353034973144531e+00, /* twoPowerIndex2hi[64] */ 
+    3.98201523146564611098029654755651628169309930562261e-17, /* twoPowerIndex2mi[64] */ 
+    1.14195965688545340101163692105448367710482873511510e-33, /* twoPowerIndex2lo[64] */ 
+  } , 
+  { 
+    1.19243138258315117816721340204821899533271789550781e+00, /* twoPowerIndex2hi[65] */ 
+    4.39755141560972144344381120574300882985513737679934e-17, /* twoPowerIndex2mi[65] */ 
+    -2.41829020212771695653773640974975764989760653578657e-33, /* twoPowerIndex2lo[65] */ 
+  } , 
+  { 
+    1.19566439203982732841780034505063667893409729003906e+00, /* twoPowerIndex2hi[66] */ 
+    4.61660367048148139742806754321229408219716031742605e-17, /* twoPowerIndex2mi[66] */ 
+    1.32248737144550668026460879187484144120719947949532e-33, /* twoPowerIndex2lo[66] */ 
+  } , 
+  { 
+    1.19890616707438057986223611806053668260574340820312e+00, /* twoPowerIndex2hi[67] */ 
+    -9.80919335600842311847819900738643766443372921069732e-17, /* twoPowerIndex2mi[67] */ 
+    -5.29087429062105337716063232877224643258346493331853e-33, /* twoPowerIndex2lo[67] */ 
+  } , 
+  { 
+    1.20215673145270307564658196497475728392601013183594e+00, /* twoPowerIndex2hi[68] */ 
+    6.64498149925230124489270286991048474954122885069094e-17, /* twoPowerIndex2mi[68] */ 
+    -3.85685255336907654452995968372311171004938395576078e-33, /* twoPowerIndex2lo[68] */ 
+  } , 
+  { 
+    1.20541610900512385917693336523370817303657531738281e+00, /* twoPowerIndex2hi[69] */ 
+    -3.35727219326752963448211014853517469169774564393197e-17, /* twoPowerIndex2mi[69] */ 
+    -4.92549550862177406688591486963370003941067572015491e-34, /* twoPowerIndex2lo[69] */ 
+  } , 
+  { 
+    1.20868432362658162482205170817906036972999572753906e+00, /* twoPowerIndex2hi[70] */ 
+    -4.74672594522898409739364787077500872067787392617061e-17, /* twoPowerIndex2mi[70] */ 
+    -2.39731037167046840753848687443925994516005866460984e-33, /* twoPowerIndex2lo[70] */ 
+  } , 
+  { 
+    1.21196139927680124337427969294367358088493347167969e+00, /* twoPowerIndex2hi[71] */ 
+    -4.89061107752111835731723583297106520554917182658748e-17, /* twoPowerIndex2mi[71] */ 
+    3.03773638515966381050119516339532028224866436819777e-33, /* twoPowerIndex2lo[71] */ 
+  } , 
+  { 
+    1.21524735998046895524282717815367504954338073730469e+00, /* twoPowerIndex2hi[72] */ 
+    -7.71263069268148813091257203929615917892526180720328e-17, /* twoPowerIndex2mi[72] */ 
+    4.71720614288499816545262331753743129502653902881319e-33, /* twoPowerIndex2lo[72] */ 
+  } , 
+  { 
+    1.21854222982740845182547673175577074289321899414062e+00, /* twoPowerIndex2hi[73] */ 
+    -9.00672695836383767486750626492663453576309245864756e-17, /* twoPowerIndex2mi[73] */ 
+    5.16504109670658058144743067711083355626699725368541e-34, /* twoPowerIndex2lo[73] */ 
+  } , 
+  { 
+    1.22184603297275762301410395593848079442977905273438e+00, /* twoPowerIndex2hi[74] */ 
+    -1.06110212114026911612338140955143073076587458436915e-16, /* twoPowerIndex2mi[74] */ 
+    1.60374219470078741193166884413586755813454143083569e-33, /* twoPowerIndex2lo[74] */ 
+  } , 
+  { 
+    1.22515879363714552674480273708468303084373474121094e+00, /* twoPowerIndex2hi[75] */ 
+    -8.90353381426998342947457496954569957296479418024787e-17, /* twoPowerIndex2mi[75] */ 
+    -3.38239295886914309313127675019861767225893406120572e-33, /* twoPowerIndex2lo[75] */ 
+  } , 
+  { 
+    1.22848053610687002468182527081808075308799743652344e+00, /* twoPowerIndex2hi[76] */ 
+    -1.89878163130252995311948719658078062677878185721429e-17, /* twoPowerIndex2mi[76] */ 
+    6.18469453652103848424687212656185051850860290411013e-34, /* twoPowerIndex2lo[76] */ 
+  } , 
+  { 
+    1.23181128473407586199073193711228668689727783203125e+00, /* twoPowerIndex2hi[77] */ 
+    7.38938247161005024655390749410851704831793332860224e-17, /* twoPowerIndex2mi[77] */ 
+    5.66416860276341522848933887503853153547313928315175e-33, /* twoPowerIndex2lo[77] */ 
+  } , 
+  { 
+    1.23515106393693341324535595049383118748664855957031e+00, /* twoPowerIndex2hi[78] */ 
+    -1.07552443443078413782534550626319265988634731989314e-16, /* twoPowerIndex2mi[78] */ 
+    -1.64465643112359468913735122191038582299186062892515e-33, /* twoPowerIndex2lo[78] */ 
+  } , 
+  { 
+    1.23849989819981654015634831011993810534477233886719e+00, /* twoPowerIndex2hi[79] */ 
+    2.76770205557396742995282629120281510329639442299790e-17, /* twoPowerIndex2mi[79] */ 
+    2.66724789689442974848682438840669194714548350787063e-35, /* twoPowerIndex2lo[79] */ 
+  } , 
+  { 
+    1.24185781207348400201340155035723000764846801757812e+00, /* twoPowerIndex2hi[80] */ 
+    4.65802759183693679122616767654141683800114091774588e-17, /* twoPowerIndex2mi[80] */ 
+    -2.31439910378785985764079190411324307370918857557275e-33, /* twoPowerIndex2lo[80] */ 
+  } , 
+  { 
+    1.24522483017525797954760946595342829823493957519531e+00, /* twoPowerIndex2hi[81] */ 
+    -4.67724044984672750044476807490179835934784763101964e-17, /* twoPowerIndex2mi[81] */ 
+    -6.19614441679121104595267684200368658842294828986636e-34, /* twoPowerIndex2lo[81] */ 
+  } , 
+  { 
+    1.24860097718920481923987608752213418483734130859375e+00, /* twoPowerIndex2hi[82] */ 
+    -8.26181099902196355045651985461180951636054028345939e-17, /* twoPowerIndex2mi[82] */ 
+    -3.13508520893426556972542244676107480243422253073214e-33, /* twoPowerIndex2lo[82] */ 
+  } , 
+  { 
+    1.25198627786631622171853450709022581577301025390625e+00, /* twoPowerIndex2hi[83] */ 
+    4.83416715246989759958838285593793501234849559981127e-17, /* twoPowerIndex2mi[83] */ 
+    1.78566475406016519018652742315549367024352654682538e-33, /* twoPowerIndex2lo[83] */ 
+  } , 
+  { 
+    1.25538075702469109629078047873917967081069946289062e+00, /* twoPowerIndex2hi[84] */ 
+    -6.71138982129687841852821870522008036246320680675952e-18, /* twoPowerIndex2mi[84] */ 
+    -5.76846264325028352862497671463784812858487529613818e-35, /* twoPowerIndex2lo[84] */ 
+  } , 
+  { 
+    1.25878443954971652729568631912115961313247680664062e+00, /* twoPowerIndex2hi[85] */ 
+    -8.42178258773059935676825219277948030487309990653640e-17, /* twoPowerIndex2mi[85] */ 
+    -3.42668790982954401635344774416743553535666629313219e-33, /* twoPowerIndex2lo[85] */ 
+  } , 
+  { 
+    1.26219735039425073885865913325687870383262634277344e+00, /* twoPowerIndex2hi[86] */ 
+    -3.08446488747384646529907217460461327518172988421553e-17, /* twoPowerIndex2mi[86] */ 
+    2.40882976270348351451454970147527613654722303853330e-33, /* twoPowerIndex2lo[86] */ 
+  } , 
+  { 
+    1.26561951457880628169050396536476910114288330078125e+00, /* twoPowerIndex2hi[87] */ 
+    4.25057700345086863701776979850140764907451511182054e-17, /* twoPowerIndex2mi[87] */ 
+    -2.43502301511662232808349177773715412240431561172854e-33, /* twoPowerIndex2lo[87] */ 
+  } , 
+  { 
+    1.26905095719173321988648694969015195965766906738281e+00, /* twoPowerIndex2hi[88] */ 
+    2.66793213134218609522998616502989391061315227839969e-18, /* twoPowerIndex2mi[88] */ 
+    -5.01723570938719050333027020376949013774930719140568e-35, /* twoPowerIndex2lo[88] */ 
+  } , 
+  { 
+    1.27249170338940276181460831139702349901199340820312e+00, /* twoPowerIndex2hi[89] */ 
+    -1.05779162672124210291083901925683986461541009150905e-17, /* twoPowerIndex2mi[89] */ 
+    -2.93131904402812719815315335629352674850210527511727e-34, /* twoPowerIndex2lo[89] */ 
+  } , 
+  { 
+    1.27594177839639200122689999261638149619102478027344e+00, /* twoPowerIndex2hi[90] */ 
+    9.91543024421429032951245620636467731146795580787420e-17, /* twoPowerIndex2mi[90] */ 
+    4.59759442266878048582159401225601949347063078487755e-33, /* twoPowerIndex2lo[90] */ 
+  } , 
+  { 
+    1.27940120750566932450453805358847603201866149902344e+00, /* twoPowerIndex2hi[91] */ 
+    -9.75909500835606221035467671832651562727399972211988e-17, /* twoPowerIndex2mi[91] */ 
+    -1.38251039186524925998756795041289231285031751943997e-33, /* twoPowerIndex2lo[91] */ 
+  } , 
+  { 
+    1.28287001607877826359072059858590364456176757812500e+00, /* twoPowerIndex2hi[92] */ 
+    1.71359491824356096814175768900864730928374054987756e-17, /* twoPowerIndex2mi[92] */ 
+    7.25131491282819461838977871983760669047046080773478e-34, /* twoPowerIndex2lo[92] */ 
+  } , 
+  { 
+    1.28634822954602556777103927743155509233474731445312e+00, /* twoPowerIndex2hi[93] */ 
+    -3.41695570693618197637835756165078424638638756108411e-17, /* twoPowerIndex2mi[93] */ 
+    3.01980638845024588477534724775904900964451374240343e-33, /* twoPowerIndex2lo[93] */ 
+  } , 
+  { 
+    1.28983587340666572274017198651563376188278198242188e+00, /* twoPowerIndex2hi[94] */ 
+    8.94925753089759172194875997189204564115016328268090e-17, /* twoPowerIndex2mi[94] */ 
+    1.20830737845688318745384554764993450976718105981461e-33, /* twoPowerIndex2lo[94] */ 
+  } , 
+  { 
+    1.29333297322908946647146422037621960043907165527344e+00, /* twoPowerIndex2hi[95] */ 
+    -2.97459044313275164581312778190571731582573264222880e-17, /* twoPowerIndex2mi[95] */ 
+    1.16237613827319824876464974429153654014369509787634e-33, /* twoPowerIndex2lo[95] */ 
+  } , 
+  { 
+    1.29683955465100964055125132290413603186607360839844e+00, /* twoPowerIndex2hi[96] */ 
+    2.53825027948883149592910250791940344234383392801619e-17, /* twoPowerIndex2mi[96] */ 
+    1.68678246461832500334243039646153124282288438904092e-34, /* twoPowerIndex2lo[96] */ 
+  } , 
+  { 
+    1.30035564337965059422685953904874622821807861328125e+00, /* twoPowerIndex2hi[97] */ 
+    5.67872810280221742200488134915364617768988996925235e-17, /* twoPowerIndex2mi[97] */ 
+    -2.65697595108343105071012773811939091954697862387724e-33, /* twoPowerIndex2lo[97] */ 
+  } , 
+  { 
+    1.30388126519193581209776766627328470349311828613281e+00, /* twoPowerIndex2hi[98] */ 
+    8.64767559826787117946355165568051639464066963273840e-17, /* twoPowerIndex2mi[98] */ 
+    8.70201872477350096167517355607069078597678984954289e-34, /* twoPowerIndex2lo[98] */ 
+  } , 
+  { 
+    1.30741644593467731816360810626065358519554138183594e+00, /* twoPowerIndex2hi[99] */ 
+    -7.33664565287886889230365718649852916028408328060276e-17, /* twoPowerIndex2mi[99] */ 
+    -2.93367882958631685351818537761286406545337467653224e-33, /* twoPowerIndex2lo[99] */ 
+  } , 
+  { 
+    1.31096121152476441373835314152529463171958923339844e+00, /* twoPowerIndex2hi[100] */ 
+    -7.18153613551945385697245613605196258733040544776187e-17, /* twoPowerIndex2mi[100] */ 
+    -2.12629266743969557140434977160228094057588798528197e-34, /* twoPowerIndex2lo[100] */ 
+  } , 
+  { 
+    1.31451558794935463581055046233814209699630737304688e+00, /* twoPowerIndex2hi[101] */ 
+    2.26754331510458564505142831387082924518590502314377e-17, /* twoPowerIndex2mi[101] */ 
+    -7.52544640273480434326029480252966858598400235446401e-34, /* twoPowerIndex2lo[101] */ 
+  } , 
+  { 
+    1.31807960126606404926974391855765134096145629882812e+00, /* twoPowerIndex2hi[102] */ 
+    -5.45795582714915350249059559812768392944707787964569e-17, /* twoPowerIndex2mi[102] */ 
+    3.01605678846279399154010507026593082215688854819315e-34, /* twoPowerIndex2lo[102] */ 
+  } , 
+  { 
+    1.32165327760315753913289427146082744002342224121094e+00, /* twoPowerIndex2hi[103] */ 
+    -2.48063824591302174150388078679826792820566433791932e-17, /* twoPowerIndex2mi[103] */ 
+    -7.98826352342197225244683042177702410050087972196938e-34, /* twoPowerIndex2lo[103] */ 
+  } , 
+  { 
+    1.32523664315974132321684919588733464479446411132812e+00, /* twoPowerIndex2hi[104] */ 
+    -2.85873121003886137327027220806882812126373511580572e-17, /* twoPowerIndex2mi[104] */ 
+    7.62021406397260431456821182703024347950927217409368e-34, /* twoPowerIndex2lo[104] */ 
+  } , 
+  { 
+    1.32882972420595435458778865722706541419029235839844e+00, /* twoPowerIndex2hi[105] */ 
+    4.08908622391016005194851803726881862830375046944341e-17, /* twoPowerIndex2mi[105] */ 
+    -8.25755527905788850028602577519818711544066895869934e-34, /* twoPowerIndex2lo[105] */ 
+  } , 
+  { 
+    1.33243254708316150036750968865817412734031677246094e+00, /* twoPowerIndex2hi[106] */ 
+    -5.10158663091674395948874951281987248409217090958003e-17, /* twoPowerIndex2mi[106] */ 
+    1.24161698455614255772408207369534691020717040259615e-33, /* twoPowerIndex2lo[106] */ 
+  } , 
+  { 
+    1.33604513820414583236129146825987845659255981445312e+00, /* twoPowerIndex2hi[107] */ 
+    -5.89186635638880135250424875698763827220081961896780e-17, /* twoPowerIndex2mi[107] */ 
+    4.82773672901544401626262260553683707114055277401310e-33, /* twoPowerIndex2lo[107] */ 
+  } , 
+  { 
+    1.33966752405330291608720472140703350305557250976562e+00, /* twoPowerIndex2hi[108] */ 
+    8.92728259483173198426255486589831591472085466011828e-17, /* twoPowerIndex2mi[108] */ 
+    -7.69657983531899254540849298389093495155758992415150e-34, /* twoPowerIndex2lo[108] */ 
+  } , 
+  { 
+    1.34329973118683532185002604819601401686668395996094e+00, /* twoPowerIndex2hi[109] */ 
+    -5.80258089020143775129607366972124060945118168095697e-17, /* twoPowerIndex2mi[109] */ 
+    -5.62848183889096727330900462318018132434931156577971e-33, /* twoPowerIndex2lo[109] */ 
+  } , 
+  { 
+    1.34694178623294580354752270068274810910224914550781e+00, /* twoPowerIndex2hi[110] */ 
+    3.22406510125467916912928274924363934664289972360091e-17, /* twoPowerIndex2mi[110] */ 
+    -2.51832203762622189165076753162586788705235166031733e-33, /* twoPowerIndex2lo[110] */ 
+  } , 
+  { 
+    1.35059371589203447427962601068429648876190185546875e+00, /* twoPowerIndex2hi[111] */ 
+    -8.28711038146241653260111018049835125653080776498248e-17, /* twoPowerIndex2mi[111] */ 
+    2.79728744284194320208556684414100450680158956985147e-33, /* twoPowerIndex2lo[111] */ 
+  } , 
+  { 
+    1.35425554693689265128853094211081042885780334472656e+00, /* twoPowerIndex2hi[112] */ 
+    7.70094837980298946162338224151128414915778826123523e-17, /* twoPowerIndex2mi[112] */ 
+    -2.24074836437395028882100810844688282941385619430371e-33, /* twoPowerIndex2lo[112] */ 
+  } , 
+  { 
+    1.35792730621290114179089414392365142703056335449219e+00, /* twoPowerIndex2hi[113] */ 
+    -9.52963574482518886708763256581296493681255450761483e-17, /* twoPowerIndex2mi[113] */ 
+    3.94129059821951840862728683884868804521606133502020e-33, /* twoPowerIndex2lo[113] */ 
+  } , 
+  { 
+    1.36160902063822475405174827756127342581748962402344e+00, /* twoPowerIndex2hi[114] */ 
+    1.53378766127066804593191316699398053341331687545086e-18, /* twoPowerIndex2mi[114] */ 
+    2.89261626537731219518175809165487342026413059288117e-36, /* twoPowerIndex2lo[114] */ 
+  } , 
+  { 
+    1.36530071720401191548432962008519098162651062011719e+00, /* twoPowerIndex2hi[115] */ 
+    -1.00053631259747651675482154696825016305954942740907e-16, /* twoPowerIndex2mi[115] */ 
+    3.54928742268818507952779264530371584695776903628456e-33, /* twoPowerIndex2lo[115] */ 
+  } , 
+  { 
+    1.36900242297459051599162194179370999336242675781250e+00, /* twoPowerIndex2hi[116] */ 
+    9.59379791911884877255545693637832999511204427845953e-17, /* twoPowerIndex2mi[116] */ 
+    -4.88674958784947176959607858061848292445663702071206e-33, /* twoPowerIndex2lo[116] */ 
+  } , 
+  { 
+    1.37271416508766841424460380949312821030616760253906e+00, /* twoPowerIndex2hi[117] */ 
+    -4.49596059523484126201398925346079480634909342749196e-17, /* twoPowerIndex2mi[117] */ 
+    1.62562490898807010621996863149362627894393561257459e-33, /* twoPowerIndex2lo[117] */ 
+  } , 
+  { 
+    1.37643597075453016920221216423669829964637756347656e+00, /* twoPowerIndex2hi[118] */ 
+    -6.89858893587180104162314142277078705990308809896903e-17, /* twoPowerIndex2mi[118] */ 
+    -9.23154448708427617703494512509845826869729176165562e-34, /* twoPowerIndex2lo[118] */ 
+  } , 
+  { 
+    1.38016786726023799047879947465844452381134033203125e+00, /* twoPowerIndex2hi[119] */ 
+    1.05103145799699839461846797726451249170514296493641e-16, /* twoPowerIndex2mi[119] */ 
+    -5.20959403592477818815879901700610698718705668178631e-34, /* twoPowerIndex2lo[119] */ 
+  } , 
+  { 
+    1.38390988196383202257777611521305516362190246582031e+00, /* twoPowerIndex2hi[120] */ 
+    -6.77051165879478628715737183479431151106043475381389e-17, /* twoPowerIndex2mi[120] */ 
+    5.25954134785524271676320971772030766300829615286373e-34, /* twoPowerIndex2lo[120] */ 
+  } , 
+  { 
+    1.38766204229852907481301826919661834836006164550781e+00, /* twoPowerIndex2hi[121] */ 
+    8.42298427487541531761909892542259393461447669376914e-17, /* twoPowerIndex2mi[121] */ 
+    4.46434333442928450361645463407705485478297602125654e-33, /* twoPowerIndex2lo[121] */ 
+  } , 
+  { 
+    1.39142437577192623621158418245613574981689453125000e+00, /* twoPowerIndex2hi[122] */ 
+    -4.90617486528898932450860315361961796480813828948749e-17, /* twoPowerIndex2mi[122] */ 
+    9.41947135373105773751136712580396521761942792376029e-34, /* twoPowerIndex2lo[122] */ 
+  } , 
+  { 
+    1.39519690996620027156893684150418266654014587402344e+00, /* twoPowerIndex2hi[123] */ 
+    -9.32933622422549655219151241388008074464471865703576e-17, /* twoPowerIndex2mi[123] */ 
+    3.85009236000292978304841859575059463134595037095756e-33, /* twoPowerIndex2lo[123] */ 
+  } , 
+  { 
+    1.39897967253831123635166022722842171788215637207031e+00, /* twoPowerIndex2hi[124] */ 
+    -9.61421320905132307233280072508933760749140842467170e-17, /* twoPowerIndex2mi[124] */ 
+    3.97465190077505680357285219692652769985214754647576e-33, /* twoPowerIndex2lo[124] */ 
+  } , 
+  { 
+    1.40277269122020475933254601841326802968978881835938e+00, /* twoPowerIndex2hi[125] */ 
+    -5.29578324940798922315924317002369067798815514694702e-17, /* twoPowerIndex2mi[125] */ 
+    3.01901046243343149118437935612420792667881700875337e-33, /* twoPowerIndex2lo[125] */ 
+  } , 
+  { 
+    1.40657599381901543544870492041809484362602233886719e+00, /* twoPowerIndex2hi[126] */ 
+    7.03491481213642218799944724280847971836007996977941e-18, /* twoPowerIndex2mi[126] */ 
+    -1.87515169946872014216649248611672456272335645241101e-34, /* twoPowerIndex2lo[126] */ 
+  } , 
+  { 
+    1.41038960821727066274888784391805529594421386718750e+00, /* twoPowerIndex2hi[127] */ 
+    4.16654872843506225899503851018795172623979530606656e-17, /* twoPowerIndex2mi[127] */ 
+    -2.40474814922300276552970992509731322006163156322473e-33, /* twoPowerIndex2lo[127] */ 
+  } , 
+  { 
+    1.41421356237309514547462185873882845044136047363281e+00, /* twoPowerIndex2hi[128] */ 
+    -9.66729331345291345105469972976694765012981670542977e-17, /* twoPowerIndex2mi[128] */ 
+    4.13867530869941356271900493210877889450985709540127e-33, /* twoPowerIndex2lo[128] */ 
+  } , 
+  { 
+    1.41804788432041517509674122266005724668502807617188e+00, /* twoPowerIndex2hi[129] */ 
+    2.27443854218552945230015468607785816403034626672752e-17, /* twoPowerIndex2mi[129] */ 
+    6.11983793133626012461813597014932765313298826737750e-34, /* twoPowerIndex2lo[129] */ 
+  } , 
+  { 
+    1.42189260216916557588717751059448346495628356933594e+00, /* twoPowerIndex2hi[130] */ 
+    -1.60778289158902441338409661475962612292273904731179e-17, /* twoPowerIndex2mi[130] */ 
+    7.68807227837949092746953551637615091691382851311989e-34, /* twoPowerIndex2lo[130] */ 
+  } , 
+  { 
+    1.42574774410549420800009556842269375920295715332031e+00, /* twoPowerIndex2hi[131] */ 
+    9.88069075850060728430483918067849097743150129356283e-17, /* twoPowerIndex2mi[131] */ 
+    -5.89890673162487333450312700634529433299513739860251e-34, /* twoPowerIndex2lo[131] */ 
+  } , 
+  { 
+    1.42961333839197002326670826732879504561424255371094e+00, /* twoPowerIndex2hi[132] */ 
+    -1.20316424890536551791763281075597751007148682598677e-17, /* twoPowerIndex2mi[132] */ 
+    3.96492532243389364766543780399018506300743370884771e-35, /* twoPowerIndex2lo[132] */ 
+  } , 
+  { 
+    1.43348941336778890054404200782300904393196105957031e+00, /* twoPowerIndex2hi[133] */ 
+    -5.80245424392682610310488944560210655448170298910740e-17, /* twoPowerIndex2mi[133] */ 
+    -1.27850570502833499820846554122319062699206032852878e-33, /* twoPowerIndex2lo[133] */ 
+  } , 
+  { 
+    1.43737599744898236764356624917127192020416259765625e+00, /* twoPowerIndex2hi[134] */ 
+    -4.20403401646755661224775048184723117388682958150796e-17, /* twoPowerIndex2mi[134] */ 
+    -7.70667502347783805122329265482919129596484289448427e-34, /* twoPowerIndex2lo[134] */ 
+  } , 
+  { 
+    1.44127311912862565712600826373090967535972595214844e+00, /* twoPowerIndex2hi[135] */ 
+    5.60250365087898567500720975825924684730592892906837e-18, /* twoPowerIndex2mi[135] */ 
+    -1.78220423347129903406970040172107023860560188781295e-34, /* twoPowerIndex2lo[135] */ 
+  } , 
+  { 
+    1.44518080697704665027458759141154587268829345703125e+00, /* twoPowerIndex2hi[136] */ 
+    -3.02375813499398731939978948265280760393682335269040e-17, /* twoPowerIndex2mi[136] */ 
+    -1.77301195820250091791088617662298487007284882395542e-33, /* twoPowerIndex2lo[136] */ 
+  } , 
+  { 
+    1.44909908964203504311285541916731745004653930664062e+00, /* twoPowerIndex2hi[137] */ 
+    -6.25940500081930925440932857364551992320704493612607e-17, /* twoPowerIndex2mi[137] */ 
+    -2.36452377319288878996205003453964701184928253771460e-33, /* twoPowerIndex2lo[137] */ 
+  } , 
+  { 
+    1.45302799584905262264555858564563095569610595703125e+00, /* twoPowerIndex2hi[138] */ 
+    -5.77994860939610610226179416579990281210592783980168e-17, /* twoPowerIndex2mi[138] */ 
+    4.65449358394055530593548186610866020262848130035371e-33, /* twoPowerIndex2lo[138] */ 
+  } , 
+  { 
+    1.45696755440144376514410851086722686886787414550781e+00, /* twoPowerIndex2hi[139] */ 
+    5.64867945387699814049307308799040836462273423076302e-17, /* twoPowerIndex2mi[139] */ 
+    5.24967327842642970132560251109596346953497158893017e-33, /* twoPowerIndex2lo[139] */ 
+  } , 
+  { 
+    1.46091779418064704465507475106278434395790100097656e+00, /* twoPowerIndex2hi[140] */ 
+    -5.60037718607521580013156831807759453639536208267684e-17, /* twoPowerIndex2mi[140] */ 
+    -4.80948804890004400970317146361816382779746350931714e-33, /* twoPowerIndex2lo[140] */ 
+  } , 
+  { 
+    1.46487874414640573128565392835298553109169006347656e+00, /* twoPowerIndex2hi[141] */ 
+    9.53076754358715731899854652788308463901335051797481e-17, /* twoPowerIndex2mi[141] */ 
+    -3.69846856553667878907707087404919621014972996085084e-34, /* twoPowerIndex2lo[141] */ 
+  } , 
+  { 
+    1.46885043333698184220281746092950925230979919433594e+00, /* twoPowerIndex2hi[142] */ 
+    8.46588275653362760829764150554853775141300918573480e-17, /* twoPowerIndex2mi[142] */ 
+    -3.90998276339861143341660977862311141233961685102469e-33, /* twoPowerIndex2lo[142] */ 
+  } , 
+  { 
+    1.47283289086936752809720019286032766103744506835938e+00, /* twoPowerIndex2hi[143] */ 
+    6.69177408194058937165142250867005391292400049525410e-17, /* twoPowerIndex2mi[143] */ 
+    -8.03669204969698754299165627994407636733379029439982e-34, /* twoPowerIndex2lo[143] */ 
+  } , 
+  { 
+    1.47682614593949934622685304930200800299644470214844e+00, /* twoPowerIndex2hi[144] */ 
+    -3.48399455689279579579151031868718147769491495422105e-17, /* twoPowerIndex2mi[144] */ 
+    -1.21157704523090580028169713170353136148082368354920e-34, /* twoPowerIndex2lo[144] */ 
+  } , 
+  { 
+    1.48083022782247186732718091661809012293815612792969e+00, /* twoPowerIndex2hi[145] */ 
+    -9.68695210263061857840747540204704607519762865792956e-17, /* twoPowerIndex2mi[145] */ 
+    -1.83093426853584085824897446366702716297781292402913e-33, /* twoPowerIndex2lo[145] */ 
+  } , 
+  { 
+    1.48484516587275239274390514765400439500808715820312e+00, /* twoPowerIndex2hi[146] */ 
+    1.07800867644074807558776439636082922597575014362313e-16, /* twoPowerIndex2mi[146] */ 
+    -5.64322930459841965610869302140803670685265398096703e-33, /* twoPowerIndex2lo[146] */ 
+  } , 
+  { 
+    1.48887098952439700383365561719983816146850585937500e+00, /* twoPowerIndex2hi[147] */ 
+    6.15536715774287133031442683555328448918198696888232e-17, /* twoPowerIndex2mi[147] */ 
+    -4.97910816988088435273822881157670080090569125411939e-33, /* twoPowerIndex2lo[147] */ 
+  } , 
+  { 
+    1.49290772829126483500772337720263749361038208007812e+00, /* twoPowerIndex2hi[148] */ 
+    1.41929201542840357707378184476885202767753055101956e-17, /* twoPowerIndex2mi[148] */ 
+    2.77326329344780505247628358108799734324783290873618e-34, /* twoPowerIndex2lo[148] */ 
+  } , 
+  { 
+    1.49695541176723545540028226241702213883399963378906e+00, /* twoPowerIndex2hi[149] */ 
+    -2.86166325389915821108552064438047364932070584938283e-17, /* twoPowerIndex2mi[149] */ 
+    1.69686608128918952548566738297292377457978745974095e-33, /* twoPowerIndex2lo[149] */ 
+  } , 
+  { 
+    1.50101406962642558440279572096187621355056762695312e+00, /* twoPowerIndex2hi[150] */ 
+    -6.41376727579023503858812048925241405475211237704851e-17, /* twoPowerIndex2mi[150] */ 
+    2.82195851325152411917232690264483764919093983459578e-33, /* twoPowerIndex2lo[150] */ 
+  } , 
+  { 
+    1.50508373162340647333223841997096315026283264160156e+00, /* twoPowerIndex2hi[151] */ 
+    7.07471061358284636428966552102679897344999964477370e-17, /* twoPowerIndex2mi[151] */ 
+    5.47182451113168633513345414695618261455556199846033e-33, /* twoPowerIndex2lo[151] */ 
+  } , 
+  { 
+    1.50916442759342284141155232646269723773002624511719e+00, /* twoPowerIndex2hi[152] */ 
+    -1.01645532775429503910501990740249618370059871055172e-16, /* twoPowerIndex2mi[152] */ 
+    2.04191706967403438352422808603561166583202022922508e-34, /* twoPowerIndex2lo[152] */ 
+  } , 
+  { 
+    1.51325618745260981334865846292814239859580993652344e+00, /* twoPowerIndex2hi[153] */ 
+    8.88449785133871209092649041499311129526944241199989e-17, /* twoPowerIndex2mi[153] */ 
+    2.91936471176098668822594707319785335362070597228113e-33, /* twoPowerIndex2lo[153] */ 
+  } , 
+  { 
+    1.51735904119821474189677701360778883099555969238281e+00, /* twoPowerIndex2hi[154] */ 
+    -4.30869947204334080070359075619950231322291381069658e-17, /* twoPowerIndex2mi[154] */ 
+    -2.07710051583928391994432084290324754641836773161677e-33, /* twoPowerIndex2lo[154] */ 
+  } , 
+  { 
+    1.52147301890881458952264893014216795563697814941406e+00, /* twoPowerIndex2hi[155] */ 
+    -5.99638767594568341984511314492633394994506478752408e-18, /* twoPowerIndex2mi[155] */ 
+    3.17143766271956082831607786726725332519992796566057e-34, /* twoPowerIndex2lo[155] */ 
+  } , 
+  { 
+    1.52559815074453841710067081294255331158638000488281e+00, /* twoPowerIndex2hi[156] */ 
+    -1.10249417123425609363148008789604625195179292613569e-16, /* twoPowerIndex2mi[156] */ 
+    -2.99382882637137806007903782085057425945683820190483e-33, /* twoPowerIndex2lo[156] */ 
+  } , 
+  { 
+    1.52973446694728698602716576715465635061264038085938e+00, /* twoPowerIndex2hi[157] */ 
+    3.78579211515721965312581373704701424608681121499690e-17, /* twoPowerIndex2mi[157] */ 
+    -1.13571103486415982326219089189691662922640586007719e-33, /* twoPowerIndex2lo[157] */ 
+  } , 
+  { 
+    1.53388199784095591304833305912325158715248107910156e+00, /* twoPowerIndex2hi[158] */ 
+    8.87522684443844614134710276926299051548575116130438e-17, /* twoPowerIndex2mi[158] */ 
+    5.65828980010215437966290324879670843424190599145086e-33, /* twoPowerIndex2lo[158] */ 
+  } , 
+  { 
+    1.53804077383165682668675344757502898573875427246094e+00, /* twoPowerIndex2hi[159] */ 
+    1.01746723511613592944060366030036337911942910864054e-16, /* twoPowerIndex2mi[159] */ 
+    -6.16113785188921653281369270464531950196652324750545e-33, /* twoPowerIndex2lo[159] */ 
+  } , 
+  { 
+    1.54221082540794074411394376511452719569206237792969e+00, /* twoPowerIndex2hi[160] */ 
+    7.94983480969762085616103882937991564856794389991833e-17, /* twoPowerIndex2mi[160] */ 
+    -9.15995637410036729585390444224530830478731117122757e-34, /* twoPowerIndex2lo[160] */ 
+  } , 
+  { 
+    1.54639218314102144802291149972006678581237792968750e+00, /* twoPowerIndex2hi[161] */ 
+    1.06839600056572198027549065429961389678954641782420e-16, /* twoPowerIndex2mi[161] */ 
+    5.83718082376326468071834720519101607593932706278383e-33, /* twoPowerIndex2lo[161] */ 
+  } , 
+  { 
+    1.55058487768499997372373400139622390270233154296875e+00, /* twoPowerIndex2hi[162] */ 
+    -1.46007065906893851790690523707186238729906746210228e-17, /* twoPowerIndex2mi[162] */ 
+    -4.77975052472883005267659258241957348576642768400574e-34, /* twoPowerIndex2lo[162] */ 
+  } , 
+  { 
+    1.55478893977708865214992783876368775963783264160156e+00, /* twoPowerIndex2hi[163] */ 
+    -8.00316135011603564103663107910618902189361743978666e-17, /* twoPowerIndex2mi[163] */ 
+    3.43160502571587532396871747107270731912475137535806e-33, /* twoPowerIndex2lo[163] */ 
+  } , 
+  { 
+    1.55900440023783692922165755589958280324935913085938e+00, /* twoPowerIndex2hi[164] */ 
+    3.78120705335752750188190562589679090842557793649900e-17, /* twoPowerIndex2mi[164] */ 
+    5.94230221045385633407443935898656310894518533675204e-35, /* twoPowerIndex2lo[164] */ 
+  } , 
+  { 
+    1.56323128997135762929815427924040704965591430664062e+00, /* twoPowerIndex2hi[165] */ 
+    7.48477764559073438896405945862770341857979941287485e-17, /* twoPowerIndex2mi[165] */ 
+    4.94341409405079431354025041618045920322070178828810e-33, /* twoPowerIndex2lo[165] */ 
+  } , 
+  { 
+    1.56746963996555299658552939945366233587265014648438e+00, /* twoPowerIndex2hi[166] */ 
+    -1.03520617688497219882501733748772197895029551157134e-16, /* twoPowerIndex2mi[166] */ 
+    2.69762629340863925921698542881054318260398435611831e-33, /* twoPowerIndex2lo[166] */ 
+  } , 
+  { 
+    1.57171948129234140267840302840340882539749145507812e+00, /* twoPowerIndex2hi[167] */ 
+    -3.34298400468720006928343525035325490394427299333229e-17, /* twoPowerIndex2mi[167] */ 
+    -2.50544082539015029477640638701507533908898561837361e-33, /* twoPowerIndex2lo[167] */ 
+  } , 
+  { 
+    1.57598084510788649659218663146020844578742980957031e+00, /* twoPowerIndex2hi[168] */ 
+    -1.01369164712783039807957177429288269249745537889645e-17, /* twoPowerIndex2mi[168] */ 
+    5.43913851556220712785038586461119929989856637311730e-34, /* twoPowerIndex2lo[168] */ 
+  } , 
+  { 
+    1.58025376265282457843852625956060364842414855957031e+00, /* twoPowerIndex2hi[169] */ 
+    -5.16340292955446806158689134977166394905402588028521e-17, /* twoPowerIndex2mi[169] */ 
+    -1.98856458425291225043917897550918006467398545517999e-33, /* twoPowerIndex2lo[169] */ 
+  } , 
+  { 
+    1.58453826525249374945758518151706084609031677246094e+00, /* twoPowerIndex2hi[170] */ 
+    -1.93377170345857029303925724496164498303135170130746e-17, /* twoPowerIndex2mi[170] */ 
+    -9.89372992541829104414473016298122291261880812772281e-35, /* twoPowerIndex2lo[170] */ 
+  } , 
+  { 
+    1.58883438431716395022874621645314618945121765136719e+00, /* twoPowerIndex2hi[171] */ 
+    -5.99495011882447940051706621855722696087552777078266e-18, /* twoPowerIndex2mi[171] */ 
+    3.40432693814393853234442560718610272389282350802004e-34, /* twoPowerIndex2lo[171] */ 
+  } , 
+  { 
+    1.59314215134226699888131406623870134353637695312500e+00, /* twoPowerIndex2hi[172] */ 
+    -1.00944065423119637216151952902063201612012779755882e-16, /* twoPowerIndex2mi[172] */ 
+    4.60848399034962572477662350836868643017178368092553e-33, /* twoPowerIndex2lo[172] */ 
+  } , 
+  { 
+    1.59746159790862707339442749798763543367385864257812e+00, /* twoPowerIndex2hi[173] */ 
+    2.48683927962209992068662736190579938975994331984811e-17, /* twoPowerIndex2mi[173] */ 
+    -1.50139044932662639156159749783676630723204028336974e-33, /* twoPowerIndex2lo[173] */ 
+  } , 
+  { 
+    1.60179275568269341434302077686879783868789672851562e+00, /* twoPowerIndex2hi[174] */ 
+    -6.05491745352778434252262534739031747865810833110836e-17, /* twoPowerIndex2mi[174] */ 
+    -7.86094560028510434095753390665330649540069137640692e-34, /* twoPowerIndex2lo[174] */ 
+  } , 
+  { 
+    1.60613565641677102924234077363507822155952453613281e+00, /* twoPowerIndex2hi[175] */ 
+    -1.03545452880599952590528959597961463687339938363058e-16, /* twoPowerIndex2mi[175] */ 
+    1.51213609096324399449109200330291470931948233371206e-33, /* twoPowerIndex2lo[175] */ 
+  } , 
+  { 
+    1.61049033194925428347232809755951166152954101562500e+00, /* twoPowerIndex2hi[176] */ 
+    2.47071925697978878522451183466139791436957933053447e-17, /* twoPowerIndex2mi[176] */ 
+    1.06968477888935897586507304780358756526593706030066e-33, /* twoPowerIndex2lo[176] */ 
+  } , 
+  { 
+    1.61485681420486071324660315440269187092781066894531e+00, /* twoPowerIndex2hi[177] */ 
+    -7.31666339912512326264416948227914471406433964055342e-17, /* twoPowerIndex2mi[177] */ 
+    -1.01595252547599872757692201057811430532632162793873e-33, /* twoPowerIndex2lo[177] */ 
+  } , 
+  { 
+    1.61923513519486372835842757922364398837089538574219e+00, /* twoPowerIndex2hi[178] */ 
+    2.09413341542290924068018622986227170935043667427799e-17, /* twoPowerIndex2mi[178] */ 
+    1.27693128474282181836038535044586644559852980247542e-35, /* twoPowerIndex2lo[178] */ 
+  } , 
+  { 
+    1.62362532701732886764034446969162672758102416992188e+00, /* twoPowerIndex2hi[179] */ 
+    -3.58451285141447470995906396542340522908345291030162e-17, /* twoPowerIndex2mi[179] */ 
+    2.01654731462508044313244700316326841947169625164993e-33, /* twoPowerIndex2lo[179] */ 
+  } , 
+  { 
+    1.62802742185734783397776936908485367894172668457031e+00, /* twoPowerIndex2hi[180] */ 
+    -6.71295508470708408629558620522800193343463268850872e-17, /* twoPowerIndex2mi[180] */ 
+    1.86124288813399584090278118171650158752835667500490e-33, /* twoPowerIndex2lo[180] */ 
+  } , 
+  { 
+    1.63244145198727497181323542463360354304313659667969e+00, /* twoPowerIndex2hi[181] */ 
+    9.85281923042999296413676989512408187295863462194442e-17, /* twoPowerIndex2mi[181] */ 
+    5.29569525404258920205362940337854972086009006345576e-33, /* twoPowerIndex2lo[181] */ 
+  } , 
+  { 
+    1.63686744976696441078445332095725461840629577636719e+00, /* twoPowerIndex2hi[182] */ 
+    7.69832507131987557450420469117071256581189667741842e-17, /* twoPowerIndex2mi[182] */ 
+    4.09860242950305193227828568999385703476733354155568e-33, /* twoPowerIndex2lo[182] */ 
+  } , 
+  { 
+    1.64130544764400632118395151337608695030212402343750e+00, /* twoPowerIndex2hi[183] */ 
+    -9.24756873764070550805453694792420241616904847542502e-17, /* twoPowerIndex2mi[183] */ 
+    -5.66841671716411725558391721762496706416420121341510e-33, /* twoPowerIndex2lo[183] */ 
+  } , 
+  { 
+    1.64575547815396494577555586147354915738105773925781e+00, /* twoPowerIndex2hi[184] */ 
+    -1.01256799136747726037875241569662212149731136230039e-16, /* twoPowerIndex2mi[184] */ 
+    -6.73838498803664271467304077725442401461793880458369e-34, /* twoPowerIndex2lo[184] */ 
+  } , 
+  { 
+    1.65021757392061774183389388781506568193435668945312e+00, /* twoPowerIndex2hi[185] */ 
+    9.13327958872990419009159019732303823956193063692260e-18, /* twoPowerIndex2mi[185] */ 
+    3.31329049471088319516103160150508562888797231765374e-34, /* twoPowerIndex2lo[185] */ 
+  } , 
+  { 
+    1.65469176765619430113929411163553595542907714843750e+00, /* twoPowerIndex2hi[186] */ 
+    9.64329430319602866138745392638249192962312397541490e-17, /* twoPowerIndex2mi[186] */ 
+    -4.32763297888919888932772949708066540512036129088577e-33, /* twoPowerIndex2lo[186] */ 
+  } , 
+  { 
+    1.65917809216161615815110508265206590294837951660156e+00, /* twoPowerIndex2hi[187] */ 
+    -7.27554555082305065439455737740507311483946617362319e-17, /* twoPowerIndex2mi[187] */ 
+    3.10484891456420478411627075503167773401278965655170e-33, /* twoPowerIndex2lo[187] */ 
+  } , 
+  { 
+    1.66367658032673637613640948984539136290550231933594e+00, /* twoPowerIndex2hi[188] */ 
+    5.89099269671309967045155789620226639428173542900082e-17, /* twoPowerIndex2mi[188] */ 
+    2.37785299276765025315795732233641105960161859663372e-33, /* twoPowerIndex2lo[188] */ 
+  } , 
+  { 
+    1.66818726513058246396781214571092277765274047851562e+00, /* twoPowerIndex2hi[189] */ 
+    4.26917801957061509059398373181907237215463008872616e-17, /* twoPowerIndex2mi[189] */ 
+    -1.29778952562173962775902833320678339532997660143370e-33, /* twoPowerIndex2lo[189] */ 
+  } , 
+  { 
+    1.67271017964159662838596887013409286737442016601562e+00, /* twoPowerIndex2hi[190] */ 
+    -5.47671596459956307615994670748846981852905207478754e-17, /* twoPowerIndex2mi[190] */ 
+    -6.83184087311466618520328543794554690349915956941633e-34, /* twoPowerIndex2lo[190] */ 
+  } , 
+  { 
+    1.67724535701787846875276954961009323596954345703125e+00, /* twoPowerIndex2hi[191] */ 
+    8.30394950995073278534724188038576562525621449256837e-17, /* twoPowerIndex2mi[191] */ 
+    -3.67907931420049303621015743180896250029187335304385e-33, /* twoPowerIndex2lo[191] */ 
+  } , 
+  { 
+    1.68179283050742900407215074665145948529243469238281e+00, /* twoPowerIndex2hi[192] */ 
+    8.19901002058149652012724391042374107310082144797238e-17, /* twoPowerIndex2mi[192] */ 
+    5.10351519472809316392686812760480457926425713861784e-33, /* twoPowerIndex2lo[192] */ 
+  } , 
+  { 
+    1.68635263344839336774327875900780782103538513183594e+00, /* twoPowerIndex2hi[193] */ 
+    -7.18146327835801067471572934253931013376714544778519e-17, /* twoPowerIndex2mi[193] */ 
+    3.52898289014887861077288846281933083915589270719972e-33, /* twoPowerIndex2lo[193] */ 
+  } , 
+  { 
+    1.69092479926930527867057207913603633642196655273438e+00, /* twoPowerIndex2hi[194] */ 
+    -9.66967147439488016589832627855454450790922345010565e-17, /* twoPowerIndex2mi[194] */ 
+    1.93673800521759096892309246646768463294752053454796e-33, /* twoPowerIndex2lo[194] */ 
+  } , 
+  { 
+    1.69550936148933262259674847882706671953201293945312e+00, /* twoPowerIndex2hi[195] */ 
+    7.23841687284516664081325689368355266258278971330115e-17, /* twoPowerIndex2mi[195] */ 
+    -4.72142878783650889336226782989306533177552216168780e-33, /* twoPowerIndex2lo[195] */ 
+  } , 
+  { 
+    1.70010635371852347752508194389520213007926940917969e+00, /* twoPowerIndex2hi[196] */ 
+    -8.02371937039770024588528464451482959960563128920877e-18, /* twoPowerIndex2mi[196] */ 
+    4.50894675051846528463958043437010583905518288996850e-34, /* twoPowerIndex2lo[196] */ 
+  } , 
+  { 
+    1.70471580965805125096323990874225273728370666503906e+00, /* twoPowerIndex2hi[197] */ 
+    -2.72888328479728156256649817220242427763035044600143e-17, /* twoPowerIndex2mi[197] */ 
+    -4.78966969731514783785812327748180984426830295688131e-34, /* twoPowerIndex2lo[197] */ 
+  } , 
+  { 
+    1.70933776310046292579158944135997444391250610351562e+00, /* twoPowerIndex2hi[198] */ 
+    -9.86877945663293107628372224517314496289872901148114e-17, /* twoPowerIndex2mi[198] */ 
+    -6.85025222060857007426626094774522285678578778256981e-34, /* twoPowerIndex2lo[198] */ 
+  } , 
+  { 
+    1.71397224792992597386387387814465910196304321289062e+00, /* twoPowerIndex2hi[199] */ 
+    6.47397510775336706412073988816560535911210776420163e-17, /* twoPowerIndex2mi[199] */ 
+    2.27573149080872552498096897849055426251128097439426e-33, /* twoPowerIndex2lo[199] */ 
+  } , 
+  { 
+    1.71861929812247793414314855908742174506187438964844e+00, /* twoPowerIndex2hi[200] */ 
+    -1.85138041826311098821086356969536380719870481925638e-17, /* twoPowerIndex2mi[200] */ 
+    6.41562962530571009881963439719259893730039269925891e-34, /* twoPowerIndex2lo[200] */ 
+  } , 
+  { 
+    1.72327894774627399243627223768271505832672119140625e+00, /* twoPowerIndex2hi[201] */ 
+    -9.52212380039379996274889157686297699809734122180713e-17, /* twoPowerIndex2mi[201] */ 
+    2.02866645853394952359480765489840261160247275266736e-33, /* twoPowerIndex2lo[201] */ 
+  } , 
+  { 
+    1.72795123096183766975286744127515703439712524414062e+00, /* twoPowerIndex2hi[202] */ 
+    -1.07509818612046424458879695751780763147087565420428e-16, /* twoPowerIndex2mi[202] */ 
+    -1.61412967076299755734407780884081362069739071884994e-34, /* twoPowerIndex2lo[202] */ 
+  } , 
+  { 
+    1.73263618202231106657507098134374246001243591308594e+00, /* twoPowerIndex2hi[203] */ 
+    -1.69805107431541549406538664930124317335159068906677e-18, /* twoPowerIndex2mi[203] */ 
+    -2.66402312008479346328768862816128097997745127782773e-35, /* twoPowerIndex2lo[203] */ 
+  } , 
+  { 
+    1.73733383527370621735030908894259482622146606445312e+00, /* twoPowerIndex2hi[204] */ 
+    3.16438929929295694659064288262436215220581330791541e-17, /* twoPowerIndex2mi[204] */ 
+    2.46812086524635182684409036079744664142196277491485e-33, /* twoPowerIndex2lo[204] */ 
+  } , 
+  { 
+    1.74204422515515644498407255014171823859214782714844e+00, /* twoPowerIndex2hi[205] */ 
+    -1.52595911895078879235703824049564298322445354780003e-18, /* twoPowerIndex2mi[205] */ 
+    -8.17523608900014455382082672926541929180458870718501e-35, /* twoPowerIndex2lo[205] */ 
+  } , 
+  { 
+    1.74676738619916904760032139165559783577919006347656e+00, /* twoPowerIndex2hi[206] */ 
+    -1.07522904835075145041783457030040618806351398410292e-16, /* twoPowerIndex2mi[206] */ 
+    8.90461808811939147294432800114435837044658194814041e-34, /* twoPowerIndex2lo[206] */ 
+  } , 
+  { 
+    1.75150335303187820734649449150310829281806945800781e+00, /* twoPowerIndex2hi[207] */ 
+    -5.12445042059672465938775283877530577740069995954300e-17, /* twoPowerIndex2mi[207] */ 
+    -1.10691385189430357525360305608492620313871007739409e-33, /* twoPowerIndex2lo[207] */ 
+  } , 
+  { 
+    1.75625216037329945351075366488657891750335693359375e+00, /* twoPowerIndex2hi[208] */ 
+    2.96014069544887330703087179323550026749650613893620e-17, /* twoPowerIndex2mi[208] */ 
+    1.23348227448930022362949427574612725745479960698002e-33, /* twoPowerIndex2lo[208] */ 
+  } , 
+  { 
+    1.76101384303758390359462282503955066204071044921875e+00, /* twoPowerIndex2hi[209] */ 
+    -7.94325312503922771056589226542000745919657831036441e-17, /* twoPowerIndex2mi[209] */ 
+    -1.04403750867744833163298565704167076212852668996068e-33, /* twoPowerIndex2lo[209] */ 
+  } , 
+  { 
+    1.76578843593327272643023206910584121942520141601562e+00, /* twoPowerIndex2hi[210] */ 
+    9.46131501808326786659595799515277320480429557947658e-17, /* twoPowerIndex2mi[210] */ 
+    1.98867486219252293915985766016443087286320281152529e-33, /* twoPowerIndex2lo[210] */ 
+  } , 
+  { 
+    1.77057597406355471392203071445692330598831176757812e+00, /* twoPowerIndex2hi[211] */ 
+    5.96179451004055584766584184178983874814969039896383e-17, /* twoPowerIndex2mi[211] */ 
+    2.25217410358405709867930003709735313542997798337535e-33, /* twoPowerIndex2lo[211] */ 
+  } , 
+  { 
+    1.77537649252652118825324123463360592722892761230469e+00, /* twoPowerIndex2hi[212] */ 
+    6.42973179655657203395602172161574258202382771355994e-17, /* twoPowerIndex2mi[212] */ 
+    -3.05903038196122316059732104267589318807211463677414e-33, /* twoPowerIndex2lo[212] */ 
+  } , 
+  { 
+    1.78019002651542446180599199578864499926567077636719e+00, /* twoPowerIndex2hi[213] */ 
+    -5.28462728909161736516945207213792976192807478608583e-17, /* twoPowerIndex2mi[213] */ 
+    -8.77486215604854126189970187247268663448961942332927e-34, /* twoPowerIndex2lo[213] */ 
+  } , 
+  { 
+    1.78501661131893496481382044294150546193122863769531e+00, /* twoPowerIndex2hi[214] */ 
+    1.53304001210313138183913113480738748539708581780129e-17, /* twoPowerIndex2mi[214] */ 
+    5.51980832680936081410203965527728574047454546736523e-34, /* twoPowerIndex2lo[214] */ 
+  } , 
+  { 
+    1.78985628232140103754943538660882040858268737792969e+00, /* twoPowerIndex2hi[215] */ 
+    -4.15435466068335038727327499723453563952032099924980e-17, /* twoPowerIndex2mi[215] */ 
+    6.11515946295708221189397364669019622476882042095523e-35, /* twoPowerIndex2lo[215] */ 
+  } , 
+  { 
+    1.79470907500310716820024481421569362282752990722656e+00, /* twoPowerIndex2hi[216] */ 
+    1.82274584279120867697625715862678123206602563412216e-17, /* twoPowerIndex2mi[216] */ 
+    1.42176433874694971095041068746172287320972847635154e-33, /* twoPowerIndex2lo[216] */ 
+  } , 
+  { 
+    1.79957502494053511732374772691400721669197082519531e+00, /* twoPowerIndex2hi[217] */ 
+    -2.52688923335889795224096886042608995683536858583738e-17, /* twoPowerIndex2mi[217] */ 
+    1.44522688753239826542123866099361934109399231372306e-33, /* twoPowerIndex2lo[217] */ 
+  } , 
+  { 
+    1.80445416780662393207990135124418884515762329101562e+00, /* twoPowerIndex2hi[218] */ 
+    -5.17722240879331788327618111907586559317876939907178e-17, /* twoPowerIndex2mi[218] */ 
+    -3.23967570721982535791533521021663088881060430531174e-34, /* twoPowerIndex2lo[218] */ 
+  } , 
+  { 
+    1.80934653937103195886493267607875168323516845703125e+00, /* twoPowerIndex2hi[219] */ 
+    -9.03264140245002968190484653709605673138415565955571e-17, /* twoPowerIndex2mi[219] */ 
+    -1.12019787608951203920985462435640152244227583657230e-33, /* twoPowerIndex2lo[219] */ 
+  } , 
+  { 
+    1.81425217550039885594514998956583440303802490234375e+00, /* twoPowerIndex2hi[220] */ 
+    -9.96953153892034881983229632097342495877571562964276e-17, /* twoPowerIndex2mi[220] */ 
+    -5.86224914377491774994695195482808191103744720514440e-33, /* twoPowerIndex2lo[220] */ 
+  } , 
+  { 
+    1.81917111215860849426917411619797348976135253906250e+00, /* twoPowerIndex2hi[221] */ 
+    7.40267690114583888997332201107850297829481646698022e-17, /* twoPowerIndex2mi[221] */ 
+    -4.89675321347547219472440109911293831971254102711009e-33, /* twoPowerIndex2lo[221] */ 
+  } , 
+  { 
+    1.82410338540705341259240412910003215074539184570312e+00, /* twoPowerIndex2hi[222] */ 
+    -1.01596278622770830649733223898080028655802910502598e-16, /* twoPowerIndex2mi[222] */ 
+    4.53871114850207724131140654395208935819981398894467e-34, /* twoPowerIndex2lo[222] */ 
+  } , 
+  { 
+    1.82904903140489727420003873703535646200180053710938e+00, /* twoPowerIndex2hi[223] */ 
+    6.88919290883569563696897029598215713285030905189271e-17, /* twoPowerIndex2mi[223] */ 
+    3.87648962331697016857882013569485482520267614310710e-33, /* twoPowerIndex2lo[223] */ 
+  } , 
+  { 
+    1.83400808640934243065601094713201746344566345214844e+00, /* twoPowerIndex2hi[224] */ 
+    3.28310722424562720351405816760294702167288526703081e-17, /* twoPowerIndex2mi[224] */ 
+    -6.42508934795304248095271046696049734574532048424330e-34, /* twoPowerIndex2lo[224] */ 
+  } , 
+  { 
+    1.83898058677589371079363900207681581377983093261719e+00, /* twoPowerIndex2hi[225] */ 
+    6.91896974027251194233158929971981865763925505317250e-18, /* twoPowerIndex2mi[225] */ 
+    8.15206232016177839312277544008762312093325605950960e-35, /* twoPowerIndex2lo[225] */ 
+  } , 
+  { 
+    1.84396656895862598446456104284152388572692871093750e+00, /* twoPowerIndex2hi[226] */ 
+    -5.93974202694996455028254223192510163033537942157969e-17, /* twoPowerIndex2mi[226] */ 
+    -1.48362556800548453304632576499694052761575815131607e-33, /* twoPowerIndex2lo[226] */ 
+  } , 
+  { 
+    1.84896606951045083810925007128389552235603332519531e+00, /* twoPowerIndex2hi[227] */ 
+    9.02758044626108928815754968893534423196214872648843e-17, /* twoPowerIndex2mi[227] */ 
+    3.66962637780002837100397510992219276952101768763175e-33, /* twoPowerIndex2lo[227] */ 
+  } , 
+  { 
+    1.85397912508338547077357816306175664067268371582031e+00, /* twoPowerIndex2hi[228] */ 
+    9.76188749072759353840331670682321086158335176176729e-17, /* twoPowerIndex2mi[228] */ 
+    4.61481577205566482307976345637533484680898060020057e-33, /* twoPowerIndex2lo[228] */ 
+  } , 
+  { 
+    1.85900577242882047990235605539055541157722473144531e+00, /* twoPowerIndex2hi[229] */ 
+    -9.52870546198994068663058182042478513584534522643660e-17, /* twoPowerIndex2mi[229] */ 
+    -3.18046180210394448463313927892837392059725438136108e-33, /* twoPowerIndex2lo[229] */ 
+  } , 
+  { 
+    1.86404604839778897940050228498876094818115234375000e+00, /* twoPowerIndex2hi[230] */ 
+    6.54091268062057171050111940599879934004515525942762e-17, /* twoPowerIndex2mi[230] */ 
+    -5.47450840369931668676283513826314309520282956450186e-33, /* twoPowerIndex2lo[230] */ 
+  } , 
+  { 
+    1.86909998994123860427407635143026709556579589843750e+00, /* twoPowerIndex2hi[231] */ 
+    -9.93850521425506708290021081667794428086842804782007e-17, /* twoPowerIndex2mi[231] */ 
+    2.01996583148501250135094900859003261161238917514540e-33, /* twoPowerIndex2lo[231] */ 
+  } , 
+  { 
+    1.87416763411029996255763307999586686491966247558594e+00, /* twoPowerIndex2hi[232] */ 
+    -6.12276341300414256163658402373731493255704994623650e-17, /* twoPowerIndex2mi[232] */ 
+    5.28588559402507397372575432425046614667899080733482e-33, /* twoPowerIndex2lo[232] */ 
+  } , 
+  { 
+    1.87924901805656019426749026024481281638145446777344e+00, /* twoPowerIndex2hi[233] */ 
+    -1.62263155578358447798931987572415275848558528109557e-17, /* twoPowerIndex2mi[233] */ 
+    9.40055036844163004544204966638003638688147648501487e-34, /* twoPowerIndex2lo[233] */ 
+  } , 
+  { 
+    1.88434417903233453195355195930460467934608459472656e+00, /* twoPowerIndex2hi[234] */ 
+    -8.22659312553371090551493304223608514657111026374334e-17, /* twoPowerIndex2mi[234] */ 
+    -5.31443494561164967610191190946004049645366520601710e-33, /* twoPowerIndex2lo[234] */ 
+  } , 
+  { 
+    1.88945315439093919351876138534862548112869262695312e+00, /* twoPowerIndex2hi[235] */ 
+    -9.00516828505912671790149612791654138076908000967551e-17, /* twoPowerIndex2mi[235] */ 
+    4.76098007513107821420081485428133742005900358438723e-33, /* twoPowerIndex2lo[235] */ 
+  } , 
+  { 
+    1.89457598158696560730618330126162618398666381835938e+00, /* twoPowerIndex2hi[236] */ 
+    3.40340353521652967060147928999507962708632290832738e-17, /* twoPowerIndex2mi[236] */ 
+    1.72475099549343225430579028439403217279441019556785e-33, /* twoPowerIndex2lo[236] */ 
+  } , 
+  { 
+    1.89971269817655530331990121339913457632064819335938e+00, /* twoPowerIndex2hi[237] */ 
+    -3.85973976937851432307271295292856183526693379019865e-17, /* twoPowerIndex2mi[237] */ 
+    8.54252722580247976290671190391307753063293836872304e-34, /* twoPowerIndex2lo[237] */ 
+  } , 
+  { 
+    1.90486334181767413831209978525293990969657897949219e+00, /* twoPowerIndex2hi[238] */ 
+    6.53385751471827862894642310249671518446001303214235e-17, /* twoPowerIndex2mi[238] */ 
+    -4.74812640133837504404873359767131188363298319607458e-33, /* twoPowerIndex2lo[238] */ 
+  } , 
+  { 
+    1.91002795027038985153922112658619880676269531250000e+00, /* twoPowerIndex2hi[239] */ 
+    -5.90968800674406023685750489615373077589386094387626e-17, /* twoPowerIndex2mi[239] */ 
+    1.83214657152134469549465915038517283323758050529819e-33, /* twoPowerIndex2lo[239] */ 
+  } , 
+  { 
+    1.91520656139714740007207183225546032190322875976562e+00, /* twoPowerIndex2hi[240] */ 
+    -1.06199460561959626376283195555328606320260702029334e-16, /* twoPowerIndex2mi[240] */ 
+    -3.05776975679132548538006102719337626149343902119718e-33, /* twoPowerIndex2lo[240] */ 
+  } , 
+  { 
+    1.92039921316304740273039897147100418806076049804688e+00, /* twoPowerIndex2hi[241] */ 
+    7.11668154063031418621133275838618151517201202262489e-17, /* twoPowerIndex2mi[241] */ 
+    -4.82668562559464286199698217483008854466173164582353e-33, /* twoPowerIndex2lo[241] */ 
+  } , 
+  { 
+    1.92560594363612502810667592711979523301124572753906e+00, /* twoPowerIndex2hi[242] */ 
+    -9.91496376969374092749319194821921356369769258703312e-17, /* twoPowerIndex2mi[242] */ 
+    -3.22132452692376239436249260443042416373307145576578e-33, /* twoPowerIndex2lo[242] */ 
+  } , 
+  { 
+    1.93082679098762710623304883483797311782836914062500e+00, /* twoPowerIndex2hi[243] */ 
+    6.16714970616910955283771024520843382562539181719792e-17, /* twoPowerIndex2mi[243] */ 
+    9.20187048243808720717080369504670367609474211649437e-34, /* twoPowerIndex2lo[243] */ 
+  } , 
+  { 
+    1.93606179349229434727419629780342802405357360839844e+00, /* twoPowerIndex2hi[244] */ 
+    1.03323859606763257447769151803649788699571393339738e-16, /* twoPowerIndex2mi[244] */ 
+    6.05301367682062275405664830597304146844867569493449e-33, /* twoPowerIndex2lo[244] */ 
+  } , 
+  { 
+    1.94131098952864045159572015109006315469741821289062e+00, /* twoPowerIndex2hi[245] */ 
+    -6.63802989162148798984357531389107673024275126550005e-17, /* twoPowerIndex2mi[245] */ 
+    -3.84589208047361365184351178085214844173829595098042e-33, /* twoPowerIndex2lo[245] */ 
+  } , 
+  { 
+    1.94657441757923321823398055130382999777793884277344e+00, /* twoPowerIndex2hi[246] */ 
+    6.81102234953387718436390433460451017868586507937427e-17, /* twoPowerIndex2mi[246] */ 
+    4.00132790381313470943337752360672827257448941559276e-33, /* twoPowerIndex2lo[246] */ 
+  } , 
+  { 
+    1.95185211623097831790119016659446060657501220703125e+00, /* twoPowerIndex2hi[247] */ 
+    -2.19901696997935108602521778603883611528020250783493e-17, /* twoPowerIndex2mi[247] */ 
+    2.41215894734058348862039105065931631090122373298988e-34, /* twoPowerIndex2lo[247] */ 
+  } , 
+  { 
+    1.95714412417540017941064434126019477844238281250000e+00, /* twoPowerIndex2hi[248] */ 
+    8.96076779103666776760155050762912042076490756639488e-17, /* twoPowerIndex2mi[248] */ 
+    -9.63267661361827588458686334472185443533033181828620e-34, /* twoPowerIndex2lo[248] */ 
+  } , 
+  { 
+    1.96245048020892731699404976097866892814636230468750e+00, /* twoPowerIndex2hi[249] */ 
+    1.09768440009135469492530703072443773737110713005320e-16, /* twoPowerIndex2mi[249] */ 
+    2.22935494198572795986893315761753148481994138005007e-33, /* twoPowerIndex2lo[249] */ 
+  } , 
+  { 
+    1.96777122323317588126201371778734028339385986328125e+00, /* twoPowerIndex2hi[250] */ 
+    -1.03149280115311315108805777837120874149571671620808e-16, /* twoPowerIndex2mi[250] */ 
+    4.19326590499492480228618720550851028485481027931040e-33, /* twoPowerIndex2lo[250] */ 
+  } , 
+  { 
+    1.97310639225523432038755800022045150399208068847656e+00, /* twoPowerIndex2hi[251] */ 
+    -7.45161786395603748608029025975637403620995816486529e-18, /* twoPowerIndex2mi[251] */ 
+    -5.91616296363099671353015573028401106053667494395426e-34, /* twoPowerIndex2lo[251] */ 
+  } , 
+  { 
+    1.97845602638795092786949680885300040245056152343750e+00, /* twoPowerIndex2hi[252] */ 
+    4.03887531092781665749784154795462589642365074083484e-17, /* twoPowerIndex2mi[252] */ 
+    3.58120371667786223934924900740488031476290303118010e-34, /* twoPowerIndex2lo[252] */ 
+  } , 
+  { 
+    1.98382016485021939189437034656293690204620361328125e+00, /* twoPowerIndex2hi[253] */ 
+    -2.20345441239106265715861919875136617618161805878720e-17, /* twoPowerIndex2mi[253] */ 
+    1.30241601884067628906145032934477933888241617967293e-33, /* twoPowerIndex2lo[253] */ 
+  } , 
+  { 
+    1.98919884696726634309982273407513275742530822753906e+00, /* twoPowerIndex2hi[254] */ 
+    8.20513263836919941553211296435337826280802285479647e-18, /* twoPowerIndex2mi[254] */ 
+    4.55959041696793749483275697431418566719882990414142e-34, /* twoPowerIndex2lo[254] */ 
+  } , 
+  { 
+    1.99459211217094023460560947569319978356361389160156e+00, /* twoPowerIndex2hi[255] */ 
+    1.79097103520026450854305804947681496082855314328245e-17, /* twoPowerIndex2mi[255] */ 
+    3.33253733318286084576384624967661010994920841819939e-34, /* twoPowerIndex2lo[255] */ 
+  } }; 
+ 
+
+
diff --git a/src/crlibm/prepare b/src/crlibm/prepare
new file mode 100755
index 0000000..47d9be7
--- /dev/null
+++ b/src/crlibm/prepare
@@ -0,0 +1,20 @@
+#!/bin/sh --
+
+# This script is inspired by the prepare script distributed with with
+#   mpfr, which is inspired by the prepare script distributed with Mutt.
+
+if aclocal && autoheader && autoconf&& automake --add-missing -c && autoconf && ./configure $@
+then
+  echo
+  echo "The crlibm source code was successfully prepared."
+  echo "Type 'make' to build crlibm."
+  echo
+  echo "Note: if you want to reconfigure crlibm, you can now use the 'configure'"
+  echo "script directly; you do not need the 'prepare' script any longer."
+  echo
+else
+  echo
+  echo "Some part of the preparation process failed."
+  echo
+  exit 1
+fi
diff --git a/src/crlibm/rem_pio2_accurate.c b/src/crlibm/rem_pio2_accurate.c
new file mode 100644
index 0000000..35b5da2
--- /dev/null
+++ b/src/crlibm/rem_pio2_accurate.c
@@ -0,0 +1,219 @@
+/*
+ * rem_pio2, used in correctly rounded trigonometric functions
+ *
+ * Author : Catherine Daramy, David Defour, Florent de Dinechin
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+/**
+ * This file include functions to compute y=x-N*pi/2 and return the last two bits of N
+ * in order to know which quadrant we are considering.
+ *
+ * We use an scs representation to compute it by Payne and Hanek methods. For more information
+ * you can read K. C. Ng research report from Sun Microsystems:
+ * "Argument reduction for huge argument: Good to the last bit" (July 13, 1992)
+ *
+ */
+#include "rem_pio2_accurate.h"
+
+
+/**
+ * Case X_IND = -1:
+ *               0 
+ *           2 ^ 
+ *  X    :   <> |--| |--| |--|   0   0 0 0 0
+ *  2/Pi :   <> |--| |--| |--| |--| .....
+ *
+ *  Case X_IND = 0:
+ *                   0 
+ *                2 ^ 
+ *  X    :   |--| <> |--| |--|   0   0 0 0 0
+ *  2/Pi :        <> |--| |--| |--| |--| .....
+ *
+ *  Case X_IND = 1:
+ *                       0 
+ *                    2 ^ 
+ *  X    :   |--| |--| <> |--| |--|   0   0 0 0 0
+ *  2/Pi :             <> |--| |--| |--| |--| .....
+ *
+ *  Case ...
+ * 
+ *  Step 1:
+ *
+ *   Compute r = X . 2/Pi where: 
+ *    - r[0] hold the integer part. (if x>0 or the once complement integer part if x<0 )
+ *    - r[1] to r[SCS_NB_WORDS+2] hold the reduced part
+ *      the 3 extra 30 bits are here to prevent possible 
+ *      cancellation due to a number x too close to a
+ *      multiple of Pi/2.
+ *
+ *  Step 2:
+ *   Compute result = (r[1] ... r[SCS_NB_WORDS]) . Pi/2.
+ *       
+ * description of local variables :
+ * - ind : where to start multiplying into 2opi table
+ *
+ */
+
+/* TODO OPTIM 
+   better 64-bit multiplication, see in scs_mult */
+
+int rem_pio2_scs(scs_ptr result, const scs_ptr x){
+  uint64_t r[SCS_NB_WORDS+3], tmp;
+  unsigned int N;
+  /* result r[0],...,r[10] could store till 300 bits of precision */
+  /* that is really enough for computing the reduced argument */
+  int sign, i, j, ind;
+  int *two_over_pi_pt;
+
+  if ((X_EXP != 1)||(X_IND < -1)){
+    scs_set(result, x);
+    return 0;
+  }
+  
+
+
+  /* Compute the product |x| * 2/Pi */
+  if ((X_IND == -1)){
+    /* In this case we consider number between ]-1,+1[    */
+    /* we may use simpler algorithm such as Cody And Waite */
+    r[0] =  0;    r[1] =  0;
+    r[2] =  (uint64_t)(two_over_pi[0]) * X_HW[0];
+    r[3] = ((uint64_t)(two_over_pi[0]) * X_HW[1]
+	   +(uint64_t)(two_over_pi[1]) * X_HW[0]);
+    if(X_HW[2] == 0){
+      for(i=4; i<(SCS_NB_WORDS+3); i++){   
+	r[i] = ((uint64_t)(two_over_pi[i-3]) * X_HW[1]
+	       +(uint64_t)(two_over_pi[i-2]) * X_HW[0]);
+      }}else {
+	for(i=4; i<(SCS_NB_WORDS+3); i++){   
+	  r[i] = ((uint64_t)(two_over_pi[i-4]) * X_HW[2]
+		 +(uint64_t)(two_over_pi[i-3]) * X_HW[1]
+		 +(uint64_t)(two_over_pi[i-2]) * X_HW[0]);
+	}
+      }
+  }else {
+    if (X_IND == 0){
+      r[0] =  0;
+      r[1] =  (uint64_t)(two_over_pi[0]) * X_HW[0];
+      r[2] = ((uint64_t)(two_over_pi[0]) * X_HW[1]
+	     +(uint64_t)(two_over_pi[1]) * X_HW[0]);
+      if(X_HW[2] == 0){
+	for(i=3; i<(SCS_NB_WORDS+3); i++){   
+	  r[i] = ((uint64_t)(two_over_pi[i-2]) * X_HW[1]
+		 +(uint64_t)(two_over_pi[i-1]) * X_HW[0]);
+	}}else {
+	  for(i=3; i<(SCS_NB_WORDS+3); i++){   
+	    r[i] = ((uint64_t)(two_over_pi[i-3]) * X_HW[2]
+		   +(uint64_t)(two_over_pi[i-2]) * X_HW[1]
+		   +(uint64_t)(two_over_pi[i-1]) * X_HW[0]);
+	  }}
+    }else {
+      if (X_IND == 1){
+	r[0] =  (uint64_t)(two_over_pi[0]) * X_HW[0];
+	r[1] = ((uint64_t)(two_over_pi[0]) * X_HW[1]
+	       +(uint64_t)(two_over_pi[1]) * X_HW[0]);
+	if(X_HW[2] == 0){
+	  for(i=2; i<(SCS_NB_WORDS+3); i++){   
+	    r[i] = ((uint64_t)(two_over_pi[i-1]) * X_HW[1]
+		   +(uint64_t)(two_over_pi[ i ]) * X_HW[0]);
+	  }}else {
+	    for(i=2; i<(SCS_NB_WORDS+3); i++){   
+	      r[i] = ((uint64_t)(two_over_pi[i-2]) * X_HW[2]
+		     +(uint64_t)(two_over_pi[i-1]) * X_HW[1]
+		     +(uint64_t)(two_over_pi[ i ]) * X_HW[0]);
+	    }}
+      }else {
+	if (X_IND == 2){
+  	  r[0] = ((uint64_t)(two_over_pi[0]) * X_HW[1]
+		 +(uint64_t)(two_over_pi[1]) * X_HW[0]);
+	  if(X_HW[2] == 0){
+	    for(i=1; i<(SCS_NB_WORDS+3); i++){   
+	      r[i] = ((uint64_t)(two_over_pi[ i ]) * X_HW[1]
+		     +(uint64_t)(two_over_pi[i+1]) * X_HW[0]);
+	    }}else {
+	      for(i=1; i<(SCS_NB_WORDS+3); i++){   
+		r[i] = ((uint64_t)(two_over_pi[i-1]) * X_HW[2]
+		       +(uint64_t)(two_over_pi[ i ]) * X_HW[1]
+		       +(uint64_t)(two_over_pi[i+1]) * X_HW[0]);
+	      }}
+	}else {
+	  ind = (X_IND - 3);
+	  two_over_pi_pt = (int*)&(two_over_pi[ind]);
+	  if(X_HW[2] == 0){
+	    for(i=0; i<(SCS_NB_WORDS+3); i++){   
+	      r[i] = ((uint64_t)(two_over_pi_pt[i+1]) * X_HW[1]
+		     +(uint64_t)(two_over_pi_pt[i+2]) * X_HW[0]);
+	    }}else {
+	      for(i=0; i<(SCS_NB_WORDS+3); i++){   
+		r[i] = ((uint64_t)(two_over_pi_pt[ i ]) * X_HW[2]
+		       +(uint64_t)(two_over_pi_pt[i+1]) * X_HW[1]
+		       +(uint64_t)(two_over_pi_pt[i+2]) * X_HW[0]);
+	      }
+	    }
+	}
+      }
+    }
+  }
+      
+  /* Carry propagate */
+  r[SCS_NB_WORDS+1] += r[SCS_NB_WORDS+2]>>30;
+  for(i=(SCS_NB_WORDS+1); i>0; i--) {tmp=r[i]>>30;   r[i-1] += tmp;  r[i] -= (tmp<<30);}  
+      
+  /* The integer part is in r[0] */
+  N = (unsigned int)(r[0]);
+#if 0
+  printf("r[0] = %d\n", N);
+#endif
+
+
+  /* test if the reduced part is bigger than Pi/4 */
+  if (r[1] > (uint64_t)(SCS_RADIX)/2){
+    N += 1;
+    sign = -1;
+    for(i=1; i<(SCS_NB_WORDS+3); i++) { r[i]=((~(unsigned int)(r[i])) & 0x3fffffff);}
+  } 
+  else
+    sign = 1; 
+
+
+  /* Now we get the reduce argument and check for possible
+   * cancellation By Kahan algorithm we will have at most 2 digits
+   * of cancellations r[1] and r[2] in the worst case.
+   */    
+  if (r[1] == 0)
+    if (r[2] == 0) i = 3;
+    else           i = 2;
+  else             i = 1;
+
+  for(j=0; j<SCS_NB_WORDS; j++) { R_HW[j] = (unsigned int)(r[i+j]);}
+
+
+  R_EXP   = 1;
+  R_IND   = -i;
+  R_SGN   = sign*X_SGN; 
+  
+  /* Last step :
+   *   Multiplication by pi/2
+   */
+  scs_mul(result, Pio2_ptr, result);
+  return X_SGN*N;
+}
+ 
+
diff --git a/src/crlibm/rem_pio2_accurate.h b/src/crlibm/rem_pio2_accurate.h
new file mode 100644
index 0000000..57716ad
--- /dev/null
+++ b/src/crlibm/rem_pio2_accurate.h
@@ -0,0 +1,53 @@
+/*
+ * 2oPi[] store in hexadecimal 48 digits, each keeping 30 bits of
+ * 2/pi. 
+ * We then store 1440 bits of 2/pi. which is for sure a bit too much ...
+ */
+ 
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+
+static const int two_over_pi[]=
+  {0x28be60db, 0x24e44152, 0x27f09d5f, 0x11f534dd,
+   0x3036d8a5, 0x1993c439, 0x0107f945, 0x23abdebb,
+   0x31586dc9, 0x06e3a424, 0x374b8019, 0x092eea09,
+   0x3464873f, 0x21deb1cb, 0x04a69cfb, 0x288235f5,
+   0x0baed121, 0x0e99c702, 0x1ad17df9, 0x013991d6,
+   0x0e60d4ce, 0x1f49c845, 0x3e2ef7e4, 0x283b1ff8,
+   0x25fff781, 0x1980fef2, 0x3c462d68, 0x0a6d1f6d,
+   0x0d9fb3c9, 0x3cb09b74, 0x3d18fd9a, 0x1e5fea2d,
+   0x1d49eeb1, 0x3ebe5f17, 0x2cf41ce7, 0x378a5292,
+   0x3a9afed7, 0x3b11f8d5, 0x3421580c, 0x3046fc7b,
+   0x1aeafc33, 0x3bc209af, 0x10d876a7, 0x2391615e,
+   0x3986c219, 0x199855f1, 0x1281a102, 0x0dffd880};
+
+
+
+
+/*
+ * This scs number store 211 bits of pi/2 
+ */
+static const scs Pio2=
+  {{0x00000001, 0x2487ed51, 0x042d1846, 0x26263314,
+    0x1701b839, 0x28948127, 0x01114cf9, 0x23a0105d},
+    DB_ONE,  0,   1 };
+
+#define Pio2_ptr  (scs_ptr)(& Pio2)
+
+
+
+#if 0
+
+/*
+ * This scs number store 211 bits of pi/4 
+ */
+static const scs Pio4=
+/* ~7.853982e-01 */ 
+{{0x3243f6a8, 0x22168c23, 0x1313198a, 0x0b80dc1c, 
+0x344a4093, 0x2088a67c, 0x31d0082e, 0x3ea63b13},
+DB_ONE,  -1,   1 };
+
+#define Pio4_ptr  ((scs_ptr)(& Pio4))
+
+#endif
diff --git a/src/crlibm/scs_lib/AUTHORS b/src/crlibm/scs_lib/AUTHORS
new file mode 100644
index 0000000..b5b6d7f
--- /dev/null
+++ b/src/crlibm/scs_lib/AUTHORS
@@ -0,0 +1,3 @@
+scslib, the Software Carry-Save multiple-precision library
+
+Authors: David Defour, Catherine Daramy, Florent de Dinechin
diff --git a/src/crlibm/scs_lib/COPYING b/src/crlibm/scs_lib/COPYING
new file mode 100644
index 0000000..f3f1b3b
--- /dev/null
+++ b/src/crlibm/scs_lib/COPYING
@@ -0,0 +1,504 @@
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/src/crlibm/scs_lib/ChangeLog b/src/crlibm/scs_lib/ChangeLog
new file mode 100644
index 0000000..783009e
--- /dev/null
+++ b/src/crlibm/scs_lib/ChangeLog
@@ -0,0 +1,16 @@
+2003-06-17 : Florent de Dinechin
+	* Version 1.4.1
+	* Added round towards 0 in scs2double
+	* Corrected buggy handling of exceptional cases in scs2double
+
+2003-04-18 : Florent de Dinechin
+	* Version 1.4.0
+	* Several bugs corrected in multiplication and scs_square
+	* minor performance improvement in scs_square
+	
+2003-04-15 : Florent de Dinechin
+	* Version 1.3.0 released
+	* scslib is now a subdirectory of crlibm
+	* Precision is now set cleanly from the configure script.
+	* make install hopefully cleaner
+	
diff --git a/src/crlibm/scs_lib/Doxyfile.dev b/src/crlibm/scs_lib/Doxyfile.dev
new file mode 100644
index 0000000..212af5a
--- /dev/null
+++ b/src/crlibm/scs_lib/Doxyfile.dev
@@ -0,0 +1,939 @@
+# Doxyfile 1.2.15
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = SCSLib
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 1.2.1
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = DocsDev/
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, 
+# German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, 
+# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
+
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = YES
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = NO
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH        = 
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+
+INHERIT_DOCS           = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = .
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+
+FILE_PATTERNS          = *.c *.h main.dox
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse.
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, 
+# or Internet explorer 4.0+). Note that for large projects the tree generation 
+# can take a very long time. In such cases it is better to disable this feature. 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = YES
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_XML           = NO
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+
+PREDEFINED             =  DOXYGEN_SHOULD_SKIP_THIS
+
+
+# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line and do not end with a semicolon. Such function macros are typically 
+# used for boiler-plate code, and will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
+
+# The CGI_NAME tag should be the name of the CGI script that 
+# starts the search engine (doxysearch) with the correct parameters. 
+# A script with this name will be generated by doxygen.
+
+CGI_NAME               = search.cgi
+
+# The CGI_URL tag should be the absolute URL to the directory where the 
+# cgi binaries are located. See the documentation of your http daemon for 
+# details.
+
+CGI_URL                = 
+
+# The DOC_URL tag should be the absolute URL to the directory where the 
+# documentation is located. If left blank the absolute path to the 
+# documentation, with file:// prepended to it, will be used.
+
+DOC_URL                = 
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the 
+# documentation is located. If left blank the directory on the local machine 
+# will be used.
+
+DOC_ABSPATH            = 
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary 
+# is installed.
+
+BIN_ABSPATH            = /usr/local/bin/
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to 
+# documentation generated for other projects. This allows doxysearch to search 
+# the documentation for these projects as well.
+
+EXT_DOC_PATHS          = 
diff --git a/src/crlibm/scs_lib/Doxyfile.user b/src/crlibm/scs_lib/Doxyfile.user
new file mode 100644
index 0000000..35b5752
--- /dev/null
+++ b/src/crlibm/scs_lib/Doxyfile.user
@@ -0,0 +1,939 @@
+# Doxyfile 1.2.15
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = SCSLib
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 1.2.1
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = Docs/
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, 
+# German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, 
+# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
+
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = YES
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = NO
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH        = 
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+
+INHERIT_DOCS           = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = .
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+
+FILE_PATTERNS          = scs.h main.dox
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse.
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = YES
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, 
+# or Internet explorer 4.0+). Note that for large projects the tree generation 
+# can take a very long time. In such cases it is better to disable this feature. 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = YES
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_XML           = NO
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+
+PREDEFINED             =  DOXYGEN_SHOULD_SKIP_THIS
+
+
+# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line and do not end with a semicolon. Such function macros are typically 
+# used for boiler-plate code, and will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
+
+# The CGI_NAME tag should be the name of the CGI script that 
+# starts the search engine (doxysearch) with the correct parameters. 
+# A script with this name will be generated by doxygen.
+
+CGI_NAME               = search.cgi
+
+# The CGI_URL tag should be the absolute URL to the directory where the 
+# cgi binaries are located. See the documentation of your http daemon for 
+# details.
+
+CGI_URL                = 
+
+# The DOC_URL tag should be the absolute URL to the directory where the 
+# documentation is located. If left blank the absolute path to the 
+# documentation, with file:// prepended to it, will be used.
+
+DOC_URL                = 
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the 
+# documentation is located. If left blank the directory on the local machine 
+# will be used.
+
+DOC_ABSPATH            = 
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary 
+# is installed.
+
+BIN_ABSPATH            = /usr/local/bin/
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to 
+# documentation generated for other projects. This allows doxysearch to search 
+# the documentation for these projects as well.
+
+EXT_DOC_PATHS          = 
diff --git a/src/crlibm/scs_lib/INSTALL b/src/crlibm/scs_lib/INSTALL
new file mode 100644
index 0000000..30e0f47
--- /dev/null
+++ b/src/crlibm/scs_lib/INSTALL
@@ -0,0 +1,215 @@
+Basic Installation
+==================
+
+Thank you for reporting installation problems to scslib at ens-lyon.fr
+
+Simple installation:
+./configure
+make
+make install
+
+More advanced installation: 
+try 
+./configure --help 
+for the compile-time options
+
+
+Installation question specific to scslib:
+
+* to change the precision of the library, use 
+./configure --enable-nbdigits=10 --enable-digitsize=30
+The guaranteed precision is digitsize*(nbdigits-1) bits. 
+The nbdigits and digitsize should be such that 
+nbdigits<2^(64-2*digitsize)
+Some day it will be checked by the configure script
+
+* to link against GMP/MPFR (not mandatory but used to test the
+library, notably if you changed the default precision) : use
+./configure --enable-mpfr 
+You need to have mpfr installed, which is a full piece of poetry by
+itself. You may need to specify its installation directory,
+typically by 
+./configure --enable-mpfr --with-gmp=/usr/local --with-mpfr=/usr/local
+
+
+
+
+Here are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell scsript `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' scsript does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' scsript.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scsripts to share,
+you can create a site shell scsript called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site scsript.
+A warning: not all `configure' scsripts look for a site scsript.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     scsript, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/src/crlibm/scs_lib/Makefile.am b/src/crlibm/scs_lib/Makefile.am
new file mode 100644
index 0000000..e5e72cc
--- /dev/null
+++ b/src/crlibm/scs_lib/Makefile.am
@@ -0,0 +1,17 @@
+## Process this file with automake to produce Makefile.in
+
+
+lib_LIBRARIES = libscs.a
+INCLUDES=-I$(top_srcdir)
+
+
+libscs_a_SOURCES = scs.h scs_private.h scs_private.c \
+	double2scs.c print_scs.c \
+	division_scs.c\
+	addition_scs.c multiplication_scs.c\
+	scs2double.c zero_scs.c \
+	scs2mpfr.c 
+
+
+include_HEADERS = scs.h ../crlibm_config.h
+
diff --git a/src/crlibm/scs_lib/Makefile.in b/src/crlibm/scs_lib/Makefile.in
new file mode 100644
index 0000000..d40c3ff
--- /dev/null
+++ b/src/crlibm/scs_lib/Makefile.in
@@ -0,0 +1,608 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = scs_lib
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(include_HEADERS) AUTHORS COPYING ChangeLog INSTALL NEWS \
+	README TODO
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/crlibm_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
+LIBRARIES = $(lib_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_ at AM_V@)
+am__v_AR_ = $(am__v_AR_ at AM_DEFAULT_V@)
+am__v_AR_0 = @echo "  AR      " $@;
+am__v_AR_1 = 
+libscs_a_AR = $(AR) $(ARFLAGS)
+libscs_a_LIBADD =
+am_libscs_a_OBJECTS = scs_private.$(OBJEXT) double2scs.$(OBJEXT) \
+	print_scs.$(OBJEXT) division_scs.$(OBJEXT) \
+	addition_scs.$(OBJEXT) multiplication_scs.$(OBJEXT) \
+	scs2double.$(OBJEXT) zero_scs.$(OBJEXT) scs2mpfr.$(OBJEXT)
+libscs_a_OBJECTS = $(am_libscs_a_OBJECTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(libscs_a_SOURCES)
+DIST_SOURCES = $(libscs_a_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ISODATE = @ISODATE@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+lib_LIBRARIES = libscs.a
+INCLUDES = -I$(top_srcdir)
+libscs_a_SOURCES = scs.h scs_private.h scs_private.c \
+	double2scs.c print_scs.c \
+	division_scs.c\
+	addition_scs.c multiplication_scs.c\
+	scs2double.c zero_scs.c \
+	scs2mpfr.c 
+
+include_HEADERS = scs.h ../crlibm_config.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps scs_lib/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu --ignore-deps scs_lib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  if test -f $$p; then \
+	    $(am__strip_dir) \
+	    echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
+	    ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
+	  else :; fi; \
+	done
+
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir)
+
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+
+libscs.a: $(libscs_a_OBJECTS) $(libscs_a_DEPENDENCIES) $(EXTRA_libscs_a_DEPENDENCIES) 
+	$(AM_V_at)-rm -f libscs.a
+	$(AM_V_AR)$(libscs_a_AR) libscs.a $(libscs_a_OBJECTS) $(libscs_a_LIBADD)
+	$(AM_V_at)$(RANLIB) libscs.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+.c.o:
+	$(AM_V_CC)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+	$(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS uninstall-libLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLIBRARIES cscopelist-am ctags ctags-am distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-includeHEADERS install-info install-info-am \
+	install-libLIBRARIES install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-includeHEADERS uninstall-libLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/crlibm/scs_lib/NEWS b/src/crlibm/scs_lib/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/src/crlibm/scs_lib/README b/src/crlibm/scs_lib/README
new file mode 100644
index 0000000..4fd1fdc
--- /dev/null
+++ b/src/crlibm/scs_lib/README
@@ -0,0 +1,9 @@
+scslib, the Software Carry-Save multiple-precision library
+
+Authors: David Defour, Catherine Daramy, Florent de Dinechin
+
+
+See the Docs directory for a detailed description and installation
+instructions.  
+
+See the DocsDev directory for developer documentation.
diff --git a/src/crlibm/scs_lib/README.DEV b/src/crlibm/scs_lib/README.DEV
new file mode 100644
index 0000000..b5b6a7b
--- /dev/null
+++ b/src/crlibm/scs_lib/README.DEV
@@ -0,0 +1,38 @@
+Toute la doc est dans les pages info.
+
+Les seuls fichiers que j'ai �crits moi-m�me sont configure.in et Makefile.am
+
+Les commandes � taper la premi�re fois apr�s le cvs checkout sont
+(dans l'ordre)
+
+aclocal
+autoheader
+autoconf
+automake --add-missing
+./configure 
+
+
+
+Pour faire la doc:
+doxygen Doxyfile.user
+doxygen Doxyfile.dev
+puis aller dans le r�pertoires latex de Docs et faire 
+cd Docs/latex/
+pdflatex  refman.tex 
+(deux fois pour les r�f�rences)
+
+Pour enlever un peu du bordel d'autoconf:
+make distclean
+
+Pour exporter : 
+
+make dist
+
+Remarque : sur mon debian woody l'autoconf de service est trop vieux,
+il faut utiliser la commande autoconf2.50 ...
+
+Remarque du meme genre: si on fait make dist sous solaris le truc
+marche sous linux, mais l'inverse n'est pas vrai (--add-missing ajoute
+plus de trucs sous solaris).
+Super portable tout cela.
+
diff --git a/src/crlibm/scs_lib/TODO b/src/crlibm/scs_lib/TODO
new file mode 100644
index 0000000..8e6d6d5
--- /dev/null
+++ b/src/crlibm/scs_lib/TODO
@@ -0,0 +1,4 @@
+(in order of importance/priority)
+Fix the number of iterations in the division
+Check the precision in the configure script
+Add back SPARC optimisations
diff --git a/src/crlibm/scs_lib/VERSION b/src/crlibm/scs_lib/VERSION
new file mode 100644
index 0000000..347f583
--- /dev/null
+++ b/src/crlibm/scs_lib/VERSION
@@ -0,0 +1 @@
+1.4.1
diff --git a/src/crlibm/scs_lib/addition_scs.c b/src/crlibm/scs_lib/addition_scs.c
new file mode 100644
index 0000000..1c5fe12
--- /dev/null
+++ b/src/crlibm/scs_lib/addition_scs.c
@@ -0,0 +1,623 @@
+/** Functions for SCS addition and subtraction 
+
+ at file addition_scs.c
+
+ at author Defour David David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr 
+ 
+This file is part of the SCS library.
+
+Many functions come in two versions, selected by a @#if.
+
+The reason is that we designed scslib library for internal use with
+SCS_NB_WORDS==8, so we provide a version with manual optimizations for
+this case.
+
+These optimisations include loop unrolling, and sometimes replacing
+temporary arrays of size 8 with 8 variables, which is more efficient
+on all modern processors with many (renaming) registers.
+
+Using gcc3.2 with the most aggressive optimization options for this
+purpose (-funroll-loops -foptimize-register-move -frerun-loop-opt
+-frerun-cse-after-loop) is still much slower. At some point in the
+future, gcc should catch up with unrolling since our loops are so
+simple, however the replacement of small arrays with variables is
+not something we are aware of in the literature about compiler
+optimization.
+*/
+
+/*
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ */
+
+#include "scs.h"
+#include "scs_private.h"
+
+/**
+This function copies a result into another. There is an unrolled
+version for the case SCS_NB_WORDS==8.
+*/
+void scs_set(scs_ptr result, scs_ptr x){
+ /* unsigned int i;*/
+  
+#if (SCS_NB_WORDS==8)
+    R_HW[0] = X_HW[0]; R_HW[1] = X_HW[1]; 
+    R_HW[2] = X_HW[2]; R_HW[3] = X_HW[3]; 
+    R_HW[4] = X_HW[4]; R_HW[5] = X_HW[5]; 
+    R_HW[6] = X_HW[6]; R_HW[7] = X_HW[7]; 
+#else
+  for(i=0; i<SCS_NB_WORDS; i++)
+    R_HW[i] = X_HW[i];
+#endif
+  R_EXP = X_EXP;  
+  R_IND = X_IND; 
+  R_SGN = X_SGN;
+}
+
+
+/** renormalize a SCS number.  
+
+This function removes the carry from each digit, and also shifts the
+digits in case of a cancellation (so that if result != 0 then its
+first digit is non-zero)
+ 
+ @warning THIS FUNCTION HAS NEVER BEEN PROPERLY TESTED and is
+ currently unused in the library: instead, specific renormalisation
+ steps are fused within the code of the operations which require it.
+ */
+
+void scs_renorm(scs_ptr result){
+  unsigned int c;
+  int i, j, k;
+
+  /*
+   * Carry propagate
+   */
+  for(i=SCS_NB_WORDS-1; i>0; i--){
+    c = R_HW[i] & ~SCS_MASK_RADIX;
+    R_HW[i-1] += c >> SCS_NB_BITS;
+    R_HW[i]    = R_HW[i] &  SCS_MASK_RADIX; 
+  }
+
+  if (R_HW[0] >= SCS_RADIX){
+    /*  Carry out! Need to shift digits  */
+    c = R_HW[0] & ~SCS_MASK_RADIX;
+    c = c >> SCS_NB_BITS;
+    for(i=SCS_NB_WORDS-1; i>1; i--)
+      R_HW[i] = R_HW[i-1];
+
+    R_HW[1] = R_HW[0] & SCS_MASK_RADIX;
+    R_HW[0] = c;
+    R_IND  += 1;
+
+  }else{
+    /* Was there a cancellation ? */
+    if (R_HW[0] == 0){
+
+      k = 1;
+      while ((R_HW[k] == 0) && (k <= SCS_NB_WORDS))
+	k++;
+      
+      R_IND -= k;
+
+      for(j=k, i=0; j<SCS_NB_WORDS; j++, i++)
+	R_HW[i] = R_HW[j];
+
+      for(        ; i<SCS_NB_WORDS; i++)
+	R_HW[i] = 0;     
+
+    }
+  }
+}
+
+
+
+/** Renormalization without cancellation check.
+
+ This renormalization step is especially designed for the addition of
+ several numbers with the same sign.  In this case, you know that there
+ has been no cancellation, which allows simpler renormalisation.
+*/
+
+void scs_renorm_no_cancel_check(scs_ptr result){ 
+  unsigned int carry, c0;
+ /* int i;*/
+
+  /* Carry propagate  */      
+#if (SCS_NB_WORDS==8)
+  carry = R_HW[7] >> SCS_NB_BITS;
+  R_HW[6] += carry;  R_HW[7] = R_HW[7] & SCS_MASK_RADIX;
+  carry = R_HW[6] >> SCS_NB_BITS;
+  R_HW[5] += carry;  R_HW[6] = R_HW[6] & SCS_MASK_RADIX;
+  carry = R_HW[5] >> SCS_NB_BITS;
+  R_HW[4] += carry;  R_HW[5] = R_HW[5] & SCS_MASK_RADIX;
+  carry = R_HW[4] >> SCS_NB_BITS;
+  R_HW[3] += carry;  R_HW[4] = R_HW[4] & SCS_MASK_RADIX;
+  carry = R_HW[3] >> SCS_NB_BITS;
+  R_HW[2] += carry;  R_HW[3] = R_HW[3] & SCS_MASK_RADIX;
+  carry = R_HW[2] >> SCS_NB_BITS;
+  R_HW[1] += carry;  R_HW[2] = R_HW[2] & SCS_MASK_RADIX;
+  carry = R_HW[1] >> SCS_NB_BITS;
+  R_HW[0] += carry;  R_HW[1] = R_HW[1] & SCS_MASK_RADIX;
+#else
+  for(i=(SCS_NB_WORDS-1);i>0;i--){
+      carry      = R_HW[i] >> SCS_NB_BITS;
+      R_HW[i-1] += carry;
+      R_HW[i]    = R_HW[i] & SCS_MASK_RADIX;
+  }
+#endif
+    
+  if (R_HW[0] >= SCS_RADIX){
+    /* Carry out ! Need to shift digits */
+    c0 = R_HW[0] >> SCS_NB_BITS;
+    
+#if (SCS_NB_WORDS==8)
+    R_HW[7] = R_HW[6]; R_HW[6] = R_HW[5]; 
+    R_HW[5] = R_HW[4]; R_HW[4] = R_HW[3]; 
+    R_HW[3] = R_HW[2]; R_HW[2] = R_HW[1]; 
+#else
+    for(i=(SCS_NB_WORDS-1); i>1; i--)
+      R_HW[i] =  R_HW[i-1];
+#endif    
+    R_HW[1] =  R_HW[0] & SCS_MASK_RADIX;
+    R_HW[0] =  c0;
+    R_IND  += 1;
+  }
+  return;
+}
+
+
+
+
+/* addition without renormalisation.
+
+
+  Add two scs number x and y, the result is put into "result".
+  Assumes x.sign == y.sign    x.index > y.index.  
+
+   The result is not normalized.
+ */
+
+static void do_add_no_renorm(scs_ptr result, scs_ptr x, scs_ptr y){
+  unsigned int RES[SCS_NB_WORDS];
+  unsigned int i, j, Diff;
+
+  if (x->exception.i[HI]==0){scs_set(result, y); return; }
+  if (y->exception.i[HI]==0){scs_set(result, x); return; }  
+  
+  for (i=0; i<SCS_NB_WORDS; i++)
+    RES[i] = X_HW[i];
+
+  Diff  = (unsigned int)(X_IND - Y_IND);
+  R_EXP = X_EXP + Y_EXP - 1; 
+  R_IND = X_IND;
+  R_SGN = X_SGN;
+
+  for (i=Diff, j=0; i<SCS_NB_WORDS; i++, j++)
+    RES[i] += Y_HW[j];
+
+  for (i=0; i<SCS_NB_WORDS; i++)
+    R_HW[i] = RES[i];
+
+  return;
+}
+
+
+/*
+ * Addition without renormalization. Assumes that x.sign == y.sign.
+ */
+void  scs_add_no_renorm(scs_ptr result, scs_ptr x, scs_ptr y)
+{
+  if (X_IND >= Y_IND)
+    do_add_no_renorm(result,x,y);
+  else
+    do_add_no_renorm(result,y,x);
+  return;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* The function that does the work in case of an addition
+
+ do_add is the function that does the addition of two SCS numbers,
+   assuming that x.sign == y.sign, X_IND > Y_IND, x and y both
+   non-zero. 
+ */
+
+static void do_add(scs_ptr result, scs_ptr x, scs_ptr y)
+{
+#if (SCS_NB_WORDS==8)  /* in this case we unroll all the loops */
+  int Diff;
+  unsigned int carry; 
+  unsigned int r0,r1,r2,r3,r4,r5,r6,r7;
+  
+  Diff  = X_IND - Y_IND;
+  R_EXP = X_EXP + Y_EXP - 1; 
+  R_IND = X_IND;
+  R_SGN = X_SGN;
+#if 0
+  if(Diff<4)
+    if(Diff<2)
+      if(Diff==0)
+	{
+	//      case 0:
+	  r0 = X_HW[0] + Y_HW[0]; r1 = X_HW[1] + Y_HW[1]; 
+	  r2 = X_HW[2] + Y_HW[2]; r3 = X_HW[3] + Y_HW[3];
+	  r4 = X_HW[4] + Y_HW[4]; r5 = X_HW[5] + Y_HW[5];
+	  r6 = X_HW[6] + Y_HW[6]; r7 = X_HW[7] + Y_HW[7]; 
+	}
+      else {
+	//  case 1:
+	r0 = X_HW[0];           r1 = X_HW[1] + Y_HW[0];
+	r2 = X_HW[2] + Y_HW[1]; r3 = X_HW[3] + Y_HW[2];
+	r4 = X_HW[4] + Y_HW[3]; r5 = X_HW[5] + Y_HW[4];
+	r6 = X_HW[6] + Y_HW[5]; r7 = X_HW[7] + Y_HW[6]; 
+      }
+    else if(Diff==2)
+      {
+	//case 2:
+	r0 = X_HW[0];           r1 = X_HW[1];      
+	r2 = X_HW[2] + Y_HW[0]; r3 = X_HW[3] + Y_HW[1];
+	r4 = X_HW[4] + Y_HW[2]; r5 = X_HW[5] + Y_HW[3];
+	r6 = X_HW[6] + Y_HW[4]; r7 = X_HW[7] + Y_HW[5];
+      }
+    else
+      {
+	//  case 3:
+	r0 = X_HW[0];           r1 = X_HW[1];     
+	r2 = X_HW[2];           r3 = X_HW[3] + Y_HW[0];
+	r4 = X_HW[4] + Y_HW[1]; r5 = X_HW[5] + Y_HW[2];
+	r6 = X_HW[6] + Y_HW[3]; r7 = X_HW[7] + Y_HW[4];
+      }
+  else if(Diff<6)
+    if(Diff==4)
+      {
+	// case 4:
+	r0 = X_HW[0];           r1 = X_HW[1];
+	r2 = X_HW[2];           r3 = X_HW[3];
+	r4 = X_HW[4] + Y_HW[0]; r5 = X_HW[5] + Y_HW[1]; 
+	r6 = X_HW[6] + Y_HW[2]; r7 = X_HW[7] + Y_HW[3];
+      }
+    else {
+      //  case 5:
+      r0 = X_HW[0];           r1 = X_HW[1];
+      r2 = X_HW[2];           r3 = X_HW[3];
+      r4 = X_HW[4];           r5 = X_HW[5] + Y_HW[0];
+      r6 = X_HW[6] + Y_HW[1]; r7 = X_HW[7] + Y_HW[2];
+    }   
+  else if(Diff<8)
+    if(Diff==6)
+      {
+      // case 6:
+	r0 = X_HW[0];           r1 = X_HW[1];
+	r2 = X_HW[2];           r3 = X_HW[3];
+	r4 = X_HW[4];           r5 = X_HW[5];
+	r6 = X_HW[6] + Y_HW[0]; r7 = X_HW[7] + Y_HW[1];
+      }
+    else {
+      // case 7:
+      r0 = X_HW[0];           r1 = X_HW[1];
+      r2 = X_HW[2];           r3 = X_HW[3];
+      r4 = X_HW[4];           r5 = X_HW[5];
+      r6 = X_HW[6];           r7 = X_HW[7] + Y_HW[0]; 
+    }
+
+  else
+    {
+      /* Diff >= 8*/
+      R_HW[0] = X_HW[0]; R_HW[1] = X_HW[1];
+      R_HW[2] = X_HW[2]; R_HW[3] = X_HW[3];
+      R_HW[4] = X_HW[4]; R_HW[5] = X_HW[5];
+      R_HW[6] = X_HW[6]; R_HW[7] = X_HW[7];    
+      return;
+    }
+#else
+  switch (Diff){
+  case 0:
+    r0 = X_HW[0] + Y_HW[0]; r1 = X_HW[1] + Y_HW[1];
+    r2 = X_HW[2] + Y_HW[2]; r3 = X_HW[3] + Y_HW[3];
+    r4 = X_HW[4] + Y_HW[4]; r5 = X_HW[5] + Y_HW[5];
+    r6 = X_HW[6] + Y_HW[6]; r7 = X_HW[7] + Y_HW[7]; break;
+  case 1:
+    r0 = X_HW[0];           r1 = X_HW[1] + Y_HW[0];
+    r2 = X_HW[2] + Y_HW[1]; r3 = X_HW[3] + Y_HW[2];
+    r4 = X_HW[4] + Y_HW[3]; r5 = X_HW[5] + Y_HW[4];
+    r6 = X_HW[6] + Y_HW[5]; r7 = X_HW[7] + Y_HW[6]; break;
+  case 2:
+    r0 = X_HW[0];           r1 = X_HW[1];
+    r2 = X_HW[2] + Y_HW[0]; r3 = X_HW[3] + Y_HW[1];
+    r4 = X_HW[4] + Y_HW[2]; r5 = X_HW[5] + Y_HW[3];
+    r6 = X_HW[6] + Y_HW[4]; r7 = X_HW[7] + Y_HW[5]; break;
+  case 3:
+    r0 = X_HW[0];           r1 = X_HW[1];
+    r2 = X_HW[2];           r3 = X_HW[3] + Y_HW[0];
+    r4 = X_HW[4] + Y_HW[1]; r5 = X_HW[5] + Y_HW[2];
+    r6 = X_HW[6] + Y_HW[3]; r7 = X_HW[7] + Y_HW[4]; break;
+  case 4:
+    r0 = X_HW[0];           r1 = X_HW[1];
+    r2 = X_HW[2];           r3 = X_HW[3];
+    r4 = X_HW[4] + Y_HW[0]; r5 = X_HW[5] + Y_HW[1];
+    r6 = X_HW[6] + Y_HW[2]; r7 = X_HW[7] + Y_HW[3]; break;
+  case 5:
+    r0 = X_HW[0];           r1 = X_HW[1];
+    r2 = X_HW[2];           r3 = X_HW[3];
+    r4 = X_HW[4];           r5 = X_HW[5] + Y_HW[0];
+    r6 = X_HW[6] + Y_HW[1]; r7 = X_HW[7] + Y_HW[2]; break;
+  case 6:
+    r0 = X_HW[0];           r1 = X_HW[1];
+    r2 = X_HW[2];           r3 = X_HW[3];
+    r4 = X_HW[4];           r5 = X_HW[5];
+    r6 = X_HW[6] + Y_HW[0]; r7 = X_HW[7] + Y_HW[1]; break;
+  case 7:
+    r0 = X_HW[0];           r1 = X_HW[1];
+    r2 = X_HW[2];           r3 = X_HW[3];
+    r4 = X_HW[4];           r5 = X_HW[5];
+    r6 = X_HW[6];           r7 = X_HW[7] + Y_HW[0]; break;
+  default:
+    /* Diff >= 8*/
+    R_HW[0] = X_HW[0]; R_HW[1] = X_HW[1];
+    R_HW[2] = X_HW[2]; R_HW[3] = X_HW[3];
+    R_HW[4] = X_HW[4]; R_HW[5] = X_HW[5];
+    R_HW[6] = X_HW[6]; R_HW[7] = X_HW[7];    return;
+ }
+#endif
+
+  /* Carry propagation */
+  
+  carry = r7 >> SCS_NB_BITS; r6 += carry;  r7 = r7 & SCS_MASK_RADIX;
+  carry = r6 >> SCS_NB_BITS; r5 += carry;  r6 = r6 & SCS_MASK_RADIX;
+  carry = r5 >> SCS_NB_BITS; r4 += carry;  r5 = r5 & SCS_MASK_RADIX;
+  carry = r4 >> SCS_NB_BITS; r3 += carry;  r4 = r4 & SCS_MASK_RADIX;
+  carry = r3 >> SCS_NB_BITS; r2 += carry;  r3 = r3 & SCS_MASK_RADIX;
+  carry = r2 >> SCS_NB_BITS; r1 += carry;  r2 = r2 & SCS_MASK_RADIX;
+  carry = r1 >> SCS_NB_BITS; r0 += carry;  r1 = r1 & SCS_MASK_RADIX;
+  carry = r0 >> SCS_NB_BITS;
+   
+  if (carry!=0){
+    R_HW[7] = r6; R_HW[6] = r5;  R_HW[5] = r4; R_HW[4] = r3; 
+    R_HW[3] = r2; R_HW[2] = r1;  R_HW[1] = r0 & SCS_MASK_RADIX;
+    R_HW[0] = 1 ;  
+    R_IND  += 1;
+  }
+  else {
+    R_HW[0] = r0; R_HW[1] = r1; R_HW[2] = r2; R_HW[3] = r3; 
+    R_HW[4] = r4; R_HW[5] = r5; R_HW[6] = r6; R_HW[7] = r7; 
+  }
+  return;
+
+#else /* #if SCS_NB_WORDS==8*/
+
+/* This generic version is still written in such a way that
+ it is unrollable at compile time
+*/
+  int i,j, s, carry, Diff;
+  int res[SCS_NB_WORDS];
+  
+  Diff  = X_IND - Y_IND;
+  R_EXP = X_EXP + Y_EXP - 1; 
+  R_IND = X_IND;
+  R_SGN = X_SGN;
+
+  /* The easy case */
+  if(Diff >= SCS_NB_WORDS){  
+    scs_set(result, x); return;
+  }
+
+  /* 0 <= Diff <= (SCS_NB_WORDS-1) */
+
+  carry=0;
+  for(i=(SCS_NB_WORDS-1), j=((SCS_NB_WORDS-1)-Diff); i>=0 ; i--,j--){
+    if (j>=0)
+      s = X_HW[i] + Y_HW[j] + carry;
+    else
+      s = X_HW[i] + carry;
+    carry = s >> SCS_NB_BITS;
+    res[i] = s & SCS_MASK_RADIX;
+  }
+
+  if (carry){
+    /* Carry out ! Need to shift digits */    
+    for(i=(SCS_NB_WORDS-1); i>=1; i--)
+      R_HW[i] =  res[i-1];
+    
+    R_HW[0] = 1 ;  
+    R_IND  += 1;
+  }
+  else {
+    for(i=0; i<SCS_NB_WORDS; i++)
+      R_HW[i] =  res[i];
+  }
+
+  return;
+#endif  /* #if SCS_NB_WORDS==8*/
+
+} /* do_add*/
+
+
+
+
+/*/////////////////////////////////////////////////////////////////
+/////////////////////// SUBTRACTION //////////////////////////////
+//////////////////////////////////////////////////////////////////
+// This procedure assumes :
+// -    X_IND >= Y_IND
+// -   X_SIGN != Y_SIGN
+//    neither x or y is zero
+//  and result = x - y  
+*/
+
+
+static void do_sub(scs_ptr result, scs_ptr x, scs_ptr y){
+  int s, carry;
+  int Diff, i, j, cp;
+  int res[SCS_NB_WORDS];
+
+  R_EXP = X_EXP + Y_EXP - 1;
+  Diff  = X_IND - Y_IND;
+  R_IND = X_IND;
+  
+    /* The easy case */
+  if(Diff >= SCS_NB_WORDS){  
+    scs_set(result, x); return;
+  }
+
+  else { 
+    /* 0 <= Diff <= (SCS_NB_WORDS-1) */
+    carry = 0;
+    if(Diff==0) { 
+
+      i=0;
+      while((X_HW[i] == Y_HW[i]) && (i<SCS_NB_WORDS)) i++;
+      if (X_HW[i] > Y_HW[i]) cp=1;
+      else if (X_HW[i] < Y_HW[i]) cp=-1;
+      else cp=0;
+
+      if (cp == 0) {
+	/* Yet another easy case: result = 0 */
+	scs_zero(result);
+	return;
+      }
+      else { /* cp <> 0 */
+	if (cp > 0){
+	  /* x > y */
+
+	  R_SGN = X_SGN; 
+	  for(i=(SCS_NB_WORDS-1); i>=0 ;i--){
+	    s = (int)(X_HW[i] - Y_HW[i] - carry);
+	    carry = (int)((s&SCS_RADIX)>>SCS_NB_BITS);
+	    res[i] = (int)((s&SCS_RADIX) + s);
+	  }	  
+	}
+	else { /* cp < 0  */
+	  /* x < y (change of sign) */
+
+	  R_SGN = - X_SGN;
+	  for(i=(SCS_NB_WORDS-1); i>=0 ;i--){
+	    s = (int)(- X_HW[i] + Y_HW[i] - carry);
+	    carry = (int)((s&SCS_RADIX)>>SCS_NB_BITS);
+	    res[i] = (int)((s&SCS_RADIX) + s);
+	  }
+	}
+      }
+    }
+    else {
+      /* 1<=Diff<(SCS_NB_WORDS-1) Digits of x and y overlap but the
+       * sign will be that of x */
+      
+      R_SGN = X_SGN; 
+      for(i=(SCS_NB_WORDS-1), j=((SCS_NB_WORDS-1)-Diff); i>=0 ;i--,j--){
+	if(j>=0)
+	  s = (int)(X_HW[i] - Y_HW[j] - carry);
+	else
+	  s = (int)(X_HW[i] - carry);
+	carry = (int)((s&SCS_RADIX)>>SCS_NB_BITS);
+	res[i] = (int)((s&SCS_RADIX) + s);
+      }
+    }
+    /* check for cancellations */
+    i=0;
+    while ((res[i]==0) && (i < SCS_NB_WORDS))  i++;
+
+    if(i>0) { /* cancellation, shift result*/
+      R_IND -= i;
+      for(j=0; i<SCS_NB_WORDS; i++,j++)    R_HW[j] = (unsigned int)(res[i]);
+      for(   ; j<SCS_NB_WORDS; j++) 	   R_HW[j] = 0;
+    }
+    else {
+      for(i=0; i<SCS_NB_WORDS; i++)
+	R_HW[i] =  (unsigned int)(res[i]);
+    }
+  }
+  return;
+}
+
+
+
+
+
+ 
+
+
+/** SCS addition (result is a normalised SCS number).
+
+ */
+void  scs_add(scs_ptr result, scs_ptr x, scs_ptr y)
+{
+    
+  if (x->exception.i[HI]==0){scs_set(result, y); return; }
+  if (y->exception.i[HI]==0){scs_set(result, x); return; }  
+
+  if (X_SGN == Y_SGN){
+    if(X_IND >= Y_IND)
+      do_add(result,x,y);
+    else
+      do_add(result,y,x);
+  }else {  
+    if(X_IND>=Y_IND){
+      do_sub(result,x,y);
+    }else { 
+      do_sub(result,y,x); 
+    } 
+  } return; 
+}
+
+/** SCS subtraction (result is a normalised SCS number).
+
+ The arguments x, y and result may point to the same memory
+ location. 
+ */
+void  scs_sub(scs_ptr result, scs_ptr x, scs_ptr y)
+{
+  if (x->exception.i[HI]==0)
+    { scs_set(result, y); R_SGN = -R_SGN; return; }
+  if (y->exception.i[HI]==0)
+    { scs_set(result, x); return; }
+
+  if (X_SGN == Y_SGN) {
+    /* Same sign, so it's a sub   */
+    if(X_IND>=Y_IND)
+      do_sub(result,x,y);
+    else{
+      do_sub(result,y,x);
+      R_SGN = -R_SGN;
+    }
+  }else {
+    if(X_IND>=Y_IND)
+      do_add(result,x,y);
+    else{
+      do_add(result,y,x);
+      R_SGN = -R_SGN; 
+    }
+  }
+  return;
+}
+
+
diff --git a/src/crlibm/scs_lib/division_scs.c b/src/crlibm/scs_lib/division_scs.c
new file mode 100644
index 0000000..373794f
--- /dev/null
+++ b/src/crlibm/scs_lib/division_scs.c
@@ -0,0 +1,110 @@
+/** Functions for SCS inverse and division
+
+ at file division_scs.c
+
+ at author Defour David David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr 
+ 
+This file is part of the SCS library.
+
+
+*/
+
+/*
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ */
+#include "scs.h"
+#include "scs_private.h"
+
+
+void scs_div_2(scs_ptr num) {
+  /* small function to divide by 2 any SCS number */
+  unsigned int carry, mask, old_value;
+  int i;
+  carry = 0x00000000;
+  mask = (unsigned int)(((0x1) << SCS_NB_BITS)-1);/*we now have a mask for the used bits in a word*/
+  /* if it's a normal number, i.e. not zero nor NaN */
+  if( (num->exception).d == (double) 1) {
+    /* first, a loop to rotate all numbers to the right*/
+    for(i = 0; i < SCS_NB_WORDS; i++) {
+      old_value = num->h_word[i];
+      num->h_word[i] = (old_value & !mask) | carry | ((old_value >> 1) & mask);
+      carry = old_value & 0x00000001;/* it can be interesting to keep the last bit of each number =) */
+      carry = carry << (SCS_NB_BITS-1);
+    }
+    /* In the SCS format, the first number can't be zero, so we must handle this particular case */
+    if (num->h_word[0] == 0){
+      num->index = num->index - 1;
+      for(i = 1; i < SCS_NB_WORDS; i++) {
+	num->h_word[i-1] = num->h_word[i];
+      }
+      num->h_word[SCS_NB_WORDS-1] = 0;
+    }
+  }
+  else {
+    (num->exception).d = (num->exception).d / 2;/* zero, NaN, ... */
+  }
+}
+
+
+
+
+/*
+ * Compute 1/x with a Newton scheme
+ */
+void scs_inv(scs_ptr result, scs_ptr x){
+  scs_t tmp, res, res1, scstwo;
+  double app_x, inv;
+  
+  scs_set(tmp, x);  tmp->index = 0;  scs_get_d(&app_x, tmp);
+
+  scs_set_si(scstwo, 2);
+  /* inv is a 53-bit approximation of 1/x */
+  inv = 1/app_x;
+  
+  scs_set_d(res, inv);
+  res->index -= x->index;
+
+  /* First Newton Iteration */
+  scs_mul(res1, x, res);
+  scs_sub(res1, scstwo, res1);
+  scs_mul(res, res, res1);
+
+  /* Second Newton Iteration */
+  scs_mul(res1, x, res);
+  scs_sub(res1, scstwo, res1);
+  scs_mul(result, res, res1); 
+
+  return;
+}
+
+/*
+ * Compute result = x/y; 
+ */
+void scs_div(scs_ptr result, scs_ptr x, scs_ptr y){ 
+  scs_t res;
+ 
+  if (X_EXP != 1){
+    R_EXP = X_EXP / Y_EXP;
+    return;
+  }
+
+  scs_inv(res, y);
+  scs_mul(result, res, x);
+  return;
+}
diff --git a/src/crlibm/scs_lib/double2scs.c b/src/crlibm/scs_lib/double2scs.c
new file mode 100644
index 0000000..ad6d091
--- /dev/null
+++ b/src/crlibm/scs_lib/double2scs.c
@@ -0,0 +1,174 @@
+/** Conversion of floating-point double to SCS
+ at file double2scs.c
+
+ at author Defour David David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr 
+
+This file is part of the SCS library.
+*/
+
+/*
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ */
+#include "scs.h"
+#include "scs_private.h"
+
+
+/** Convert a double precision number in it SCS multiprecision
+  representation
+ */
+
+void scs_set_d(scs_ptr result, double x){
+  db_number nb, mantissa;
+  int exponent, exponent_remainder;
+  int ind, i;
+
+  if(x>=0){R_SGN = 1;    nb.d = x;}
+  else    {R_SGN = -1;   nb.d = -x;}
+
+  exponent = nb.i[HI] & 0x7ff00000 ;
+
+  if (exponent == 0x7ff00000)  {
+    /*
+     * x = +/- Inf, s/qNAN
+     */
+    R_EXP = x;  
+    for(i=0; i<SCS_NB_WORDS; i++)
+      R_HW[i] = 0;
+ 
+    R_IND = 0;
+    R_SGN = 1;
+  } 
+
+  else {    /* Normals,  denormals, +/- 0.  */
+
+    /* This number is not an exception */
+    R_EXP = 1;
+
+#if 1
+
+    if (exponent == 0){
+      /* x is a denormal number : bring it back to the normal range */
+      nb.d = nb.d * SCS_RADIX_TWO_DOUBLE;      /* 2^(2.SCS_NB_BITS) */
+      exponent = nb.i[HI] & 0x7ff00000 ;
+      R_IND = -2;
+    }else {
+      R_IND = 0;
+    }
+
+    exponent = exponent >> 20;  /* get the actual value */
+
+    ind = ((exponent +((100*SCS_NB_BITS)-1023))/SCS_NB_BITS) - 100 ;  
+    /* means : = (exponent -1023 + 100*SCS_NB_BITS)/SCS_NB_BITS -100 
+     The business with 100*SCS_NB_BITS is to stay within the positive
+     range for exponent_remainder between 1 and SCS_NB_BITS */
+
+    exponent_remainder = exponent - 1022 - (SCS_NB_BITS*ind);
+
+    R_IND += ind;
+
+    /* now get the mantissa and add the implicit 1 in fp. format*/
+    mantissa.l = (nb.l & ULL(000fffffffffffff)) | ULL(0010000000000000);
+
+
+    /* and spread it over the structure
+       Everything here is 64-bit arithmetic */
+    R_HW[0] = (unsigned int) (mantissa.l >> (53 - exponent_remainder) );
+
+    /* 11 = 64-53 */
+    mantissa.l =  (mantissa.l << (exponent_remainder+11));
+    R_HW[1] = (mantissa.i[HI] >> (32 - SCS_NB_BITS))& SCS_MASK_RADIX ;
+    mantissa.l =  (mantissa.l << SCS_NB_BITS);
+    R_HW[2] = (mantissa.i[HI] >> (32 - SCS_NB_BITS))& SCS_MASK_RADIX ;
+#if SCS_NB_BITS < 27
+    mantissa.l =  (mantissa.l << SCS_NB_BITS);
+    R_HW[3] = (mantissa.i[HI] >> (32 - SCS_NB_BITS))& SCS_MASK_RADIX ;
+#else
+    R_HW[3] = 0 ;
+#endif
+
+#if (SCS_NB_WORDS==8)
+      R_HW[4] = 0; R_HW[5] = 0; R_HW[6] = 0; R_HW[7] = 0;
+#else
+    for(i=4; i<SCS_NB_WORDS; i++)
+      R_HW[i] = 0;
+#endif
+
+
+
+#else /* Other algorithm as in the research report. Slower */
+    R_IND = 0;
+
+    while(nb.d>SCS_RADIX_ONE_DOUBLE) {
+	R_IND++;
+	nb.d *= SCS_RADIX_MONE_DOUBLE;
+      }
+
+    while(nb.d<1)  {
+	R_IND--;
+	nb.d *= SCS_RADIX_ONE_DOUBLE;
+      }
+
+    i=0;
+    while(nb.d != 0){
+      R_HW[i] = (unsigned int) nb.d;
+      nb.d = (nb.d - (double)R_HW[i]) * SCS_RADIX_ONE_DOUBLE;
+      i++;
+    }
+    for(; i<SCS_NB_WORDS; i++)
+      R_HW[i] = 0;
+
+#endif
+
+  } /* end if test NaN etc */
+
+  return;
+}
+
+
+/**
+  Convert an integer number in it scs multiprecision
+  representation
+ */
+void scs_set_si(scs_ptr result, int x){
+  unsigned int ux;
+  int i;
+  
+  if(x>=0){R_SGN = 1;   ux = (unsigned int)x;}
+  else    {R_SGN = -1;  ux = (unsigned int)-x;}
+  
+
+  if (ux > SCS_RADIX){
+    R_IND   = 1;
+    R_HW[0] = (ux - SCS_RADIX) >> SCS_NB_BITS;
+    R_HW[1] =  ux - (R_HW[0] << SCS_NB_BITS);
+  }else {
+    R_IND   = 0;
+    R_HW[0] = ux;
+    R_HW[1] = 0;
+  }
+
+  for(i=2; i<SCS_NB_WORDS; i++)
+    R_HW[i] = 0;
+
+  if (x != 0)  R_EXP = 1;
+  else         R_EXP = 0;
+  
+  return;
+}
+
diff --git a/src/crlibm/scs_lib/main.dox b/src/crlibm/scs_lib/main.dox
new file mode 100644
index 0000000..63eef18
--- /dev/null
+++ b/src/crlibm/scs_lib/main.dox
@@ -0,0 +1,104 @@
+/* What goes on the main page of SCSLib as generated by doxygen. */
+
+/**@mainpage SCSLib, the Software Carry-Save multiple-precision library
+
+
+   @section intro Introduction
+
+SCSLib is a fast and lightweight multiple-precision library developped
+in the Ar�naire project at ENS Lyon. It was developed as a building
+block for evaluating elementary functions with correct rounding. Its
+interesting features are:
+
+- Compile-time selected precision: SCSLib is a fixed-precision
+library, where precision is selected at compile-time for
+performance. Out-of-the-box, the library ensures 210 bits of precision
+(quad-double). It is easily configurable to do any precision between
+twice or half that, and with a little bit more work it can in
+principle ensure up to a few thousand bits.
+
+- Floating-point format: The SCS format is a floating-point format
+where exponents are machine integers (usually 32-bit numbers), which
+ensures a huge exponent range.  
+
+- Supported operations: SCSLib currently offers addition/subtraction,
+multiplication, and an experimental division, plus all the useful 
+conversion functions.  
+
+- IEEE-754 compatibility: The range of SCS numbers include the range
+of IEEE double-precision numbers, including denormals and exceptional
+cases. Conversions between SCS format and IEEE-754 doubles, as well as
+arithmetic operations, follow the IEEE rules concerning the
+exceptional cases. SCS doesn't ensure correct rounding, but provides
+conversions to doubles in the four IEEE-754 rounding modes.
+
+- Performance: SCSLib is designed to be fast. With 210 bits, it
+  outperforms MPF for most operations on most architectures.
+
+- Licence: This library is distributed under the LGPL. See inside the
+  archive for details.
+
+
+SCSLib is still under development and hasn't been tested on all
+possible combinations of architecture and environment. If you think
+you have found a bug, please investigate and report it.
+
+All you need to build SCSLib is a C compiler compliant with the ANSI
+C99 standard. So far we have successfully tested the following compilers:
+- gcc-2.95x 
+- gcc-3.0x 
+ 
+
+
+
+  @section install Installation
+
+Standard installation should only require
+- ./configure 
+- make
+
+Compile-time options may be passed to configure 
+- to change the precision (default is 200 bits)
+- to link with the GNU multiple-precision package MPFR 
+   (for testing and debugging purpose)
+
+See the INSTALL file and configure --help for details
+
+
+
+
+  @section using Linking with the SCS library  
+
+To use SCSLib you need to include the header file
+ scs.h. See the documentation of this file for details. Then you need
+to link with libscs.a.
+
+For C++ users we provide a wrapper class wrapper_scs.h that
+overloads the basic arithmetic operators with SCS operations. It
+hasn't been tested extensively.
+   
+
+
+   @section bugs Reporting bugs
+
+Please report bugs at the following address: scslib at ens-lyon.fr
+
+
+   @section copyleft Copyright and license
+
+Copyright (C) 2002  Catherine Daramy, David Defour and Florent de Dinechin
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
diff --git a/src/crlibm/scs_lib/maple/SCSS_procedures.mws b/src/crlibm/scs_lib/maple/SCSS_procedures.mws
new file mode 100644
index 0000000..e2733e2
--- /dev/null
+++ b/src/crlibm/scs_lib/maple/SCSS_procedures.mws
@@ -0,0 +1,74 @@
+{VERSION 5 0 "IBM INTEL LINUX" "5.0" }
+{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 
+1 0 0 0 0 1 }{CSTYLE "" -1 256 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 0 }
+{CSTYLE "" -1 257 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 0 }{PSTYLE "Normal
+" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 
+-1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 
+"" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }}
+{SECT 0 {PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 3 "" 0 "" {TEXT 
+-1 11 "PARAMETERS:" }}{PARA 0 "" 0 "" {TEXT -1 43 "Don\264t forget to \+
+set all the parameters here" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 
+30 "NB_WORDS := 8:\nNB_BITS  := 30:" }}}}{SECT 1 {PARA 3 "" 0 "" 
+{TEXT -1 11 "GetSCS_real" }}{PARA 3 "" 0 "" {TEXT 256 67 "This procedu
+re convert a decimal number into it SCS representation." }}{PARA 3 "" 
+0 "" {TEXT 257 61 "       x : input number to convert into it SCS repr
+esentation" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 883 "GetSCS_real :
+= proc(x)\nlocal exception, index, sign, mantissa, nb, i;\n\nif x <> 0
+ then\n  exception := 1;\n  if x > 0 then\n    sign  := 1;\n    nb    \+
+:= x;\n  elif x < 0 then\n    sign := -1;\n    nb   := -x;\n  end if;
+\n  \n  index := 0;\n\n  if nb >= 1 then\n    for i from 0 while nb > \+
+(2^(NB_BITS+1)-1) do\n      index := index+1;\n      nb    := nb * 2^(
+-NB_BITS);\n    end do; \n  else\n    for i from 0 while nb < 1 do\n  \+
+    index := index-1;\n      nb    := nb * 2^(NB_BITS);\n    end do; \+
+\n  end if;\n\n  for i from 0 by 1 to (NB_WORDS-1) do\n    mantissa[i]
+ := trunc(nb);\n    nb          := (nb - mantissa[i]) * 2^(NB_BITS);\n
+  end do;\nelse\n  for i from 0 by 1 to (NB_WORDS-1) do\n    mantissa[
+i] := 0;\n  end do;\n\n  index     := 1;\n  exception := x;\n  sign   \+
+   := 1;\nend if;\nmantissa[NB_WORDS]   := exception;\nmantissa[NB_WOR
+DS+1] := index;\nmantissa[NB_WORDS+2] := sign;\n\nreturn mantissa;\nen
+d proc:" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 11 "SetSCS_real" }}
+{PARA 0 "" 0 "" {TEXT -1 44 "Convert an SCS number into a rational num
+ber" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" 
+{MPLTEXT 1 0 306 "SetSCS_real := proc(tab)\n  local res, i;\n\n  if (t
+ab[NB_WORDS] <> 1) then\n    return tab[NB_WORDS];\n  end if;\n\n  res
+ := 0;\n  for i from (NB_WORDS-1) by -1 while i>=0 do\n    res := 2^(-
+NB_BITS)*res + tab[i] \n  end do;\n  \nres := tab[NB_WORDS+2]*(res * 2
+.^(NB_BITS * tab[NB_WORDS+1]));\n\nreturn res;\n\nend proc:\n" }}}
+{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 8 "W
+riteSCS" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 204 "Write Into file fd the
+ SCSS number stored into the table tab where\ntab[0..(NB_WORDS-1)] sto
+re the mantissa\ntab[NB_WORDS] store the exception\ntab[NB_WORDS+1] st
+ore the index\ntab[NB_WORDS+2] store the sign\n" }}{PARA 0 "> " 0 "" 
+{MPLTEXT 1 0 541 "WriteSCS := proc(fd, tab)\n local i;\n\nfprintf(fd,
+\"\{\{\");\n\nfprintf(fd,\"0x%+0.8x, \", tab[0]);\nfor i from 1 by 1 t
+o (NB_WORDS-2) do\n  fprintf(fd,\"0x%+0.8x, \", tab[i]);\n  if (i mod \+
+4 = 3) then\n    fprintf(fd,\"\\n\"); \n  fi;\nend do;\nfprintf(fd,\"0
+x%+0.8x\},\\n\", tab[NB_WORDS-1]);\nif (tab[NB_WORDS]=1) then\n  fprin
+tf(fd,\"DB_ONE, %3d, %3d \", tab[NB_WORDS+1], tab[NB_WORDS+2]);\nelse
+\n  # the only other possible value is 0 so....\n  fprintf(fd,\"\{0x00
+000000, 0x00000000\}, %3d, %3d \", tab[NB_WORDS+1], tab[NB_WORDS+2]);
+\nend if;\n\nfprintf(fd, \"\} \\n\");\nend proc:" }}}}{SECT 1 {PARA 3 
+"" 0 "" {TEXT -1 11 "GetSCS_poly" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
+{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 220 "get_nb_terms := proc(poly)
+\n local i, deg_poly;\n\n deg_poly := degree(poly);\n for i from deg_p
+oly by -1 while i>=0 do\n  if coeff(poly, x, i)=0 then\n   deg_poly :=
+ deg_poly-1;\n  end if;\n end do;\n\n return deg_poly;\nend proc:" }}
+{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 
+-1 67 "Convert each coefficient of a polynom into it SCSS representati
+on\n\n" }}{PARA 0 "" 0 "" {TEXT -1 72 "poly : input polynom \n  file :
+ name of the file where to put the result\n" }{MPLTEXT 1 0 687 "GetSCS
+_poly := proc(poly, file)\n  local i, fd, mantissa, deg;\n  #fclose(fd
+);\n\n  try\n    fd := fopen(file, WRITE,TEXT);\n  finally\n    fprint
+f(fd,\"static const SCS constant_poly[%d]=\\n\",get_nb_terms(poly)+1);
+\n    deg := degree(poly); \n\n    fprintf(fd,\"/* ~%e */ \\n\{\", coe
+ff(poly, x, deg));   \n    mantissa := GetSCS_real(coeff(poly, x, deg)
+);\n    WriteSCS(fd, mantissa); \n    for i from (deg-1) by (-1) while
+ i>=0 do\n      if (coeff(poly, x, i)<>0) then \n        fprintf(fd,\"
+,\\n/* ~%e */ \\n\", coeff(poly, x, i));\n        mantissa := GetSCS_r
+eal(coeff(poly, x, i));\n        WriteSCS(fd, mantissa, 0);\n      end
+ if; \n    end do;\n    fprintf(fd,\"\};\\n\");\n   \n  fclose(fd);\n \+
+ end try;\nend proc:" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "Ge
+tSCS_poly(Poly_Res, \"/home/ddefour/coef_ln10.h\");" }}}{EXCHG {PARA 
+0 "> " 0 "" {MPLTEXT 1 0 14 "Digits := 100:" }}}{EXCHG {PARA 0 "> " 0 
+"" {MPLTEXT 1 0 0 "" }}}}{MARK "8 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 
+1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }
diff --git a/src/crlibm/scs_lib/maple/calculpoly.mws b/src/crlibm/scs_lib/maple/calculpoly.mws
new file mode 100644
index 0000000..7cb502e
--- /dev/null
+++ b/src/crlibm/scs_lib/maple/calculpoly.mws
@@ -0,0 +1,267 @@
+{VERSION 4 0 "SUN SPARC SOLARIS" "4.0" }
+{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 
+1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 
+0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 }
+{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 
+{CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 
+-1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 2 6 1 {CSTYLE "" -1 -1 "" 0 1 0 
+0 0 0 0 0 0 0 0 0 2 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "W
+arning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }
+0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Error" 7 8 1 {CSTYLE "" -1 
+-1 "" 0 1 255 0 255 1 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 
+-1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 
+1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 
+0 0 0 0 0 0 -1 0 }}
+{SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with(numapprox);" }}
+{PARA 11 "" 1 "" {XPPMATH 20 "6#7/%(chebdegG%)chebmultG%)chebpadeG%)ch
+ebsortG%*chebyshevG%,confracformG%-hermite_padeG%+hornerformG%(infnorm
+G%(laurentG%(minimaxG%%padeG%&remezG" }}}{EXCHG {PARA 0 "> " 0 "" 
+{MPLTEXT 1 0 142 "P := convert(series(sin(sqrt(x))/(x^(3/2)-1/x), x=0,
+ 5 ), polynom):\nR := minimax(P, x=2^(-60)..2^(-9),[7,0],((sqrt(x^3))/
+sin(sqrt(x))),'err');" }}{PARA 6 "" 1 "" {TEXT -1 81 "minimax:   weigh
+t function is   proc (x) evalf((x^3)^(1/2)/sin(x^(1/2))) end proc" }}
+{PARA 6 "" 1 "" {TEXT -1 128 "minimax:   procedure for function evalua
+tion is   proc (x) evalf(-x^(3/2)+1/6*x^(5/2)-1/120*x^(7/2)-x^4+1/5040
+*x^(9/2)) end proc" }}{PARA 6 "" 1 "" {TEXT -1 20 "numapprox[chebyshev
+]" }}{PARA 6 "" 1 "" {TEXT -1 28 "procedure for evaluation is:" }}
+{PARA 6 "" 1 "" {TEXT -1 78 "proc (x) evalf(-x^(3/2)+1/6*x^(5/2)-1/120
+*x^(7/2)-x^4+1/5040*x^(9/2)) end proc" }}{PARA 6 "" 1 "" {TEXT -1 64 "
+numapprox[chebyshev]   try again using more function evaluations" }}
+{PARA 6 "" 1 "" {TEXT -1 20 "numapprox/chebyshev:" }}{PARA 6 "" 1 "" 
+{TEXT -1 28 "procedure for evaluation is:" }}{PARA 6 "" 1 "" {TEXT -1 
+78 "proc (x) evalf(-x^(3/2)+1/6*x^(5/2)-1/120*x^(7/2)-x^4+1/5040*x^(9/
+2)) end proc" }}{PARA 6 "" 1 "" {TEXT -1 417 "minimax:   the Chebyshev
+-Pade approximation is   -.4394713587e-4*T(1,1024.000000*x-1.000000000
+)-.6275569735e-5*T(2,1024.000000*x-1.000000000)+.6982024156e-6*T(3,102
+4.000000*x-1.000000000)-.1903388654e-6*T(4,1024.000000*x-1.000000000)+
+.7320175804e-7*T(5,1024.000000*x-1.000000000)-.3416008676e-7*T(6,1024.
+000000*x-1.000000000)+.1808477568e-7*T(7,1024.000000*x-1.000000000)-.3
+662442970e-4*T(0,1024.000000*x-1.000000000)" }}{PARA 6 "" 1 "" {TEXT 
+-1 213 "minimax:   to be evaluated as   proc (x) options operator, arr
+ow; .33148529e-7+(-.5703323904e-2+(-52.56107700+(59810.97859+(-5774462
+6.89+(.3378871607e11+(-.1060123116e14+.1366447017e16*x)*x)*x)*x)*x)*x)
+*x end proc" }}{PARA 6 "" 1 "" {TEXT -1 36 "numapprox/remez:   critica
+l points =" }}{PARA 12 "" 1 "" {XPPMATH 20 "6+$\"3e******ztht')!#O$\"3
+'4-T/%\\9Xo!#A$\"3mS$G'))R%)yC!#@$\"3<'QN)pQ=]aF+$\"3. at _Y*>>B=*F+$\"3#
+RIld9LjI\"!#?$\"3*f1Xw*ycV;F2$\"3PbSoI at As=F2$\"3+++++]7`>F2" }}{PARA 
+6 "" 1 "" {TEXT -1 46 "solve/linear/integer/sparse:   # equations   9
+" }}{PARA 6 "" 1 "" {TEXT -1 231 "solve/linear/integer/sparse:   p[4],
+ 9364032305000*p[0]+8588273375000*p[1]+6389531365000*p[2]+313211380700
+0*p[3]-644260793500*p[4]-4313888418500*p[5]-7268751855000*p[6]-9019262
+520000*p[7]-5000000000000000*e+758339201, -644260793500" }}{PARA 6 "" 
+1 "" {TEXT -1 46 "solve/linear/integer/sparse:   # equations   8" }}
+{PARA 6 "" 1 "" {TEXT -1 310 "solve/linear/integer/sparse:   p[3], -39
+852618784353435956250*p[0]-30453552470038604008750*p[1]-11890598573873
+005000000*p[2]-771271623082576422500*p[3]+3109965363008006892500*p[5]+
+17759974283434877255000*p[6]+35270467994453945075000*p[7]+237142949437
+50000000000000*e-2871989595437299509, -771271623082576422500" }}{PARA 
+6 "" 1 "" {TEXT -1 46 "solve/linear/integer/sparse:   # equations   7
+" }}{PARA 6 "" 1 "" {TEXT -1 365 "solve/linear/integer/sparse:   p[5],
+ -108246780656447782877771046930000*p[0]-81790651598785636282507268670
+000*p[1]-29930168397274615360835194180000*p[2]+67581517038170934086920
+89380000*p[5]+46973655943533768365160792100000*p[6]+960830170704099976
+27772571820000*p[7]+65163721532386804355625000000000000*e-774663935520
+5662722530787813, 6758151703817093408692089380000" }}{PARA 6 "" 1 "" 
+{TEXT -1 46 "solve/linear/integer/sparse:   # equations   6" }}{PARA 
+6 "" 1 "" {TEXT -1 405 "solve/linear/integer/sparse:   p[2], 855941070
+634206741462727057123876983650000*p[0]+4918388946423536960538259284919
+88290250000*p[1]+43439734810308574351391786052097025350000*p[2]-143667
+328881296009445115279192557633050000*p[6]-6544115290658152407935256724
+04769376155000*p[7]-643295692780789082746458712271875000000000000*e+53
+236377847357333174446387735506560117, 43439734810308574351391786052097
+025350000" }}{PARA 6 "" 1 "" {TEXT -1 46 "solve/linear/integer/sparse:
+   # equations   5" }}{PARA 6 "" 1 "" {TEXT -1 427 "solve/linear/integ
+er/sparse:   p[6], -20771063321375427844364609476401613513000120319500
+00*p[0]-1492124314962609454635806821758308950768992624210000*p[1]+3165
+54921461760259370551308904340524606512237520000*p[6]+19097905414030795
+33996454880764776353771152264450000*p[7]-83948905110680793692401576655
+1323449303125000000000000*e-141657647885324057267987296878025616360243
+660521, 316554921461760259370551308904340524606512237520000" }}{PARA 
+6 "" 1 "" {TEXT -1 46 "solve/linear/integer/sparse:   # equations   4
+" }}{PARA 6 "" 1 "" {TEXT -1 439 "solve/linear/integer/sparse:   p[7],
+ 1107252900583919958685640493310974042045362791688385288998850000*p[0]
+-668062593854892481055754592530667537471278551484639948795190000*p[1]+
+386785071446781565521804585219504698672228494624262782072170000*p[7]-8
+960950365111832541306941338252628146472947541058853125000000000000*e+1
+1170378829985122939810113327384365820914549723135548018347, 3867850714
+46781565521804585219504698672228494624262782072170000" }}{PARA 6 "" 1 
+"" {TEXT -1 46 "solve/linear/integer/sparse:   # equations   3" }}
+{PARA 6 "" 1 "" {TEXT -1 418 "solve/linear/integer/sparse:   p[1], 508
+9877080119340820185055689806282233594113578303331146378906963113155000
+*p[0]-1684381981254301457875361831505261684623647812277043211886270104
+28621500*p[1]-21764632599500914756508905498791201621587707544790757051
+065730312500000000000*e+1789649522460186540516450504160969157961948633
+97206244946065538940191, -16843819812543014578753618315052616846236478
+1227704321188627010428621500" }}{PARA 6 "" 1 "" {TEXT -1 46 "solve/lin
+ear/integer/sparse:   # equations   2" }}{PARA 6 "" 1 "" {TEXT -1 402 
+"solve/linear/integer/sparse:   p[0], -9559291097563304602757836885427
+001435258475493283985494897555322872213416173115424100000*p[0]+3837504
+5423572314128524334717375774696727360087622461242385814983591309995175
+000000000000000*e-3500216191836878166602153421342146859930263164231825
+64971270363677505171300729826459, -95592910975633046027578368854270014
+35258475493283985494897555322872213416173115424100000" }}{PARA 6 "" 1 
+"" {TEXT -1 46 "solve/linear/integer/sparse:   # equations   1" }}
+{PARA 6 "" 1 "" {TEXT -1 428 "solve/linear/integer/sparse:   e, 477964
+5548781831151307262651477512597784892747720615298359368680495340637867
+23092364942120872601902984375000000000000000000000000000000000*e+62401
+1993959977321119098783992030078598284634081525182986890834316903475079
+83228896288011421437811619208882118801, 477964554878183115130726265147
+7512597784892747720615298359368680495340637867230923649421208726019029
+84375000000000000000000000000000000000" }}{PARA 6 "" 1 "" {TEXT -1 55 
+"solve/linear/integer/sparse:   backsubstitution at:   9" }}{PARA 6 "
+" 1 "" {TEXT -1 55 "solve/linear/integer/sparse:   backsubstitution at
+:   8" }}{PARA 6 "" 1 "" {TEXT -1 55 "solve/linear/integer/sparse:   b
+acksubstitution at:   7" }}{PARA 6 "" 1 "" {TEXT -1 55 "solve/linear/i
+nteger/sparse:   backsubstitution at:   6" }}{PARA 6 "" 1 "" {TEXT -1 
+55 "solve/linear/integer/sparse:   backsubstitution at:   5" }}{PARA 
+6 "" 1 "" {TEXT -1 55 "solve/linear/integer/sparse:   backsubstitution
+ at:   4" }}{PARA 6 "" 1 "" {TEXT -1 55 "solve/linear/integer/sparse: \+
+  backsubstitution at:   3" }}{PARA 6 "" 1 "" {TEXT -1 55 "solve/linea
+r/integer/sparse:   backsubstitution at:   2" }}{PARA 6 "" 1 "" {TEXT 
+-1 55 "solve/linear/integer/sparse:   backsubstitution at:   1" }}
+{PARA 8 "" 1 "" {TEXT -1 95 "Error, (in numapprox/remez) error curve f
+ails to oscillate sufficiently; try different degrees\n" }}}{EXCHG 
+{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "err;" }}{PARA 11 "" 1 "" {XPPMATH 
+20 "6#$\"[p/i0B(Q[i)=)GC@%HQnez=eK\\iDcH&Q)[6S'o\"GM at M#>,*!#!*" }}}
+{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "log(err)/log(2.);" }}{PARA 
+11 "" 1 "" {XPPMATH 20 "6#$![pFk+#\\&Q;T'34(*)3JXa#H#o8C<)fg$pxl/Bh,s5
+%*)RPpL$!#y" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 494 "IEEEdouble:
+=proc(x) local logabsx, exposant, mantisse; Digits:=200;\n logabsx:=ev
+alf(log(abs(x))/log(2.));\n if logabsx>=0 then exposant:=trunc(logabsx
+)\n elif trunc(logabsx)=logabsx then exposant:=logabsx\n else exposant
+:=trunc(logabsx)-1\n fi;\n if exposant>1023 then mantisse:=infinity\n \+
+elif exposant<-1022 then mantisse:=0\n else mantisse:=round(2^(53)*abs
+(x)/2^exposant)/2^53 fi;\n if x<0 then mantisse:=-mantisse fi; Digits \+
+:= 53;\n mantisse*2^exposant, convert(mantisse*2.0^exposant,binary);\n
+end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 115 "IEEEdouble(-.16666
+6666666666666666666666666666666570728027679949072934046248414507329978
+4809421763093213085142506);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$#!2B8K1
+!*f4?\"\"2Oz#z.%fd?($!V,,,,,,,,,,,,,,,,,,,,,,,,,,\"!#b" }}}{EXCHG 
+{PARA 0 "> " 0 "" {MPLTEXT 1 0 116 "IEEEdouble(.0083333333333333333333
+3333333333293535775352461386501467809924109297973065521102540955580966
+4820757002);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$#\"1H&GDgRQ![\"3)[BMI_
+2Yw&$\"V,+,+,+,+,+,+,+,+,+,+,+,+,+\"!#f" }}}{EXCHG {PARA 0 "> " 0 "" 
+{MPLTEXT 1 0 118 "IEEEdouble(-.000198412698412698412698412697848407150
+0102994430958002095767915251033119832282919846858109422973369088);" }}
+{PARA 11 "" 1 "" {XPPMATH 20 "6$#!1lJfo#o+m$\"5;;b4P2WnW=$!V55,+++55,+
+++55,+++55,+++55\"!#l" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "I
+EEEdouble(.27557319223985890652553449821914437635565887942832089804138
+68785158205567199030755762754173388216971e-5);" }}{PARA 11 "" 1 "" 
+{XPPMATH 20 "6$#\"2J!4h1wN,8\"7'p8_kpG[mBs%$\"V6+6+6,+65,,,,,556+56,6,
++6,\"!#r" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 118 "IEEEdouble(-.2
+5052108385441718628267968185060361058187418601779311173653356130439297
+34624389798494799669355006052e-7);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$
+#!2FBZJ.2V^\"\"9)3`te9t!)4HY/'$!V6+56+,+,,,666,5,,,+,5,5655\"!#y" }}}
+{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "IEEEdouble(.160590438368183
+6992419321448831031833728375335512795391953420275779428392795045701212
+007426922166072e-9);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$#\"2hy*)[L3DC
+\"\";k_>\"=niLbCDrt($\"V5+5++55,+5556+,+5,+,5+,+5,\"!#&)" }}}{EXCHG 
+{PARA 0 "> " 0 "" {MPLTEXT 1 0 119 "IEEEdouble(-.764716369021640852619
+8866421782331543663165714484615603128534238649724331194813683812555192
+634978651e-12);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$#!2v6a!>on9:\">%e()
+fQ)R%3m&G1/2)>$!V65655,++6665+,566+666,5655\"!#$*" }}}{EXCHG {PARA 0 "
+> " 0 "" {MPLTEXT 1 0 118 "IEEEdouble(.2811170463538626082557703975224
+235561517689078040072401240900544359120139060989936327261501689030452e
+-14);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$#\"2PWz,xKaU\"\"@/:#G\"o)fg<H
+\"4S-12&$\"V5++,6,655,,5,,5+56,+5+,,,5\"!$,\"" }}}{EXCHG {PARA 0 "> " 
+0 "" {MPLTEXT 1 0 360 "infnorm((sin(x)-(x-12009599006321323/7205759403
+7927936*x^3+4803839602528529/576460752303423488*x^5-3660068268593165/1
+8446744073709551616*x^7+13013576066109031/4722366482869645213696*x^9-1
+5143070331472327/604462909807314587353088*x^11+12425083348897861/77371
+252455336267181195264*x^13-15146768190541175/1980704062856608439838598
+7584*x^15))/sin(x),x=0..2^(-40));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$
+\"_qD[zajSSyo$3'*ooI%[jjn3qZ87zY2?>A9\\Hq#)4A:tN$[r'He1!zk#Q!$T\"" }}}
+{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "log(%)/log(2.);" }}{PARA 11 
+"" 1 "" {XPPMATH 20 "6#$!_q9MZ\\3&4dD^L0@'Rs=hQ$oi2TMa:wppZA4xo=_rQPX
+\"=c6s+D'\\eP\"!#(*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 383 "x-1
+2009599006321323/72057594037927936.*x^3+4803839602528529/5764607523034
+23488.*x^5-3660068268593165/18446744073709551616.*x^7+1301357606610903
+1/4722366482869645213696.*x^9-15143070331472327/6044629098073145873530
+88.*x^11+12425083348897861/77371252455336267181195264.*x^13-1514676819
+0541175/19807040628566084398385987584.*x^15+14254327701794437/50706024
+00912917605986812821504.*x^17;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" 
+}}{PARA 12 "" 1 "" {XPPMATH 20 "6#,4%\"xG\"\"\"*&$\"_q++++++++++++++++
+++++++vozTy.&>8l<D_\"Qf$ff#Hrmmmmmmm;!$+\"F%)F$\"\"$F%!\"\"*&$\"_q++++
++++++++++++++++++]7y]&R0C,<(eq$>Y:g,^o<KLLLLLLL)!$-\"F%)F$\"\"&F%F%*&$
+\"_q+++++++++++++++++++]7yvEChu#)pc8of8\\ya6<j_7%)p7%)p7%)>!$.\"F%)F$
+\"\"(F%F,*&$\"_q++++++++++++++++]PM-u3-(e*Gr7!=KM5RqqM^AoLR!*e)RA>tbF!
+$0\"F%)F$\"\"*F%F%*&$\"_q++++++++++++++vo/)*zpr#zw?&zWb_x![j9$)H:U&\\]
+p&=<W&Q3 at 0D!$2\"F%)F$\"#6F%F,*&$\"_q+++++++++++]7y+32gif^CWML23Jb-9N:b
+QO+pxOM0P=o$Q/fg\"!$4\"F%)F$\"#8F%F%*&$\"_q+++++++++v$fL%phj.(4+&z<okp
+=DlUo!o&pNLdNb+$*Q`3k@!pjrk(!$7\"F%)F$\"#:F%F,*&$\"_q++++++D\"y+e>jWDE
+_DHD()z:oYA_t(QUxX,@[^)GsB-*4E'QNYq6\"G!$9\"F%)F$\"#<F%F%" }}}{EXCHG 
+{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#
+>%\"RG,&$\"_q1D9&38K4j<U4[y*Ht]9%[i/MH2\\*zw-G2dmmmmmmmmmmmmmmmmm;!$+
+\"\"\"\"*&,&$\"_q-qv?[m4eb4a-6_lI(zH4T#*4yY,lQhCNvd`$HLLLLLLLLLLLLLL$)
+!$-\"F)*&,&$!_q)3pL(HU4\"eo%)>HGK)>J.^_\"zw&4-!e4V%*H5+:2%[yp7%)p7%)p7
+%)p7%)>!$.\"F)*&,&$\"_qrp@)QtTvidvI!*>nb?e^yoQT!)*3KG%z)ecNwV9>#)\\Mb_
+1*e)RA>tbF!$0\"F)*&,&$!_q_g+b$p'*z%\\)z*QCYtHR/8cLlt6Jz<g=u=e5Og]=ozEG
+'=<W&Q3 at 0D!$2\"F)*&,&$\"_qsg;ApU2?@,d/&z#RG%zdF?M&>R&z7bLv$GP$=.J)[9K>
+C*p$=o$Q/fg\"!$4\"F)*&,&$!_q^'y\\j#>bD\"Qo8[>JVs\\'QU`GJg:Y[9d;jOaJBy@
+k'))>E&3k@!pjrk(!$7\"F)*&$\"_q_/.*o,:EFj$**)41R,7fVa+4C,C2S!y!*o<:cNUA
+vRqdD3E'QNYq6\"G!$9\"F)%\"xGF)F)F)FLF)F)F)FLF)F)F)FLF)F)F)FLF)F)F)FLF)
+F)F)FLF)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "Q := minimax(
+sin(sqrt(x)), x=2^(-60)..2^(-7),[9,0], ,'err');" }}{PARA 12 "" 1 "" 
+{XPPMATH 20 "6#>%\"QG,&$\"fpXXs_7;7PNF]63l6ewafQMv$R*)\\n(G\\JH+fWv<@P
+$>$Q\"=pU<!$E\"\"\"\"*&,&$\"_q')>Vyq\\Wn>d\"Q(o3`DW0*euozJ.I,Gr*GF(4Bc
+*******************************!$+\"F)*&,&$\"hp-xK6jYZl=3X.4(*G,5C9qa/
+Q'Q\"=E7R'\\6.A'*)pjfw/ID)el7=!$?\"F)*&,&$!_qaM8C@)G\")G9&ffi#ys40#yB4
+.'em:x()*yei*y=axCdpmmmmmmmmmmm\"F.F)*&,&$\"ipnCO*f)e=)>H#zZ->8JRO1`.H
+IyGE9+-0IPtQC^RR:C$*GviFcB!$:\"F)*&,&$\"_q%)z_sP'y]Wk.>S6X\"y(Q^z\\o3*
+QI%*\\Yb'[$=!pz:%oEKOVALLLLLLL$)!$-\"F)*&,&$\"ipx.0&p%[f&z7D=y\"))RqjC
+%f62^)f\">cpG\"pxe6m)))z?JVk:O5<E.$!$5\"F)*&,&$!_qmUiS]]^Z(H()p.vKV#oh
+w3%\\nl<'y+'y!Q>pgp'e\"He7a!)G0!yT)p7%)>!$.\"F)*&,&$\"jpiQh!=I.&R>)p/5
+;kcI!R8EO%HTY%)=z]t5f4ZgDaEY`0#)e1D<?\\!$2\"F)*&$\"_q:CS[KKdoy&)omq*\\
+[vommt(=-\"o#fdF#zSdEfGK\"QsrF2O5+F^(4dv#!$0\"F)%\"xGF)F)F)FUF)F)F)FUF
+)F)F)FUF)F)F)FUF)F)F)FUF)F)F)FUF)F)F)FUF)F)F)FUF)F)" }}}{EXCHG {PARA 
+0 "> " 0 "" {MPLTEXT 1 0 17 "log(err)/log(2.);" }}{PARA 11 "" 1 "" 
+{XPPMATH 20 "6#$!_qQB%4(>x.5QQHemq'Q#G]\\OGY;]7TTD1`-#)H,kqeY1Eb;>>dR4
+)y=\"!#(*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "IEEEdouble(eva
+lf(Pi/2));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$#\"2\")o0/bZ[T\"\"1#*4ua
+#*>2!*$\"V+5,+,65++,+,+,,,6566,+5+,5\"!#_" }}}{EXCHG {PARA 0 "> " 0 "
+" {MPLTEXT 1 0 63 "convert(evalf(Pi/2)-14148475504056881/9007199254740
+992,binary);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$!_q66+5,6566,655,6,,5
+,+66,+,5666+556556+6+6,5,6,5,,56!$a\"" }}}{EXCHG {PARA 0 "> " 0 "" 
+{MPLTEXT 1 0 35 "convert(2^1024/evalf(Pi/2),binary);" }}{PARA 11 "" 1 
+"" {XPPMATH 20 "6#$\"_q66,+,66,,,6,5++666,55+,,,++,+,56+,565,6++5,5665
++55\"$C*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "1024*2^53;" }}
+{PARA 11 "" 1 "" {XPPMATH 20 "6#\"43exao.sLA*" }}}{EXCHG {PARA 0 "> " 
+0 "" {MPLTEXT 1 0 6 "2^113;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"D#>S%
+eE*41d_lpqr$f%Q5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "toto:= \+
+proc(x) x-floor(x/evalf(Pi/2))*evalf(Pi/2); end;" }}{PARA 0 "> " 0 "" 
+{MPLTEXT 1 0 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%%totoGR6#%\"xG6
+\"F(F(,&9$\"\"\"*&-%&floorG6#*&F*F+-%&evalfG6#,$%#PiG#F+\"\"#!\"\"F+F1
+F+F8F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "toto(2^(200))
+;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"H=uNB.#yOOMF]n(=WV()R*\\!#R" }
+}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "Digits := 150;" }}{PARA 
+11 "" 1 "" {XPPMATH 20 "6#>%'DigitsG\"$]\"" }}}{EXCHG {PARA 0 "> " 0 "
+" {MPLTEXT 1 0 12 "toto(2^350);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"
+ipX+7_uDNU\\;KHK'e,CG>cfZ/4;`E5r9L8(y?^nPMa%G&=?wf/!)!#%*" }}}{EXCHG 
+{PARA 0 "> " 0 "" {MPLTEXT 1 0 143 "P := convert(series(sin(sqrt(x))/(
+x^(3/2)-1/x), x=0, 25 ), polynom):\nR := minimax(P, x=2^(-60)..2^(-9),
+[7,0],((sqrt(x^3))/sin(sqrt(x))),'err');" }}}{EXCHG {PARA 0 "> " 0 "" 
+{MPLTEXT 1 0 99 "R := minimax(sin(sqrt(x))/(x^(3/2)-1/x), x=2^(-62)..2
+^(-9),[7,0],((sqrt(x^3))/sin(sqrt(x))),'err');" }}{PARA 12 "" 1 "" 
+{XPPMATH 20 "6#>%\"RG,&$\"atlL2!H@$>\\yF at nbJ-*HRJowzrgS*\\%)*oh>z2<=DJ
+!36q!*>?s)=D'o#4P!\\,MN%p`$e?+2$zDDo2H6R::E`\"!$c\"\"\"\"*&,&$!`tW9&)p
+U-5XPZULM#p^b)oBAUpV,ARS!pIhVWK!o(\\b/bW*o-yd)f\\\\V7je(*QXyVpwgJ?@e)e
+R9%f9!>9v(!$^\"F)*&,&$!at\"o at NN'=Ef#p&Rr%Hf:dN'pX?H!Q)pInb2X<*p\"oZE`b
+4p&[WQ$oko)fG$p!))3!R$[$feZeZl\"4?F)>f>(p;K=%!$[\"F)*&,&$\"atX<C_jgJJE
+7o#)Q#>7'Rxmz:daw')[-#fK)evYF\"3y$z>mgJ'fYsd(p$*R[2 at oN?2Jrs#RC3?#>xR%z
+[0qoW$!$X\"F)*&,&$!at3;qX!fUn+^M#o;6hr*o.?sD`tHsXIBVf6))p.k=&)HxP>K%H5
+WYQm_B)R$Q3xx%eT)=YraW/)y5g#\\#)=oE!$U\"F)*&,&$\"atE%fY%Q#eZ9Xl\\!pB&H
+1A4[sxo!ppeTU?9p?_a`'o`'[rc->e(e3.7wzs!>1CPY4>=9&*f%*p5*zj%\\xoTF8!$R
+\"F)*&,&$!atG`%QQy.,wO:=g#oDi)e!*=ejM:%Q9!***o=&[5U'yvhWdc!*yNBrw.%H$G
+hLZma(4#pp\"z_x8HQ'eusT!Q4dn$!$P\"F)*&$\"at,N[qYjoyq9GRVDZu4i^Av\\W6c
+\"=TG>6<LQLVi=mJ.ya\"*e<1,8UDo***Rm&H_iu,[k(e.i-GLmUmE*G%!$N\"F)%\"xGF
+)F)F)FLF)F)F)FLF)F)F)FLF)F)F)FLF)F)F)FLF)F)F)FLF)F)" }}}{EXCHG {PARA 
+0 "> " 0 "" {MPLTEXT 1 0 4 "err;" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#$
+\"atK>>2*zpJ8?@=tY1zcg:>kR6cuLB$yyaUV$ouurNX1=\"3$p5(y\"Q\\(z0j%Q*)32W
+!*RhrwLlwqR4fSfm?Z\"!$h\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 
+17 "log(err)/log(2.);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#$!atxTE\"e6E:
+bv0hXMCcZjS\"\\(*p)RoN))e&*=po!=.*=Mups!==#z/L\">Dn&zNQR)p.cfy-%zJi-nO
+IDW+UH0$R!$[\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "infnorm((
+sin(x)-(x)" }}}}{MARK "0 0 0" 16 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }
+{PAGENUMBERS 0 1 2 33 1 1 }
diff --git a/src/crlibm/scs_lib/multiplication_scs.c b/src/crlibm/scs_lib/multiplication_scs.c
new file mode 100644
index 0000000..a58b403
--- /dev/null
+++ b/src/crlibm/scs_lib/multiplication_scs.c
@@ -0,0 +1,339 @@
+/** Functions for SCS multiplication operations 
+ at file multiplication_scs.c
+
+ at author Defour David David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr 
+
+ This file is part of the SCS library.
+*/
+
+/*
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+#include "scs.h"
+#include "scs_private.h"
+
+#if 0 /* used to help debugging */
+void pr(char* s,double d) {
+  db_number x;
+  x.d=d;
+  printf(s);printf("   ");
+  printf("%8x%8x . 2^%d   (%8f %8x %8x)   \n",
+	 (x.i[HI]&0x000FFFFF)+0x00100000,
+	 x.i[LO],
+	 (x.i[HI]>>20)-1023,
+	 x.d,
+	 x.i[HI],
+	 x.i[LO]);
+}
+#endif
+
+
+
+/*  Compute the carry of r1, remove it from r1, and add it to r0 */
+#define SCS_CARRY_PROPAGATE(r1,r0,tmp) \
+      {tmp = r1>>SCS_NB_BITS; r0 += tmp; r1 -= (tmp<<SCS_NB_BITS);}     
+
+
+
+
+
+
+
+/************************************************************/
+/* We have unrolled the loops for SCS_NB_WORDS==8 
+It leads to almost x2 speedup.
+
+   We just wish gcc would do it for us ! There are option switches,
+   but they don't lead to any performance improvement. When they do,
+   this part of the source code will be removed.
+
+   In the meantime, feel free to unroll for other values. */
+
+
+
+
+
+/***************************/
+#if (SCS_NB_WORDS==8)
+/***************************/
+void scs_mul(scs_ptr result, scs_ptr x, scs_ptr y){
+  uint64_t     val, tmp;
+  uint64_t     r0,r1,r2,r3,r4,r5,r6,r7,r8;
+  uint64_t     x0,x1,x2,x3,x4,x5,x6,x7;
+  int                    y0,y1,y2,y3,y4,y5,y6,y7;
+    
+  R_EXP = X_EXP * Y_EXP;
+  R_SGN = X_SGN * Y_SGN;
+  R_IND = X_IND + Y_IND;
+
+  /* Partial products computation */   
+  x7=X_HW[7];  y7=Y_HW[7];  x6=X_HW[6];  y6=Y_HW[6];
+  x5=X_HW[5];  y5=Y_HW[5];  x4=X_HW[4];  y4=Y_HW[4];
+  x3=X_HW[3];  y3=Y_HW[3];  x2=X_HW[2];  y2=Y_HW[2];
+  x1=X_HW[1];  y1=Y_HW[1];  x0=X_HW[0];  y0=Y_HW[0];
+
+  r8 = x7*y1 + x6*y2 + x5*y3 + x4*y4 + x3*y5 + x2*y6 + x1*y7;
+  r7 = x7*y0 + x6*y1 + x5*y2 + x4*y3 + x3*y4 + x2*y5 + x1*y6 + x0*y7;
+  r6 = x6*y0 + x5*y1 + x4*y2 + x3*y3 + x2*y4 + x1*y5 + x0*y6;
+  r5 = x5*y0 + x4*y1 + x3*y2 + x2*y3 + x1*y4 + x0*y5;
+  r4 = x4*y0 + x3*y1 + x2*y2 + x1*y3 + x0*y4 ;
+  r3 = x3*y0 + x2*y1 + x1*y2 + x0*y3;
+  r2 = x2*y0 + x1*y1 + x0*y2;
+  r1 = x1*y0 + x0*y1 ;
+  r0 = x0*y0 ;
+ 
+  val= 0;
+  /* Carry Propagate */
+  SCS_CARRY_PROPAGATE(r8,r7,tmp)
+  SCS_CARRY_PROPAGATE(r7,r6,tmp)
+  SCS_CARRY_PROPAGATE(r6,r5,tmp)
+  SCS_CARRY_PROPAGATE(r5,r4,tmp)
+  SCS_CARRY_PROPAGATE(r4,r3,tmp)
+  SCS_CARRY_PROPAGATE(r3,r2,tmp)
+  SCS_CARRY_PROPAGATE(r2,r1,tmp)
+  SCS_CARRY_PROPAGATE(r1,r0,tmp)      
+  SCS_CARRY_PROPAGATE(r0,val,tmp)      
+ 
+  if(val != 0){
+    /* shift all the digits ! */
+    R_HW[0] = val; R_HW[1] = r0; R_HW[2] = r1;  R_HW[3] = r2;
+    R_HW[4] = r3;  R_HW[5] = r4; R_HW[6] = r5;  R_HW[7] = r6;
+    R_IND += 1;
+  }
+  else {
+    R_HW[0] = r0; R_HW[1] = r1; R_HW[2] = r2; R_HW[3] = r3;
+    R_HW[4] = r4; R_HW[5] = r5; R_HW[6] = r6; R_HW[7] = r7;
+  }
+
+}
+
+
+void scs_square(scs_ptr result, scs_ptr x){
+  uint64_t  r0,r1,r2,r3,r4,r5,r6,r7,r8;
+  uint64_t  x0,x1,x2,x3,x4,x5,x6,x7;
+  uint64_t  val, tmp;
+
+
+  R_EXP = X_EXP * X_EXP;
+  R_IND = X_IND + X_IND;
+  R_SGN = 1;
+    
+  /*
+   * Partial products
+   */   
+  x7=X_HW[7];  x6=X_HW[6];  x5=X_HW[5];  x4=X_HW[4];
+  x3=X_HW[3];  x2=X_HW[2];  x1=X_HW[1];  x0=X_HW[0];
+
+  r0 =  x0*x0;
+  r1 = (x0*x1)* 2 ;
+  r2 =  x1*x1 + (x0*x2*2);
+  r3 = (x1*x2 +  x0*x3)* 2;
+  r4 =  x2*x2 + (x1*x3 + x0*x4)* 2;
+  r5 = (x2*x3 +  x1*x4 + x0*x5)* 2;
+  r6 =  x3*x3 + (x2*x4 + x1*x5 + x0*x6)* 2;
+  r7 = (x3*x4 +  x2*x5 + x1*x6 + x0*x7)* 2;
+  r8 =  x4*x4 + (x3*x5 + x2*x6 + x1*x7)* 2;
+
+  val= 0;
+  /* Carry propagation */
+  SCS_CARRY_PROPAGATE(r8,r7,tmp)
+  SCS_CARRY_PROPAGATE(r7,r6,tmp)
+  SCS_CARRY_PROPAGATE(r6,r5,tmp)
+  SCS_CARRY_PROPAGATE(r5,r4,tmp)
+  SCS_CARRY_PROPAGATE(r4,r3,tmp)
+  SCS_CARRY_PROPAGATE(r3,r2,tmp)
+  SCS_CARRY_PROPAGATE(r2,r1,tmp)
+  SCS_CARRY_PROPAGATE(r1,r0,tmp)      
+  SCS_CARRY_PROPAGATE(r0,val,tmp)      
+ 
+  if(val != 0){
+    /* shift all the digits ! */
+    R_HW[0] = val; R_HW[1] = r0; R_HW[2] = r1;  R_HW[3] = r2;
+    R_HW[4] = r3;  R_HW[5] = r4; R_HW[6] = r5;  R_HW[7] = r6;
+    R_IND += 1;
+  }
+  else {
+    R_HW[0] = r0; R_HW[1] = r1; R_HW[2] = r2; R_HW[3] = r3;
+    R_HW[4] = r4; R_HW[5] = r5; R_HW[6] = r6; R_HW[7] = r7;
+  }
+  
+}
+
+
+
+/***************************/
+#else
+/***************************/
+/* From there on, the normal, unrolled case */
+
+
+void scs_mul(scs_ptr result, scs_ptr x, scs_ptr y){
+  uint64_t RES[SCS_NB_WORDS+1];
+  uint64_t val, tmp;
+  int i, j;    
+
+  R_EXP = X_EXP * Y_EXP;
+  R_SGN = X_SGN * Y_SGN;
+  R_IND = X_IND + Y_IND;
+
+  for(i=0; i<=SCS_NB_WORDS; i++)
+    RES[i]=0;
+
+  /* Compute only the first half of the partial product. See the
+     unrolled code for an example of what we compute */
+
+ /* i=0 */
+ tmp = X_HW[0];
+ for(j=0; j<(SCS_NB_WORDS); j++)
+   RES[j] += tmp * Y_HW[j];
+ /* i = 1..SCS_NB_WORDS-1 */
+ for(i=1 ; i<SCS_NB_WORDS; i++){
+      tmp = X_HW[i];
+      for(j=0; j<(SCS_NB_WORDS-i); j++)
+	RES[i+j] += tmp * Y_HW[j];
+      RES[SCS_NB_WORDS] += tmp * Y_HW[j]; /* here j==SCS_NB_WORDS-i */
+  }
+
+  val = 0;
+
+  /* Carry propagate */
+  for(i=SCS_NB_WORDS; i>0; i--)
+    SCS_CARRY_PROPAGATE(RES[i],RES[i-1],tmp)
+  SCS_CARRY_PROPAGATE(RES[0],val,tmp)
+
+
+  /* Store the result */
+  if(val != 0){
+    /* shift all the digits ! */     
+    R_HW[0] = val;
+    for(i=1; i<SCS_NB_WORDS; i++)
+      R_HW[i] = RES[i-1];
+  
+    R_IND += 1;
+  }else {
+    for(i=0; i<SCS_NB_WORDS; i++)
+      R_HW[i] = RES[i];
+   }
+}
+
+
+
+
+
+
+
+void scs_square(scs_ptr result, scs_ptr x){
+  uint64_t RES[SCS_NB_WORDS+1];
+  uint64_t val, tmp;
+  int i, j;
+  
+
+  R_EXP = X_EXP * X_EXP;
+  R_SGN = 1;
+  R_IND = X_IND + X_IND;
+
+  /* Set to 0 intermediate register     */
+  for(i=0; i<=SCS_NB_WORDS; i++)
+    RES[i] = 0;
+
+  /* Compute all the double partial products: 2 x_i * x_j, i!=j */
+  tmp = (uint64_t)X_HW[0];
+  for(j=1; j<SCS_NB_WORDS; j++)
+    RES[j] += tmp * X_HW[j];
+  for(i=1 ; i<(SCS_NB_WORDS+1)/2; i++){
+    tmp = (uint64_t)X_HW[i];
+    for(j=i+1; j<(SCS_NB_WORDS-i); j++)
+      RES[i+j] += tmp * X_HW[j];
+    RES[SCS_NB_WORDS] += tmp * X_HW[SCS_NB_WORDS-i];
+  }
+
+  /* All these partial products are double */
+  for(i=0; i<=SCS_NB_WORDS; i++)
+    RES[i] *=2;
+
+  /* Add partial product of the form x_i^2 */
+  for(i=0, j=0; i<=SCS_NB_WORDS; i+=2, j++){
+    RES[i]  += (uint64_t)X_HW[j] * X_HW[j];
+  }  
+
+  val = 0;
+  /* Carry propagate */
+  for(i=SCS_NB_WORDS; i>0; i--)
+      SCS_CARRY_PROPAGATE(RES[i],RES[i-1],tmp)
+ 
+  SCS_CARRY_PROPAGATE(RES[0],val,tmp)
+
+
+  /* Store the result */
+  if(val != 0){
+    /* shift all the digits ! */     
+    R_HW[0] = val;
+    for(i=1; i<SCS_NB_WORDS; i++)
+      R_HW[i] = RES[i-1];
+  
+    R_IND += 1;
+  }else {
+    for(i=0; i<SCS_NB_WORDS; i++)
+      R_HW[i] = RES[i];
+   }
+
+}
+
+
+/* 
+ * #endif corresponding to the test #if (SCS_NB_WORDS==8)
+ */
+#endif
+
+
+/*
+ Multiply x by an integer val; result is returned in x.
+ */
+ void scs_mul_ui(scs_ptr x, unsigned int val_int){
+  uint64_t val, tmp, vald, rr;
+  int i;
+
+  if (val_int == 0)
+    X_EXP = 0;
+  
+  vald = val_int;
+
+  val = 0; 
+  rr  = 0;
+  for(i=(SCS_NB_WORDS-1); i>=0; i--){
+    val    += vald * X_HW[i];
+    SCS_CARRY_PROPAGATE(val, rr, tmp)
+    X_HW[i] = val;
+    val     = rr;
+    rr      = 0; 
+  }
+
+  if(val != 0){
+    /* shift all the digits ! */ 
+    for(i=(SCS_NB_WORDS-1); i>0; i--)
+      X_HW[i] = X_HW[i-1];
+
+    X_HW[0] = (unsigned int)val;
+    X_IND  += 1;
+  }
+  
+  return;
+}
+
diff --git a/src/crlibm/scs_lib/poly_fct.c b/src/crlibm/scs_lib/poly_fct.c
new file mode 100644
index 0000000..14cea65
--- /dev/null
+++ b/src/crlibm/scs_lib/poly_fct.c
@@ -0,0 +1,112 @@
+/*
+ * Author  : Defour David
+ * Contact : David.Defour at ens-lyon.fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ */
+#include "scs.h"
+#include "scs_private.h"
+
+
+/*
+ * result = z + (x * y)
+ */
+/* z->sign = X_SGN . Y_SGN */
+void scs_fma(scs_ptr result,  scs_ptr x,  scs_ptr y,  scs_ptr z){
+  uint64_t RES[2*SCS_NB_WORDS];
+  uint64_t val, tmp;
+  int i, j, ind, Diff;    
+
+  ind = X_IND + Y_IND; 
+
+  for(i=0; i<=SCS_NB_WORDS+1; i++)
+    RES[i]=0;
+  
+  for(i=0 ; i<SCS_NB_WORDS; i++){
+    for(j=0; j<(SCS_NB_WORDS-i); j++){
+      RES[i+j] += (uint64_t)X_HW[i] * Y_HW[j];
+    }}
+
+  /* if we can perform an add */
+  if (z->sign == (X_SGN * Y_SGN)){
+    Diff = z->index - ind;
+    if (Diff >= 0){
+      for(i=(SCS_NB_WORDS-1), j=(SCS_NB_WORDS-Diff); j>=0; i--, j--)
+	RES[i] = z->h_word[i] + RES[j];     
+      for(  ; i>=0; i--)
+	RES[i] = z->h_word[i]; 
+    }else {    
+      for(i=(SCS_NB_WORDS+Diff), j=(SCS_NB_WORDS-1); i>=0; i--, j--)
+	RES[j] = z->h_word[i] + RES[j];     
+    }
+
+    /* Carry propagate */
+    RES[SCS_NB_WORDS-1] += (RES[SCS_NB_WORDS]>>SCS_NB_BITS);
+    for(i=(SCS_NB_WORDS-1); i>0; i--)
+      {tmp = RES[i]>>SCS_NB_BITS;  RES[i-1] += tmp;  RES[i] -= (tmp<<SCS_NB_BITS);}
+    
+    val = RES[0] >> SCS_NB_BITS;
+    R_IND = X_IND + Y_IND;
+    
+    /* Store the result */
+    if(val != 0){
+      /* shift all the digits ! */     
+      R_HW[0] = (unsigned int)val;
+      R_HW[1] = (unsigned int)(RES[0] - (val<<SCS_NB_BITS));
+      for(i=2; i<SCS_NB_WORDS; i++)
+	R_HW[i] = (unsigned int)RES[i-1];
+      
+      R_IND += 1;
+    }
+    else {
+      for(i=0; i<SCS_NB_WORDS; i++)
+	R_HW[i] = (unsigned int)RES[i];
+    }
+    
+    R_EXP = (z->exception.d + (X_EXP * Y_EXP)) - 1;
+    R_SGN = X_SGN * Y_SGN;
+  
+  }else {
+    /* we have to do a sub */
+
+    /* Carry propagate */
+    RES[SCS_NB_WORDS-1] += (RES[SCS_NB_WORDS]>>SCS_NB_BITS);
+    for(i=(SCS_NB_WORDS-1); i>0; i--)
+      {tmp = RES[i]>>SCS_NB_BITS;  RES[i-1] += tmp;  RES[i] -= (tmp<<SCS_NB_BITS);}
+    
+    val = RES[0] >> SCS_NB_BITS;
+    R_IND = X_IND + Y_IND;
+    
+    /* Store the result */
+    if(val != 0){
+      /* shift all the digits ! */     
+      R_HW[0] = (unsigned int)val;
+      R_HW[1] = (unsigned int)(RES[0] - (val<<SCS_NB_BITS));
+      for(i=2; i<SCS_NB_WORDS; i++)
+	R_HW[i] = (unsigned int)RES[i-1];
+      
+      R_IND += 1;
+    }
+    else {
+      for(i=0; i<SCS_NB_WORDS; i++)
+	R_HW[i] = (unsigned int)RES[i];
+    }
+    
+    R_EXP = (X_EXP * Y_EXP);
+    R_SGN = X_SGN * Y_SGN;
+
+    scs_add(result, result, z);
+  }
+}
diff --git a/src/crlibm/scs_lib/print_scs.c b/src/crlibm/scs_lib/print_scs.c
new file mode 100644
index 0000000..97aee4c
--- /dev/null
+++ b/src/crlibm/scs_lib/print_scs.c
@@ -0,0 +1,73 @@
+/*
+ * Author  : Defour David
+ * Contact : David.Defour at ens-lyon.fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ */
+#include <stdio.h>
+#include "scs.h"
+#include "scs_private.h"
+
+
+/*
+ * used by the next function to write
+ * bit of the integer in the right order ....
+ */
+static void print_order(unsigned int x, int nb, int b){
+  if (nb<=0)
+    return;
+  print_order(x/b, nb-1, b);
+  printf("%u",x%b);
+  return;
+}
+/*
+ * print nb digits of the chain x in base "b"
+ * b must be between 1 and 10
+ */ 
+static void print_integer(unsigned int x, int b, int nb){
+   
+  if ((b < 2)||(b>16)){
+    fprintf(stderr," ERROR: You musn't print number with a base larger than 10 or less than 2 \n");
+    return;
+  }
+  print_order(x, nb, b);
+  return;
+}
+
+
+/*
+ * Convert a double precision number in it scs multiprecision
+ * representation
+ *
+ * Rem. : We haven't tested all special cases yet.
+ */
+
+/*
+ */
+void scs_get_std( scs_ptr x){
+  int i; 
+  db_number d;
+
+  scs_get_d(&d.d, x);
+  printf("Exception : %e \n", X_EXP);
+  printf("Index= %d   \n Sign=  %d \n Double value= %.30e   \n Hex mantissa= %x %x\n", 
+	 X_IND, X_SGN, d.d, d.i[HI], d.i[LO]);
+  for(i=0;i<SCS_NB_WORDS;i++){
+    printf("  D %d :  %8x %20u \n",i, X_HW[i], X_HW[i]);
+  }
+}
+
+
+
diff --git a/src/crlibm/scs_lib/rand_scs.c b/src/crlibm/scs_lib/rand_scs.c
new file mode 100644
index 0000000..dcaa484
--- /dev/null
+++ b/src/crlibm/scs_lib/rand_scs.c
@@ -0,0 +1,63 @@
+/*
+ * Author  : Defour David
+ * Contact : David.Defour at ens-lyon.fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ */
+#include <stdlib.h>
+#include "scs.h"
+#include "scs_private.h"
+
+/*
+ * Return 'sizeof(int)' random bits   
+ */
+
+
+int rand_val(void){
+  int val;
+  int i;
+
+  val = (rand() & 0x000000ff);
+  for(i=0; i<(sizeof(int)); i++){
+    val = val << 8;
+    val += (rand() & 0x000000ff ); /* we keep only 8 bits */
+  }
+  return val;
+}
+
+
+/*
+ * Put into 'result' a scs random number with the index field set
+ * with a value between -expo_max and +expo_max.
+ *
+ * Rem. :
+ * 1) If you want an scs number belonging to double precision floating
+ * point number you must call scs_rand with an expo_max less than 39.
+ * 2) expo_max must be less than RAND_MAX that is usually set a
+ * value greater than 32767
+ */
+void scs_rand(scs_ptr result, int expo_max){
+  int i;
+
+  R_EXP = 1;
+  R_IND = (rand() % (2*expo_max)) - expo_max;
+  R_SGN = ((2*rand()- RAND_MAX) > 0) ?  (-1) : (1);
+
+  
+  for(i=0; i<SCS_NB_WORDS; i++){
+    /* We keep the first SCS_NB_BITS bits of a random value */
+    R_HW[i] = rand_val() & SCS_MASK_RADIX; 
+  }
+}
diff --git a/src/crlibm/scs_lib/scs.h b/src/crlibm/scs_lib/scs.h
new file mode 100644
index 0000000..777bd4d
--- /dev/null
+++ b/src/crlibm/scs_lib/scs.h
@@ -0,0 +1,353 @@
+/** This is the main header file of the SCS library, which defines the
+    SCS data structure, and the functions that implement arithmetic on it.
+
+ at file scs.h
+
+ at author David Defour David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr
+
+This file is part of the SCS library.
+
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+
+
+/* Avoid loading the header twice */
+#ifndef INCLUDE_SCS 
+#define INCLUDE_SCS 1
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS /* because it is not very clean */
+
+#ifdef HAVE_CONFIG_H
+#include "../crlibm_config.h"
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+
+
+/* 64 bit arithmetic may be standardised, but people still do want they want */
+#ifdef HAVE_INTTYPES_H
+#define ULL(bits) 0x##bits##uLL
+#elif defined(WIN32) 
+/* TODO insert Windows garbage there */
+/* Default, hoping it works, hopefully less and less relevant */
+#else
+typedef long long int64_t;
+typedef unsigned long long uint64_t; 
+#define ULL(bits) 0x##bits##uLL
+#endif
+
+#ifndef SCS_DEF_INT64 
+#define SCS_DEF_INT64
+#ifdef SCS_TYPEOS_HPUX
+#ifndef __LP64__ /* To solve the problem with 64 bits integer */
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#define ULL(bits) 0x##bits##uLL
+#endif
+#endif
+#endif
+
+
+#ifdef HAVE_GMP_H
+ #include <gmp.h>
+#endif
+
+#ifdef HAVE_MPFR_H
+ #include <mpfr.h>
+#endif
+
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/** @internal An union to cast floats into doubles or the other way round. For
+    internal purpose only */
+
+typedef union {
+  int32_t i[2]; /* Signed (may be useful) */                
+  int64_t l;    /* Signed (may be useful) */
+  double d;
+} db_number;
+
+
+
+
+
+/* ****************************************************************** */
+/**@name SCS data-types */ /**@{*/
+
+/** @struct scs 
+The SCS data type. 
+
+An SCS number is a a floating-point number in base 2^32.
+
+- Its mantissa is formed of SCS_NB_WORDS digits (currently 32 bits by default)
+
+- Its exponent is a 32-bit integer
+
+- It also has a sign field, and an exception field used to store and
+  propagate IEEE-754 exceptions.
+
+
+The real number represented by a scs structure is equal to:
+ at f$
+\displaystyle 
+\sum_{i=0}^{\mathtt{SCS\_NB\_WORDS}} 
+2^{(\mathtt{index} -i)\mathtt{SCS\_NB\_BITS}}
+\times
+\mathtt{h\_word}[i] 
+ at f$
+*/
+
+/*
+  (verbatim-mode formula for the above eqation:) the number represented by a
+  SCS structure is :
+
+         i<SCS_NB_WORDS               (index - i).SCS_NB_BITS
+ sign . (    sum       ( h_word[i] . 2^                        ) 
+            i=0 
+*/
+
+struct scs {
+  /** the digits, as 32 bits words */ 
+  uint32_t h_word[SCS_NB_WORDS]; 
+  /** Used to store Nan,+/-0, Inf, etc and then let the hardware handle them */
+  db_number exception;   
+  /** This corresponds to the exponent in an FP format, but here we are
+     in base 2^32  */
+  int index;        
+  /** The sign equals 1 or -1*/
+  int sign;              
+};
+
+
+typedef struct scs scs;
+
+
+
+/** scs_ptr is a pointer on a SCS structure */
+typedef struct scs * scs_ptr;
+
+
+
+
+/** scs_t is an array of one SCS struct to lighten syntax : you may
+ declare a scs_t object, and pass it to the scs functions (which
+ expect pointers) without using ampersands.
+*/
+typedef struct scs scs_t[1];
+
+/**@}*/ /* end doxygen group for SCS data-types */
+
+
+
+
+
+
+
+
+/* ****************************************************************** */
+/**@name Conversion and initialization functions  */ /**@{*/
+
+/** Convert a SCS number to a double, rounding to the nearest */
+void scs_get_d(double*, scs_ptr);
+
+/** Convert a SCS number to a double, rounding towards minus infinity */
+void scs_get_d_minf(double*, scs_ptr);
+
+/** Convert a SCS number to a double, rounding towards plus infinity */
+void scs_get_d_pinf(double*, scs_ptr);
+
+/** Convert a SCS number to a double, rounding towards zero */
+void scs_get_d_zero(double*, scs_ptr);
+
+/** Convert a double into a SCS number (this is an exact operation) */
+void scs_set_d(scs_ptr, double);
+
+/** Convert a signed int into a SCS number (this is an exact operation) */
+void scs_set_si(scs_ptr, signed int);
+
+
+/** Print out a SCS number. Sorry for the strange name, we are mimicking GMP */
+void scs_get_std(scs_ptr);
+
+
+/** Copy a SCS number into another */
+void scs_set(scs_ptr, scs_ptr); 
+
+
+/** Set a SCS number to zero */
+void scs_zero(scs_ptr);
+
+
+/** Generate a random SCS number. 
+   The index field of result will be between -expo_max and +expo_max.
+   Example: to get a number in the double-precision floating-point range,
+   expo_max should be smaller than 39.
+   @warning No guarantee is made about the quality of the random algorithm
+   used... */
+void scs_rand(scs_ptr result, int expo_max);
+
+/**@}*/ /* end doxygen group for conversion / initialisation functions*/
+
+
+
+
+/* ****************************************************************** */
+/**@name Addition and renormalisation functions  */ /**@{*/
+
+
+/** Addition of two SCS numbers.  
+ The arguments x, y and result may point to the same memory
+ location. The result is a normalised SCS number.
+*/
+void scs_add(scs_ptr result, scs_ptr x, scs_ptr y);
+
+
+/** Subtraction of two SCS numbers.  
+ The arguments x, y and result may point to the same memory
+ location. The result is a normalised SCS number.
+ */
+void scs_sub(scs_ptr result, scs_ptr x, scs_ptr y);
+
+
+/** Addition without renormalisation, to be used for adding many
+   numbers.
+  @warning  In case of a cancellation, severe loss of precision could
+   happen. Safe if the numbers are of the same sign.
+ */
+void scs_add_no_renorm(scs_ptr result, scs_ptr x, scs_ptr y);
+
+
+/** Renormalisation (to be used after several scs_add_no_renorm).
+This function removes the carry from each digit, and also shifts the
+digits in case of a cancellation (so that if result != 0 then its
+first digit is non-zero)
+ 
+ @warning THIS FUNCTION HAS NEVER BEEN PROPERLY TESTED and is
+ currently unused in the library: instead, specific renormalisation
+ steps are fused within the code of the operations which require it.
+  */
+
+void scs_renorm(scs_ptr);
+
+
+/** Renormalisation assuming no cancellation.  This function is useful
+   for example when adding many numbers of the same sign */
+void scs_renorm_no_cancel_check(scs_ptr);
+
+/**@}*/ /* end doxygen group for addition and normalisation functions*/
+
+
+
+
+/* ****************************************************************** */
+/**@name Multiplication functions */ /**@{*/
+
+/** Multiplication of two SCS numbers.  The arguments x, y and result
+ may point to the same memory location. The result is a normalised SCS
+ number.
+ */
+void scs_mul(scs_ptr result, const scs_ptr x, const scs_ptr y);
+
+/** Multiplication of a SCS with an unsigned integer; result is
+    returned in x. */
+void scs_mul_ui(scs_ptr, const unsigned int);
+
+/** Square. Result is normalised */
+void scs_square(scs_ptr result, scs_ptr x);
+
+/** Fused multiply-and-add (ab+c);   Result is normalised
+\warning This function has not been tested thoroughly */
+void scs_fma(scs_ptr result,  scs_ptr a,  scs_ptr b,  scs_ptr c);
+
+/**@}*/ /* end doxygen group for Multiplication functions*/
+
+
+
+
+
+/* ****************************************************************** */
+/**@name Divisions */ /**@{*/
+
+/** SCS inverse.  
+Stores 1/x in result. Result is normalised 
+
+ at warning This function is known not to work for most precisions: it
+performs a fixed number of Newton-Raphson iterations (two), starting
+with a FP number (53 bits), so provides roughly 210 bits of
+precision. It should be modified to perform more iterations if more
+precision is needed.
+*/
+void scs_inv(scs_ptr result, scs_ptr x);
+
+/** SCS division. Computes x/y. Result is normalised 
+ at warning This function is known not to work for most precisions: it
+performs a fixed number of Newton-Raphson iterations (two), starting
+with a FP number (53 bits), so provides roughly 210 bits of
+precision. It should be modified to perform more iterations if more
+precision is needed.
+*/
+void scs_div(scs_ptr result, scs_ptr x, scs_ptr y);
+
+
+/** SCS division by 2. Computes x/2. Result is normalised */ 
+void scs_div_2(scs_t x);
+
+/**@}*/ /* end doxygen group for division functions*/
+
+
+
+
+
+/* ****************************************************************** */
+/**@name Functions for testing purpose */ /**@{*/
+
+
+#ifdef HAVE_LIBGMP
+/** Convert a SCS number into a GMP MPF (multiple precision,
+   floating-point) number. Should be exact if the target number has
+   more precision than the SCS number, otherwise the rounding is
+   unspecified (the conversion uses MPF functions) */
+void scs_get_mpf(scs_ptr, mpf_t);
+#endif
+
+
+
+#ifdef HAVE_MPFR_H 
+/**  Convert a SCS number into a MPFR (multiple precision,
+   floating-point) number. Should be exact if the target number has
+   more precision than the SCS number, otherwise should be correctly
+   rounded (the conversion uses MPFR functions). Not heavily tested
+   though */
+void scs_get_mpfr(scs_ptr, mpfr_t);
+#endif
+
+
+/**@}*/ /* end doxygen group for functions for testing purpose */
+
+#endif /* INCLUDE_SCS */
+
+
+
+
+
diff --git a/src/crlibm/scs_lib/scs2double.c b/src/crlibm/scs_lib/scs2double.c
new file mode 100644
index 0000000..d386b0b
--- /dev/null
+++ b/src/crlibm/scs_lib/scs2double.c
@@ -0,0 +1,411 @@
+/** Conversion of SCS to floating-point double 
+ at file scs2double.c
+
+ at author Defour David David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr 
+
+This file is part of the SCS library.
+*/
+
+/*
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ */
+#include "scs.h"
+#include "scs_private.h"
+
+
+/** Convert a multiple precision number in scs format into a double
+ precision number.
+
+ at warning  "x" need to be normalized
+  */ 
+
+/* TODO BUG scs_get_d doesn't do round-to nearest even */
+
+
+
+
+/*  computes the exponent from the index */
+/* in principle an inline function would be cleaner, but 
+ this leads to faster and smaller code 
+*/
+
+
+
+
+
+void scs_get_d(double *result, scs_ptr x){ 
+  db_number nb, rndcorr;
+  uint64_t lowpart, roundbits, t1;
+  int expo, expofinal, shift;
+  double res;
+  
+  /* convert the MSB digit into a double, and store it in nb.d */
+  nb.d = (double)X_HW[0]; 
+
+  /* place the two next digits in lowpart */
+  t1   = X_HW[1];
+  lowpart  = (t1 << SCS_NB_BITS) + X_HW[2];
+    /* there is at least one significant bit in nb, 
+       and at least 2*SCS_NB_BITS in lowpart, 
+       so provided SCS_NB_BITS >= 27
+       together they include the 53+ guard bits to decide rounding 
+    */
+
+  /* test for  s/qNan, +/- Inf, +/- 0, placed here for obscure performance reasons */
+  if (X_EXP != 1){
+    *result = X_EXP; 
+    return;
+  }
+  
+  /* take the exponent of nb.d (will be in [0:SCS_NB_BITS])*/
+  expo = ((nb.i[HI] & 0x7ff00000)>>20) - 1023; 
+
+  /* compute the exponent of the result */
+  expofinal = expo + SCS_NB_BITS*X_IND;
+
+  /* Is the SCS number not too large for the IEEE exponent range ? */
+  if (expofinal >  1023) {
+    /* return an infinity */
+    res = SCS_RADIX_RNG_DOUBLE*SCS_RADIX_RNG_DOUBLE;
+  }
+
+  /* Is our SCS number a denormal  ? */
+  else if (expofinal >= -1022){		
+    /* x is in the normal range */   
+    shift=expo+2*SCS_NB_BITS-53;
+    roundbits=lowpart<<(64-shift);
+    /* align the rest of the mantissa to nb : shift by (2*SCS_NB_BITS)-53+expo */
+    lowpart = lowpart >> shift;     
+    /* Look at the last bit to decide rounding */
+
+    if (lowpart & ULL(0000000000000001)){
+      /* Test for the round to even case */
+      if(roundbits==0)
+	{ int i;
+	  for (i=3; i<SCS_NB_WORDS; i++)
+	    roundbits=roundbits | X_HW[i];
+	}
+      if(roundbits==0) {
+	/* round to even mantissa */
+	if (lowpart & ULL(0000000000000002)){
+	  /* mantissa odd, need to add an half-ulp */
+	  rndcorr.i[LO] = 0; 
+	  rndcorr.i[HI] = (expo-52+1023)<<20;    /* 2^(exp-52) */ 
+	}else
+	  rndcorr.d = 0.0;
+      }
+      else { /* there are round bits need to add an half-ulp */
+	rndcorr.i[LO] = 0; 
+	rndcorr.i[HI] = (expo-52+1023)<<20;    /* 2^(exp-52) */ 
+      }
+    }else{
+      /* need to add nothing*/
+      rndcorr.d = 0.0;
+    }
+    
+    lowpart = lowpart >> 1;
+    nb.l = nb.l | lowpart;    /* Finish to fill the mantissa */
+    res  = nb.d + rndcorr.d;  /* rounded to nearest   */
+    
+    /* now compute the exponent from the index :
+       we need to multiply res by 2^(X_IND*SCS_NB_BITS)
+       First check this number won't be a denormal itself */
+    if((X_IND)*SCS_NB_BITS +1023 > 0) {
+      /* build the double 2^(X_IND*SCS_NB_BITS)   */         		
+      nb.i[HI] = ((X_IND)*SCS_NB_BITS +1023)  << 20;  		
+      nb.i[LO] = 0;
+      res *= nb.d;     /* exact multiplication */
+    }
+    else { /*offset the previous computation by 2^(2*SCS_NB_BITS) */
+      /* build the double 2^(X_IND*SCS_NB_BITS)   */         		
+      nb.i[HI] = ((X_IND)*SCS_NB_BITS +1023 + 2*SCS_NB_BITS)  << 20;  		
+      nb.i[LO] = 0;                                 
+      res *= SCS_RADIX_MTWO_DOUBLE;  /* exact multiplication */
+      res *= nb.d;                  /* exact multiplication */
+    }
+  } 
+
+
+  else { 
+    /* the final number is a denormal with 52-(expfinal+1022)
+     significant bits. */
+
+    if (expofinal < -1022 - 53 ) {
+      res = 0.0;
+    }
+    else {
+
+      /* align the rest of the mantissa to nb */
+      lowpart = lowpart >> (expo+(2*SCS_NB_BITS)-52);     
+      /* Finish to fill the mantissa */
+      nb.l = nb.l | lowpart; 
+
+      /* this is still a normal number. 
+	 Now remove its exponent and add back the implicit one */
+      nb.l = (nb.l & ULL(000FFFFFFFFFFFFF)) | ULL(0010000000000000);
+      
+      /* keep only the significant bits */
+      nb.l = nb.l >> (-1023 - expofinal);
+      /* Look at the last bit to decide rounding */
+      if (nb.i[LO] & 0x00000001){
+	/* need to add an half-ulp */
+	rndcorr.l = 1;    /* this is a full ulp but we multiply by 0.5 in the end */ 
+      }else{
+	/* need to add nothing*/
+	rndcorr.d = 0.0;
+
+      }
+      res  = 0.5*(nb.d + rndcorr.d);  /* rounded to nearest   */
+      
+      /* the exponent field is already set to zero so that's all */
+    }          
+  } 
+
+  /* sign management */                                                 
+  if (X_SGN < 0)                                                        
+    *result = - res;                                                    
+  else                                                                  
+    *result = res;
+}
+
+
+
+
+
+/* All the directed roundings boil down to the same computation, which
+is: first build the truncated mantissa.  if the SCS number is exactly
+a double precision number, return that. Otherwise, either return the
+truncated mantissa, or return this mantissa plus an ulp, rounded to
+the nearest. Plus handle the infinities and denormals.
+*/
+
+static void get_d_directed(double *result, scs_ptr x, int rndMantissaUp){ 
+  db_number nb, rndcorr;
+  uint64_t lowpart, t1;
+  int expo,expofinal,i, not_null;
+  double res;
+  
+  /* convert the MSB digit into a double, and store it in nb.d */
+  nb.d = (double)X_HW[0]; 
+
+  /* place the two next digits in lowpart */
+  t1   = X_HW[1];
+  lowpart  = (t1 << SCS_NB_BITS) + X_HW[2];
+
+  /* test for  s/qNan, +/- Inf, +/- 0, placed here for obscure performance reasons */
+  if (X_EXP != 1){
+    *result = X_EXP; 
+    return;
+  }
+  
+  /* take the exponent of nb.d (will be in [0:SCS_NB_BITS])*/
+  expo = ((nb.i[HI] & 0x7ff00000)>>20) - 1023; 
+  not_null = ((lowpart << (64+52 - 2*SCS_NB_BITS - expo)) != 0 );      
+  /* Test if we are not on an exact double precision number */        
+  for (i=3; i<SCS_NB_WORDS; i++)                                      
+    if (X_HW[i]!=0)  not_null = 1;                                  
+
+  /* compute the exponent of the result */
+  expofinal = expo + SCS_NB_BITS*X_IND;
+
+  /* Is the SCS number not too large for the IEEE exponent range ? */
+  if (expofinal >  1023) {
+    if (rndMantissaUp) 
+      /* return an infinity */
+      res = SCS_RADIX_RNG_DOUBLE*SCS_RADIX_RNG_DOUBLE;
+    else
+      /* infinity, rounded down, is SCS_MAX_DOUBLE */
+      res = SCS_MAX_DOUBLE;
+  }
+
+  /* Is our SCS number a denormal  ? */
+  else if (expofinal >= -1022){		
+    /* x is in the normal range */   
+
+    /* align the rest of the mantissa to nb : shift by (2*SCS_NB_BITS)-53-exp */
+    lowpart = lowpart >> (expo+(2*SCS_NB_BITS)-52);     
+    /* Finish to fill the mantissa */                                   
+    nb.l = nb.l | lowpart;                                              
+    if (rndMantissaUp && (not_null)){                                   
+      rndcorr.i[LO] = 0;                                         
+      rndcorr.i[HI] = (expo-52+1023)<<20;    /* 2^(exp-52) */     
+    } else {                                                            
+      rndcorr.d = 0.0;                                                
+    }                                                                   
+    res  = nb.d + rndcorr.d;  /*  rounded to nearest   */         
+    
+    /* now compute the exponent from the index :
+       we need to multiply res by 2^(X_IND*SCS_NB_BITS)
+       First check this number won't be a denormal itself */
+    if((X_IND)*SCS_NB_BITS +1023 > 0) {
+      /* build the double 2^(X_IND*SCS_NB_BITS)   */         		
+      nb.i[HI] = ((X_IND)*SCS_NB_BITS +1023)  << 20;  		
+      nb.i[LO] = 0;
+      res *= nb.d;     /* exact multiplication */
+    }
+    else { /*offset the previous computation by 2^(2*SCS_NB_BITS) */
+      /* build the double 2^(X_IND*SCS_NB_BITS)   */         		
+      nb.i[HI] = ((X_IND)*SCS_NB_BITS +1023 + 2*SCS_NB_BITS)  << 20;  		
+      nb.i[LO] = 0;                                 
+      res *= SCS_RADIX_MTWO_DOUBLE;  /* exact multiplication */
+      res *= nb.d;                  /* exact multiplication */
+    }
+  } 
+  
+
+  else { 
+    /* the final number is a denormal with 52-(expfinal+1022)
+       significant bits. */
+
+    if (expofinal < -1022 - 53 ) {
+      if(rndMantissaUp)
+	res = SCS_MIN_DOUBLE;
+      else
+	res = 0.0;
+    }
+    else {
+
+      /* align the rest of the mantissa to nb */
+      lowpart = lowpart >> (expo+(2*SCS_NB_BITS)-52);     
+      /* Finish to fill the mantissa */
+      nb.l = nb.l | lowpart; 
+
+      /* this is still a normal number. 
+	 Now remove its exponent and add back the implicit one */
+      nb.l = (nb.l & ULL(000FFFFFFFFFFFFF)) | ULL(0010000000000000);
+      
+      if (rndMantissaUp && (not_null)){
+	nb.l = nb.l >> (-1022 - expofinal);
+	nb.l = nb.l +1; /* works even if we move back into the normals*/
+      }
+      else
+	/* keep only the significant bits */
+	nb.l = nb.l >> (-1022 - expofinal);
+
+      res  = nb.d;
+      
+      /* the exponent field is already set to zero so that's all */
+    }          
+  } 
+
+  /* sign management */                                                 
+  if (X_SGN < 0)                                                        
+    *result = - res;                                                    
+  else                                                                  
+    *result = res;
+}
+
+#if 0
+void get_d_directed0(double *result, scs_ptr x,int rndMantissaUp)                                 
+{                                                                     
+  uint64_t lowpart, t1;                                 
+  db_number nb, rndcorr;                                          
+  int i, expo, not_null;                                               
+  double res;                                                         
+  /* convert the MSB digit into a double, and store it in nb.d */     
+  nb.d = (double)X_HW[0];                                             
+  /* place the two next digits in lowpart */                          
+  t1   = X_HW[1];                                                     
+  lowpart  = (t1 << SCS_NB_BITS) + X_HW[2];                           
+  /* s/qNan, +/- Inf, +/- 0 */                                        
+  if (X_EXP != 1){                                                    
+    *result = X_EXP;                                                  
+    return;                                                           
+  }                                                                   
+  /* take the exponent */                                             
+  expo = ((nb.i[HI] & 0x7ff00000)>>20) - 1023;                  
+  not_null = ((lowpart << (64+52 - 2*SCS_NB_BITS - expo)) != 0 );      
+  /* align the rest of the mantissa  */                               
+  lowpart = lowpart >> (expo + 2*SCS_NB_BITS - 52);                    
+  /* Finish to fill the mantissa */                                   
+  nb.l = nb.l | lowpart;                                              
+  /* Test if we are not on an exact double precision number */        
+  for (i=3; i<SCS_NB_WORDS; i++)                                      
+      if (X_HW[i]!=0)  not_null = 1;                                  
+  if (rndMantissaUp && (not_null)){                                   
+    rndcorr.i[LO] = 0;                                         
+    rndcorr.i[HI] = (expo-52+1023)<<20;    /* 2^(exp-52) */     
+  } else {                                                            
+      rndcorr.d = 0.0;                                                
+  }                                                                   
+  res  = nb.d + rndcorr.d;  /* make a rounded to nearest   */         
+  if ((X_IND < SCS_MAX_RANGE) && (X_IND > -SCS_MAX_RANGE)){	      
+    /* x is comfortably in the double-precision range */   	      
+    /* build the double 2^(X_IND*SCS_NB_BITS)   */         	      
+    nb.i[HI] = ((X_IND)*SCS_NB_BITS +1023)  << 20;  	      
+    nb.i[LO] = 0;                                   	      
+    res *= nb.d;                                           	      
+  }else {                                                  	      
+    /* x may end up being a denormal or overflow */        	      
+    i    = X_IND;                                          	      
+    nb.d = 0;                                              	      
+    if (X_IND > 0){                                        	      
+      /* one of the following computations may lead to an overflow */ 
+      res *=SCS_RADIX_RNG_DOUBLE; /* 2^(SCS_NB_BITS.SCS_MAX_RANGE) */ 
+      i   -= SCS_MAX_RANGE;                                           
+      while((i-->0)&&(res <= SCS_MAX_DOUBLE)) {                           
+	/* second test means: This loop stops on overflow */          
+	res *= SCS_RADIX_ONE_DOUBLE;                                  
+      }                                                               
+    }else {                                                           
+      /* One of the computations may lead to denormal/underflow */    
+      res *=SCS_RADIX_MRNG_DOUBLE; /* 2^-(SCS_NB_BITS.SCS_MAX_RANGE)*/
+      i   += SCS_MAX_RANGE;                                           
+      while((i++<0)&&(res != 0)) {                                    
+	res *=SCS_RADIX_MONE_DOUBLE;                                  
+      }                                                               
+    }	                                                              
+  }                                                                   
+  /* sign management */                                               
+  if (X_SGN < 0)                                                      
+    *result = - res;                                                  
+  else                                                                
+    *result = res;                                                    
+}
+
+#endif
+/*
+ * Rounded toward -Inf
+ */
+void scs_get_d_minf(double *result, scs_ptr x){ 
+
+  /* round up the mantissa if negative  */
+  get_d_directed(result, x, (int)(X_SGN<0));
+}
+
+
+
+/*
+ * Rounded toward +Inf
+ */
+void scs_get_d_pinf(double *result, scs_ptr x){ 
+
+  /* round up the mantissa if positive  */
+  get_d_directed(result, x, (int)(X_SGN>=0));
+}
+
+
+
+/*
+ * Rounded toward zero
+ */
+void scs_get_d_zero(double *result, scs_ptr x){ 
+  /* never round up the mantissa  */
+  get_d_directed(result, x, 0);
+}
diff --git a/src/crlibm/scs_lib/scs2mpf.c b/src/crlibm/scs_lib/scs2mpf.c
new file mode 100644
index 0000000..1d5905f
--- /dev/null
+++ b/src/crlibm/scs_lib/scs2mpf.c
@@ -0,0 +1,58 @@
+/*
+ * Author  : Defour David
+ * Contact : David.Defour at ens-lyon.fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ */
+
+
+#include "scs.h"
+#include "scs_private.h"
+
+/* Compile only if gmp is present */
+
+#ifdef HAVE_GMP_H
+
+/*
+ * Convert a scs number into a MPF number (GMP)
+ */
+void scs_get_mpf(scs_ptr x, mpf_t rop){
+    mpf_t mp1;
+    long int expo;
+    int i;
+
+    mpf_set_ui(rop, 0);
+
+    /* mantissa */
+    for (i=0; i<SCS_NB_WORDS; i++){
+      mpf_mul_2exp(rop, rop, SCS_NB_BITS);
+      mpf_add_ui(rop, rop, X_HW[i]);
+    }
+
+    /* sign */
+    if (X_SGN == -1) mpf_neg(rop, rop);
+
+    /* exception */
+    mpf_init_set_d(mp1, X_EXP); mpf_mul(rop, rop, mp1);
+
+    /* exponent */
+    expo = (X_IND - SCS_NB_WORDS + 1) * SCS_NB_BITS;
+
+    if (expo < 0)  mpf_div_2exp(rop, rop, (unsigned int) -expo);
+    else           mpf_mul_2exp(rop, rop, (unsigned int) expo);
+
+    mpf_clear(mp1);
+}
+#endif /*HAVE_GMP_H*/
diff --git a/src/crlibm/scs_lib/scs2mpfr.c b/src/crlibm/scs_lib/scs2mpfr.c
new file mode 100644
index 0000000..12aac30
--- /dev/null
+++ b/src/crlibm/scs_lib/scs2mpfr.c
@@ -0,0 +1,61 @@
+/*
+ * Author  : Defour David
+ * Contact : David.Defour at ens-lyon.fr
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+ */
+
+
+
+#include "scs.h"
+#include "scs_private.h"
+
+/* Compile only if mpfr is present */
+
+#ifdef HAVE_MPFR_H
+
+
+/*
+ * Convert a scs number into a MPFR number rounded to nearest
+ */
+void scs_get_mpfr(scs_ptr x, mpfr_t rop){
+    mpfr_t mp1;
+    long int expo;
+    int i;
+
+    mpfr_set_ui(rop, 0, GMP_RNDN);
+
+    /* mantissa */
+    for (i=0; i<SCS_NB_WORDS; i++){
+      mpfr_mul_2exp(rop, rop, SCS_NB_BITS, GMP_RNDN);
+      mpfr_add_ui(rop, rop, X_HW[i], GMP_RNDN);
+    }
+
+    /* sign */
+    if (X_SGN == -1) mpfr_neg(rop, rop, GMP_RNDN);
+
+    /* exception */
+    mpfr_init_set_d(mp1, X_EXP, GMP_RNDN); 
+    mpfr_mul(rop, rop, mp1, GMP_RNDN);
+
+    /* exponent */
+    expo = (X_IND - SCS_NB_WORDS + 1) * SCS_NB_BITS;
+
+    if (expo < 0)  mpfr_div_2exp(rop, rop, (unsigned int) -expo, GMP_RNDN);
+    else           mpfr_mul_2exp(rop, rop, (unsigned int) expo, GMP_RNDN);
+
+    mpfr_clear(mp1);
+}
+#endif /* HAVE_MPFR_H */
diff --git a/src/crlibm/scs_lib/scs_private.c b/src/crlibm/scs_lib/scs_private.c
new file mode 100644
index 0000000..895020f
--- /dev/null
+++ b/src/crlibm/scs_lib/scs_private.c
@@ -0,0 +1,23 @@
+#include "scs.h"
+#include "scs_private.h"
+
+#ifdef WORDS_BIGENDIAN
+  const db_number radix_one_double  = {{((1023+SCS_NB_BITS)<<20) ,               0x00000000 }}; 
+  const db_number radix_two_double  = {{((1023+2*SCS_NB_BITS)<<20) ,             0x00000000 }}; 
+  const db_number radix_mone_double = {{((1023-SCS_NB_BITS)<<20) ,               0x00000000 }}; 
+  const db_number radix_mtwo_double = {{((1023-2*SCS_NB_BITS)<<20) ,             0x00000000 }}; 
+  const db_number radix_rng_double  = {{((1023+SCS_NB_BITS*SCS_MAX_RANGE)<<20) , 0x00000000 }}; 
+  const db_number radix_mrng_double = {{((1023-SCS_NB_BITS*SCS_MAX_RANGE)<<20) , 0x00000000 }};
+  const db_number max_double        = {{0x7FEFFFFF ,                             0xFFFFFFFF }}; 
+  const db_number min_double        = {{0x00000000 ,                             0x00000001 }}; 
+#else
+  const db_number radix_one_double  = {{0x00000000 , ((1023+SCS_NB_BITS)<<20)               }}; 
+  const db_number radix_two_double  = {{0x00000000 , ((1023+2*SCS_NB_BITS)<<20)             }}; 
+  const db_number radix_mone_double = {{0x00000000 , ((1023-SCS_NB_BITS)<<20)               }}; 
+  const db_number radix_mtwo_double = {{0x00000000 , ((1023-2*SCS_NB_BITS)<<20)             }}; 
+  const db_number radix_rng_double  = {{0x00000000 , ((1023+SCS_NB_BITS*SCS_MAX_RANGE)<<20) }}; 
+  const db_number radix_mrng_double = {{0x00000000 , ((1023-SCS_NB_BITS*SCS_MAX_RANGE)<<20) }}; 
+  const db_number max_double        = {{0xFFFFFFFF ,                             0x7FEFFFFF }}; 
+  const db_number min_double        = {{0x00000001 ,                             0x00000000 }}; 
+#endif
+
diff --git a/src/crlibm/scs_lib/scs_private.h b/src/crlibm/scs_lib/scs_private.h
new file mode 100644
index 0000000..55b50a2
--- /dev/null
+++ b/src/crlibm/scs_lib/scs_private.h
@@ -0,0 +1,133 @@
+/** Various declarations and macros shared by
+   several .c files, but useless to users of the library 
+
+ @file scs_private.h
+
+ at author Defour David David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr 
+*/
+
+
+/*
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ */
+#ifndef SCS_PRIVATE_H
+#define SCS_PRIVATE_H 1
+
+
+#define SCS_RADIX   ((unsigned int)(1<<SCS_NB_BITS))
+
+#define SCS_MASK_RADIX ((unsigned int)(SCS_RADIX-1))
+
+#include "scs.h"
+
+#ifdef WORDS_BIGENDIAN
+ #define HI 0
+ #define LO 1 
+#else
+ #define HI 1
+ #define LO 0
+#endif
+
+/* An int such that SCS_MAX_RANGE * SCS_NB_BITS < 1024, 
+   where 1024 is the max of the exponent of a double number.
+   Used in scs2double.c along with radix_rng_double et al. 
+   The value of 32 is OK for all practical values of SCS_NB_BITS */       
+#define SCS_MAX_RANGE  32
+
+/*
+ * DEFINITION OF DOUBLE PRECISION FLOATING POINT NUMBER CONSTANTS 
+ */
+/* In all the following "radix" means 2^(SCS_NB_BITS),
+   and radix_blah means radix^blah.
+   (1023 + e)<<20 is the way to cast e into the exponent field of an IEEE-754 double
+ */
+
+ 
+ extern const db_number radix_one_double ; 
+ extern const db_number radix_two_double ; 
+ extern const db_number radix_mone_double; 
+ extern const db_number radix_mtwo_double; 
+ extern const db_number radix_rng_double ; 
+ extern const db_number radix_mrng_double;
+ extern const db_number max_double       ; 
+ extern const db_number min_double       ; 
+
+
+#define SCS_RADIX_ONE_DOUBLE     radix_one_double.d   /* 2^(SCS_NB_BITS)           */ 
+#define SCS_RADIX_TWO_DOUBLE     radix_two_double.d   /* 2^(2.SCS_NB_BITS)         */
+#define SCS_RADIX_MONE_DOUBLE    radix_mone_double.d  /* 2^-(SCS_NB_BITS)          */ 
+#define SCS_RADIX_MTWO_DOUBLE    radix_mtwo_double.d  /* 2^-(2.SCS_NB_BITS)        */ 
+#define SCS_RADIX_RNG_DOUBLE     radix_rng_double.d   /* 2^(SCS_NB_BITS.SCS_MAX_RANGE) */
+#define SCS_RADIX_MRNG_DOUBLE    radix_mrng_double.d  /* 2^-(SCS_NB_BITS.SCS_MAX_RANGE)*/
+#define SCS_MAX_DOUBLE           max_double.d         /* 2^1024-1              */
+#define SCS_MIN_DOUBLE           min_double.d         /* 2^-1074             */
+
+
+
+
+
+
+#define R_HW  result->h_word
+#define R_SGN result->sign
+#define R_IND result->index
+#define R_EXP result->exception.d
+
+#define X_HW  x->h_word
+#define X_SGN x->sign
+#define X_IND x->index
+#define X_EXP x->exception.d
+
+#define Y_HW  y->h_word
+#define Y_SGN y->sign
+#define Y_IND y->index
+#define Y_EXP y->exception.d
+
+#define Z_HW  z->h_word
+#define Z_SGN z->sign
+#define Z_IND z->index
+#define Z_EXP z->exception.d
+
+#define W_HW  w->h_word
+#define W_SGN w->sign
+#define W_IND w->index
+#define W_EXP w->exception.d
+
+
+
+/* A few additional defines for the case when we use floating-point
+   multiplier  (OBSOLETE, NEVER USED ANYMORE but who knows, some day) */
+
+#ifdef SCS_USE_FLT_MULT
+/* There is a "53" below, which means that these constants won't do
+   what we expect from them on x86 because of the double extended
+   precision. We could put more ifdefs, but why care, nobody wants to use the
+   FP muls on the x86. */
+#ifdef WORDS_BIGENDIAN
+ static const db_number scs_flt_trunc_cst = {{ ((1023+SCS_NB_BITS-1)<<20) ,           0x00000000 }}; 
+ static const db_number scs_flt_shift_cst = {{ ((1023+SCS_NB_BITS+53)<<20),0x00000000}}; 
+#else
+ static const db_number scs_flt_trunc_cst = {{ 0x00000000, ((1023+SCS_NB_BITS-1)<<20) }}; 
+ static const db_number scs_flt_shift_cst = {{ 0x00000000 ,((1023+SCS_NB_BITS+53)<<20)}}; 
+#endif /*WORDS_BIGENDIAN*/
+
+#define SCS_FLT_TRUNC_CST  scs_flt_trunc_cst.d    /* 2^(SCS_NB_BITS+53-1) */
+#define SCS_FLT_SHIFT_CST  scs_flt_shift_cst.d    /* 2^(SCS_NB_BITS)(1+1/2) */
+#endif /* SCS_USE_FLTMULT */
+
+#endif /* SCS_PRIVATE_H */
diff --git a/src/crlibm/scs_lib/tests/Makefile.am b/src/crlibm/scs_lib/tests/Makefile.am
new file mode 100644
index 0000000..5faf374
--- /dev/null
+++ b/src/crlibm/scs_lib/tests/Makefile.am
@@ -0,0 +1,13 @@
+## Process this file with automake to produce Makefile.in
+
+bin_PROGRAMS =  scs_test_timing scs_test_accuracy
+
+LDADD= $(top_builddir)/libscs.a
+INCLUDES=-I$(top_srcdir)
+
+../libscs.a:
+	cd $(top_srcdir); make libscs.a 
+
+scs_test_timing_SOURCES = test_timing.c tbx_timing.h
+
+scs_test_accuracy_SOURCES = test_accuracy.c
\ No newline at end of file
diff --git a/src/crlibm/scs_lib/tests/log.h b/src/crlibm/scs_lib/tests/log.h
new file mode 100644
index 0000000..41d0c88
--- /dev/null
+++ b/src/crlibm/scs_lib/tests/log.h
@@ -0,0 +1,502 @@
+/*
+ * Constant to compute the natural logarithm. 
+ */
+
+#ifdef WORDS_BIGENDIAN
+static const scs_db_number 
+  norm_number = {{0x3FD60000, 0x00000000}}; /* 11*2^(-5) */
+#else
+static const scs_db_number 
+  norm_number = {{0x00000000, 0x3FD60000}}; /* 11*2^(-5) */
+#endif
+
+#ifdef SCS_TYPECPU_SPARC
+static const scs 
+   sc_ln2={{0x0162e42f, 0x01df473d, 0x01cd5e4f, 0x003b3980, 
+	    0x007e5ed5, 0x01d03cd0, 0x0193394c, 0x00b62d8a},
+	   DB_ONE,  -1,   1 }; 
+
+static const scs table_ti[13]=
+/* ~-3.746934e-01 */ 
+{{{0x00bfd7d1, 0x01bd8151, 0x017dbcdf, 0x016d4cb1, 
+0x0044bcca, 0x01f38987, 0x013333aa, 0x007cf0d4},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-2.876821e-01 */ 
+{{0x00934b10, 0x01134db9, 0x004f077d, 0x00dd9db0, 
+0x00554e15, 0x0030f490, 0x01b996a8, 0x00de6ad6},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-2.076394e-01 */ 
+{{0x006a4fb4, 0x01e456cf, 0x0036f2be, 0x014ef4b9, 
+0x00037337, 0x0077188a, 0x01f1e9e8, 0x016e7b9f},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-1.335314e-01 */ 
+{{0x00445e3a, 0x00113f23, 0x01bde338, 0x01683f8e, 
+0x00b7a078, 0x01dda8fe, 0x01878496, 0x01e28def},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-6.453852e-02 */ 
+{{0x00210b31, 0x00d678e8, 0x0034451f, 0x01d9bf50, 
+0x0066e582, 0x00bf1b16, 0x007f8dd1, 0x011cb965},
+DB_ONE,  -1,  -1 } 
+,
+/* ~6.062462e-02 */ 
+{{0x001f0a30, 0x018022c5, 0x009985f3, 0x004b8b77, 
+0x00b32f13, 0x0034d1d3, 0x0099bada, 0x01259671},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.177830e-01 */ 
+{{0x003c4e0e, 0x01b8abcb, 0x012f4f54, 0x007ffe1f, 
+0x01d3c2ab, 0x016e53af, 0x00200bfb, 0x00f957dd},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.718503e-01 */ 
+{{0x0057fcc1, 0x01853c9e, 0x013c873e, 0x004140e4, 
+0x0048eebf, 0x0135571c, 0x01aafef9, 0x01e631c0},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.231436e-01 */ 
+{{0x00723fdf, 0x003cd4d1, 0x001ac25d, 0x0103de5f, 
+0x01ee6892, 0x0171d97a, 0x013a08d6, 0x01c1b170},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.719337e-01 */ 
+{{0x008b3ae5, 0x00baba60, 0x01c07398, 0x01f55c41, 
+0x01717047, 0x01c19f41, 0x00521e0c, 0x01f534c3},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.184537e-01 */ 
+{{0x00a30c5e, 0x0021c5ec, 0x004fa16f, 0x00cdeccf, 
+0x0039a20a, 0x01dcb349, 0x006005a2, 0x00393cb5},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.629055e-01 */ 
+{{0x00b9cebf, 0x016bbd00, 0x00d39c49, 0x0114feb4, 
+0x01f7bcb5, 0x00b77843, 0x00e752cb, 0x0157bbbc},
+DB_ONE,  -1,   1 } 
+};
+
+static const scs table_inv_wi[13]=
+/* ~1.454545e+00 */ 
+{{{0x00000001, 0x00e8ba2e, 0x011745d1, 0x00e8ba2e, 
+0x011745d1, 0x00e8ba2e, 0x011745d1, 0x00e8ba2e},
+DB_ONE,   0,   1 } 
+,
+/* ~1.333333e+00 */ 
+{{0x00000001, 0x00aaaaaa, 0x01555555, 0x00aaaaaa, 
+0x01555555, 0x00aaaaaa, 0x01555555, 0x00aaaaaa},
+DB_ONE,   0,   1 } 
+,
+/* ~1.230769e+00 */ 
+{{0x00000001, 0x00762762, 0x00ec4ec4, 0x01d89d89, 
+0x01b13b13, 0x01627627, 0x00c4ec4e, 0x0189d89d},
+DB_ONE,   0,   1 } 
+,
+/* ~1.142857e+00 */ 
+{{0x00000001, 0x00492492, 0x00924924, 0x01249249, 
+0x00492492, 0x00924924, 0x01249249, 0x00492492},
+DB_ONE,   0,   1 } 
+,
+/* ~1.066667e+00 */ 
+{{0x00000001, 0x00222222, 0x00444444, 0x00888888, 
+0x01111111, 0x00222222, 0x00444444, 0x00888888},
+DB_ONE,   0,   1 } 
+,
+/* ~1.000000e+00 */ 
+{{0x00000001, 0x00000000, 0x00000000, 0x00000000, 
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+DB_ONE,   0,   1 } 
+,
+/* ~9.411765e-01 */ 
+{{0x01e1e1e1, 0x01c3c3c3, 0x01878787, 0x010f0f0f, 
+0x001e1e1e, 0x003c3c3c, 0x00787878, 0x00f0f0f0},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.888889e-01 */ 
+{{0x01c71c71, 0x018e38e3, 0x011c71c7, 0x0038e38e, 
+0x0071c71c, 0x00e38e38, 0x01c71c71, 0x018e38e3},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.421053e-01 */ 
+{{0x01af286b, 0x019435e5, 0x001af286, 0x0179435e, 
+0x00a1af28, 0x00d79435, 0x01ca1af2, 0x010d7943},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.000000e-01 */ 
+{{0x01999999, 0x01333333, 0x00666666, 0x00cccccc, 
+0x01999999, 0x01333333, 0x00666666, 0x00cccccc},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.619048e-01 */ 
+{{0x01861861, 0x010c30c3, 0x00186186, 0x0030c30c, 
+0x00618618, 0x00c30c30, 0x01861861, 0x010c30c3},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.272727e-01 */ 
+{{0x01745d17, 0x008ba2e8, 0x01745d17, 0x008ba2e8, 
+0x01745d17, 0x008ba2e8, 0x01745d17, 0x008ba2e8},
+DB_ONE,  -1,   1 } 
+,
+/* ~6.956522e-01 */ 
+{{0x01642c85, 0x0121642c, 0x010b2164, 0x00590b21, 
+0x00c8590b, 0x0042c859, 0x001642c8, 0x00b21642},
+DB_ONE,  -1,   1 } 
+};
+
+static const scs constant_poly[20]=
+/* ~-5.023367e-02 */ 
+{{{0x0019b83a, 0x00b9d6ab, 0x002e59e9, 0x00a24f80, 
+0x0027986a, 0x007928b4, 0x005ddb72, 0x00619d7f},
+DB_ONE,  -1,  -1 } 
+,
+/* ~5.286469e-02 */ 
+{{0x001b1114, 0x01894bfd, 0x012e0600, 0x005542f4, 
+0x00af2119, 0x00f848c9, 0x00ffffb2, 0x00e80ead},
+DB_ONE,  -1,   1 } 
+,
+/* ~-5.555504e-02 */ 
+{{0x001c71b5, 0x01bc1996, 0x014e2328, 0x00d31ffd, 
+0x01d9197b, 0x01dd617b, 0x008f49f5, 0x0114fa8f},
+DB_ONE,  -1,  -1 } 
+,
+/* ~5.882305e-02 */ 
+{{0x001e1e0d, 0x01be311c, 0x01d73257, 0x00706242, 
+0x016f89de, 0x01a8eccc, 0x01f56b8f, 0x0007fe91},
+DB_ONE,  -1,   1 } 
+,
+/* ~-6.250000e-02 */ 
+{{0x00200000, 0x000adcae, 0x0185071e, 0x017bf346, 
+0x00ca1252, 0x0061b6b6, 0x013f5139, 0x01ca868c},
+DB_ONE,  -1,  -1 } 
+,
+/* ~6.666667e-02 */ 
+{{0x00222222, 0x004dd3cc, 0x01922a63, 0x00f3c5d7, 
+0x01a47f93, 0x00ff9671, 0x00e00ecb, 0x00bd3330},
+DB_ONE,  -1,   1 } 
+,
+/* ~-7.142857e-02 */ 
+{{0x00249249, 0x00492279, 0x00db5116, 0x00671689, 
+0x006a3376, 0x003f35c0, 0x00661341, 0x002815e5},
+DB_ONE,  -1,  -1 } 
+,
+/* ~7.692308e-02 */ 
+{{0x00276276, 0x004ec339, 0x005ea9a2, 0x01011824, 
+0x0075bd24, 0x003cc34f, 0x01c99f69, 0x0129e78c},
+DB_ONE,  -1,   1 } 
+,
+/* ~-8.333333e-02 */ 
+{{0x002aaaaa, 0x01555555, 0x012d8c96, 0x010abd3b, 
+0x018f2c29, 0x0196754b, 0x019ec134, 0x00768c4d},
+DB_ONE,  -1,  -1 } 
+,
+/* ~9.090909e-02 */ 
+{{0x002e8ba2, 0x01d1745d, 0x008e49f5, 0x01341475, 
+0x0081f0c0, 0x014f2ec1, 0x01dd9fe2, 0x01f38d59},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.000000e-01 */ 
+{{0x00333333, 0x00666666, 0x00ccc2cc, 0x01fb84f5, 
+0x01eebd5a, 0x013af37f, 0x012bc6d5, 0x004c47a1},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.111111e-01 */ 
+{{0x0038e38e, 0x0071c71c, 0x00e387cf, 0x00be22fc, 
+0x014bae85, 0x01b43f38, 0x002876db, 0x010a8b36},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.250000e-01 */ 
+{{0x00400000, 0x00000000, 0x00000000, 0x00eb1b6c, 
+0x00227096, 0x01596ab4, 0x00492bc3, 0x018163ed},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.428571e-01 */ 
+{{0x00492492, 0x00924924, 0x01249249, 0x00c76cd0, 
+0x00055827, 0x00afd708, 0x015a6f90, 0x01d11663},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.666667e-01 */ 
+{{0x00555555, 0x00aaaaaa, 0x01555555, 0x00aaa4bb, 
+0x00cc61d7, 0x0044a5cf, 0x01cf9970, 0x004415cc},
+DB_ONE,  -1,  -1 } 
+,
+/* ~2.000000e-01 */ 
+{{0x00666666, 0x00cccccc, 0x01999999, 0x013330bb, 
+0x017cdd12, 0x013269ea, 0x00761531, 0x010437bf},
+DB_ONE,  -1,   1 } 
+,
+/* ~-2.500000e-01 */ 
+{{0x00800000, 0x00000000, 0x00000000, 0x00000000, 
+0x00232b9b, 0x0054cd5a, 0x00b651a3, 0x011d0f4b},
+DB_ONE,  -1,  -1 } 
+,
+/* ~3.333333e-01 */ 
+{{0x00aaaaaa, 0x01555555, 0x00aaaaaa, 0x01555555, 
+0x00b43c17, 0x00b2094a, 0x003eef44, 0x0118c38a},
+DB_ONE,  -1,   1 } 
+,
+/* ~-5.000000e-01 */ 
+{{0x00ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 
+0x01ffffe1, 0x009bd81b, 0x01b07b1e, 0x01fa34a2},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.000000e+00 */ 
+{{0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 
+0x01fffffc, 0x01e04b7e, 0x00472719, 0x0176878b},
+DB_ONE,  -1,   1 } 
+};
+
+
+#else
+
+static const scs 
+   sc_ln2={{0x2c5c85fd, 0x3d1cf79a, 0x2f278ece, 0x1803f2f6, 
+	     0x2bd03cd0, 0x3267298b, 0x18b62834, 0x175b8baa},
+	    DB_ONE,  -1,   1 };
+
+static const scs table_ti[13]=
+/* ~-3.746934e-01 */ 
+{{{0x17fafa3b, 0x360546fb, 0x1e6fdb53, 0x0b1225e6, 
+0x15f38987, 0x26664702, 0x3cb1bf6d, 0x118a64f9},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-2.876821e-01 */ 
+{{0x12696211, 0x0d36e49e, 0x03beb767, 0x1b02aa70, 
+0x2a30f490, 0x3732bb37, 0x2425c6da, 0x1fc53d0e},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-2.076394e-01 */ 
+{{0x0d49f69e, 0x115b3c6d, 0x395f53bd, 0x0b901b99, 
+0x2e77188a, 0x3e3d1ab5, 0x1147dede, 0x05483ae4},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-1.335314e-01 */ 
+{{0x088bc741, 0x04fc8f7b, 0x319c5a0f, 0x38e5bd03, 
+0x31dda8fe, 0x30f08645, 0x2fa1d5c5, 0x02c6529d},
+DB_ONE,  -1,  -1 } 
+,
+/* ~-6.453852e-02 */ 
+{{0x0421662d, 0x19e3a068, 0x228ff66f, 0x3503372c, 
+0x04bf1b16, 0x0ff1b85c, 0x006c21b2, 0x21a9efd6},
+DB_ONE,  -1,  -1 } 
+,
+/* ZERO         */
+{{0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+{{0, 0}},  0,   1 }
+,
+/* ~6.062462e-02 */ 
+{{0x03e14618, 0x008b1533, 0x02f992e2, 0x37759978, 
+0x2634d1d3, 0x13375edb, 0x2e4634ea, 0x1dcf0aef},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.177830e-01 */ 
+{{0x0789c1db, 0x22af2e5e, 0x27aa1fff, 0x21fe9e15, 
+0x176e53af, 0x04015c6b, 0x021a0541, 0x006df1d7},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.718503e-01 */ 
+{{0x0aff9838, 0x14f27a79, 0x039f1050, 0x0e424775, 
+0x3f35571c, 0x355ff008, 0x1ca13efc, 0x3c2c8490},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.231436e-01 */ 
+{{0x0e47fbe3, 0x33534435, 0x212ec0f7, 0x25ff7344, 
+0x2571d97a, 0x274129e2, 0x12b111db, 0x2c051568},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.719337e-01 */ 
+{{0x11675cab, 0x2ae98380, 0x39cc7d57, 0x041b8b82, 
+0x0fc19f41, 0x0a43c91d, 0x1523ef69, 0x164b69f6},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.184537e-01 */ 
+{{0x14618bc2, 0x0717b09f, 0x10b7b37b, 0x0cf1cd10, 
+0x15dcb349, 0x0c00c397, 0x2c39cc9b, 0x274c94a8},
+DB_ONE,  -1,   1 } 
+,
+{{0x1739d7f6, 0x2ef401a7, 0x0e24c53f, 0x2b4fbde5, 
+0x2ab77843, 0x1cea5975, 0x1eeef249, 0x384d2344},
+DB_ONE,  -1,   1 } 
+};
+
+static const scs table_inv_wi[13]=
+/* ~1.454545e+00 */ 
+{{{0x00000001, 0x1d1745d1, 0x1d1745d1, 0x1d1745d1, 
+0x1d1745d1, 0x1d1745d1, 0x1d183e2a, 0x36835582},
+DB_ONE,   0,   1 } 
+,
+/* ~1.333333e+00 */ 
+{{0x00000001, 0x15555555, 0x15555555, 0x15555555, 
+0x15555555, 0x15555555, 0x15549b7e, 0x1a416c6b},
+DB_ONE,   0,   1 } 
+,
+/* ~1.230769e+00 */ 
+{{0x00000001, 0x0ec4ec4e, 0x313b13b1, 0x0ec4ec4e, 
+0x313b13b1, 0x0ec4ec4e, 0x313a6825, 0x3ab28b77},
+DB_ONE,   0,   1 } 
+,
+/* ~1.142857e+00 */ 
+{{0x00000001, 0x09249249, 0x09249249, 0x09249249, 
+0x09249249, 0x09249249, 0x09238b74, 0x26f620a6},
+DB_ONE,   0,   1 } 
+,
+/* ~1.066667e+00 */ 
+{{0x00000001, 0x04444444, 0x11111111, 0x04444444, 
+0x11111111, 0x04444444, 0x1111d60e, 0x1f0c9d58},
+DB_ONE,   0,   1 } 
+,
+/* ~1.000000e+00 */ 
+{{0x00000001, 0x00000000, 0x00000000, 0x00000000, 
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+DB_ONE,   0,   1 } 
+,
+/* ~9.411765e-01 */ 
+{{0x3c3c3c3c, 0x0f0f0f0f, 0x03c3c3c3, 0x30f0f0f0, 
+0x3c3c3c3c, 0x0f0f923d, 0x16e0e0a4, 0x3a84202f},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.888889e-01 */ 
+{{0x38e38e38, 0x38e38e38, 0x38e38e38, 0x38e38e38, 
+0x38e38e38, 0x38e3946a, 0x2e0ee2c9, 0x0d6e0fbd},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.421053e-01 */ 
+{{0x35e50d79, 0x10d79435, 0x39435e50, 0x35e50d79, 
+0x10d79435, 0x3943324d, 0x0637ea85, 0x131a67ba},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.000000e-01 */ 
+{{0x33333333, 0x0ccccccc, 0x33333333, 0x0ccccccc, 
+0x33333333, 0x0ccccccc, 0x33333333, 0x0ccccccc},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.619048e-01 */ 
+{{0x30c30c30, 0x30c30c30, 0x30c30c30, 0x30c30c30, 
+0x30c30c30, 0x30c2f1a4, 0x160958a1, 0x2b03bc88},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.272727e-01 */ 
+{{0x2e8ba2e8, 0x2e8ba2e8, 0x2e8ba2e8, 0x2e8ba2e8, 
+0x2e8ba2e8, 0x2e8bcb74, 0x2d78b525, 0x00a1db67},
+DB_ONE,  -1,   1 } 
+,
+/* ~6.956522e-01 */ 
+{{0x2c8590b2, 0x0590b216, 0x10b21642, 0x321642c8, 
+0x1642c859, 0x02c8590b, 0x08590b21, 0x190b2164},
+DB_ONE,  -1,   1 } 
+};
+
+
+
+static const scs constant_poly[20]=
+/*0 ~-5.023367e-02 */ 
+{{{0x0337074b, 0x275aac5c, 0x2cf4a893, 0x38013cc3, 
+0x149a3416, 0x0e067307, 0x12745608, 0x1658e0d5},
+DB_ONE,  -1,  -1 } 
+,
+/*1 ~5.286469e-02 */ 
+{{0x03622298, 0x252ff65c, 0x03001550, 0x2f457908, 
+0x32f78ecc, 0x17442a4e, 0x1d806366, 0x2c50350e},
+DB_ONE,  -1,   1 } 
+,
+/*2 ~-5.555504e-02 */ 
+{{0x038e36bb, 0x30665a9c, 0x119434c7, 0x3fdec8cb, 
+0x37dd3adb, 0x2663cd45, 0x230e43e9, 0x32b9663c},
+DB_ONE,  -1,  -1 } 
+,
+/*3 ~5.882305e-02 */ 
+{{0x03c3c1bb, 0x38c473ae, 0x192b9c18, 0x242b7c4e, 
+0x3da8edc8, 0x04454ffe, 0x2cf133c6, 0x0c926fd0},
+DB_ONE,  -1,   1 } 
+,
+/*4 ~-6.250000e-02 */ 
+{{0x04000000, 0x2b72bb0a, 0x038f5efc, 0x34665092, 
+0x2461b6c9, 0x172f7050, 0x1218b5c1, 0x104862d7},
+DB_ONE,  -1,  -1 } 
+,
+/*5 ~6.666667e-02 */ 
+{{0x04444444, 0x374f3324, 0x1531bcf1, 0x1d7d23fc, 
+0x26ff9670, 0x38fc33ae, 0x15bf1cfb, 0x2c9f1c2d},
+DB_ONE,  -1,   1 } 
+,
+/*6 ~-7.142857e-02 */ 
+{{0x04924924, 0x2489e5b6, 0x288b19c5, 0x2893519b, 
+0x2c3f35c0, 0x0b8bfdce, 0x3541ab49, 0x1de415bc},
+DB_ONE,  -1,  -1 } 
+,
+/*7 ~7.692308e-02 */ 
+{{0x04ec4ec4, 0x3b0ce4bd, 0x14d14046, 0x0243ade9, 
+0x083cc34f, 0x393e6a5a, 0x2c1855f2, 0x259d599f},
+DB_ONE,  -1,   1 } 
+,
+/*8 ~-8.333333e-02 */ 
+{{0x05555555, 0x1555565b, 0x064b42af, 0x13bc7961, 
+0x1396754b, 0x33d85415, 0x2ba548d4, 0x039c4ff6},
+DB_ONE,  -1,  -1 } 
+,
+/*9 ~9.090909e-02 */ 
+{{0x05d1745d, 0x05d1751c, 0x24facd05, 0x07540f86, 
+0x014f2ec1, 0x3bb3fa8b, 0x02e1da4c, 0x3304817c},
+DB_ONE,  -1,   1 } 
+,
+/*10 ~-1.000000e-01 */ 
+{{0x06666666, 0x19999999, 0x21667ee1, 0x0f5f75ea, 
+0x353af37f, 0x2578daa1, 0x07c76f47, 0x16541534},
+DB_ONE,  -1,  -1 } 
+,
+/*11 ~1.111111e-01 */ 
+{{0x071c71c7, 0x071c71c7, 0x03e7af88, 0x2fca5d74, 
+0x0bb43f38, 0x050edb70, 0x3631b696, 0x1fc3e0d3},
+DB_ONE,  -1,   1 } 
+,
+/*12 ~-1.250000e-01 */ 
+{{0x08000000, 0x00000000, 0x00003ac6, 0x36c11384, 
+0x2d596ab4, 0x09257878, 0x0597dc26, 0x2d60813a},
+DB_ONE,  -1,  -1 } 
+,
+/*13 ~1.428571e-01 */ 
+{{0x09249249, 0x09249249, 0x0924b1db, 0x0d002ac1, 
+0x0eafd708, 0x2b4df21d, 0x0458da93, 0x2d11460c},
+DB_ONE,  -1,   1 } 
+,
+/*14 ~-1.666667e-01 */ 
+{{0x0aaaaaaa, 0x2aaaaaaa, 0x2aaaaaa9, 0x0bb6630e, 
+0x2e44a5cf, 0x39f32e04, 0x105732b9, 0x01a76208},
+DB_ONE,  -1,  -1 } 
+,
+/*15 ~2.000000e-01 */ 
+{{0x0ccccccc, 0x33333333, 0x0ccccccc, 0x0bbbe6e8, 
+0x253269ea, 0x0ec2a630, 0x10defc5c, 0x238aef3b},
+DB_ONE,  -1,   1 } 
+,
+/*16 ~-2.500000e-01 */ 
+{{0x10000000, 0x00000000, 0x00000000, 0x0001195c, 
+0x3654cd5a, 0x16ca3471, 0x343d2da0, 0x235273f2},
+DB_ONE,  -1,  -1 } 
+,
+/*17 ~3.333333e-01 */ 
+{{0x15555555, 0x15555555, 0x15555555, 0x1555a1e0, 
+0x2eb2094a, 0x07dde891, 0x230e2bfa, 0x28aae6ab},
+DB_ONE,  -1,   1 } 
+,
+/*18 ~-5.000000e-01 */ 
+{{0x1fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff, 
+0x029bd81b, 0x360f63df, 0x28d28bd3, 0x3c15f394},
+DB_ONE,  -1,  -1 } 
+,
+/*19 ~1.000000e+00 */ 
+{{0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff, 
+0x39e04b7e, 0x08e4e337, 0x1a1e2ed3, 0x23e85705},
+DB_ONE,  -1,   1 } 
+};
+#endif
+
+
+
+#define sc_ln2_ptr        (scs_ptr)(&sc_ln2)
+#define constant_poly_ptr (scs_ptr)&constant_poly
+#define table_ti_ptr      (scs_ptr)&table_ti
+#define table_inv_wi_ptr  (scs_ptr)&table_inv_wi
+ 
diff --git a/src/crlibm/scs_lib/tests/tbx_timing.h b/src/crlibm/scs_lib/tests/tbx_timing.h
new file mode 100644
index 0000000..f3bf990
--- /dev/null
+++ b/src/crlibm/scs_lib/tests/tbx_timing.h
@@ -0,0 +1,102 @@
+#ifndef TBX_TIMING_H
+#define TBX_TIMING_H
+
+#include <sys/types.h>
+#include <sys/time.h>
+#if defined(CRLIBM_TYPECPU_ITANIUM) && defined(__INTEL_COMPILER)
+#include<ia64intrin.h>
+#endif
+
+/*
+ * For the user interested in High resolution timer, to my knowledge 
+ * the best library is "RTAI", unfortunately it works only on Linux OS
+ */
+
+
+typedef union u_tbx_tick
+{
+  unsigned long long tick;
+
+  struct
+  {
+    unsigned long low;
+    unsigned long high;
+  } sub;
+
+  struct timeval timev;
+} tbx_tick_t, *p_tbx_tick_t;
+
+
+#if defined(CRLIBM_TYPECPU_ITANIUM) && defined(__GNUC__) && !defined(__INTEL_COMPILER)
+ 
+#define TBX_GET_TICK(t) \
+   __asm__ __volatile__("mov %0=ar.itc" : "=r"((t).tick) :: "memory")
+#define TBX_TICK_RAW_DIFF(t1, t2)    ((t2).tick - (t1).tick)
+
+
+#elif defined(CRLIBM_TYPECPU_ITANIUM) && defined(__HPCC__)
+/* Never tested, currently nobody defines __HPCC__.
+  It should work on HPUX machines using HP compiler */
+#include<machine/sys/inline.h>/* to move up of course */
+#define TBX_GET_TICK(t) \
+   t.tick=_Asm_mov_from_ar(_AREG_ITC)
+#define TBX_TICK_RAW_DIFF(t1, t2)    ((t2).tick - (t1).tick )
+
+
+#elif defined(CRLIBM_TYPECPU_ITANIUM) && defined(__INTEL_COMPILER)
+#define TBX_GET_TICK(t)    t.tick=__getReg(_IA64_REG_AR_ITC)   
+#define TBX_TICK_RAW_DIFF(t1, t2)    ((t2).tick - (t1).tick)
+
+
+
+#elif (defined(CRLIBM_TYPECPU_AMD64) || defined(CRLIBM_TYPECPU_X86)) \
+    && defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#define TBX_GET_TICK(time)                \
+        __asm__ __volatile__(             \
+                "xorl %%eax,%%eax\n\t"    \
+                "cpuid\n\t"               \
+                "rdtsc\n\t"               \
+                "movl %%eax,(%0)\n\t"     \
+                "movl %%edx,4(%0)\n\t"    \
+                "xorl %%eax,%%eax\n\t"    \
+                "cpuid\n\t"               \
+                : /* no output */         \
+                : "S"(&time.tick)         \
+                : "eax", "ebx", "ecx", "edx", "memory")
+#define TBX_TICK_RAW_DIFF(t1, t2)    ((t2).tick - (t1).tick)
+
+
+#elif defined(CRLIBM_TYPECPU_ALPHA)  && defined(__GNUC__)
+#define TBX_GET_TICK(t) \
+   __asm__ volatile("rpcc %0\n\t" : "=r"((t).tick))
+#define TBX_TICK_RAW_DIFF(t1, t2) \
+   (((t2).tick & 0xFFFFFFFF) - ((t1).tick & 0xFFFFFFFF))
+
+
+#elif defined(CRLIBM_TYPECPU_SPARC)  && defined(__GNUC__)
+#define TBX_GET_TICK(t) \
+    (t).tick = gethrtime()
+#define TBX_TICK_RAW_DIFF(t1, t2) \
+   ((t2).tick  - (t1).tick)
+
+
+
+#else  /* generic case */
+
+#define TIMING_USES_GETTIMEOFDAY 1  /* inform the test functions that timings are inaccurate */
+#define TBX_GET_TICK(t) \
+   gettimeofday(&(t).timev, 0)
+#define TBX_TICK_RAW_DIFF(t1, t2) \
+   ((t2.timev.tv_sec * 1000000L + t2.timev.tv_usec) - \
+    (t1.timev.tv_sec * 1000000L + t1.timev.tv_usec))
+
+#endif
+
+#define TBX_TICK_DIFF(t1, t2) (TBX_TICK_RAW_DIFF(t1, t2) - tbx_residual + 1)
+#define TBX_TIMING_DELAY(t1, t2) tbx_tick2usec(TBX_TICK_DIFF(t1, t2))
+
+extern unsigned long long tbx_residual;
+extern tbx_tick_t         tbx_new_event;
+extern tbx_tick_t         tbx_last_event;
+
+#endif /* TBX_TIMING_H */
diff --git a/src/crlibm/scs_lib/tests/test_accuracy.c b/src/crlibm/scs_lib/tests/test_accuracy.c
new file mode 100644
index 0000000..d2be388
--- /dev/null
+++ b/src/crlibm/scs_lib/tests/test_accuracy.c
@@ -0,0 +1,330 @@
+/** Test of SCS library against MPFR
+ at file tests/test_accuracy.c
+
+ at author David Defour David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr 
+
+This file is part of the SCS library.
+*/
+
+/*
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ */
+#include "scs.h"
+#include "scs_private.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+
+/* Compile only if mpfr is present */
+#ifdef HAVE_MPFR_H
+
+#include <mpfr.h>
+
+
+void (* test_scs_fct) () = NULL;
+int (* test_mpfr_fct) () = NULL;
+mp_rnd_t ROUNDING = GMP_RNDN;
+
+
+/* Function defined in scs2MPF.c */
+//void scs2MPF(scs_t, mpf_t);
+
+
+void usage(char *namefct){
+    printf("Usage :\n \t %s n [k] \n\n", namefct);
+    printf("Where k is the number of random tests to generate (default 1000) \n");
+    printf("and n is the function to test \n");
+    printf(" 1 : scs_add \n");
+    printf(" 2 : scs_sub \n");
+    printf(" 3 : scs_mul \n");
+    printf(" 4 : scs_div \n");
+    printf(" 5 : scs_get_d \n");
+    printf(" 6 : scs_get_d_minf \n");
+    printf(" 7 : scs_get_d_pinf \n");
+    printf(" 8 : scs_get_d_zero \n");
+    printf(" 9 : scs_set \n");
+    printf(" 10: scs_square \n");
+
+    printf("\n");
+    exit (1);
+}
+
+
+void test_square(int bcl){
+  scs_t scx, scr, scx_maxerr, scr_maxerr;
+  mpfr_t mpx, mpr,mpscr,mperr;
+  int j;
+  double err, maxerr, avgerr;
+
+  mpfr_init2(mpx, SCS_NB_WORDS*SCS_NB_BITS*2);
+  mpfr_init2(mpr, SCS_NB_WORDS*SCS_NB_BITS*2);
+  mpfr_init2(mpscr, SCS_NB_WORDS*SCS_NB_BITS*2);
+  mpfr_init2(mperr, SCS_NB_WORDS*SCS_NB_BITS*2);
+  maxerr = 0; avgerr=0;
+
+  for(j=0; j<bcl; j++){
+    scs_rand(scx, 20);
+    #if 1 
+    /* set worst case */
+    scx -> h_word[0] = 1; 
+    #endif
+    scs_get_mpfr(scx, mpx);  
+
+    scs_square(scr, scx);
+    mpfr_mul(mpr, mpx, mpx, GMP_RNDN);
+    scs_get_mpfr(scr, mpscr);  
+
+    mpfr_sub(mperr, mpscr, mpr, GMP_RNDN); 
+    mpfr_div(mperr, mperr, mpr, GMP_RNDN); 
+    mpfr_abs(mperr, mperr, GMP_RNDN);
+
+    err = mpfr_get_d(mperr, GMP_RNDN);
+    if (err > maxerr){
+      maxerr = err;
+      scs_set(scx_maxerr, scx);
+      scs_set(scr_maxerr, scr);
+    }
+    avgerr +=  err;
+  }
+  avgerr = avgerr / bcl;
+  printf("Average error : %e nb bit : %d \n", 
+	 avgerr, -(int)(log(avgerr)/log(2.)));
+  printf("Max     error : %e nb bit : %d \n", 
+	 maxerr,  -(int)(log(maxerr)/log(2.)));
+
+  printf("Argument giving max error : \n"); scs_get_std(scx_maxerr);
+  printf("Result with max error: \n"); scs_get_std(scr_maxerr);
+ 
+  mpfr_clear(mpx); mpfr_clear(mpr); mpfr_clear(mperr); 
+  mpfr_clear(mpscr);
+}
+
+
+
+
+void test_one_arg(int bcl){
+  scs_t sc1, scex;
+  mpfr_t mpf1, mpfex;
+  double scsd, mpfrd, scsdmax;
+  int j, nberr;
+
+
+  mpfr_init2(mpf1, SCS_NB_WORDS*SCS_NB_BITS*2);
+  mpfr_init2(mpfex, SCS_NB_WORDS*SCS_NB_BITS*2);
+  scsd = 0; mpfrd = 0; nberr = 0; scsdmax = 0;
+  
+  for(j=0; j<bcl; j++){
+    scs_rand(sc1, 1500); /* test some special cases */
+    test_scs_fct(&scsd, sc1);
+
+    scs_get_mpfr(sc1, mpf1);  
+
+    mpfrd = mpfr_get_d(mpf1, ROUNDING);
+
+    if (mpfrd != scsd){
+      scs_set(scex, sc1);
+      nberr ++;}
+  }
+  printf("Number of misrounds: %d\n", nberr);
+  if (nberr){
+    printf("Original number :\n"); 
+    scs_get_std(scex);
+    scs_get_mpfr(scex, mpfex); 
+    /* commented out because this function has disappeared from recent MPFR versions  */
+/*     mpfr_out_str(stdout, 2, 150, mpfex, ROUNDING);  printf("\n"); */
+ 
+    printf("SCS rounding : \n");
+    test_scs_fct(&scsd, scex);
+    printf("%.40e\n",scsd);
+    printf("In binary : \n");
+    mpfr_set_d(mpf1, scsd, ROUNDING); 
+/*     mpfr_out_str(stdout, 2, 150, mpf1, ROUNDING);  printf("\n");  */
+ 
+    printf("MPFR rounding : \n");
+    mpfrd = mpfr_get_d(mpfex, ROUNDING);
+    printf("%.40e\n",mpfrd);
+    printf("In binary : \n");
+    mpfr_set_d(mpf1, mpfrd, ROUNDING); 
+/*     mpfr_out_str(stdout, 2, 150, mpf1, ROUNDING);  printf("\n");  */
+  }
+
+  mpfr_clear(mpf1); mpfr_clear(mpfex); 
+}
+
+
+void test_two_arg(int bcl){
+  scs_t sc1, sc2, sc3, scm1, scm2, scm3;
+  mpfr_t mp1, mp2, mp3, mp4, mp5;
+  double d1, d2, max;
+  int j;
+
+  mpfr_init2(mp1, SCS_NB_WORDS*SCS_NB_BITS*2); 
+  mpfr_init2(mp2, SCS_NB_WORDS*SCS_NB_BITS*2);
+  mpfr_init2(mp3, SCS_NB_WORDS*SCS_NB_BITS*2);
+  mpfr_init2(mp4, SCS_NB_WORDS*SCS_NB_BITS*2);
+  mpfr_init2(mp5, SCS_NB_WORDS*SCS_NB_BITS*2); 
+  d1 = 0; d2 = 0;  max = 0;
+ 
+  
+  for(j=0; j<bcl; j++){
+    scs_rand(sc1, 20); scs_rand(sc2, 20); 
+    /* You get most worst cases by imposing the following: */
+    #if 1
+    sc1 -> h_word[0] = 1; 
+    sc2 -> h_word[0] = 1; 
+    sc1 -> h_word[1] = 1; 
+    sc2 -> h_word[1] = 1; 
+    #endif
+    test_scs_fct(sc3, sc1, sc2);
+
+    scs_get_mpfr(sc1, mp1);  scs_get_mpfr(sc2, mp2);  scs_get_mpfr(sc3, mp3);
+ 
+    test_mpfr_fct(mp4, mp1, mp2, GMP_RNDN);
+ 
+    /* Error Computation */   
+    mpfr_sub(mp5, mp4, mp3, GMP_RNDN); mpfr_div(mp5, mp5, mp4, GMP_RNDN); mpfr_abs(mp5, mp5, GMP_RNDN);
+    
+    d2 = mpfr_get_d(mp5, GMP_RNDN);
+    if (d2 > max){
+      max = d2;
+      scs_set(scm1, sc1);
+      scs_set(scm2, sc2);
+      scs_set(scm3, sc3); }
+
+    d1 +=  d2;
+  }
+  
+  printf("Average error : %e nb bit : %d \n", d1/bcl, -(int)(log(d1/bcl)/log(2.)));
+  printf("Max     error : %e nb bit : %d \n", max,    -(int)(log(max)/log(2.)));
+
+
+  printf("First  Number : \n"); scs_get_std(scm1);
+  printf("Second Number : \n"); scs_get_std(scm2);
+  printf("Result Number : \n"); scs_get_std(scm3);
+
+  mpfr_clear(mp1); mpfr_clear(mp2); mpfr_clear(mp3); 
+  mpfr_clear(mp4); mpfr_clear(mp5);
+
+}
+
+
+void test_scs_set_d(int loops) {
+  db_number d;
+  double d1, d2;
+  scs_t s;
+  int i,j, errors, ep;
+  double errorcases1[20];
+  double errorcases2[20];
+
+  errors=0; ep=0;
+  
+  for (i=0; i<loops; i++) {
+    d.l = (rand() & 0x000000ff);
+    for(j=0; j<(sizeof(db_number)); j++){
+      d.l = d.l << 8;
+      d.l += (rand() & 0x000000ff );
+    }
+    d1 = d.d;
+    scs_set_d(s,d1);
+    scs_get_d(&d2,s);
+    if((d1!=d2) && (!(!(d1==d1)))) { 
+      /* second test to filter out NaNs, for which the first is always
+	 true */
+      errors++;
+      if(ep<20) {
+	errorcases1[ep]=d1;
+	errorcases2[ep]=d2;
+	ep++;
+      }
+    }
+  }
+  printf("Number of errors: %d\n", errors);
+  if(ep!=0) {
+    for(i=0; i<ep; i++)
+      printf("example:\t%e\t%e\n", errorcases1[i], errorcases2[i]);
+  }
+}
+
+
+/*
+ * Fct de test . 
+ */
+int main(int argc, char *argv[]){
+  int fct, bcl;
+ 
+ 
+  if (argc < 2)    usage(argv[0]);
+
+  fct  = atoi(argv[1]);
+  bcl  = (argc >= 3)? atoi(argv[2]) : 1000;
+
+
+  switch(fct){
+  case 1:
+    test_scs_fct = scs_add;   test_mpfr_fct = mpfr_add;
+    test_two_arg(bcl);
+    break;
+  case 2:
+    test_scs_fct = scs_sub;   test_mpfr_fct = mpfr_sub;
+    test_two_arg(bcl);
+    break;
+  case 3:
+    test_scs_fct = scs_mul;   test_mpfr_fct = mpfr_mul;    
+    test_two_arg(bcl);
+    break;
+  case 4:
+    test_scs_fct = scs_div;   test_mpfr_fct = mpfr_div;    
+    test_two_arg(bcl);
+   break;
+  case 5:
+    test_scs_fct = scs_get_d;      ROUNDING = GMP_RNDN;
+    test_one_arg(bcl);
+    break;
+  case 6:
+    test_scs_fct = scs_get_d_minf; ROUNDING = GMP_RNDD;
+    test_one_arg(bcl);
+    break;
+  case 7:
+    test_scs_fct = scs_get_d_pinf; ROUNDING = GMP_RNDU;
+    test_one_arg(bcl);
+    break;
+  case 8:
+    test_scs_fct = scs_get_d_zero; ROUNDING = GMP_RNDZ;
+    test_one_arg(bcl);
+    break;
+  case 9:
+    test_scs_set_d(bcl);
+    break;
+  case 10:
+    test_square(bcl);
+    break;
+  default :
+    fprintf(stderr,"Unknown Function \n");
+    usage(argv[0]);
+  }
+
+  return 0;
+}
+#else
+int main(){
+  fprintf(stderr,"No MPFR detected on your system.\n Please install MPFR, and compile scslib with MPFR support\n (see ./configure --help) \n");
+  return 0;
+}
+#endif /*HAVE_LIBMPFR*/
diff --git a/src/crlibm/scs_lib/tests/test_log.c b/src/crlibm/scs_lib/tests/test_log.c
new file mode 100644
index 0000000..80a2ceb
--- /dev/null
+++ b/src/crlibm/scs_lib/tests/test_log.c
@@ -0,0 +1,436 @@
+/*
+ * Function to compute the logarithm with fully exact rounding
+ *
+ * Author : Defour David  (David.Defour at ens-lyon.fr)
+ *
+ * Date of creation : 13/05/2002   
+ * Last Modified    : 17/05/2002
+ */
+#include "scs.h"
+#include "scs_private.h"
+#include "log.h"
+#include <stdio.h>
+#ifdef HAVE_GMP_H
+#include <gmp.h>
+#include "tbx_timing.h"
+
+
+
+
+#define LOOPS 10000
+
+mpf_t mpf_sc_ln2_ptr;
+mpf_t mpf_constant_poly_ptr[20];
+mpf_t mpf_table_ti_ptr[13];
+mpf_t mpf_table_inv_wi_ptr[13];
+
+
+/*
+ * 6) SCS CONSTANTS
+ */
+#ifdef SCS_TYPECPU_SPARC
+static const scs
+/* 0   */
+   scs_zer ={{0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             {{0, 0}},  0,   1 },
+/* 1/2 */
+   scs_half={{0x02000000, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE, -1,   1 },
+/*  1  */  
+   scs_one ={{0x00000001, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE,  0,   1 },
+/*  2  */
+   scs_two ={{0x00000002, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE,  0,   1 };
+#else
+static const scs
+/* 0   */
+   scs_zer ={{0x00000000, 0x00000000, 0x00000000, 0x00000000,
+             0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             {{0, 0}},  0,   1 },
+/* 1/2 */
+   scs_half={{0x20000000, 0x00000000, 0x00000000, 0x00000000,
+             0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE, -1,   1 },
+/*  1  */  
+   scs_one ={{0x00000001, 0x00000000, 0x00000000, 0x00000000,
+             0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE,  0,   1 },
+/*  2  */
+   scs_two ={{0x00000002, 0x00000000, 0x00000000, 0x00000000,
+             0x00000000, 0x00000000, 0x00000000, 0x00000000},
+             DB_ONE,  0,   1 };
+#endif
+
+#define SCS_ZERO (scs_ptr)(&scs_zer)
+#define SCS_HALF (scs_ptr)(&scs_half)
+#define SCS_ONE  (scs_ptr)(&scs_one)
+#define SCS_TWO  (scs_ptr)(&scs_two)
+
+double sn_log(double); 
+double mpf_sn_log(double);
+
+
+/*
+ *  1) First reduction: exponent extraction      
+ *         E  
+ *  x = 2^   .(1+f)    with  0 <= f < 1
+ *
+ *  log(x) = E.log(2) + log(1+f) where:
+ *     - log(2)   is tabulated
+ *     - log(1+f) need to be evalute 
+ *  
+ *
+ *  2) Avoiding accuracy problem when E=-1 by testing
+ *   
+ *    if (1+f >= sqrt(2)) then 
+ *        1+f = (1+f)/2;  E = E+1; 
+ *    and,
+ *        log(x) = (E+1).log(2) + log((1+f)/2)
+ *
+ *    so now:      sqrt(2)/2 <= (1+f) < sqrt(2)
+ *
+ *
+ *  3) Second reduction: tabular reduction
+ *                   -4  
+ *   wi = 1 + i. 2^
+ *                                   1  
+ *   log(1+f) = log(wi) + log ( 1 + --- . (1 + f - wi) ) 
+ *                                   wi 
+ *
+ *   then |(1+f-wi)/wi| <= 2^-5 if we use rounded to nearest.
+ *
+ *  4) Computation:
+ *   a) Table lookup of: 
+ *        - ti    = log(wi)
+ *        - inv_wi = 1/(wi)
+ *   b) Polynomial evaluation of:
+ *        - P(R) ~ log(1 + R), where R = (1+f-wi) * inv_wi 
+ *
+ *                 -5 
+ *   with  |R| < 2^
+ *
+ *
+ *  5) Reconstruction:
+ *   log(x) = E.log(2) + t_i + P(R)
+ *
+ */
+#define SQRT_2 1.4142135623730950489e0 
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST
+ *************************************************************
+ *************************************************************/
+double sn_log(double x){ 
+  scs_t R, sc_ln2_times_E, res1;
+  db_number nb, nb2, wi, resd;
+  int ti, i, E=0;
+
+  nb.d = x;
+  /* Filter cases */
+  if (nb.i[HI_ENDIAN] < 0x00100000){        /* x < 2^(-1022)    */
+    if (((nb.i[HI_ENDIAN] & 0x7fffffff)|nb.i[LO_ENDIAN])==0)
+      return 1.0/0.0;                       /* log(+/-0) = -Inf */
+    if (nb.i[HI_ENDIAN] < 0) 
+      return (x-x)/0;                       /* log(-x) = Nan    */
+
+    /* Subnormal number */
+    E    -= (SCS_NB_BITS*2); /* keep in mind that x is a subnormal number */ 
+    nb.d *=SCS_RADIX_TWO_DOUBLE;  /* make x as normal number     */         
+    /* We may just want add 2 to the scs number.index */
+    /* may be .... we will see */
+  }
+  if (nb.i[HI_ENDIAN] >= 0x7ff00000)
+    return x+x;                             /* Inf or Nan       */
+
+  /* find n, nb.d such that sqrt(2)/2 < nb.d < sqrt(2) */
+  E += (nb.i[HI_ENDIAN]>>20)-1023;
+  nb.i[HI_ENDIAN] =  (nb.i[HI_ENDIAN] & 0x000fffff) | 0x3ff00000;
+  if (nb.d > SQRT_2){
+    nb.d *= 0.5;
+    E++;
+  }
+
+  /* to normalize nb.d and round to nearest      */
+  /* + (1-trunc(sqrt(2.)/2 * 2^(4))*2^(-4) )+2.^(-(4+1))*/ 
+  nb2.d = nb.d + norm_number.d; 
+  i = (nb2.i[HI_ENDIAN] & 0x000fffff);
+  i = i >> 16; /* 0<= i <=11 */
+  
+
+  wi.d = (11+i)*(double)0.6250e-1;
+
+  /* (1+f-w_i) */
+  nb.d -= wi.d; 
+
+  /* Table reduction */
+  ti = i; 
+
+  /* R = (1+f-w_i)/w_i */
+  scs_set_d(R, nb.d);
+  scs_mul(R, R, table_inv_wi_ptr[i]);
+
+  /* sc_ln2_times_E = E*log(2)  */
+  scs_set(sc_ln2_times_E, sc_ln2_ptr);
+
+  if (E >= 0){
+    scs_mul_ui(sc_ln2_times_E, E);
+  }else{
+    scs_mul_ui(sc_ln2_times_E, -E);
+    sc_ln2_times_E->sign = -1;
+  }
+
+  /*
+   * Polynomial evaluation of log(1 + R) with an error less than 2^(-130)
+   */
+  scs_mul(res1, constant_poly_ptr[0], R);
+  for(i=1; i<20; i++){
+    scs_add(res1, constant_poly_ptr[i], res1);
+    scs_mul(res1, res1, R);
+  }
+  scs_add(res1, res1, table_ti_ptr[ti]);
+  scs_add(res1, res1, sc_ln2_times_E);  
+  
+
+  scs_get_d(&resd.d, res1);  
+
+  return resd.d;
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TO NEAREST
+ *************************************************************
+ *************************************************************/
+double mpf_sn_log(double x){ 
+    mpf_t R, sc_ln2_times_E, res1;
+    db_number nb, nb2, wi, resd;
+    int ti, i, E=0;
+
+    /* Memory allocation */
+    mpf_init2(R, 210);
+    mpf_init2(sc_ln2_times_E, 210);
+    mpf_init2(res1, 210);
+
+  nb.d = x;
+  /* Filter cases */
+  if (nb.i[HI_ENDIAN] < 0x00100000){        /* x < 2^(-1022)    */
+    if (((nb.i[HI_ENDIAN] & 0x7fffffff)|nb.i[LO_ENDIAN])==0)
+      return 1.0/0.0;                       /* log(+/-0) = -Inf */
+    if (nb.i[HI_ENDIAN] < 0) 
+      return (x-x)/0;                       /* log(-x) = Nan    */
+
+    /* Subnormal number */
+    E    -= (SCS_NB_BITS*2); /* keep in mind that x is a subnormal number */ 
+    nb.d *=SCS_RADIX_TWO_DOUBLE;  /* make x as normal number     */         
+    /* We may just want add 2 to the scs number.index */
+    /* may be .... we will see */
+  }
+  if (nb.i[HI_ENDIAN] >= 0x7ff00000)
+    return x+x;                             /* Inf or Nan       */
+
+
+  /* find n, nb.d such that sqrt(2)/2 < nb.d < sqrt(2) */
+  E += (nb.i[HI_ENDIAN]>>20)-1023;
+  nb.i[HI_ENDIAN] =  (nb.i[HI_ENDIAN] & 0x000fffff) | 0x3ff00000;
+  if (nb.d > SQRT_2){
+    nb.d *= 0.5;
+    E++;
+  }
+
+  /* to normalize nb.d and round to nearest      */
+  /* + (1-trunc(sqrt(2.)/2 * 2^(4))*2^(-4) )+2.^(-(4+1))*/ 
+  nb2.d = nb.d + norm_number.d; 
+  i = (nb2.i[HI_ENDIAN] & 0x000fffff);
+  i = i >> 16; /* 0<= i <=11 */
+  
+
+  wi.d = (11+i)*(double)0.6250e-1;
+
+  /* (1+f-w_i) */
+  nb.d -= wi.d; 
+
+
+  /* Table reduction */
+  ti = i; 
+ 
+  /* R = (1+f-w_i)/w_i */
+  mpf_set_d(R, nb.d);
+  mpf_mul(R, R, mpf_table_inv_wi_ptr[i]);
+ 
+
+  /* sc_ln2_times_E = E*log(2)  */
+  mpf_set(sc_ln2_times_E, mpf_sc_ln2_ptr);
+
+
+  if (E >= 0){
+    mpf_mul_ui(sc_ln2_times_E, sc_ln2_times_E, E);
+  }else{
+    mpf_mul_ui(sc_ln2_times_E, sc_ln2_times_E, -E);
+    mpf_neg(sc_ln2_times_E, sc_ln2_times_E);
+  }
+
+
+  /*
+   * Polynomial evaluation of log(1 + R) with an error less than 2^(-130)
+   */
+  mpf_mul(res1, mpf_constant_poly_ptr[0], R);
+  for(i=1; i<20; i++){
+    mpf_add(res1, mpf_constant_poly_ptr[i], res1);
+    mpf_mul(res1, res1, R);
+  }
+  mpf_add(res1, res1, mpf_table_ti_ptr[ti]);
+  mpf_add(res1, res1, sc_ln2_times_E);  
+
+  resd.d = mpf_get_d(res1);  
+
+  /* Free Memory */
+  mpf_clear(R);  mpf_clear(sc_ln2_times_E);  mpf_clear(res1);
+
+  return resd.d;
+}
+
+
+
+void free_mpf_cst(){
+    int i;
+
+    for (i=0; i<13; i++) mpf_clear(mpf_table_ti_ptr[i]);
+    for (i=0; i<13; i++) mpf_clear(mpf_table_inv_wi_ptr[i]);
+    for (i=0; i<20; i++) mpf_clear(mpf_constant_poly_ptr[i]);
+    mpf_clear(mpf_sc_ln2_ptr);
+}
+
+void init_mpf_cst(){
+
+    /*
+     * mpf constant initialisation 
+     */
+ mpf_init_set_str(mpf_sc_ln2_ptr,".6931471805599453094172321214581765680755001343602552541206800094933936",10);
+ mpf_init_set_str(mpf_table_ti_ptr[0],"-.3746934494414106936069849078675769724802936835036038412641523288430009",10);
+ mpf_init_set_str(mpf_table_ti_ptr[1],"-.2876820724517809274392190059938274315035097108977610565066656853492930",10);
+ mpf_init_set_str(mpf_table_ti_ptr[2],"-.2076393647782445016154410442673876674967325926808139000636745273101098",10);
+ mpf_init_set_str(mpf_table_ti_ptr[3],"-.1335313926245226231463436209313499745894156734989045739026498785426010",10);
+ mpf_init_set_str(mpf_table_ti_ptr[4],"-.06453852113757117167292391568399292812890862534975384283537781286190121",10);
+ mpf_init_set_str(mpf_table_ti_ptr[5],"0.0",10);
+ mpf_init_set_str(mpf_table_ti_ptr[6],".06062462181643484258060613204042026328620247514472377081451769990871809",10);
+ mpf_init_set_str(mpf_table_ti_ptr[7],".1177830356563834545387941094705217050684807125647331411073486387948077",10);
+ mpf_init_set_str(mpf_table_ti_ptr[8],".1718502569266592223400989460551472649353787238581078020552401984357182",10);
+ mpf_init_set_str(mpf_table_ti_ptr[9],".2231435513142097557662950903098345033746010855480072136712878724873917",10);
+ mpf_init_set_str(mpf_table_ti_ptr[10],".2719337154836417588316694945329991619825747499635896237113644456014997",10);
+ mpf_init_set_str(mpf_table_ti_ptr[11],".3184537311185346158102472135905995955952064508566514128565276806503928",10);
+ mpf_init_set_str(mpf_table_ti_ptr[12],".3629054936893684531378243459774898461403797773994147255159153395094188",10);
+  
+ mpf_init_set_str(mpf_table_inv_wi_ptr[0],"1.454545454545454545454545454545454545454545454545454545454545454545455",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[1],"1.333333333333333333333333333333333333333333333333333333333333333333333",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[2],"1.230769230769230769230769230769230769230769230769230769230769230769231",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[3],"1.142857142857142857142857142857142857142857142857142857142857142857143",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[4],"1.066666666666666666666666666666666666666666666666666666666666666666667",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[5],"1.0",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[6],".9411764705882352941176470588235294117647058823529411764705882352941176",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[7],".8888888888888888888888888888888888888888888888888888888888888888888889",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[8],".8421052631578947368421052631578947368421052631578947368421052631578947",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[9],".8000000000000000000000000000000000000000000000000000000000000000000000",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[10],".7619047619047619047619047619047619047619047619047619047619047619047619",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[11],".7272727272727272727272727272727272727272727272727272727272727272727273",10);
+ mpf_init_set_str(mpf_table_inv_wi_ptr[12],".6956521739130434782608695652173913043478260869565217391304347826086957",10);
+  
+
+
+ mpf_init_set_str(mpf_constant_poly_ptr[0],"-.5023367294567568078075892234129085015737046673117638148835793879900684e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[1],".5286469364636800162451931056605008699849205395651010015123349866702438e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[2],"-.5555504165240301671600703643945025506173351812330050928639639013749408e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[3],".5882304523791230393387514237891031448778320732847321758009922427128675e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[4],"-.6250000063225403563289268352338121550211573212295444469323271379834995e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[5],".6666666722317130353982967043683210254854513387493745794307824211890102e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[6],"-.7142857142809460344869308613352646790467720996336436837300223496769771e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[7],".7692307692269045639218260467556323317594125412187843530035925183575360e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[8],"-.8333333333333356037828752693534976595948243524382699349340678490229276e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[9],".9090909090909107517931824416149710386096279143853141933153563186364239e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[10],"-.9999999999999999993224242653285578758483071952239027712038970659952908e-1",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[11],".1111111111111111110676605039270706067112823008194317757408530067415460",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[12],"-.1250000000000000000000121547531034901577892307419239533855249184555657",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[13],".1428571428571428571428636714934431388385979630564777290210429555695253",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[14],"-.1666666666666666666666666654681759449880186388123105519286024077940397",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[15],".1999999999999999999999999995018689489549856935258632875129946570831422",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[16],"-.2500000000000000000000000000000541884832055314060603150374550752650562",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[17],".3333333333333333333333333333333480752710184240674027421784076979756719",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[18],"-.4999999999999999999999999999999999992783495160517279217122998393096071",10);
+ mpf_init_set_str(mpf_constant_poly_ptr[19],".9999999999999999999999999999999999999280145118565650165317802247440368",10);
+
+}
+
+
+/*
+ * Used to mesure time taken by the instruction "name"
+ */
+#define TST_FCT(char, name)\
+         TBX_GET_TICK(t1);\
+         for(i=0; i< LOOPS-1; i++){ \
+           name;\
+           } \
+         TBX_GET_TICK(t2);\
+	 deltat = TBX_TICK_RAW_DIFF(t1, t2); \
+	 printf("%28s :  %lld ticks \n", char, deltat);
+
+
+
+int main(){
+    /* table storing random number */
+    double  tableau[LOOPS];
+    double res[LOOPS];
+    mpf_t  TAB_MPF[LOOPS];
+    int i;
+    tbx_tick_t   t1, t2; 
+    unsigned long long deltat;
+
+    printf("mpf constant initialisation ... \n");
+    init_mpf_cst();
+    printf("Finished ... \n");
+
+    srand(42);  
+    for(i=0; i<LOOPS; i++) tableau[i]=rand();
+    printf("End of random number generation \n");
+
+    for(i=0; i< LOOPS-1; i++){ 
+      res[i]=sn_log(tableau[i]);
+    } 
+    for(i=0; i< LOOPS-1; i++){ 
+      res[i]=mpf_sn_log(tableau[i]);
+    } 
+
+
+    TBX_GET_TICK(t1);
+    for(i=0; i< LOOPS-1; i++){ 
+      res[i]=sn_log(tableau[i]);
+    } 
+    TBX_GET_TICK(t2);
+    deltat = TBX_TICK_RAW_DIFF(t1, t2); 
+    printf("%28s :  %lld ticks \n", "scs_log ", deltat);
+    printf("\n");
+
+
+
+
+    TBX_GET_TICK(t1);
+    for(i=0; i< LOOPS-1; i++){ 
+      res[i]=mpf_sn_log(tableau[i]);
+    } 
+    TBX_GET_TICK(t2);
+    deltat = TBX_TICK_RAW_DIFF(t1, t2); 
+    printf("%28s :  %lld ticks \n", "mpf_log " , deltat);
+
+
+    free_mpf_cst();
+}
+
+#else
+main(){
+    fprintf(stderr,"No GMP detected on your system\n");
+}
+#endif /*HAVE_GMP_H*/
diff --git a/src/crlibm/scs_lib/tests/test_timing.c b/src/crlibm/scs_lib/tests/test_timing.c
new file mode 100644
index 0000000..d9cad17
--- /dev/null
+++ b/src/crlibm/scs_lib/tests/test_timing.c
@@ -0,0 +1,166 @@
+#include "scs.h"
+#include "scs_private.h"
+
+/* Compile only if gmp is present */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <math.h>
+#include "tbx_timing.h"
+#ifdef HAVE_GMP_H
+#include <gmp.h>
+#endif
+#ifdef HAVE_MPFR_H
+#include <mpfr.h>
+#endif
+
+
+#define LOOPS 1000
+
+
+
+/*
+ * Used to mesure time taken by the instruction "name"
+ */
+#define TST_FCT(char, name)\
+         /* one untimed loop to load cache */ \
+         for(i=0; i< LOOPS-1; i++){ \
+           name;\
+           } \
+         TBX_GET_TICK(t1);\
+         for(i=0; i< LOOPS-1; i++){ \
+           name;\
+           } \
+         TBX_GET_TICK(t2);\
+	 deltat = TBX_TICK_RAW_DIFF(t1, t2); \
+         printf("%28s :  %lld ticks,\t ratio to  FP +:  %f\n", char, deltat, (double) deltat/tadd);
+
+
+/* Similar to the previous, computes the time for one FP add so that
+   we have something to normalize against */
+#define COMPUTE_TADD()\
+         /* one untimed loop to load cache */ \
+         for(i=0; i< LOOPS-1; i++){ \
+           d3 = double_table[i]*double_table[i+1];\
+           } \
+         TBX_GET_TICK(t1);\
+         for(i=0; i< LOOPS-1; i++){ \
+           d3 = double_table[i]*double_table[i+1];\
+           } \
+         TBX_GET_TICK(t2);\
+	 tadd = TBX_TICK_RAW_DIFF(t1, t2);
+
+
+/*
+ * Fct de test . 
+ */
+int main(){
+  scs_t n1I;
+  volatile double d3;
+  volatile int int_r;
+  unsigned long long deltat,tadd;
+  tbx_tick_t   t1, t2; 
+  int i;
+ 
+  /* table storing random number */
+  scs_t  scs_table[LOOPS];
+#ifdef HAVE_GMP_H
+  mpf_t  mpf_table[LOOPS];
+  mpf_t a;
+#endif
+#ifdef HAVE_MPFR_H
+  mpfr_t  mpfr_table[LOOPS];
+  mpfr_t  mpfr_a;
+#endif
+
+  double double_table[LOOPS];
+  int int_table[LOOPS];
+
+
+
+  printf("Random generation  ... ");
+  srand(42);  
+  for(i=0; i<LOOPS; i++){ 
+    scs_rand(scs_table[i], 7);  
+#if 1
+    scs_table[i]->sign = 1; /* only positive numbers */
+#endif
+    scs_get_d(&double_table[i], scs_table[i]);
+    int_table[i] = double_table[i];
+#ifdef HAVE_GMP_H
+    mpf_init2(mpf_table[i], (SCS_NB_BITS*SCS_NB_WORDS) );
+    scs_get_mpf(scs_table[i], mpf_table[i]);
+#endif
+#ifdef HAVE_MPFR_H
+    mpfr_init2(mpfr_table[i], (SCS_NB_BITS*SCS_NB_WORDS) );
+    scs_get_mpfr(scs_table[i], mpfr_table[i]);
+#endif
+  }
+  printf(" done \n\n");
+
+
+#ifdef HAVE_GMP_H
+  mpf_init2(a, (SCS_NB_BITS*SCS_NB_WORDS));
+  mpf_set(a, mpf_table[1]);
+#endif
+#ifdef HAVE_MPFR_H
+  mpfr_init2(mpfr_a, (SCS_NB_BITS*SCS_NB_WORDS));
+  mpfr_set(mpfr_a, mpfr_table[1], GMP_RNDN);
+#endif
+
+  printf("These first timings don't mean much\n");
+  COMPUTE_TADD()
+  TST_FCT("int a + b ", int_r = int_table[i]+int_table[i+1])
+  TST_FCT("int a * b ", d3 = int_table[i]*int_table[i+1])
+  TST_FCT("double a + b ", d3 = double_table[i]+double_table[i+1])
+  TST_FCT("double a * b ", d3 = double_table[i]*double_table[i+1])
+  TST_FCT("double a / b ", d3 = double_table[i]/double_table[i+1])
+  printf("\n"); 
+
+  printf("Here come the meaningful timings\n");
+  /* scs library test */
+  TST_FCT("conversion scs=>doubles ", scs_get_d(&double_table[i], scs_table[i]))
+  TST_FCT("conversion doubles=>scs ", scs_set_d(n1I, double_table[i]))
+  TST_FCT("scs_add ", scs_add(n1I, scs_table[i], scs_table[i+1]))
+  TST_FCT("scs_sub ", scs_sub(n1I, scs_table[i], scs_table[i+1]))
+  TST_FCT("scs_add_no_renorm ",scs_add_no_renorm(n1I, scs_table[i], scs_table[i+1]))
+  TST_FCT("scs_mul ", scs_mul(n1I, scs_table[i], scs_table[i+1]))
+  TST_FCT("scs_mul_ui ", scs_mul_ui(scs_table[i], 31242436))
+  TST_FCT("scs_square  ", scs_square(n1I, scs_table[i]))
+    //  TST_FCT("scs_fma ", scs_fma(n1I, scs_table[i], scs_table[i], scs_table[i+1]))
+  TST_FCT("add + mul scs ", scs_mul(n1I, scs_table[i], scs_table[i+1]); scs_add(n1I, n1I, scs_table[i])) 
+
+  TST_FCT("renormalization scs ", scs_renorm(scs_table[i]))
+  TST_FCT("scs_div ", scs_div(n1I, scs_table[i], scs_table[i+1]))
+  printf("\n");  
+
+#ifdef HAVE_GMP_H
+  /* mpf (gmp) library test */
+  TST_FCT("Conversion mpf=>double", double_table[i] = mpf_get_d(mpf_table[i]))
+  TST_FCT("Conversion double=>mpf ", mpf_set_d(a, double_table[i]))
+  TST_FCT("Addition mpf ", mpf_add(a, mpf_table[i], mpf_table[i+1]))
+  TST_FCT("Multiplication mpf ", mpf_mul(a, mpf_table[i], mpf_table[i+1]))
+  TST_FCT("Multiplication_with_int mpf ", mpf_mul_ui(a, mpf_table[i], 3254353))
+  TST_FCT("Division mpf ", mpf_div(a, mpf_table[i], mpf_table[i+1]))
+  printf("\n");  
+#endif
+ 
+
+#ifdef HAVE_MPFR_H
+  /* mpf (gmp) library test */
+  TST_FCT("Conversion mpfr=>double", double_table[i] = mpfr_get_d(mpfr_table[i],GMP_RNDN))
+  TST_FCT("Conversion double=>mpfr ", mpfr_set_d(mpfr_a, double_table[i],GMP_RNDN))
+  TST_FCT("Addition mpfr ", mpfr_add(mpfr_a, mpfr_table[i], mpfr_table[i+1],GMP_RNDN))
+  TST_FCT("Multiplication mpfr ", mpfr_mul(mpfr_a, mpfr_table[i], mpfr_table[i+1],GMP_RNDN))
+  TST_FCT("Multiplication_with_int mpfr ", mpfr_mul_ui(mpfr_a, mpfr_table[i], 3254353,GMP_RNDN))
+  TST_FCT("Division mpfr ", mpfr_div(mpfr_a, mpfr_table[i], mpfr_table[i+1],GMP_RNDN))
+  printf("\n");  
+#endif
+ 
+
+
+
+  return 0;
+}
+
diff --git a/src/crlibm/scs_lib/wrapper_scs.h b/src/crlibm/scs_lib/wrapper_scs.h
new file mode 100644
index 0000000..188576a
--- /dev/null
+++ b/src/crlibm/scs_lib/wrapper_scs.h
@@ -0,0 +1,486 @@
+extern "C"
+{
+#include "scs.h"
+}
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <iostream.h>
+
+#ifndef SCS_WRAPPER_CPP
+#define SCS_WRAPPER_CPP 1
+
+extern "C" int scs_cmp_mant(scs_ptr , scs_ptr);
+
+class Scs{
+ private:
+    scs scsnb; 
+
+ public:
+    /* Constructors */
+    Scs(){}
+    Scs(double &d){scs_set_d(&scsnb, d);}
+    Scs(int &i){scs_set_si(&scsnb, i);}
+    Scs(const Scs& nb);
+    ~Scs(){}; 
+
+    /* Mutators */
+    void scs_set_sign (int i)     {this->scsnb.sign = i;}
+    void scs_set_index(int i)     {this->scsnb.index = i;}
+    void scs_set_excep(double d)  {this->scsnb.exception.d = d;}
+    void scs_set_words(unsigned int word[SCS_NB_WORDS]){for(int i=0; i<SCS_NB_WORDS; i++) this->scsnb.h_word[i] = word[i];}
+
+    /* Cast */
+    operator double();
+    operator int();
+
+
+    /* Negation */
+    Scs operator-() const;
+    friend Scs fabs(const Scs &a);
+
+    /* Assignment */
+    Scs &operator=(const Scs &nb1);
+    Scs &operator=(const double nb1);
+    Scs &operator=(const int i){scs_set_si(&scsnb, i);}
+
+    /* Addition */
+    friend Scs operator+(Scs &nb1,Scs &nb2);
+    friend Scs operator+(Scs &nb1, const double &nb2);
+    friend Scs operator+(const double &nb1,Scs &nb2);
+    void operator+=(Scs &nb);
+    void operator+=(const double nb);
+
+    /* Subtraction */
+    friend Scs operator-(Scs &nb1,Scs &nb2);
+    friend Scs operator-(Scs &nb1, const double &nb2);
+    friend Scs operator-(const double &nb1,Scs &nb2);
+    void operator-=(Scs &nb);
+    void operator-=(const double nb);
+
+    /* Multiplication */
+    friend Scs operator*(Scs &nb1,Scs &nb2);
+    friend Scs operator*(Scs &nb1, const double &nb2);
+    friend Scs operator*(const double &nb1,Scs &nb2);
+    friend Scs operator*(Scs &nb1, const int &nb2);
+    friend Scs operator*(const int &nb1,Scs &nb2);
+    void operator*=(Scs &nb);
+    void operator*=(const double nb);
+    void operator*=(const int nb);
+
+    /* Multiplication */
+    friend Scs operator/(Scs &nb1,Scs &nb2);
+    friend Scs operator/(Scs &nb1, const double &nb2);
+    friend Scs operator/(const double &nb1,Scs &nb2);
+    void operator/=(Scs &nb);
+    void operator/=(const double nb);
+
+    /* Comparisons */
+    friend bool operator==(Scs &nb1,Scs &nb2);
+    friend bool operator!=(Scs &nb1,Scs &nb2);
+    friend bool operator<=(Scs &nb1,Scs &nb2);
+    friend bool operator>=(Scs &nb1,Scs &nb2);
+    friend bool operator<(Scs &nb1,Scs &nb2);
+    friend bool operator>(Scs &nb1,Scs &nb2);
+
+    /* Random Number */
+    Scs rand(void);
+
+    /* Input/Output */
+    friend ostream& operator<<(ostream &s, const Scs &a);
+    friend istream& operator>>(istream &s, Scs &a);
+
+};
+
+
+
+
+/**************
+ * CONSTRUCTOR
+ **************/
+Scs::Scs(const Scs& nb){
+  unsigned int i;
+  
+  for(i=0; i<SCS_NB_WORDS; i++)
+    this->scsnb.h_word[i] = nb.scsnb.h_word[i];
+
+  this->scsnb.exception.d = nb.scsnb.exception.d;
+  this->scsnb.index = nb.scsnb.index;
+  this->scsnb.sign = nb.scsnb.sign;
+}
+
+/**************
+ * CAST
+ **************/
+inline Scs::operator double() {
+    double d;
+    scs_get_d(&d, &(this->scsnb));
+    return d;
+}
+inline Scs::operator int() {
+    double d;
+    scs_get_d(&d, &(this->scsnb));
+    return ((int)d);
+}
+
+ 
+
+/**************    
+ * ASSIGNATION
+ **************/
+inline Scs &Scs::operator=(const Scs& nb){
+  unsigned int i;
+  
+  for(i=0; i<SCS_NB_WORDS; i++)
+    scsnb.h_word[i] = nb.scsnb.h_word[i];
+
+  scsnb.exception.d = nb.scsnb.exception.d;
+  scsnb.index = nb.scsnb.index;
+  scsnb.sign = nb.scsnb.sign;
+  
+  return *this;
+}
+inline Scs &Scs::operator=(const double nb){
+    scs_set_d(&(this->scsnb), nb);
+    return *this;
+}
+inline Scs fabs(const Scs &a){
+    Scs res(a);
+    res.scsnb.sign = 1;
+    return res;
+}
+
+
+/************
+ * ADDITION
+ ************/
+inline Scs operator+(Scs &nb1,Scs &nb2){
+    Scs res;    scs_add(&(res.scsnb), &(nb1.scsnb), &(nb2.scsnb));
+    return res;
+}
+inline Scs operator+(Scs &nb1,const double &nb2){
+    Scs res, op;
+    scs_set_d(&(op.scsnb), nb2);
+    scs_add(&(res.scsnb), &(nb1.scsnb), &(op.scsnb));
+    return res;
+}
+inline Scs operator+(const double &nb1, Scs &nb2){
+    Scs res, op;
+    scs_set_d(&(op.scsnb), nb1);
+    scs_add(&(res.scsnb), &(nb2.scsnb), &(op.scsnb));
+    return res;
+}
+void inline Scs::operator+=(Scs &nb) {
+    scs_add(&(this->scsnb), &(this->scsnb), &(nb.scsnb));
+}
+void inline Scs::operator+=(const double nb) {
+    Scs op;
+    scs_set_d(&(op.scsnb), nb);
+    scs_add(&(this->scsnb), &(this->scsnb), &(op.scsnb));
+}
+
+
+
+
+/**************
+ * SUBTRACTION
+ **************/
+inline Scs operator-(Scs &nb1,Scs &nb2){
+    Scs res;    scs_sub(&(res.scsnb), &(nb1.scsnb), &(nb2.scsnb));
+    return res;
+}
+inline Scs operator-(Scs &nb1,const double &nb2){
+    Scs res, op;
+    scs_set_d(&(op.scsnb), nb2);
+    scs_sub(&(res.scsnb), &(nb1.scsnb), &(op.scsnb));
+    return res;
+}
+inline Scs operator-(const double &nb1, Scs &nb2){
+    Scs res, op;
+    scs_set_d(&(op.scsnb), nb1);
+    scs_sub(&(res.scsnb), &(nb2.scsnb), &(op.scsnb));
+    return res;
+}
+void inline Scs::operator-=(Scs &nb) {
+    scs_sub(&(this->scsnb), &(this->scsnb), &(nb.scsnb));
+}
+void inline Scs::operator-=(const double nb) {
+    Scs op;
+    scs_set_d(&(op.scsnb), nb);
+    scs_sub(&(this->scsnb), &(this->scsnb), &(op.scsnb));
+}
+
+
+
+/*****************
+ * MULTIPLICATION
+ *****************/
+inline Scs operator*(Scs &nb1,Scs &nb2){
+    Scs res;    scs_mul(&(res.scsnb), &(nb1.scsnb), &(nb2.scsnb));
+    return res;
+}
+inline Scs operator*(Scs &nb1,const double &nb2){
+    Scs res, op;
+    scs_set_d(&(op.scsnb), nb2);
+    scs_mul(&(res.scsnb), &(nb1.scsnb), &(op.scsnb));
+    return res;
+}
+inline Scs operator*(const double &nb1, Scs &nb2){
+    Scs res, op;
+    scs_set_d(&(op.scsnb), nb1);
+    scs_mul(&(res.scsnb), &(nb2.scsnb), &(op.scsnb));
+    return res;
+}
+inline Scs operator*(Scs &nb1, const int &nb2){
+    Scs res;
+    scs_set(&(res.scsnb), &(nb1.scsnb));
+    scs_mul_ui(&(res.scsnb), nb2);
+    return res;
+}
+inline Scs operator*(const int &nb1, Scs &nb2){
+    Scs res;
+    scs_set(&(res.scsnb), &(nb2.scsnb));
+    scs_mul_ui(&(res.scsnb), nb1);
+    return res;
+}
+void inline Scs::operator*=(Scs &nb) {
+    scs_mul(&(this->scsnb), &(this->scsnb), &(nb.scsnb));
+}
+void inline Scs::operator*=(const double nb) {
+    Scs op;
+    scs_set_d(&(op.scsnb), nb);
+    scs_mul(&(this->scsnb), &(this->scsnb), &(op.scsnb));
+}
+void inline Scs::operator*=(const int nb) {
+    scs_mul_ui(&(this->scsnb), nb);
+}
+
+
+
+/*****************
+ * DIVISION
+ *****************/
+inline Scs operator/(Scs &nb1,Scs &nb2){
+    Scs res;    scs_div(&(res.scsnb), &(nb1.scsnb), &(nb2.scsnb));
+    return res;
+}
+inline Scs operator/(Scs &nb1, const double &nb2){
+    Scs res, op;
+    scs_set_d(&(op.scsnb), nb2);
+    scs_div(&(res.scsnb), &(nb1.scsnb), &(op.scsnb));
+    return res;
+}
+inline Scs operator/(const double &nb1, Scs &nb2){
+    Scs res, op;
+    scs_set_d(&(op.scsnb), nb1);
+    scs_div(&(res.scsnb), &(nb2.scsnb), &(op.scsnb));
+    return res;
+}
+void inline Scs::operator/=(Scs &nb) {
+    scs_div(&(this->scsnb), &(this->scsnb), &(nb.scsnb));
+}
+void inline Scs::operator/=(const double nb) {
+    Scs op;
+    scs_set_d(&(op.scsnb), nb);
+    scs_div(&(this->scsnb), &(this->scsnb), &(op.scsnb));
+}
+
+
+
+/*************
+ * COMPARISON
+ *************/
+inline bool operator==(Scs &nb1, Scs &nb2){
+  unsigned int i;
+  bool b=1;
+  
+  for(i=0; i<SCS_NB_WORDS; i++) 
+      if (nb1.scsnb.h_word[i] == nb2.scsnb.h_word[i]) b=0;
+  
+  return ((nb1.scsnb.exception.d == nb2.scsnb.exception.d)&&
+	  (nb1.scsnb.index == nb2.scsnb.index)&&
+	  (nb1.scsnb.sign  == nb2.scsnb.sign)&& b);
+}
+inline bool operator!=(Scs &nb1, Scs &nb2){
+    return !(nb1==nb2);
+}
+inline bool operator<=(Scs &nb1, Scs &nb2){
+    return ((nb1.scsnb.exception.d <= nb2.scsnb.exception.d)&&
+	    (nb1.scsnb.sign  <= nb2.scsnb.sign)&&
+	    ((nb1.scsnb.index < nb2.scsnb.index)||
+	     ((nb1.scsnb.index == nb2.scsnb.index)&&
+	      (scs_cmp_mant(&(nb1.scsnb), &(nb2.scsnb))<=0))));
+}
+inline bool operator>=(Scs &nb1, Scs &nb2){
+    return ((nb1.scsnb.exception.d >= nb2.scsnb.exception.d)&&
+	    (nb1.scsnb.sign  >= nb2.scsnb.sign)&&
+	    ((nb1.scsnb.index > nb2.scsnb.index)||
+	     ((nb1.scsnb.index == nb2.scsnb.index)&&
+	      (scs_cmp_mant(&(nb1.scsnb), &(nb2.scsnb))>=0))));
+}
+inline bool operator<(Scs &nb1, Scs &nb2){
+    return ((nb1.scsnb.exception.d <= nb2.scsnb.exception.d)&&
+	    (nb1.scsnb.sign  <= nb2.scsnb.sign)&&
+	    ((nb1.scsnb.index < nb2.scsnb.index)||
+	     ((nb1.scsnb.index == nb2.scsnb.index)&&
+	      (scs_cmp_mant(&(nb1.scsnb), &(nb2.scsnb))<0))));
+}
+inline bool operator>(Scs &nb1, Scs &nb2){
+    return ((nb1.scsnb.exception.d >= nb2.scsnb.exception.d)&&
+	    (nb1.scsnb.sign  >= nb2.scsnb.sign)&&
+	    ((nb1.scsnb.index > nb2.scsnb.index)||
+	     ((nb1.scsnb.index == nb2.scsnb.index)&&
+	      (scs_cmp_mant(&(nb1.scsnb), &(nb2.scsnb))>0))));
+}
+
+
+
+
+/****************
+ * RANDOM NUMBER
+ ****************/
+inline Scs Scs::rand(void){
+    scs_rand(&(this->scsnb), 200); 
+    return *this;
+}
+
+
+
+
+/*************** 
+ * OUTPUT (in hexadecimal)
+ ***************/ 
+ostream &operator<<(ostream &os, const Scs &a){
+    Scs aa, p, zer;
+    double d;
+    char buffer[10];
+    int e, exposant;
+    bool bb;
+
+    if (a.scsnb.exception.d != 1.){
+	os << (double)a.scsnb.exception.d;
+    }else {
+	if (a.scsnb.sign == -1)
+	    os << '-';
+	
+	aa = fabs(a);
+
+	/* Compute the exposant in radix 16 */
+	d = ((a.scsnb.index)*SCS_NB_BITS)/4;
+	e = 4*(int)floor(d);
+
+	p = 1;
+	p.scsnb.index = (int)floor(((double)e)/SCS_NB_BITS);
+	p.scsnb.h_word[0] = 1 << e - p.scsnb.index*SCS_NB_BITS;
+	exposant = (int)floor(d);
+	p /= 16;
+	exposant--;
+	while(p <= aa){
+	    p *= 16;
+	    exposant++;
+	}
+	p /= 16;
+	exposant--;
+	
+	/* Extract digits */
+	aa = aa / p;
+	sprintf(buffer,"%x", aa.scsnb.h_word[0]);
+	os << buffer << ".";
+	aa.scsnb.h_word[0] = 0;
+	aa *= 16;
+	
+	bb = 1;
+	while(bb){
+	    sprintf(buffer,"%x", aa.scsnb.h_word[0]);
+	    os << buffer;
+	    aa.scsnb.h_word[0] = 0;
+	    aa *= 16;
+
+	    bb = 0;
+	    for(int i=0; i<SCS_NB_WORDS; i++)
+		if (aa.scsnb.h_word[i] != 0) bb=1;
+	}
+
+	/* Write the exponent */
+	os << " x16^(" << exposant <<")";
+    } 
+    
+    return os;
+}
+
+
+/*************** 
+ * INPUT (in decimal)
+ ***************/ 
+istream& operator>>(istream &is, Scs &a){
+    char c;
+    int nd = 0;
+    int point = -1;
+    int ex;
+    bool done = false;
+    Scs r;
+
+    r = 0;
+
+    /* Skip any leading spaces */
+    do{
+	is>>c;
+    }while (c == ' ');
+
+    /* Read sign, digits, and exponent */
+    while (!done && (c != '\0')) {
+	if (c >= '0' && c <= '9') {
+	    int d = c - '0';
+	    r *= 10.0;
+	    r += d;
+	    nd++;
+	} else {
+	    switch (c) {
+	    case '.':
+		point = nd;
+		break;
+	    case '-':
+	    case '+':
+		if (nd > 0){
+		    a = 0;
+		    done = true;
+		    point = -1;
+		    ex = 0;
+		}
+		a.scsnb.sign = (c == '-') ? -1 : 1;
+		break;
+	    case 'E':
+	    case 'e':
+		is >> ex;
+		done = true;
+		break;
+	    default:
+		a = 0;
+		done = true;
+		point = -1;
+		ex = 0;
+	    }
+	}
+	is>>c;
+    }
+
+    if (point >= 0) 
+	ex -= (nd - point);
+    
+    
+    if (ex != 0) {
+	if (ex > 0)
+	    for(int i=0; i<ex; i++)
+		r *= 10;
+	if (ex < 0){
+	    Scs inv_ten, ten;
+	    ten = 10;
+	    scs_inv(&(inv_ten.scsnb), &(ten.scsnb) );
+	    for(int i=0; i>ex; i--)
+		r *= inv_ten;
+	}
+    }
+}
+#endif
+
+
diff --git a/src/crlibm/scs_lib/zero_scs.c b/src/crlibm/scs_lib/zero_scs.c
new file mode 100644
index 0000000..f9c1b3a
--- /dev/null
+++ b/src/crlibm/scs_lib/zero_scs.c
@@ -0,0 +1,52 @@
+/** Function for setting an SCS number to zero 
+ at file zero_scs.c
+
+ at author Defour David David.Defour at ens-lyon.fr
+ at author Florent de Dinechin Florent.de.Dinechin at ens-lyon.fr 
+
+ This file is part of the SCS library.
+*/
+
+/*
+Copyright (C) 2002  David Defour and Florent de Dinechin
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+
+#include "scs.h"
+#include "scs_private.h"
+
+
+/** Set a SCS number to zero.
+There should be a few simple functions in this library.
+ */
+
+
+
+void inline scs_zero(scs_ptr result) {
+  int i;
+
+  for(i=0; i<SCS_NB_WORDS; i++)
+    R_HW[i] = 0;
+
+  R_EXP = 0;
+  R_IND = 0;
+  R_SGN = 1;
+}
+
+
+
diff --git a/src/crlibm/trigo_accurate.c b/src/crlibm/trigo_accurate.c
new file mode 100644
index 0000000..d35f040
--- /dev/null
+++ b/src/crlibm/trigo_accurate.c
@@ -0,0 +1,501 @@
+/*
+ * Correctly rounded trigonometric functions
+ *
+ * Author : Catherine Daramy, David Defour, Florent de Dinechin
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include "trigo_accurate.h"
+
+
+/*
+ *
+ * 1) Range reduction if needed ... x in [-Pi/4, +Pi/4]
+ *
+ * 2) call cosine, sine or tan polynomial
+ *
+ * Polynomials are vastly too accurate.
+ */   
+
+
+
+extern int rem_pio2_scs(scs_ptr, scs_ptr);
+
+
+/* Polynomial evaluation of sin(x) over [-Pi/4, +Pi/4] 	
+   Approximation error lower than  2^(-133) */
+
+static void scs_sin(scs_ptr x){
+  scs_t res_scs;
+  scs_t x2;
+  int i;
+ 
+  scs_square(x2, x);
+  scs_mul(res_scs, sin_scs_poly_ptr[0], x2);
+
+  for(i=1; i<(DEGREE_SIN_SCS-1)/2; i++){ /* Last coeff is one, not read from the file*/
+    scs_add(res_scs, sin_scs_poly_ptr[i], res_scs);
+    scs_mul(res_scs, res_scs, x2);
+  } 
+  scs_mul(res_scs, res_scs, x);
+  scs_add(x, x, res_scs);
+
+  return;
+}
+
+
+/* Polynomial evaluation of cos(x) over [-Pi/4, +Pi/4] 
+   Approximation error lower than  2^(-128) */
+
+static void scs_cos(scs_ptr x){
+  scs_t res_scs;
+  scs_t x2;
+  int i;
+
+  scs_square(x2, x);
+  scs_mul(res_scs, cos_scs_poly_ptr[0], x2);
+  for(i=1; i<DEGREE_COS_SCS/2; i++){
+    scs_add(res_scs, cos_scs_poly_ptr[i], res_scs);
+    scs_mul(res_scs, res_scs, x2);
+  }
+  /* The last coefficient is exactly one and is not read from the file */
+  scs_add(x, res_scs, SCS_ONE);
+
+  return ;
+}
+
+
+
+
+
+
+
+
+double scs_sin_rn(double x){  
+  scs_t sc1, sc2;
+  double resd;
+  int N;
+
+
+#if EVAL_PERF
+	crlibm_second_step_taken++;
+#endif
+
+  scs_set_d(sc1, x);
+  N = rem_pio2_scs(sc2, sc1);
+  N = N & 0x0000003;		/* extract the 2 last bits of  N */
+  switch (N){
+  case 0:
+    scs_sin(sc2);
+    scs_get_d(&resd, sc2);
+    return resd;
+  case 1:
+    scs_cos(sc2);
+    scs_get_d(&resd, sc2);
+    return resd;
+  case 2:
+    scs_sin(sc2);
+    scs_get_d(&resd, sc2);
+    return -resd;		
+  case 3:
+    scs_cos(sc2);
+    scs_get_d(&resd, sc2);
+    return -resd;
+    default:
+    fprintf(stderr,"ERREUR: %d is not a valid value in s_scs_sin \n", N);
+    return 0.0;
+  }
+}
+
+
+
+
+double scs_sin_rd(double x){  
+  scs_t sc1, sc2;
+  double resd;
+  int N;
+    
+#if EVAL_PERF
+	crlibm_second_step_taken++;
+#endif
+
+  scs_set_d(sc1, x);
+  N = rem_pio2_scs(sc2, sc1);
+  N = N & 0x0000003;		/* extract the 2 last bits of  N */
+  switch (N){
+  case 0:
+    scs_sin(sc2);
+    scs_get_d_minf(&resd, sc2);
+    return resd;
+  case 1:
+    scs_cos(sc2);
+    scs_get_d_minf(&resd, sc2);
+    return resd;
+  case 2:  
+    scs_sin(sc2);
+    scs_get_d_pinf(&resd, sc2);
+    return -resd;
+  case 3:
+    scs_cos(sc2);
+    scs_get_d_pinf(&resd, sc2);
+    return -resd;
+  default:
+    fprintf(stderr,"ERREUR: %d is not a valid value in s_scs_sin \n", N);
+    exit(1);
+  }
+  return resd;
+}
+
+
+
+
+double scs_sin_ru(double x){  
+  scs_t sc1, sc2;
+  double resd;
+  int N;
+
+#if EVAL_PERF
+	crlibm_second_step_taken++;
+#endif
+
+  scs_set_d(sc1, x);
+  N = rem_pio2_scs(sc2, sc1);
+  N = N & 0x0000003;		/* extract the 2 last bits of  N */
+  switch (N){
+  case 0:
+    scs_sin(sc2);
+    scs_get_d_pinf(&resd, sc2);
+    return resd;
+  case 1:
+    scs_cos(sc2);
+    scs_get_d_pinf(&resd, sc2);
+    return resd;
+   case 2:
+    scs_sin(sc2);
+    scs_get_d_minf(&resd, sc2);
+    return -resd;
+  case 3:
+    scs_cos(sc2);
+    scs_get_d_minf(&resd, sc2);
+    return -resd;
+  default:
+    fprintf(stderr,"ERREUR: %d is not a valid value in s_scs_sin \n", N);
+    exit(1);
+  }
+  return resd;
+}
+
+
+
+
+double scs_sin_rz(double x){  
+  scs_t sc1, sc2;
+  double resd;
+  int N;
+
+#if EVAL_PERF
+	crlibm_second_step_taken++;
+#endif
+
+  scs_set_d(sc1, x);
+  N = rem_pio2_scs(sc2, sc1);
+  N = N & 0x0000003;		/* extract the 2 last bits of  N */
+  switch (N){
+  case 0:
+    scs_sin(sc2);
+    scs_get_d_zero(&resd, sc2);
+    return resd;
+  case 1:
+    scs_cos(sc2);
+    scs_get_d_zero(&resd, sc2);
+    return resd;
+   case 2:
+    scs_sin(sc2);
+    scs_get_d_zero(&resd, sc2);
+    return -resd;
+  case 3:
+    scs_cos(sc2);
+    scs_get_d_zero(&resd, sc2);
+    return -resd;
+  default:
+    fprintf(stderr,"ERREUR: %d is not a valid value in s_scs_sin \n", N);
+    exit(1);
+  }
+  return resd;
+}
+
+
+
+
+
+
+
+double scs_cos_rn(double x){ 
+  scs_t sc1, sc2;
+  double resd;
+  int N;
+
+#if EVAL_PERF
+	crlibm_second_step_taken++;
+#endif
+
+  scs_set_d(sc1, x);
+  N = rem_pio2_scs(sc2, sc1);
+  N = N & 0x0000003;		/* extract the 2 last bits of  N */
+  switch (N){
+  case 0:
+    scs_cos(sc2);
+    scs_get_d(&resd, sc2);
+    return resd;
+  case 1:
+    scs_sin(sc2);
+    scs_get_d(&resd, sc2);
+    return -resd;
+  case 2:
+    scs_cos(sc2);
+    scs_get_d(&resd, sc2);
+    return -resd;
+  case 3:
+    scs_sin(sc2);
+    scs_get_d(&resd, sc2);
+    return resd;
+  default:
+    fprintf(stderr,"ERREUR: %d is not a valid value in s_cos \n", N);
+    return 0.0;
+  }
+  
+}
+
+
+double scs_cos_rd(double x){ 
+  scs_t sc1, sc2;
+  double resd;
+  int N;
+
+#if EVAL_PERF
+	crlibm_second_step_taken++;
+#endif
+
+  scs_set_d(sc1, x);
+  N = rem_pio2_scs(sc2, sc1);
+  N = N & 0x0000003;		/* extract the 2 last bits of  N */
+  switch (N){
+  case 0:
+    scs_cos(sc2);
+    scs_get_d_minf(&resd, sc2);
+    return resd;
+  case 1:
+    scs_sin(sc2); 
+    scs_get_d_pinf(&resd, sc2);
+    return -resd;
+  case 2:
+    scs_cos(sc2); 
+    scs_get_d_pinf(&resd, sc2);
+    return -resd;
+  case 3:
+    scs_sin(sc2);
+    scs_get_d_minf(&resd, sc2);
+    return resd;
+  default:
+    fprintf(stderr,"ERREUR: %d is not a valid value in s_cos \n", N);
+    exit(1);
+  }
+  return resd;
+}
+
+
+double scs_cos_ru(double x){ 
+  scs_t sc1, sc2;
+  double resd;
+  int N;
+
+#if EVAL_PERF
+	crlibm_second_step_taken++;
+#endif
+
+  scs_set_d(sc1, x);
+  N = rem_pio2_scs(sc2, sc1);
+  N = N & 0x0000003;		/* extract the 2 last bits of  N */
+  switch (N){
+  case 0:
+    scs_cos(sc2);
+    scs_get_d_pinf(&resd, sc2);
+    return resd;
+  case 1:
+    scs_sin(sc2);
+    scs_get_d_minf(&resd, sc2);
+    return -resd;
+  case 2:
+    scs_cos(sc2);
+    scs_get_d_minf(&resd, sc2);
+    return -resd;
+  case 3:
+    scs_sin(sc2);
+    scs_get_d_pinf(&resd, sc2);
+    return resd;
+  default:
+    fprintf(stderr,"ERREUR: %d is not a valid value in s_cos \n", N);
+    exit(1);
+  }
+  return resd;
+}
+
+
+
+double scs_cos_rz(double x){ 
+  scs_t sc1, sc2;
+  double resd;
+  int N;
+
+#if EVAL_PERF
+	crlibm_second_step_taken++;
+#endif
+
+  scs_set_d(sc1, x);
+  N = rem_pio2_scs(sc2, sc1);
+  N = N & 0x0000003;		/* extract the 2 last bits of  N */
+  switch (N){
+  case 0:
+    scs_cos(sc2);
+    scs_get_d_zero(&resd, sc2);
+    return resd;
+  case 1:
+    scs_sin(sc2); 
+    scs_get_d_zero(&resd, sc2);
+    return -resd;
+  case 2:
+    scs_cos(sc2);
+    scs_get_d_zero(&resd, sc2);
+    return -resd;
+  case 3:
+    scs_sin(sc2);
+    scs_get_d_zero(&resd, sc2);
+    return resd;
+  default:
+    fprintf(stderr,"ERREUR: %d is not a valid value in s_cos \n", N);
+    exit(1);
+  }
+  return resd;
+}
+
+
+
+
+
+/*************************************************************
+ *                  Tangent                                  *
+ *************************************************************/
+
+
+/* The main function */
+
+static void scs_tan(double x, scs_ptr res_scs){
+  scs_t x_scs;
+  scs_t x2;
+  int i;
+   scs_t y_scs;
+  int N;
+
+  scs_set_d(x_scs, x);
+  
+
+  N = rem_pio2_scs(y_scs, x_scs); 	/* x (=sc2) is in [-Pi/4,Pi/4] */ 
+  N = N & 1;		/* extract the last bit of  N */
+  scs_square(x2, y_scs);
+
+  scs_mul(res_scs, tan_scs_poly_ptr[0], x2);
+  
+  for(i=1; i<(DEGREE_TAN_SCS-1)/2; i++){ /* The last coeff is not read from the file. */
+    scs_add(res_scs, tan_scs_poly_ptr[i], res_scs);
+    scs_mul(res_scs, res_scs, x2);
+  }
+  
+  scs_mul(res_scs, res_scs, y_scs);
+  scs_add(res_scs, y_scs, res_scs);
+  
+  if(N==1) {
+    scs_inv(res_scs, res_scs);
+    res_scs->sign = -res_scs->sign;
+  }
+}
+
+
+
+
+
+double scs_tan_rn(double x){  
+  scs_t res_scs;
+  double resd;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  scs_tan(x,res_scs);
+  scs_get_d(&resd, res_scs);
+  return resd;
+}
+
+
+
+double scs_tan_rd(double x){  
+  scs_t res_scs;
+  double resd;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  scs_tan(x,res_scs);
+  scs_get_d_minf(&resd, res_scs);
+  return resd;
+}
+
+
+
+double scs_tan_ru(double x){  
+  scs_t res_scs;
+  double resd;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  scs_tan(x,res_scs);
+  scs_get_d_pinf(&resd, res_scs);
+  return resd;
+}
+
+
+
+double scs_tan_rz(double x){  
+  scs_t res_scs;
+  double resd;
+
+#if EVAL_PERF
+  crlibm_second_step_taken++;
+#endif
+
+  scs_tan(x,res_scs);
+  scs_get_d_zero(&resd, res_scs);
+  return resd;
+}
+
+
diff --git a/src/crlibm/trigo_accurate.h b/src/crlibm/trigo_accurate.h
new file mode 100644
index 0000000..7a6fe09
--- /dev/null
+++ b/src/crlibm/trigo_accurate.h
@@ -0,0 +1,331 @@
+/*File generated by maple/trigo.mpl*/
+
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+#define DEGREE_SIN_SCS  25 
+#define DEGREE_COS_SCS  26 
+#define DEGREE_TAN_SCS  69 
+
+#define  sin_scs_poly_ptr (scs_ptr)&sin_scs_poly 
+#define  cos_scs_poly_ptr (scs_ptr)&cos_scs_poly 
+#define  tan_scs_poly_ptr (scs_ptr)&tan_scs_poly 
+
+static const scs sin_scs_poly [13]=
+/* ~6.41304778336249081566343888442398912691656493764128e-26 */ 
+{{{0x0000004f, 0x18f09e97, 0x212a5b47, 0x39f049a7, 
+0x3bd24b7b, 0x23af8e4a, 0x34d618d1, 0x013262b6},
+DB_ONE,  -3,   1 } 
+,
+/* ~-3.86811532168049337542273735719002682824970072395874e-23 */ 
+{{0x0000bb0c, 0x3cb17c1e, 0x37e81e1a, 0x37195774, 
+0x129a10ee, 0x1f4e5bd3, 0x14c6fde7, 0x15d2d8fd},
+DB_ONE,  -3,  -1 } 
+,
+/* ~1.95729405534209807707389556511391204655008788789058e-20 */ 
+{{0x0171b8ee, 0x330c68b0, 0x185bd7cd, 0x085a8b04, 
+0x00c4a269, 0x38b64e54, 0x18d2c602, 0x292ac5c1},
+DB_ONE,  -3,   1 } 
+,
+/* ~-8.22063524632359448147958406923548651998620031502275e-18 */ 
+{{0x00000009, 0x1e9368cf, 0x32371688, 0x0021bd52, 
+0x19613de4, 0x2e9e92f1, 0x27c78771, 0x3f5cc281},
+DB_ONE,  -2,  -1 } 
+,
+/* ~2.81145725434540361996328805963492166242366185016172e-15 */ 
+{{0x00000ca9, 0x18ee0615, 0x210b66bb, 0x339e7ef6, 
+0x2c29a154, 0x1f2d1a6e, 0x0dbea028, 0x1214063f},
+DB_ONE,  -2,   1 } 
+,
+/* ~-7.64716373181981617151041618487160223947055132654927e-13 */ 
+{{0x000d73f9, 0x3ce67703, 0x36256279, 0x0f1440e6, 
+0x24128080, 0x2e0c47a6, 0x27b32155, 0x2f115571},
+DB_ONE,  -2,  -1 } 
+,
+/* ~1.60590438368216145988717363310806625253064912470338e-10 */ 
+{{0x0b092309, 0x350da12f, 0x24b28056, 0x31def2f9, 
+0x24044621, 0x074f188c, 0x3829c278, 0x09324bdd},
+DB_ONE,  -2,   1 } 
+,
+/* ~-2.50521083854417187750515438912201232789985352336291e-08 */ 
+{{0x0000001a, 0x399159fd, 0x144e38fe, 0x1d141fdb, 
+0x1666d4df, 0x1bf80c34, 0x17ad2747, 0x0566e4f9},
+DB_ONE,  -1,  -1 } 
+,
+/* ~2.75573192239858906525573188629015139728734265040299e-06 */ 
+{{0x00000b8e, 0x3c74aad8, 0x399c7d56, 0x03906123, 
+0x2a904384, 0x14010ddd, 0x155495d5, 0x0daca530},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.98412698412698412698412698411505245319877050168798e-04 */ 
+{{0x00034034, 0x00d00d00, 0x34034034, 0x00d006ce, 
+0x348eca38, 0x3f5dd48f, 0x205a5108, 0x07e84299},
+DB_ONE,  -1,  -1 } 
+,
+/* ~8.33333333333333333333333333333331789325780263439286e-03 */ 
+{{0x00888888, 0x22222222, 0x08888888, 0x2222220d, 
+0x270976f8, 0x08cd270c, 0x22fa3253, 0x22fd1924},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.66666666666666666666666666666666666633597567091248e-01 */ 
+{{0x0aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa, 
+0x27da7c46, 0x26422150, 0x2f255a8c, 0x055ff185},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.00000000000000000000000000000000000000000000000000e+00 */ 
+{{0x00000001, 0x00000000, 0x00000000, 0x00000000, 
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+DB_ONE,   0,   1 } 
+};
+
+
+static const scs cos_scs_poly [14]=
+/* ~-2.46647929292600518676295332824511712550323986955787e-27 */ 
+{{{0x00000003, 0x036a24af, 0x0b960021, 0x36ab92b4, 
+0x251cbcb3, 0x24a97fbb, 0x175c8edb, 0x26ff1299},
+DB_ONE,  -3,  -1 } 
+,
+/* ~1.61171432886064441126907703621370209480774221167915e-24 */ 
+{{0x000007cb, 0x0d2a2e99, 0x10f8748e, 0x389f34e6, 
+0x2313bd8f, 0x20be0984, 0x333a6d8e, 0x1b807806},
+DB_ONE,  -3,   1 } 
+,
+/* ~-8.89679115256512652448661798519024218223622120108391e-22 */ 
+{{0x0010ce39, 0x1987726f, 0x1eea7e37, 0x1ddf4cfa, 
+0x1ec5b5c4, 0x120cb52e, 0x37c988dc, 0x0a3377ba},
+DB_ONE,  -3,  -1 } 
+,
+/* ~4.11031762315246203111669239627818651812500805916919e-19 */ 
+{{0x1e542ba3, 0x3f3c9ecf, 0x00267a43, 0x134ef26e, 
+0x1ff9a381, 0x26109691, 0x3d30a560, 0x223f772e},
+DB_ONE,  -3,   1 } 
+,
+/* ~-1.56192069685855088499658490258665358909888204805953e-16 */ 
+{{0x000000b4, 0x04f0c772, 0x3e3a3149, 0x04b97d58, 
+0x13ea02e8, 0x370088b3, 0x212bb00b, 0x06497545},
+DB_ONE,  -2,  -1 } 
+,
+/* ~4.77947733238738507613572564831414572436923450558343e-14 */ 
+{{0x0000d73f, 0x27ce6770, 0x0f5c0984, 0x0a909e14, 
+0x043eaabb, 0x3925da80, 0x0d2bb88b, 0x1b8d9c50},
+DB_ONE,  -2,   1 } 
+,
+/* ~-1.14707455977297247133847313888206952874744927320517e-11 */ 
+{{0x00c9cba5, 0x1180f93a, 0x1053f6e9, 0x07a12245, 
+0x25d6d8fe, 0x0183a89f, 0x11fe0ecc, 0x116ceaf8},
+DB_ONE,  -2,  -1 } 
+,
+/* ~2.08767569878680989792094302574029159968587056449638e-09 */ 
+{{0x00000002, 0x0f76c77f, 0x31b12f6a, 0x226bf583, 
+0x38324c53, 0x0bebff35, 0x1d8aa929, 0x0902e04a},
+DB_ONE,  -1,   1 } 
+,
+/* ~-2.75573192239858906525573186252547032413218294797050e-07 */ 
+{{0x00000127, 0x393edde2, 0x1f5c72ef, 0x005b3093, 
+0x064ee888, 0x10be8aa5, 0x3b5ca412, 0x36d45cbe},
+DB_ONE,  -1,  -1 } 
+,
+/* ~2.48015873015873015873015873012641551756418143632119e-05 */ 
+{{0x00006806, 0x201a01a0, 0x06806806, 0x2019fff2, 
+0x243ec0f6, 0x3857f8fc, 0x1e36a7c0, 0x0c2c43d2},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.38888888888888888888888888888887982865405653380695e-03 */ 
+{{0x0016c16c, 0x05b05b05, 0x2c16c16c, 0x05b05af9, 
+0x29545050, 0x0f1975d1, 0x0cc59466, 0x3fbcae72},
+DB_ONE,  -1,  -1 } 
+,
+/* ~4.16666666666666666666666666666666665668698162855937e-02 */ 
+{{0x02aaaaaa, 0x2aaaaaaa, 0x2aaaaaaa, 0x2aaaaaaa, 
+0x222d48a2, 0x0e242eac, 0x1247b316, 0x3b9fbfe1},
+DB_ONE,  -1,   1 } 
+,
+/* ~-4.99999999999999999999999999999999999999817875826704e-01 */ 
+{{0x1fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff, 
+0x3ffc089f, 0x2c68799b, 0x0b48bbde, 0x2ea8aa51},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.00000000000000000000000000000000000000000000000000e+00 */ 
+{{0x00000001, 0x00000000, 0x00000000, 0x00000000, 
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+DB_ONE,   0,   1 } 
+};
+
+
+static const scs tan_scs_poly [35]=
+/* ~4.19304248008015673367346745301068970533039252359331e-12 */ 
+{{{0x0049c3c8, 0x3614b771, 0x24336d30, 0x18260f52, 
+0x1c63a612, 0x3c9708b1, 0x2c030207, 0x3b60a762},
+DB_ONE,  -2,   1 } 
+,
+/* ~-3.36706575103240667705547059415226434034305176587654e-11 */ 
+{{0x02505729, 0x078bbff7, 0x277b7292, 0x2ae76500, 
+0x3326025d, 0x0785010a, 0x2e88ed52, 0x23a7933a},
+DB_ONE,  -2,  -1 } 
+,
+/* ~1.37767867318476248799250258961217380776040310955523e-10 */ 
+{{0x0977a350, 0x3804d188, 0x2d3b121c, 0x3b0228d8, 
+0x002a8c44, 0x2d5dfc73, 0x2507d88e, 0x3cfff02b},
+DB_ONE,  -2,   1 } 
+,
+/* ~-3.65061594065798937565902299436877921270308616808248e-10 */ 
+{{0x19163b42, 0x137d2c1b, 0x19fd92a2, 0x1d367da1, 
+0x28a08aa6, 0x19489cc8, 0x2fbf37c1, 0x2a39fb53},
+DB_ONE,  -2,  -1 } 
+,
+/* ~7.07244120811389943078195053689224634883725238108269e-10 */ 
+{{0x3099f85b, 0x38f9459b, 0x195e2a8d, 0x3797159c, 
+0x34148387, 0x3b401948, 0x1983fd31, 0x184ad9fd},
+DB_ONE,  -2,   1 } 
+,
+/* ~-1.04501041542939812062419752159269710100683051724611e-09 */ 
+{{0x00000001, 0x07d00484, 0x1f25e4fe, 0x34768b93, 
+0x3b55eb65, 0x12227622, 0x04fedebc, 0x2e961f5c},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.25002445075359892223710684907004440385587934042993e-09 */ 
+{{0x00000001, 0x15e6a9a6, 0x23b954f6, 0x248f5fba, 
+0x38fabeaf, 0x059e710a, 0x3e68659e, 0x08f9d054},
+DB_ONE,  -1,   1 } 
+,
+/* ~-1.17970967862051201631515521131934092286748635204441e-09 */ 
+{{0x00000001, 0x1111ac11, 0x2b29b510, 0x0408b38c, 
+0x29617027, 0x289298c6, 0x2fe4c001, 0x34903af7},
+DB_ONE,  -1,  -1 } 
+,
+/* ~1.01504782471787319555323236139271916057005781543881e-09 */ 
+{{0x00000001, 0x05c0e901, 0x1495b536, 0x3d0dceff, 
+0x11d27769, 0x314f4319, 0x2adb4907, 0x04581607},
+DB_ONE,  -1,   1 } 
+,
+/* ~-5.23224716917514023729869567637974110005720667650098e-10 */ 
+{{0x23f4aaa3, 0x3810e7e3, 0x377f317c, 0x118eb173, 
+0x271248c9, 0x0dc34f76, 0x38c69c1a, 0x1715bf81},
+DB_ONE,  -2,  -1 } 
+,
+/* ~6.84075783927905363651245539376244733085133140080869e-10 */ 
+{{0x2f026372, 0x048fabda, 0x157f9376, 0x1ee01201, 
+0x1d337305, 0x3277dac2, 0x0388ddbb, 0x1e444286},
+DB_ONE,  -2,   1 } 
+,
+/* ~5.90392308289226882244924529214622620104906585387600e-10 */ 
+{{0x28924a94, 0x186459bd, 0x07f03e85, 0x3c711128, 
+0x3ae6e0c9, 0x1e84f311, 0x3d3d9fe2, 0x186b0f23},
+DB_ONE,  -2,   1 } 
+,
+/* ~1.97885803554882259263714586727843568959917519849302e-09 */ 
+{{0x00000002, 0x07fc704f, 0x2fe41d64, 0x39e487cf, 
+0x184c49c2, 0x0bee9906, 0x1478fbed, 0x3b189f6a},
+DB_ONE,  -1,   1 } 
+,
+/* ~4.66924357822849164083933883654466829463908058807791e-09 */ 
+{{0x00000005, 0x00de33a3, 0x25923c9c, 0x2ca62cba, 
+0x20bdef99, 0x128b5ff5, 0x3fc900ea, 0x04ca7a66},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.15959738194320052411880314174946234008645186820135e-08 */ 
+{{0x0000000c, 0x1cde875f, 0x11fe6b7a, 0x1bf8f0ee, 
+0x1fdaf92d, 0x3db0bd62, 0x15f329f2, 0x1aaaa7de},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.85891620102917727867302985486597414498702504078098e-08 */ 
+{{0x0000001e, 0x2ca1db60, 0x16b02396, 0x27782b2d, 
+0x13c68dde, 0x28c97a48, 0x1971af0d, 0x190791d2},
+DB_ONE,  -1,   1 } 
+,
+/* ~7.05468704925032913074778071743586293193594984535199e-08 */ 
+{{0x0000004b, 0x2ff1aba9, 0x215c7e5f, 0x0ec7c100, 
+0x29f9ff6e, 0x0f5a5e50, 0x1b028faf, 0x24fd23e7},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.74066092089222113091708523795806369314584635744294e-07 */ 
+{{0x000000ba, 0x39bb1378, 0x228e6aab, 0x1cd5a3f6, 
+0x0df50eb5, 0x2fe1339f, 0x3bf44406, 0x0623c42c},
+DB_ONE,  -1,   1 } 
+,
+/* ~4.29491124040745236871063166723486418908614935914252e-07 */ 
+{{0x000001cd, 0x0a67c230, 0x15e26fde, 0x2d6f2ed2, 
+0x1e5d5eed, 0x13306d09, 0x2bc7fd07, 0x3e19f2db},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.05972682972071952486859820141805093442802320377425e-06 */ 
+{{0x00000471, 0x37df8b71, 0x36c6ae8b, 0x247f572b, 
+0x11ae0684, 0x2c9d50b0, 0x3b8c1296, 0x142cbe10},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.61477115156382799612950555257222875670856895150216e-06 */ 
+{{0x00000af7, 0x25b48fd7, 0x22f9b7b5, 0x1bf47d23, 
+0x2d5e7cb4, 0x29eec735, 0x12e994fc, 0x38f234bd},
+DB_ONE,  -1,   1 } 
+,
+/* ~6.45168921562814305334220557964389527562662181436031e-06 */ 
+{{0x00001b0f, 0x1cb4fb69, 0x3117e917, 0x2d08cb65, 
+0x3ed33963, 0x11bb69f4, 0x0b13ad8f, 0x2ed16814},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.59189050693312274383546286106716190276142802345865e-05 */ 
+{{0x000042c4, 0x32d39a62, 0x3b08d8b5, 0x1a0a769d, 
+0x102ec25d, 0x27c1ccb1, 0x2d7c3ac9, 0x1484f03b},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.92783238833166802364700496685053984935780264819631e-05 */ 
+{{0x0000a4be, 0x31dd44a4, 0x21406dec, 0x00d8ae9b, 
+0x263ef3ac, 0x26d69803, 0x1d7f349d, 0x2a7a1ff7},
+DB_ONE,  -1,   1 } 
+,
+/* ~9.69153795692945116999068122084400485954578423200626e-05 */ 
+{{0x0001967e, 0x062bf2be, 0x2d29a81a, 0x3528530a, 
+0x2be09523, 0x150ffb17, 0x1543b0ee, 0x2e51e70c},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.39129114243552481118447657590127606492827347439830e-04 */ 
+{{0x0003eafa, 0x3b9a68b3, 0x083c6556, 0x3c8a24a1, 
+0x2485ea61, 0x0e5b9b2c, 0x2d16e9ba, 0x0700d411},
+DB_ONE,  -1,   1 } 
+,
+/* ~5.90027440945585981390430768333505444797856150283712e-04 */ 
+{{0x0009aac1, 0x09006ce8, 0x229156e9, 0x1010a671, 
+0x167b367e, 0x02d471c6, 0x33700cd8, 0x180a5404},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.45583438705131826824917380276818501608784487595954e-03 */ 
+{{0x0017da36, 0x114add78, 0x2b6a1c11, 0x39bc050b, 
+0x1fa62cde, 0x202525f2, 0x06797d2e, 0x188697d8},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.59212803657248101692546700427010326668047642683335e-03 */ 
+{{0x003ada7a, 0x070abeef, 0x36bf9822, 0x114b4de5, 
+0x29c19548, 0x21cff3b2, 0x1b67ac39, 0x3afe7677},
+DB_ONE,  -1,   1 } 
+,
+/* ~8.86323552990219656886323546095947145451052636633979e-03 */ 
+{{0x0091371a, 0x2bcd8479, 0x07ada8e1, 0x2d73a327, 
+0x39d10b36, 0x2a1371ab, 0x10b30f6e, 0x139bddaa},
+DB_ONE,  -1,   1 } 
+,
+/* ~2.18694885361552028218694885366767472933069912253187e-02 */ 
+{{0x01664f48, 0x20b043e7, 0x332d6bba, 0x1281f45d, 
+0x05c107b1, 0x0b2e1a96, 0x378ae51e, 0x2c9d2be3},
+DB_ONE,  -1,   1 } 
+,
+/* ~5.39682539682539682539682539682518643701644736548166e-02 */ 
+{{0x03743743, 0x1d0dd0dd, 0x03743743, 0x1d0dc5f0, 
+0x20d05868, 0x240b23be, 0x38da29df, 0x3866f03c},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.33333333333333333333333333333333336718465844517559e-01 */ 
+{{0x08888888, 0x22222222, 0x08888888, 0x22222226, 
+0x288230ee, 0x27ff32df, 0x1b2f8f82, 0x12608ad5},
+DB_ONE,  -1,   1 } 
+,
+/* ~3.33333333333333333333333333333333333332426548650668e-01 */ 
+{{0x15555555, 0x15555555, 0x15555555, 0x15555555, 
+0x154195d6, 0x3f2e970a, 0x24a360e2, 0x3f8caf8e},
+DB_ONE,  -1,   1 } 
+,
+/* ~1.00000000000000000000000000000000000000000000000000e+00 */ 
+{{0x00000001, 0x00000000, 0x00000000, 0x00000000, 
+0x00000000, 0x00000000, 0x00000000, 0x00000000},
+DB_ONE,   0,   1 } 
+};
+
diff --git a/src/crlibm/trigo_fast.c b/src/crlibm/trigo_fast.c
new file mode 100644
index 0000000..25c2274
--- /dev/null
+++ b/src/crlibm/trigo_fast.c
@@ -0,0 +1,1243 @@
+/*
+ * Correctly rounded trigonometric functions
+ *
+ * Author : Catherine Daramy, Florent de Dinechin, David Defour
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+#include "crlibm_private.h"
+#include "trigo_fast.h"
+
+extern double scs_sin_rn(double);
+extern double scs_sin_ru(double);
+extern double scs_sin_rd(double);
+extern double scs_sin_rz(double);
+extern double scs_cos_rn(double);
+extern double scs_cos_ru(double);
+extern double scs_cos_rd(double);
+extern double scs_cos_rz(double);
+extern double scs_tan_rn(double); 
+extern double scs_tan_rd(double);  
+extern double scs_tan_ru(double);  
+extern double scs_tan_rz(double);  
+extern int rem_pio2_scs(scs_ptr, scs_ptr);
+
+
+/* 
+
+How these functions work:
+
+The trig range reduction in crlibm computes an integer k and a reduced
+argument y such that
+
+x = k.Pi/256 + y
+
+with the reduced argument y directly in -Pi/512, Pi/512.  
+(Pi/512 < 4/512 = 2^-7)
+y is computed as a double-double yh+yl
+
+Then we read off a table 
+
+  sah+sal ~ sin(kPi/256)
+  cah+cal ~ cos(kPi/256)
+
+and we use the reconstruction 
+
+  sin(kPi/256 + y) = sin(kPi/256)cos(y) + cos(kPi/256)sin(y)
+  cos(kPi/256 + y) = cos(kPi/256)cos(y) - sin(kPi/256)sin(y)
+
+where cos(y) and sin(y) are computed as unevaluated 1+tc and (yh+yl)(1+ts)
+respectively, where tc and ts are doubles resulting from a small
+polynomial approximation.
+This gives 14 extra bits of accuracy, so this first step is very accurate.
+
+
+Why not use accurate tables as defined by Gal ?
+
+In short, because Gal's fast approach only gives as many additiona bits 
+as you've got to address the table (so we are limited to 7 if we limit 
+the table size to 4KB), and we need more to have a good average performance. 
+From a performance point of view we probably lose a few cycles: There
+is 4 values to read in our scheme compared to 3 in Gal's method. The
+reconstruction costs a few floating-point operations more (not that
+many, if you look in details and want to ensure more than 7 extra
+bits).
+ 
+Now for the advantages:
+1/ The whole thing is simpler
+2/ We have much more accuracy in the table, which simplifies the proof.  
+3/ We will be able to reuse the same table values to speed up the
+second step (just tabulating a third double such that the three-double
+approx of sin/cos(kPi/256) will be summed exactly into an SCS number)
+
+
+
+Now a word on range reduction:
+
+We have 4 possible range reductions: 
+
+Cody and Waite with 2 constants (the fastest)
+Cody and Waite with 3 constants (almost as fast)
+Cody and Waite with 3 constants in double-double and k a long-long int
+Payne and Hanek, implemented in SCS (the slowest).
+
+Each of these range reductions except Payne and Hanek is valid for x
+smaller than some bound. 
+
+This range reduction may cancel up to 62 bits according to a program
+by Kahan/Douglas available in Muller's book and implemented as
+function WorstCaseForAdditiveRangeReduction in common-procedures.mpl
+However this is not a concern unless x is close to a multiple of Pi/2
+(that is k&127==0): in the general case the reconstruction will add a
+tabulated non-zero value, so the error to consider in the range
+reduction is the absolute error. Only in the cases when k&127==0 do we
+need to have 62 extra bits to compute with. This is ensured by using a
+slower, more accurate range reduction. This test for k&127==0 actually
+speeds up even these cases, because in these cases there is no table
+to read and no reconstruction to do : a simple approximation to the
+function suffices.
+
+
+Why not use Payne and Hanek only as in Markstein's book ?  Because
+our scheme, in the absence of FMA, is much faster for small values
+which are the most used.
+
+Markstein takes as reduced argument the fractional part of x*256/Pi, 
+(or maybe it's 512 in his case), so he's got the same tables as we have, 
+but different polynomials (which compute sin(2Pi*y) and cos(2Pi*y).
+
+
+
+
+
+ */
+
+
+
+
+#define DEBUG 0
+/* TODO: 
+
+ - in the Cody and Waite, the kd=double(k) should be replaced with a single substraction of the magic number of Double2Int
+
+ - In some Cody and Waite there are Mul12 involving k, CH and CM. They
+	 can be improved by pre-splitting CH, CM (tabulated values)
+	 and k (as an int) Then you can improve the precision by
+	 taking kmax into account
+
+ - The first coefficient of the cosine polynomial is equal exactly
+   to 1/2 and this should be modified in order to increase to accuracy
+   of the approximation.
+
+ - The second step should get the reduced argument from the first step
+   (and use the same argument reduction). This should lead to 5x
+   improvement of the worst case.
+
+ - in the tangent there are three steps. This could be studied for the
+   other functions
+*/
+
+
+static int rem_pio256_scs(scs_ptr result, const scs_ptr x){
+  uint64_t r[SCS_NB_WORDS+3], tmp;
+  unsigned int N;
+
+  /* result r[0],...,r[10] could store till 300 bits of precision */
+
+  /* that is really enough for computing the reduced argument */
+  int sign, i, j, ind;
+  int *digits_256_over_pi_pt;
+
+  if ((X_EXP != 1)||(X_IND < -2)){
+    scs_set(result, x);
+    return 0;
+  }
+  
+  /* Compute the product |x| * 256/Pi */
+  if ((X_IND == -2)){
+    r[0] =  0;    r[1] =  0;
+    r[2] =  (uint64_t)(digits_256_over_pi[0]) * X_HW[0];
+    r[3] = ((uint64_t)(digits_256_over_pi[0]) * X_HW[1]
+	   +(uint64_t)(digits_256_over_pi[1]) * X_HW[0]);
+    if(X_HW[2] == 0){
+      for(i=4; i<(SCS_NB_WORDS+3); i++){   
+	r[i] = ((uint64_t)(digits_256_over_pi[i-3]) * X_HW[1]
+	       +(uint64_t)(digits_256_over_pi[i-2]) * X_HW[0]);
+      }}else {
+	for(i=4; i<(SCS_NB_WORDS+3); i++){   
+	  r[i] = ((uint64_t)(digits_256_over_pi[i-4]) * X_HW[2]
+		 +(uint64_t)(digits_256_over_pi[i-3]) * X_HW[1]
+		 +(uint64_t)(digits_256_over_pi[i-2]) * X_HW[0]);
+	}
+      }
+  }else {
+    if (X_IND == -1){
+      r[0] =  0;
+      r[1] =  (uint64_t)(digits_256_over_pi[0]) * X_HW[0];
+      r[2] = ((uint64_t)(digits_256_over_pi[0]) * X_HW[1]
+	     +(uint64_t)(digits_256_over_pi[1]) * X_HW[0]);
+      if(X_HW[2] == 0){
+	for(i=3; i<(SCS_NB_WORDS+3); i++){   
+	  r[i] = ((uint64_t)(digits_256_over_pi[i-2]) * X_HW[1]
+		 +(uint64_t)(digits_256_over_pi[i-1]) * X_HW[0]);
+	}}else {
+	  for(i=3; i<(SCS_NB_WORDS+3); i++){   
+	    r[i] = ((uint64_t)(digits_256_over_pi[i-3]) * X_HW[2]
+		   +(uint64_t)(digits_256_over_pi[i-2]) * X_HW[1]
+		   +(uint64_t)(digits_256_over_pi[i-1]) * X_HW[0]);
+	  }}
+    }else {
+      if (X_IND == 0){
+	r[0] =  (uint64_t)(digits_256_over_pi[0]) * X_HW[0];
+	r[1] = ((uint64_t)(digits_256_over_pi[0]) * X_HW[1]
+	       +(uint64_t)(digits_256_over_pi[1]) * X_HW[0]);
+	if(X_HW[2] == 0){
+	  for(i=2; i<(SCS_NB_WORDS+3); i++){   
+	    r[i] = ((uint64_t)(digits_256_over_pi[i-1]) * X_HW[1]
+		   +(uint64_t)(digits_256_over_pi[ i ]) * X_HW[0]);
+	  }}else {
+	    for(i=2; i<(SCS_NB_WORDS+3); i++){   
+	      r[i] = ((uint64_t)(digits_256_over_pi[i-2]) * X_HW[2]
+		     +(uint64_t)(digits_256_over_pi[i-1]) * X_HW[1]
+		     +(uint64_t)(digits_256_over_pi[ i ]) * X_HW[0]);
+	    }}
+      }else {
+	if (X_IND == 1){
+  	  r[0] = ((uint64_t)(digits_256_over_pi[0]) * X_HW[1]
+		 +(uint64_t)(digits_256_over_pi[1]) * X_HW[0]);
+	  if(X_HW[2] == 0){
+	    for(i=1; i<(SCS_NB_WORDS+3); i++){   
+	      r[i] = ((uint64_t)(digits_256_over_pi[ i ]) * X_HW[1]
+		     +(uint64_t)(digits_256_over_pi[i+1]) * X_HW[0]);
+	    }}else {
+	      for(i=1; i<(SCS_NB_WORDS+3); i++){   
+		r[i] = ((uint64_t)(digits_256_over_pi[i-1]) * X_HW[2]
+		       +(uint64_t)(digits_256_over_pi[ i ]) * X_HW[1]
+		       +(uint64_t)(digits_256_over_pi[i+1]) * X_HW[0]);
+	      }}
+	}else {
+	  ind = (X_IND - 2);
+	  digits_256_over_pi_pt = (int*)&(digits_256_over_pi[ind]);
+	  if(X_HW[2] == 0){
+	    for(i=0; i<(SCS_NB_WORDS+3); i++){   
+	      r[i] = ((uint64_t)(digits_256_over_pi_pt[i+1]) * X_HW[1]
+		     +(uint64_t)(digits_256_over_pi_pt[i+2]) * X_HW[0]);
+	    }}else {
+	      for(i=0; i<(SCS_NB_WORDS+3); i++){   
+		r[i] = ((uint64_t)(digits_256_over_pi_pt[ i ]) * X_HW[2]
+		       +(uint64_t)(digits_256_over_pi_pt[i+1]) * X_HW[1]
+		       +(uint64_t)(digits_256_over_pi_pt[i+2]) * X_HW[0]);
+	      }
+	    }
+	}
+      }
+    }
+  }
+      
+  /* Carry propagate */
+  r[SCS_NB_WORDS+1] += r[SCS_NB_WORDS+2]>>30;
+  for(i=(SCS_NB_WORDS+1); i>0; i--) {tmp=r[i]>>30;   r[i-1] += tmp;  r[i] -= (tmp<<30);}  
+  /* The integer part is in r[0] */
+  N = r[0];
+
+
+  if (r[1] > (SCS_RADIX)/2){	/* test if the reduced part is bigger than Pi/4 */
+    N += 1;
+    sign = -1;
+    for(i=1; i<(SCS_NB_WORDS+3); i++) { r[i]=((~(unsigned int)(r[i])) & 0x3fffffff);}
+  } 
+  else
+    sign = 1; 
+
+
+  /* Now we get the reduced argument and check for possible
+   * cancellation. By Kahan algorithm we will have at most 2 digits
+   * of cancellations, r[1] and r[2] in the worst case.
+   */    
+  if (r[1] == 0)
+    if (r[2] == 0) i = 3;
+    else           i = 2;
+  else             i = 1;
+
+  for(j=0; j<SCS_NB_WORDS; j++)  
+    R_HW[j] = r[i+j];
+
+  R_EXP   = 1;
+  R_IND   = -i;
+  R_SGN   = sign*X_SGN; 
+  
+  /* Last step :
+   *   Multiplication by pi/2
+   */
+  scs_mul(result, Pio256_ptr, result);
+  return N*X_SGN;
+}
+ 
+
+
+
+#define DoSinZero(psh,psl)                         \
+do{                                                \
+  yh2 = yh*yh ;                                    \
+  ts = yh2 * (s3.d + yh2*(s5.d + yh2*s7.d));	   \
+  /* (1+ts)*(yh+yl) is an approx to sin(yh+yl) */  \
+  /* Now compute (1+ts)*(yh+yl) */                 \
+  Add12(*psh,*psl,   yh, yl+ts*yh);	           \
+} while(0)						   
+
+#define DoCosZero(pch,pcl)                        \
+do {                                              \
+  yh2 = yh*yh ;                                   \
+  tc = yh2 * (c2.d + yh2*(c4.d + yh2*c6.d ));	  \
+  /* 1+ tc is an approx to cos(yh+yl) */	  \
+  /* Now compute 1+tc */			  \
+  Add12(*pch,*pcl, 1., tc);		          \
+} while(0)					  
+
+/* See the documentation for explanations on DoSinNotZero */
+#define DoSinNotZero(psh,psl)                                          \
+do {                                                                   \
+  double thi, tlo, cahyh_h, cahyh_l  ;          		       \
+  Mul12(&cahyh_h,&cahyh_l, cah, yh);				       \
+  Add12(thi, tlo, sah,cahyh_h);					       \
+  tlo = tc*sah+(ts*cahyh_h+(sal+(tlo+(cahyh_l+(cal*yh + cah*yl))))) ;  \
+  Add12(*psh,*psl,  thi, tlo);	   			               \
+} while(0)
+ 
+/* See the documentation for explanations on DoCosNotZero */
+#define DoCosNotZero(pch,pcl)                                       \
+do {                                                                \
+  double thi, tlo, sahyh_h,sahyh_l;      			    \
+  Mul12(&sahyh_h,&sahyh_l, sah, yh);			            \
+  Add12(thi, tlo,  cah, -sahyh_h);			            \
+  tlo = tc*cah-(ts*sahyh_h-(cal+(tlo-(sahyh_l+(sal*yh+sah*yl))))) ; \
+  Add12(*pch, *pcl,    thi, tlo);                                   \
+} while(0)
+
+
+
+
+
+/************************************************************************/
+/*                                                                      */
+/*                       Argument Reduction                             */
+/*                                                                      */
+/************************************************************************/
+
+
+#define SIN 0
+#define COS 1
+#define TAN 2
+
+
+#define SHIFT1 ( 1. / ((double) (1<<SCS_NB_BITS))  )
+#define SHIFT2 (SHIFT1*SHIFT1)
+#define SHIFT3 (SHIFT2*SHIFT1)
+#define RangeReductionSCS()                                \
+do { 							   \
+  db_number nb;   double x0,x1,x2,x3;                      \
+  scs_t X, Y;						   \
+  scs_set_d(X, rri->x); 			  	   \
+  k= rem_pio256_scs(Y, X);				   \
+  index=(k&127)<<2;                                        \
+  quadrant = (k>>7)&3;                                     \
+  x0 = (double)(Y->h_word[0]);                             \
+  x1 = ((double)(Y->h_word[1])) * SHIFT1;                  \
+  x2 = ((double)(Y->h_word[2])) * SHIFT2;                  \
+  x3 = ((double)(Y->h_word[3])) * SHIFT3;                  \
+  nb.i[HI] = ((Y->index)*SCS_NB_BITS +1023)  << 20;  	   \
+  nb.i[LO] = 0;                                            \
+  nb.d *= Y->sign;                                         \
+  yh=(x2+x1)+x0;                                           \
+  yl=(((x0-yh)+x1)+x2) + x3;                               \
+  yh *= nb.d;     /* exact multiplication */               \
+  yl *= nb.d;     /* exact multiplication */               \
+}while(0)
+
+
+
+
+
+/* A structure that holds all the information to be exchanged between
+   ComputeTrigWithArgred and the 12 functions sin_rn etc
+
+   It is purely for performance (almost 100 cycles out of 300 on a P4
+   when compared to passing a list of arguments). In addition to
+   saving a few memory accesses, it also allows other small
+   optimizations like deferring the possible change of sign of the
+   result to the the last moment using rri->changesign.
+
+   All this is not very elegant, but it is safe.
+*/
+
+struct rrinfo_s {double rh; double rl; double x; int absxhi; int function;} ;
+typedef struct rrinfo_s rrinfo;
+#define changesign function  /* saves one int in the rrinfo structure */
+
+static void ComputeTrigWithArgred(rrinfo *rri){ 
+  double sah,sal,cah,cal, yh, yl, yh2, ts,tc, kd; 
+  double kch_h,kch_l, kcm_h,kcm_l, th, tl,sh,sl,ch,cl;
+  int k, quadrant, index;
+  int64_t kl;
+
+  if  (rri->absxhi < XMAX_CODY_WAITE_3) {
+    /* Compute k, deduce the table index and the quadrant */
+#if 0
+    DOUBLE2INT(k, rri->x * INV_PIO256);
+    kd = (double) k;
+#else
+		{db_number _t;
+			double _d = rri->x * INV_PIO256;
+			_t.d = (_d+6755399441055744.0);
+			k = _t.i[LO];
+			kd=_t.d-6755399441055744.0;
+		}
+
+#endif
+    quadrant = (k>>7)&3;      
+    index=(k&127)<<2;
+    if((index == 0)) { 
+      /* Here a large cancellation on yh+yl would be a problem, so use double-double RR */
+      /* all this is exact */
+      Mul12(&kch_h, &kch_l,   kd, RR_DD_MCH);
+      Mul12(&kcm_h, &kcm_l,   kd, RR_DD_MCM);
+      Add12 (th,tl,  kch_l, kcm_h) ;
+      /* only rounding error in the last multiplication and addition */ 
+      Add22 (&yh, &yl,    (rri->x + kch_h) , (kcm_l - kd*RR_DD_CL),   th, tl) ;
+      goto computeZero;
+    } 
+    else {      
+      /* index <> 0, don't worry about cancellations on yh+yl */
+      if (rri->absxhi < XMAX_CODY_WAITE_2) {
+	/* CW 2: all this is exact but the rightmost multiplication */
+	Add12 (yh,yl,  (rri->x - kd*RR_CW2_CH),  (kd*RR_CW2_MCL) ) ; 
+      }
+      else { 
+	/* CW 3: all this is exact but the rightmost multiplication */
+	Add12Cond(yh,yl,  (rri->x - kd*RR_CW3_CH) -  kd*RR_CW3_CM,   kd*RR_CW3_MCL);
+      }
+    }
+    goto computeNotZero;
+  }
+
+  else if ( rri->absxhi < XMAX_DDRR ) {
+    /* x sufficiently small for a Cody and Waite in double-double */
+    DOUBLE2LONGINT(kl, rri->x*INV_PIO256);
+    kd=(double)kl;
+    quadrant = (kl>>7)&3;
+    index=(kl&127)<<2;
+    if(index == 0) { 
+      /* Here again a large cancellation on yh+yl would be a problem, 
+	 so we do the accurate range reduction */
+      RangeReductionSCS();   /*recomputes k, index, quadrant, and yh and yl*/
+      /* Now it may happen that the new k differs by 1 of kl, so check that */
+      if(index==0)   /* no surprise */
+	goto computeZero; 
+      else 
+	goto computeNotZero;
+    }
+    else {   /*  index<>0 : double-double argument reduction*/
+      /* all this is exact */
+      Mul12(&kch_h, &kch_l,   kd, RR_DD_MCH);
+      Mul12(&kcm_h, &kcm_l,   kd, RR_DD_MCM);
+      Add12 (th,tl,  kch_l, kcm_h) ;
+      /* only rounding error in the last multiplication and addition */ 
+      Add22 (&yh, &yl,    (rri->x + kch_h) , (kcm_l - kd*RR_DD_CL),   th, tl) ;
+      //      printf("%f\n", yh);
+      goto computeNotZero;
+    }
+  } /* closes if ( absxhi < XMAX_DDRR ) */ 
+
+  else {
+    /* Worst case : x very large, sin(x) probably meaningless, we return
+       correct rounding but do't mind taking time for it */
+    RangeReductionSCS(); 
+    quadrant = (k>>7)&3;                                       
+    if(index == 0)
+      goto computeZero;
+    else 
+      goto computeNotZero;
+  }
+
+
+ computeZero:
+  switch(rri->function) {
+ 
+  case SIN: 
+    if (quadrant&1)
+      DoCosZero(&rri->rh, &rri->rl);
+    else 
+      DoSinZero(&rri->rh, &rri->rl);
+    rri->changesign=(quadrant==2)||(quadrant==3);
+    return;
+    
+  case COS: 
+    if (quadrant&1)
+      DoSinZero(&rri->rh, &rri->rl);
+    else 
+      DoCosZero(&rri->rh, &rri->rl);
+    rri->changesign= (quadrant==1)||(quadrant==2);
+    return;
+
+  case TAN: 
+    rri->changesign = quadrant&1;
+    if (quadrant&1) {
+      DoSinZero(&ch, &cl);
+      DoCosZero(&sh, &sl);
+    } else {
+      DoSinZero(&sh, &sl);
+      DoCosZero(&ch, &cl);
+    }
+    Div22(&rri->rh, &rri->rl, sh, sl, ch, cl);
+    return;
+  }
+  
+ computeNotZero:
+  if(index<=(64<<2)) {                                    
+    sah=sincosTable[index+0].d; /* sin(a), high part */   
+    sal=sincosTable[index+1].d; /* sin(a), low part  */   
+    cah=sincosTable[index+2].d; /* cos(a), high part */   
+    cal=sincosTable[index+3].d; /* cos(a), low part  */   
+  }else { /* cah <= sah */                                
+    index=(128<<2) - index;                               
+    cah=sincosTable[index+0].d; /* cos(a), high part */   
+    cal=sincosTable[index+1].d; /* cos(a), low part  */   
+    sah=sincosTable[index+2].d; /* sin(a), high part */   
+    sal=sincosTable[index+3].d; /* sin(a), low part  */   
+  }                                                       
+  yh2 = yh*yh ;
+  ts = yh2 * (s3.d + yh2*(s5.d + yh2*s7.d));	
+  tc = yh2 * (c2.d + yh2*(c4.d + yh2*c6.d ));	
+  switch(rri->function) {
+
+  case SIN: 
+    if (quadrant&1)   
+      DoCosNotZero(&rri->rh, &rri->rl);
+    else 
+      DoSinNotZero(&rri->rh, &rri->rl);
+    rri->changesign=(quadrant==2)||(quadrant==3);
+    return;
+
+  case COS: 
+    if (quadrant&1)   
+      DoSinNotZero(&rri->rh, &rri->rl);
+    else 
+      DoCosNotZero(&rri->rh, &rri->rl);
+    rri->changesign=(quadrant==1)||(quadrant==2);
+    return;
+
+  case TAN: 
+    rri->changesign = quadrant&1;
+    if (quadrant&1) {
+      DoSinNotZero(&ch, &cl);
+      DoCosNotZero(&sh, &sl);
+    } else {
+      DoSinNotZero(&sh, &sl);
+      DoCosNotZero(&ch, &cl);
+    }
+    Div22(&rri->rh, &rri->rl, sh, sl, ch, cl);
+    return;
+  }
+}
+
+
+/*************************************************************
+ *************************************************************
+ *              SIN ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/ 
+
+double sin_rn(double x){ 
+  double ts,x2,rncst; 
+  rrinfo rri;
+  db_number x_split;
+  double r;
+  
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) sin(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d; 
+  }
+   
+  else if (rri.absxhi < XMAX_SIN_CASE2){
+    /* CASE 1 : x small enough sin(x)=x */
+    if (rri.absxhi <XMAX_RETURN_X_FOR_SIN)
+      return x;
+    
+    /* CASE 2 :XMAX_RETURN_X_FOR_SIN x < XMAX_SIN_CASE2
+       Fast polynomial evaluation as in DoSinZero */
+    x2 = x*x ;
+    ts = x2 * (s3.d + x2*(s5.d + x2*s7.d));
+    Add12(rri.rh,rri.rl,   x, ts*x);
+    if(rri.rh == (rri.rh + (rri.rl * RN_CST_SIN_CASE2)))	
+      return rri.rh;
+    else
+      return scs_sin_rn(x); 
+  }
+  
+  /* CASE 3 : Need argument reduction */ 
+  else {
+    rri.x=x;
+    rri.function=SIN;
+    ComputeTrigWithArgred(&rri);
+
+    /* change sign in parallel to the test */ 
+    if(rri.changesign) r= -rri.rh; else r= rri.rh;
+
+    rncst= RN_CST_SINCOS_CASE3;
+    if(rri.rh == (rri.rh + (rri.rl * rncst)))	
+      return r;
+    else
+      return scs_sin_rn(x); 
+  }
+}
+
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               SIN ROUNDED  TOWARD  +INFINITY              *
+ *************************************************************
+ *************************************************************/
+
+
+double sin_ru(double x){
+  double xx, ts, epsilon; 
+  rrinfo rri;
+  db_number x_split;
+  
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) sin(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d; 
+  }    
+  
+  if (rri.absxhi < XMAX_SIN_CASE2){
+
+    /* CASE 1 : x small enough, return x suitably rounded */
+    if (rri.absxhi <XMAX_RETURN_X_FOR_SIN) {
+      if(x>=0.)
+	return x;
+      else {
+	x_split.l --;
+	return x_split.d;
+      }
+    }
+    else {
+      /* CASE 2 : x < Pi/512
+	 Fast polynomial evaluation */
+      xx = x*x;
+      ts = x * xx * (s3.d + xx*(s5.d + xx*s7.d ));
+      Add12(rri.rh,rri.rl, x, ts);
+      epsilon=EPS_SIN_CASE2; 
+    }
+  }
+  else {
+    /* CASE 3 : Need argument reduction */ 
+    rri.x=x;
+    rri.function=SIN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_SINCOS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    } 
+  }
+
+  TEST_AND_RETURN_RU(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_sin_ru(x);
+}
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               SIN ROUNDED  TOWARD  -INFINITY              *
+ *************************************************************
+ *************************************************************/
+double sin_rd(double x){ 
+  double xx, ts, epsilon; 
+  db_number x_split;
+  rrinfo rri;
+  
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) sin(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d; 
+  }    
+  
+  if (rri.absxhi < XMAX_SIN_CASE2){
+
+    /* CASE 1 : x small enough, return x suitably rounded */
+    if (rri.absxhi <XMAX_RETURN_X_FOR_SIN) {
+      if(x<=0.)
+	return x;
+      else {
+	x_split.l --;
+	return x_split.d;
+      }
+    }
+
+    else{
+      /* CASE 2 : x < Pi/512
+	 Fast polynomial evaluation */
+      xx = x*x;
+      ts = x * xx * (s3.d + xx*(s5.d + xx*s7.d ));
+      Add12(rri.rh,rri.rl, x, ts);
+      epsilon=EPS_SIN_CASE2; 
+    }
+  }
+  else {
+    /* CASE 3 : Need argument reduction */ 
+    rri.x=x;
+    rri.function=SIN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_SINCOS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    } 
+  }
+
+  TEST_AND_RETURN_RD(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_sin_rd(x);
+}
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *               SIN ROUNDED  TOWARD  ZERO                   *
+ *************************************************************
+ *************************************************************/
+double sin_rz(double x){ 
+  double xx, ts, epsilon; 
+  db_number x_split;
+  rrinfo rri;  
+  x_split.d=x;
+
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) sin(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d; 
+  }    
+  
+  if (rri.absxhi < XMAX_SIN_CASE2){
+
+    /* CASE 1 : x small enough, return x suitably rounded */
+    if (rri.absxhi <XMAX_RETURN_X_FOR_SIN) {
+      if(x==0) return x;
+      else {
+	x_split.l --;
+	return x_split.d;
+      }
+    }
+    else {
+      /* CASE 2 : x < Pi/512
+	 Fast polynomial evaluation */
+      xx = x*x;
+      ts = x * xx * (s3.d + xx*(s5.d + xx*s7.d ));
+      Add12(rri.rh,rri.rl, x, ts);
+      epsilon=EPS_SIN_CASE2; 
+    }
+  }
+  else {
+    /* CASE 3 : Need argument reduction */ 
+    rri.x=x;
+    rri.function=SIN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_SINCOS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    } 
+  }
+
+  TEST_AND_RETURN_RZ(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_sin_rz(x);
+}
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *              COS ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/
+double cos_rn(double x){ 
+  double tc, x2;
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    /* was : return x-x; 
+       but it's optimized out by Intel compiler (bug reported).
+       Who cares to be slow in this case anyway... */
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d-x_split.d;
+  }
+
+  if (rri.absxhi < XMAX_COS_CASE2){
+    /* CASE 1 : x small enough cos(x)=1. */
+    if (rri.absxhi <XMAX_RETURN_1_FOR_COS_RN)
+      return 1.;
+    else {
+      /* CASE 2 : Fast polynomial evaluation */
+      x2 = x*x;
+      tc = x2 * (c2.d + x2*(c4.d + x2*c6.d ));
+      Add12(rri.rh,rri.rl, 1.0, tc);
+      if(rri.rh == (rri.rh + (rri.rl * RN_CST_COS_CASE2)))	
+	return rri.rh;
+      else
+	return scs_cos_rn(x); 
+    }
+  }
+  else {
+  /* CASE 3 : Need argument reduction */ 
+    rri.x=x;
+    rri.function=COS;
+    ComputeTrigWithArgred(&rri);
+    if(rri.rh == (rri.rh + (rri.rl * RN_CST_SINCOS_CASE3)))	
+      if(rri.changesign) return -rri.rh; else return rri.rh;
+    else
+      return scs_cos_rn(x); 
+  }
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *              COS ROUNDED  TO +INFINITY      		     *
+ *************************************************************
+ *************************************************************/
+double cos_ru(double x){ 
+  double x2, tc, epsilon; 
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }
+   
+  if (rri.absxhi < XMAX_COS_CASE2){
+    /* CASE 1 : x small enough cos(x)=1. */
+    if (rri.absxhi <XMAX_RETURN_1_FOR_COS_RDIR)
+      return 1.;
+    else{
+      /* CASE 2 : Fast polynomial evaluation */
+      x2 = x*x;
+      tc = x2 * (c2.d + x2*(c4.d + x2*c6.d ));
+      Add12(rri.rh,rri.rl, 1, tc);
+      epsilon=EPS_COS_CASE2; 
+    }
+  }
+
+  else {
+    /* CASE 3 : Need argument reduction */ 
+    rri.x=x;
+    rri.function=COS;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_SINCOS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    }
+  }    
+  
+  TEST_AND_RETURN_RU(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_cos_ru(x);
+}
+
+
+/*************************************************************
+ *************************************************************
+ *              COS ROUNDED  TO -INFINITY      		     *
+ *************************************************************
+ *************************************************************/
+double cos_rd(double x){ 
+  double x2, tc, epsilon; 
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }   
+
+  if (rri.absxhi < XMAX_COS_CASE2){
+    if (x==0) return 1;
+    /* CASE 1 : x small enough cos(x)=1. */
+    if (rri.absxhi <XMAX_RETURN_1_FOR_COS_RDIR)
+      return ONE_ROUNDED_DOWN; 
+    else {   
+      /* CASE 2 :  Fast polynomial evaluation */
+      x2 = x*x;
+      tc = x2 * (c2.d + x2*(c4.d + x2*c6.d ));
+      Add12(rri.rh,rri.rl, 1, tc);
+      epsilon=EPS_COS_CASE2; 
+    }
+  }
+  else {
+  /* CASE 3 : Need argument reduction */ 
+    rri.x=x;
+    rri.function=COS;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_SINCOS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    }     
+  }
+
+  TEST_AND_RETURN_RD(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_cos_rd(x);
+}
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *              COS ROUNDED  TO ZERO      		     *
+ *************************************************************
+ *************************************************************/
+double cos_rz(double x){ 
+  double x2, tc, epsilon; 
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }   
+
+  if (rri.absxhi < XMAX_COS_CASE2){
+    if (x==0) return 1;
+    /* CASE 1 : x small enough cos(x)=1. */
+    if (rri.absxhi <XMAX_RETURN_1_FOR_COS_RDIR)
+      return ONE_ROUNDED_DOWN; 
+    else {
+      /* CASE 2 : Fast polynomial evaluation */
+      x2 = x*x;
+      tc = x2 * (c2.d + x2*(c4.d + x2*c6.d ));
+      Add12(rri.rh,rri.rl, 1, tc);
+      epsilon=EPS_COS_CASE2; 
+    }
+  }
+  else {
+    /* CASE 3 : Need argument reduction */ 
+    rri.x=x;
+    rri.function=COS;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_SINCOS_CASE3;
+    if(rri.changesign) {
+      rri.rh = -rri.rh;
+      rri.rl = -rri.rl;
+    } 
+  }
+
+  TEST_AND_RETURN_RZ(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return scs_cos_rz(x);
+}
+
+
+
+
+
+/*************************************************************
+ *************************************************************
+ *              TAN ROUNDED  TO NEAREST			     *
+ *************************************************************
+ *************************************************************/ 
+double tan_rn(double x){  
+  double x2, p5, tt;
+  rrinfo rri;
+  db_number x_split, rndcst;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d; 
+  }   
+
+  if (rri.absxhi < XMAX_TAN_CASE2){ 
+    if (rri.absxhi < XMAX_RETURN_X_FOR_TAN) 
+      return x;
+    /* Dynamic computation of the rounding constant */
+    rndcst.i[HI] = 0x3ff00000 + (((rri.absxhi & 0x000fffff)+0x00100000) >> (0x3ff+2 - (rri.absxhi>>20))) ;
+    rndcst.i[LO] =0xffffffff;
+    /* Fast Taylor series */
+    x2 = x*x;
+    p5 = t5.d + x2*(t7.d + x2*(t9.d + x2*t11.d));
+    tt = x2*(t3h.d + (t3l.d + x2*p5));
+    Add12(rri.rh, rri.rl, x, x*tt);  
+    /* Test if round to nearest achieved */ 
+    if(rri.rh == (rri.rh + (rri.rl * rndcst.d)))
+      return rri.rh;
+    else
+      return scs_tan_rn(x); 
+  }
+  else {
+    /* Otherwise : Range reduction then standard evaluation */
+    rri.x=x;
+    rri.function=TAN;
+    ComputeTrigWithArgred(&rri);
+
+    /* Test if round to nearest achieved */ 
+    if(rri.rh == (rri.rh + (rri.rl * RN_CST_TAN_CASE3)))
+      if(rri.changesign) return -rri.rh; else return rri.rh;
+    else
+      return scs_tan_rn(x); 
+  }    
+}
+
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  +INFINITY
+ *************************************************************
+ *************************************************************/
+double tan_ru(double x){  
+  double epsilon, p5, tt, x2;
+  db_number x_split;
+  rrinfo rri;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }   
+  
+  if (rri.absxhi < XMAX_TAN_CASE2){
+    if (rri.absxhi < XMAX_RETURN_X_FOR_TAN) {
+      if(x<=0.)
+	return x;
+      else {
+	x_split.l ++;
+	return x_split.d;
+      }
+    }
+    else {
+      /* Fast Taylor series */
+      x2 = x*x;
+      p5 = t5.d + x2*(t7.d + x2*(t9.d + x2*t11.d));
+      tt = x2*(t3h.d + (t3l.d +x2*p5));
+      Add12(rri.rh, rri.rl, x, x*tt);  
+
+      /* TODO dynamic computation of error constant */
+      TEST_AND_RETURN_RU(rri.rh, rri.rl, EPS_TAN_CASE2);
+
+      /* if the previous block didn't return a value, launch accurate phase */
+      return  scs_tan_ru(x);
+    }
+  }
+  else { 
+    /* Normal case: Range reduction then standard evaluation */
+    rri.x=x;
+    rri.function=TAN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_TAN_CASE3; 
+    if(rri.changesign) {
+      rri.rh= -rri.rh; 
+      rri.rl=-rri.rl;
+    }
+  }
+  
+  TEST_AND_RETURN_RU(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return  scs_tan_ru(x);
+}
+
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  -INFINITY
+ *************************************************************
+ *************************************************************/
+double tan_rd(double x){  
+  double epsilon, p5, tt, x2;
+  rrinfo rri;
+  db_number x_split;
+
+  
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000){
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+
+  }   
+  
+  if (rri.absxhi < XMAX_TAN_CASE2){
+    if (rri.absxhi < XMAX_RETURN_X_FOR_TAN) {
+      if(x>=0.)
+	return x;
+      else {
+	x_split.l ++;
+	return x_split.d;
+      }
+    }
+    
+    /* Fast Taylor series */
+    x2 = x*x;
+    p5 = t5.d + x2*(t7.d + x2*(t9.d + x2*t11.d));
+    tt = x2*(t3h.d + (t3l.d +x2*p5));
+    Add12(rri.rh, rri.rl, x, x*tt);  
+      
+    TEST_AND_RETURN_RD(rri.rh, rri.rl, EPS_TAN_CASE2);
+
+    /* if the previous block didn't return a value, launch accurate phase */
+    return  scs_tan_rd(x);
+  }
+  
+  else { 
+    /* normal case: Range reduction then standard evaluation */
+    rri.x=x;
+    rri.function=TAN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_TAN_CASE3; 
+    if(rri.changesign) {
+      rri.rh= -rri.rh; 
+      rri.rl=-rri.rl;
+    }
+  }
+  
+  TEST_AND_RETURN_RD(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return  scs_tan_rd(x);
+}
+ 	
+
+/*************************************************************
+ *************************************************************
+ *               ROUNDED  TOWARD  ZERO
+ *************************************************************
+ *************************************************************/
+double tan_rz(double x){  
+  double epsilon, p5, tt, x2;
+  rrinfo rri;
+  db_number x_split;
+
+  x_split.d=x;
+  rri.absxhi = x_split.i[HI] & 0x7fffffff;
+  
+  /* SPECIAL CASES: x=(Nan, Inf) cos(x)=Nan */
+  if (rri.absxhi>=0x7ff00000) {
+    x_split.l=0xfff8000000000000LL;
+    return x_split.d - x_split.d;
+  }   
+  
+  if (rri.absxhi < XMAX_TAN_CASE2){
+    if (rri.absxhi < XMAX_RETURN_X_FOR_TAN) {
+      return x;
+    }
+    else{ 
+      /* Fast Taylor series */
+      x2 = x*x;
+      p5 = t5.d + x2*(t7.d + x2*(t9.d + x2*t11.d));
+      tt = x2*(t3h.d + (t3l.d +x2*p5));
+      Add12(rri.rh, rri.rl, x, x*tt);  
+
+      TEST_AND_RETURN_RZ(rri.rh, rri.rl, EPS_TAN_CASE2);
+
+      /* if the TEST_AND_RETURN block didn't return a value, launch accurate phase */
+      return  scs_tan_rz(x);
+    }
+  }
+  else { 
+    /* Normal case: Range reduction then standard evaluation */
+    rri.x=x;
+    rri.function=TAN;
+    ComputeTrigWithArgred(&rri);
+    epsilon=EPS_TAN_CASE3; 
+    if(rri.changesign) {
+      rri.rh = -rri.rh; 
+      rri.rl = -rri.rl;
+    }
+  }
+
+  TEST_AND_RETURN_RZ(rri.rh, rri.rl, epsilon);
+
+  /* if the previous block didn't return a value, launch accurate phase */
+  return  scs_tan_rz(x); 
+}
+
diff --git a/src/crlibm/trigo_fast.h b/src/crlibm/trigo_fast.h
new file mode 100644
index 0000000..5849aaa
--- /dev/null
+++ b/src/crlibm/trigo_fast.h
@@ -0,0 +1,639 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/*File generated by maple/trigo.pl*/
+
+#define XMAX_RETURN_X_FOR_SIN 0x3E4FFFFE        /* .14901147e-7 */
+#define XMAX_SIN_CASE2         0x3F8921F9        /* .12271835e-1 */
+#define XMAX_RETURN_1_FOR_COS_RN 0x3E46A09C        /* .10536702e-7 */
+#define XMAX_RETURN_1_FOR_COS_RDIR 0x3E4FFFFE        /* .14901147e-7 */
+#define XMAX_COS_CASE2         0x3F8921F9        /* .12271835e-1 */
+#define XMAX_RETURN_X_FOR_TAN 0x3E3FFFFE        /* .74505735e-8 */
+#define XMAX_TAN_CASE2         0x3FAFFFFE        /* .62499940e-1 */
+
+#define ONE_ROUNDED_DOWN  9.9999999999999988897769754e-01 
+
+#define EPS_SIN_CASE2     1.1843448950468158814341336e-20 
+#define RN_CST_SIN_CASE2  1.0002134047098797985844841 
+
+#define EPS_COS_CASE2     3.7840527971432048221275834e-20 
+#define RN_CST_COS_CASE2  1.0006823406990255799706351 
+
+#define EPS_SINCOS_CASE3     4.0657581468206416275279480e-20 
+#define RN_CST_SINCOS_CASE3  1.0007331378299121345641375 
+
+#define EPS_TAN_CASE2     4.5960200000000000000000000e-19 
+#define EPS_TAN_CASE3     8.5380921083233474178086908e-20 
+#define RN_CST_TAN_CASE3  1.0015410958904110700976399 
+
+#define INV_PIO256        81.4873308630504119136684868 
+
+#define XMAX_CODY_WAITE_2 0x40B921F9        /* 6433.9756 */
+#define XMAX_CODY_WAITE_3 0x416921F9        /* 13176782. */
+#define XMAX_DDRR         0x426921F9        /* .86355359e12 */
+
+#define RR_CW2_CH  1.2271846303519851062446833e-02
+#define RR_CW2_MCL 4.3472122470213191794988193e-13
+
+#define RR_CW3_CH  1.2271845713257789611816406e-02
+#define RR_CW3_CM  5.8982729811418721510563046e-10
+#define RR_CW3_MCL -4.2111741079360304438362959e-17
+
+#define RR_DD_MCH  -1.2271846303085129359367045e-02
+#define RR_DD_MCM  -4.7837765591693484655225157e-19
+#define RR_DD_CL   -1.1698319569212264319871158e-35
+
+
+
+
+static const int digits_256_over_pi[] = 
+{ 0x51,  	 0x1F306DC9,  	 0x3220A94F,  	 0x384EAFA3,  	
+  0x3A9A6EE0,  	 0x1B6C52B3,  	 0x9E21C82,  	 0x3FCA2C7,  	
+  0x15EF5DE2,  	 0x2C36E48D,  	 0x31D2126E,  	 0x25C00C92,  	
+  0x177504E8,  	 0x32439FC3,  	 0x2F58E589,  	 0x134E7DD1,  	
+  0x11AFA97,  	 0x1768909D,  	 0xCE38135,  	 0x28BEFC82,  	
+  0x1CC8EB1C,  	 0x306A673E,  	 0x24E422FC,  	 0x177BF250,  	
+  0x1D8FFC4B,  	 0x3FFBC0B3,  	 0x7F7978,  	 0x2316B414,  	
+  0x368FB69B,  	 0xFD9E4F9,  	 0x184DBA7A,  	 0xC7ECD3C,  	
+  0x2FF516BA,  	 0x24F758FD,  	 0x1F2F8BD9,  	 0x3A0E73EF,  	
+  0x5294975,  	 0xD7F6BF6,  	 0x8FC6AE8,  	 0x10AC0660,  	
+  0x237E3DB5,  	 0x357E19F7,  	 0x2104D7A1,  	 0x2C3B53C7,  	
+  0x8B0AF73,  	 0x3610CB3,  	 0xC2AF8A5,  	 0xD0811C,  	
+ };
+
+static const scs Pio256=
+{{0x00c90fda, 0x28885a30, 0x234c4c66, 0x0a2e0370, 
+0x1cd12902, 0x13822299, 0x3cc74020, 0x2efa98ec},
+DB_ONE,  -1,   1 } 
+;
+#define Pio256_ptr  (scs_ptr)(& Pio256)
+
+#ifdef WORDS_BIGENDIAN
+static db_number const s3 = {{0xBFC55555,0x55555555}} /* -1.6666666667e-01 */;
+static db_number const s5 = {{0x3F811111,0x11111111}} /* +8.3333333333e-03 */;
+static db_number const s7 = {{0xBF2A01A0,0x1A01A01A}} /* -1.9841269841e-04 */;
+
+static db_number const c2 = {{0xBFE00000,0x00000000}} /* -5.0000000000e-01 */;
+static db_number const c4 = {{0x3FA55555,0x55555555}} /* +4.1666666667e-02 */;
+static db_number const c6 = {{0xBF56C16C,0x16C16C17}} /* -1.3888888889e-03 */;
+
+static db_number const t3h = {{0x3FD55555,0x55555555}} /* +3.3333333333e-01 */;
+static db_number const t3l = {{0x3C7CB8E2,0xB4EE83F1}} /* +2.4912545352e-17 */;
+static db_number const t5 = {{0x3FC11111,0x11110586}} /* +1.3333333333e-01 */;
+static db_number const t7 = {{0x3FABA1BA,0x1D1301A5}} /* +5.3968254136e-02 */;
+static db_number const t9 = {{0x3F9664EC,0x751BE4A4}} /* +2.1869368217e-02 */;
+static db_number const t11 = {{0x3F823953,0xEFC04F73}} /* +8.8984067479e-03 */;
+
+
+/*  sine and cos of kPi/256 in double-double */
+static db_number const sincosTable[260] =
+{
+{{0x00000000,0x00000000}} /* +0.0000000000e+00 */ ,
+{{0x00000000,0x00000000}} /* +0.0000000000e+00 */ ,
+{{0x3FF00000,0x00000000}} /* +1.0000000000e+00 */ ,
+{{0x00000000,0x00000000}} /* +0.0000000000e+00 */ ,
+{{0x3F8921D1,0xFCDEC784}} /* +1.2271538286e-02 */ ,
+{{0x3C29878E,0xBE836D9D}} /* +6.9197907640e-19 */ ,
+{{0x3FEFFF62,0x169B92DB}} /* +9.9992470184e-01 */ ,
+{{0x3C85DDA3,0xC81FBD0D}} /* +3.7931082513e-17 */ ,
+{{0x3F992155,0xF7A3667E}} /* +2.4541228523e-02 */ ,
+{{0xBBFB1D63,0x091A0130}} /* -9.1868490126e-20 */ ,
+{{0x3FEFFD88,0x6084CD0D}} /* +9.9969881870e-01 */ ,
+{{0xBC81354D,0x4556E4CB}} /* -2.9851486404e-17 */ ,
+{{0x3FA2D865,0x759455CD}} /* +3.6807222941e-02 */ ,
+{{0x3C2686F6,0x5BA93AC0}} /* +6.1060088804e-19 */ ,
+{{0x3FEFFA72,0xEFFEF75D}} /* +9.9932238459e-01 */ ,
+{{0xBC88B4CD,0xCDB25956}} /* -4.2858538441e-17 */ ,
+{{0x3FA91F65,0xF10DD814}} /* +4.9067674327e-02 */ ,
+{{0xBC2912BD,0x0D569A90}} /* -6.7961037205e-19 */ ,
+{{0x3FEFF621,0xE3796D7E}} /* +9.9879545621e-01 */ ,
+{{0xBC6C57BC,0x2E24AA15}} /* -1.2291693337e-17 */ ,
+{{0x3FAF656E,0x79F820E0}} /* +6.1320736302e-02 */ ,
+{{0xBC22E1EB,0xE392BFFE}} /* -5.1181134065e-19 */ ,
+{{0x3FEFF095,0x658E71AD}} /* +9.9811811290e-01 */ ,
+{{0x3C801A8C,0xE18A4B9E}} /* +2.7935487558e-17 */ ,
+{{0x3FB2D520,0x92CE19F6}} /* +7.3564563600e-02 */ ,
+{{0xBC49A088,0xA8BF6B2C}} /* -2.7784941506e-18 */ ,
+{{0x3FEFE9CD,0xAD01883A}} /* +9.9729045668e-01 */ ,
+{{0x3C6521EC,0xD0C67E35}} /* +9.1647695371e-18 */ ,
+{{0x3FB5F6D0,0x0A9AA419}} /* +8.5797312344e-02 */ ,
+{{0xBC4F4022,0xD03F6C9A}} /* -3.3881893831e-18 */ ,
+{{0x3FEFE1CA,0xFCBD5B09}} /* +9.9631261218e-01 */ ,
+{{0x3C6A23E3,0x202A884E}} /* +1.1336497892e-17 */ ,
+{{0x3FB917A6,0xBC29B42C}} /* +9.8017140330e-02 */ ,
+{{0xBC3E2718,0xD26ED688}} /* -1.6345823622e-18 */ ,
+{{0x3FEFD88D,0xA3D12526}} /* +9.9518472667e-01 */ ,
+{{0xBC887DF6,0x378811C7}} /* -4.2486913678e-17 */ ,
+{{0x3FBC3785,0xC79EC2D5}} /* +1.1022220729e-01 */ ,
+{{0xBC24F39D,0xF133FB21}} /* -5.6789503538e-19 */ ,
+{{0x3FEFCE15,0xFD6DA67B}} /* +9.9390697000e-01 */ ,
+{{0xBC75DD6F,0x830D4C09}} /* -1.8964849471e-17 */ ,
+{{0x3FBF564E,0x56A9730E}} /* +1.2241067520e-01 */ ,
+{{0x3C4A2704,0x729AE56D}} /* +2.8354501490e-18 */ ,
+{{0x3FEFC264,0x70E19FD3}} /* +9.9247953460e-01 */ ,
+{{0x3C81EC86,0x68ECACEE}} /* +3.1093055095e-17 */ ,
+{{0x3FC139F0,0xCEDAF577}} /* +1.3458070851e-01 */ ,
+{{0xBC652343,0x4D1B3CFA}} /* -9.1670359171e-18 */ ,
+{{0x3FEFB579,0x7195D741}} /* +9.9090263543e-01 */ ,
+{{0x3C71BFAC,0x7397CC08}} /* +1.5394565095e-17 */ ,
+{{0x3FC2C810,0x6E8E613A}} /* +1.4673047446e-01 */ ,
+{{0x3C513000,0xA89A11E0}} /* +3.7269471470e-18 */ ,
+{{0x3FEFA755,0x7F08A517}} /* +9.8917650996e-01 */ ,
+{{0xBC87A0A8,0xCA13571F}} /* -4.0987309937e-17 */ ,
+{{0x3FC45576,0xB1293E5A}} /* +1.5885814333e-01 */ ,
+{{0xBC5285A2,0x4119F7B1}} /* -4.0163200574e-18 */ ,
+{{0x3FEF97F9,0x24C9099B}} /* +9.8730141816e-01 */ ,
+{{0xBC8E2AE0,0xEEA5963B}} /* -5.2332261256e-17 */ ,
+{{0x3FC5E214,0x448B3FC6}} /* +1.7096188876e-01 */ ,
+{{0x3C6531FF,0x779DDAC6}} /* +9.1919980182e-18 */ ,
+{{0x3FEF8764,0xFA714BA9}} /* +9.8527764239e-01 */ ,
+{{0x3C7AB256,0x778FFCB6}} /* +2.3155637028e-17 */ ,
+{{0x3FC76DD9,0xDE50BF31}} /* +1.8303988796e-01 */ ,
+{{0x3C61D5EE,0xEC501B2F}} /* +7.7349918689e-18 */ ,
+{{0x3FEF7599,0xA3A12077}} /* +9.8310548743e-01 */ ,
+{{0x3C884F31,0xD743195C}} /* +4.2170007523e-17 */ ,
+{{0x3FC8F8B8,0x3C69A60B}} /* +1.9509032202e-01 */ ,
+{{0xBC626D19,0xB9FF8D82}} /* -7.9910790685e-18 */ ,
+{{0x3FEF6297,0xCFF75CB0}} /* +9.8078528040e-01 */ ,
+{{0x3C756217,0x2A361FD3}} /* +1.8546939998e-17 */ ,
+{{0x3FCA82A0,0x25B00451}} /* +2.0711137619e-01 */ ,
+{{0xBC687905,0xFFD084AD}} /* -1.0613362529e-17 */ ,
+{{0x3FEF4E60,0x3B0B2F2D}} /* +9.7831737072e-01 */ ,
+{{0xBC78EE01,0xE695AC05}} /* -2.1623082233e-17 */ ,
+{{0x3FCC0B82,0x6A7E4F63}} /* +2.1910124016e-01 */ ,
+{{0xBC1AF143,0x9E521935}} /* -3.6513812299e-19 */ ,
+{{0x3FEF38F3,0xAC64E589}} /* +9.7570213004e-01 */ ,
+{{0xBC7D7BAF,0xB51F72E6}} /* -2.5572556081e-17 */ ,
+{{0x3FCD934F,0xE5454311}} /* +2.3105810828e-01 */ ,
+{{0x3C675B92,0x277107AD}} /* +1.0129787150e-17 */ ,
+{{0x3FEF2252,0xF7763ADA}} /* +9.7293995221e-01 */ ,
+{{0xBC820CB8,0x1C8D94AB}} /* -3.1311211122e-17 */ ,
+{{0x3FCF19F9,0x7B215F1B}} /* +2.4298017990e-01 */ ,
+{{0xBC642DEE,0xF11DA2C4}} /* -8.7514315297e-18 */ ,
+{{0x3FEF0A7E,0xFB9230D7}} /* +9.7003125319e-01 */ ,
+{{0x3C752C7A,0xDC6B4989}} /* +1.8365300348e-17 */ ,
+{{0x3FD04FB8,0x0E37FDAE}} /* +2.5486565960e-01 */ ,
+{{0xBC0412CD,0xB72583CC}} /* -1.3602299807e-19 */ ,
+{{0x3FEEF178,0xA3E473C2}} /* +9.6697647104e-01 */ ,
+{{0x3C86310A,0x67FE774F}} /* +3.8496228837e-17 */ ,
+{{0x3FD111D2,0x62B1F677}} /* +2.6671275747e-01 */ ,
+{{0x3C7824C2,0x0AB7AA9A}} /* +2.0941222579e-17 */ ,
+{{0x3FEED740,0xE7684963}} /* +9.6377606580e-01 */ ,
+{{0x3C7E82C7,0x91F59CC2}} /* +2.6463950561e-17 */ ,
+{{0x3FD1D344,0x3F4CDB3E}} /* +2.7851968938e-01 */ ,
+{{0xBC6720D4,0x1C13519E}} /* -1.0030273720e-17 */ ,
+{{0x3FEEBBD8,0xC8DF0B74}} /* +9.6043051942e-01 */ ,
+{{0x3C7C6C8C,0x615E7277}} /* +2.4653904815e-17 */ ,
+{{0x3FD29406,0x2ED59F06}} /* +2.9028467725e-01 */ ,
+{{0xBC75D28D,0xA2C4612D}} /* -1.8927978708e-17 */ ,
+{{0x3FEE9F41,0x56C62DDA}} /* +9.5694033573e-01 */ ,
+{{0x3C8760B1,0xE2E3F81E}} /* +4.0553869862e-17 */ ,
+{{0x3FD35410,0xC2E18152}} /* +3.0200594932e-01 */ ,
+{{0xBC73CB00,0x2F96E062}} /* -1.7167666235e-17 */ ,
+{{0x3FEE817B,0xAB4CD10D}} /* +9.5330604035e-01 */ ,
+{{0xBC7D0AFE,0x686B5E0A}} /* -2.5190738780e-17 */ ,
+{{0x3FD4135C,0x94176601}} /* +3.1368174040e-01 */ ,
+{{0x3C70C97C,0x4AFA2518}} /* +1.4560447300e-17 */ ,
+{{0x3FEE6288,0xEC48E112}} /* +9.4952818059e-01 */ ,
+{{0xBC616B56,0xF2847754}} /* -7.5544151928e-18 */ ,
+{{0x3FD4D1E2,0x4278E76A}} /* +3.2531029216e-01 */ ,
+{{0x3C624172,0x18792858}} /* +7.9171249464e-18 */ ,
+{{0x3FEE426A,0x4B2BC17E}} /* +9.4560732538e-01 */ ,
+{{0x3C8A8738,0x89744882}} /* +4.6019102479e-17 */ ,
+{{0x3FD58F9A,0x75AB1FDD}} /* +3.3688985339e-01 */ ,
+{{0xBC1EFDC0,0xD58CF620}} /* -4.2000940033e-19 */ ,
+{{0x3FEE2121,0x04F686E5}} /* +9.4154406518e-01 */ ,
+{{0xBC8014C7,0x6C126527}} /* -2.7896379548e-17 */ ,
+{{0x3FD64C7D,0xDD3F27C6}} /* +3.4841868025e-01 */ ,
+{{0x3C510D2B,0x4A664121}} /* +3.6974420514e-18 */ ,
+{{0x3FEDFEAE,0x622DBE2B}} /* +9.3733901191e-01 */ ,
+{{0xBC8514EA,0x88425567}} /* -3.6570926284e-17 */ ,
+{{0x3FD70885,0x30FA459F}} /* +3.5989503653e-01 */ ,
+{{0xBC744B19,0xE0864C5D}} /* -1.7601687124e-17 */ ,
+{{0x3FEDDB13,0xB6CCC23C}} /* +9.3299279883e-01 */ ,
+{{0x3C883C37,0xC6107DB3}} /* +4.2041415555e-17 */ ,
+{{0x3FD7C3A9,0x311DCCE7}} /* +3.7131719395e-01 */ ,
+{{0x3C19A3F2,0x1EF3E8D9}} /* +3.4749239648e-19 */ ,
+{{0x3FEDB652,0x6238A09B}} /* +9.2850608047e-01 */ ,
+{{0xBC7ADEE7,0xEAE69460}} /* -2.3306639848e-17 */ ,
+{{0x3FD87DE2,0xA6AEA963}} /* +3.8268343236e-01 */ ,
+{{0xBC672CED,0xD3D5A610}} /* -1.0050772696e-17 */ ,
+{{0x3FED906B,0xCF328D46}} /* +9.2387953251e-01 */ ,
+{{0x3C7457E6,0x10231AC2}} /* +1.7645047084e-17 */ ,
+{{0x3FD9372A,0x63BC93D7}} /* +3.9399204006e-01 */ ,
+{{0x3C668431,0x9E5AD5B1}} /* +9.7649241641e-18 */ ,
+{{0x3FED6961,0x73C9E68B}} /* +9.1911385169e-01 */ ,
+{{0xBC7E8C61,0xC6393D55}} /* -2.6496484622e-17 */ ,
+{{0x3FD9EF79,0x43A8ED8A}} /* +4.0524131400e-01 */ ,
+{{0x3C66DA81,0x290BDBAB}} /* +9.9111401943e-18 */ ,
+{{0x3FED4134,0xD14DC93A}} /* +9.1420975570e-01 */ ,
+{{0xBC84EF52,0x95D25AF2}} /* -3.6316182528e-17 */ ,
+{{0x3FDAA6C8,0x2B6D3FCA}} /* +4.1642956010e-01 */ ,
+{{0xBC7D5F10,0x6EE5CCF7}} /* -2.5475580413e-17 */ ,
+{{0x3FED17E7,0x743E35DC}} /* +9.0916798309e-01 */ ,
+{{0xBC5101DA,0x3540130A}} /* -3.6878564091e-18 */ ,
+{{0x3FDB5D10,0x09E15CC0}} /* +4.2755509343e-01 */ ,
+{{0x3C65B362,0xCB974183}} /* +9.4111898163e-18 */ ,
+{{0x3FECED7A,0xF43CC773}} /* +9.0398929312e-01 */ ,
+{{0xBC5E7B6B,0xB5AB58AE}} /* -6.6097544687e-18 */ ,
+{{0x3FDC1249,0xD8011EE7}} /* +4.3861623854e-01 */ ,
+{{0xBC7813AA,0xBB515206}} /* -2.0883315831e-17 */ ,
+{{0x3FECC1F0,0xF3FCFC5C}} /* +8.9867446569e-01 */ ,
+{{0x3C7E5761,0x3B68F6AB}} /* +2.6316906461e-17 */ ,
+{{0x3FDCC66E,0x9931C45E}} /* +4.4961132965e-01 */ ,
+{{0x3C56850E,0x59C37F8F}} /* +4.8831924232e-18 */ ,
+{{0x3FEC954B,0x213411F5}} /* +8.9322430120e-01 */ ,
+{{0xBC52FB76,0x1E946603}} /* -4.1161239152e-18 */ ,
+{{0x3FDD7977,0x5B86E389}} /* +4.6053871096e-01 */ ,
+{{0x3C7550EC,0x87BC0575}} /* +1.8488777492e-17 */ ,
+{{0x3FEC678B,0x3488739B}} /* +8.8763962040e-01 */ ,
+{{0x3C6D86CA,0xC7C5FF5B}} /* +1.2805091919e-17 */ ,
+{{0x3FDE2B5D,0x3806F63B}} /* +4.7139673683e-01 */ ,
+{{0x3C5E0D89,0x1D3C6841}} /* +6.5166781361e-18 */ ,
+{{0x3FEC38B2,0xF180BDB1}} /* +8.8192126435e-01 */ ,
+{{0xBC76E0B1,0x757C8D07}} /* -1.9843248406e-17 */ ,
+{{0x3FDEDC19,0x52EF78D6}} /* +4.8218377208e-01 */ ,
+{{0xBC7DD0F7,0xC33EDEE6}} /* -2.5861500926e-17 */ ,
+{{0x3FEC08C4,0x26725549}} /* +8.7607009420e-01 */ ,
+{{0x3C5B157F,0xD80E2946}} /* +5.8729024235e-18 */ ,
+{{0x3FDF8BA4,0xDBF89ABA}} /* +4.9289819223e-01 */ ,
+{{0xBC32EC1F,0xC1B776B8}} /* -1.0257831677e-18 */ ,
+{{0x3FEBD7C0,0xAC6F952A}} /* +8.7008699111e-01 */ ,
+{{0xBC8825A7,0x32AC700A}} /* -4.1888510869e-17 */ ,
+{{0x3FE01CFC,0x874C3EB7}} /* +5.0353838373e-01 */ ,
+{{0xBC734A35,0xE7C2368C}} /* -1.6731308205e-17 */ ,
+{{0x3FEBA5AA,0x673590D2}} /* +8.6397285612e-01 */ ,
+{{0x3C87EA4E,0x370753B6}} /* +4.1486355957e-17 */ ,
+{{0x3FE07387,0x9922FFEE}} /* +5.1410274419e-01 */ ,
+{{0xBC8A5A01,0x4347406C}} /* -4.5712707524e-17 */ ,
+{{0x3FEB7283,0x45196E3E}} /* +8.5772861000e-01 */ ,
+{{0xBC8BC69F,0x324E6D61}} /* -4.8183447936e-17 */ ,
+{{0x3FE0C970,0x4D5D898F}} /* +5.2458968268e-01 */ ,
+{{0xBC88D3D7,0xDE6EE9B2}} /* -4.3068869040e-17 */ ,
+{{0x3FEB3E4D,0x3EF55712}} /* +8.5135519311e-01 */ ,
+{{0xBC8EB6B8,0xBF11A493}} /* -5.3279874446e-17 */ ,
+{{0x3FE11EB3,0x541B4B23}} /* +5.3499761989e-01 */ ,
+{{0xBC8EF23B,0x69ABE4F1}} /* -5.3683132708e-17 */ ,
+{{0x3FEB090A,0x58150200}} /* +8.4485356525e-01 */ ,
+{{0xBC8926DA,0x300FFCCE}} /* -4.3631360297e-17 */ ,
+{{0x3FE1734D,0x63DEDB49}} /* +5.4532498842e-01 */ ,
+{{0xBC87EEF2,0xCCC50575}} /* -4.1517817538e-17 */ ,
+{{0x3FEAD2BC,0x9E21D511}} /* +8.3822470555e-01 */ ,
+{{0xBC847FBE,0x07BEA548}} /* -3.5560085053e-17 */ ,
+{{0x3FE1C73B,0x39AE68C8}} /* +5.5557023302e-01 */ ,
+{{0x3C8B25DD,0x267F6600}} /* +4.7094109406e-17 */ ,
+{{0x3FEA9B66,0x290EA1A3}} /* +8.3146961230e-01 */ ,
+{{0x3C39F630,0xE8B6DAC8}} /* +1.4073856985e-18 */ ,
+{{0x3FE21A79,0x9933EB59}} /* +5.6573181078e-01 */ ,
+{{0xBC83A7B1,0x77C68FB2}} /* -3.4096079597e-17 */ ,
+{{0x3FEA6309,0x1B02FAE2}} /* +8.2458930278e-01 */ ,
+{{0xBC7E9111,0x52248D10}} /* -2.6512360489e-17 */ ,
+{{0x3FE26D05,0x4CDD12DF}} /* +5.7580819142e-01 */ ,
+{{0xBC85DA74,0x3EF3770C}} /* -3.7909495459e-17 */ ,
+{{0x3FEA29A7,0xA0462782}} /* +8.1758481315e-01 */ ,
+{{0xBC7128BB,0x015DF175}} /* -1.4883149812e-17 */ ,
+{{0x3FE2BEDB,0x25FAF3EA}} /* +5.8579785746e-01 */ ,
+{{0xBC514981,0xC796EE46}} /* -3.7485501964e-18 */ ,
+{{0x3FE9EF43,0xEF29AF94}} /* +8.1045719825e-01 */ ,
+{{0x3C7B1DFC,0xB60445C2}} /* +2.3520367350e-17 */ ,
+{{0x3FE30FF7,0xFCE17035}} /* +5.9569930449e-01 */ ,
+{{0xBC6EFCC6,0x26F74A6F}} /* -1.3438641937e-17 */ ,
+{{0x3FE9B3E0,0x47F38741}} /* +8.0320753148e-01 */ ,
+{{0xBC830EE2,0x86712474}} /* -3.3060609805e-17 */ ,
+{{0x3FE36058,0xB10659F3}} /* +6.0551104140e-01 */ ,
+{{0xBC81FCB3,0xA35857E7}} /* -3.1202672493e-17 */ ,
+{{0x3FE9777E,0xF4C7D742}} /* +7.9583690461e-01 */ ,
+{{0xBC815479,0xA240665E}} /* -3.0062724852e-17 */ ,
+{{0x3FE3AFFA,0x292050B9}} /* +6.1523159058e-01 */ ,
+{{0x3C7E3E25,0xE3954964}} /* +2.6231417767e-17 */ ,
+{{0x3FE93A22,0x499263FB}} /* +7.8834642763e-01 */ ,
+{{0x3C83D419,0xA920DF0B}} /* +3.4396993154e-17 */ ,
+{{0x3FE3FED9,0x534556D4}} /* +6.2485948814e-01 */ ,
+{{0x3C836916,0x608C5061}} /* +3.3671846037e-17 */ ,
+{{0x3FE8FBCC,0xA3EF940D}} /* +7.8073722857e-01 */ ,
+{{0xBC66DFA9,0x9C86F2F1}} /* -9.9198782067e-18 */ ,
+{{0x3FE44CF3,0x25091DD6}} /* +6.3439328416e-01 */ ,
+{{0x3C68076A,0x2CFDC6B3}} /* +1.0420901929e-17 */ ,
+{{0x3FE8BC80,0x6B151741}} /* +7.7301045336e-01 */ ,
+{{0xBC82C5E1,0x2ED1336D}} /* -3.2565907034e-17 */ ,
+{{0x3FE49A44,0x9B9B0939}} /* +6.4383154289e-01 */ ,
+{{0xBC827EE1,0x6D719B94}} /* -3.2084798795e-17 */ ,
+{{0x3FE87C40,0x0FBA2EBF}} /* +7.6516726562e-01 */ ,
+{{0xBC82DABC,0x0C3F64CD}} /* -3.2707225613e-17 */ ,
+{{0x3FE4E6CA,0xBBE3E5E9}} /* +6.5317284295e-01 */ ,
+{{0x3C63C293,0xEDCEB327}} /* +8.5695642060e-18 */ ,
+{{0x3FE83B0E,0x0BFF976E}} /* +7.5720884651e-01 */ ,
+{{0xBC76F420,0xF8EA3475}} /* -1.9909098777e-17 */ ,
+{{0x3FE53282,0x92A35596}} /* +6.6241577759e-01 */ ,
+{{0xBC7A12EB,0x89DA0257}} /* -2.2615508886e-17 */ ,
+{{0x3FE7F8EC,0xE3571771}} /* +7.4913639452e-01 */ ,
+{{0xBC89C8D8,0xCE93C917}} /* -4.4729078447e-17 */ ,
+{{0x3FE57D69,0x348CECA0}} /* +6.7155895485e-01 */ ,
+{{0xBC875720,0x992BFBB2}} /* -4.0489037749e-17 */ ,
+{{0x3FE7B5DF,0x226AAFAF}} /* +7.4095112535e-01 */ ,
+{{0xBC70F537,0xACDF0AD7}} /* -1.4708616952e-17 */ ,
+{{0x3FE5C77B,0xBE65018C}} /* +6.8060099780e-01 */ ,
+{{0x3C8069EA,0x9C0BC32A}} /* +2.8473293355e-17 */ ,
+{{0x3FE771E7,0x5F037261}} /* +7.3265427167e-01 */ ,
+{{0x3C75CFCE,0x8D84068F}} /* +1.8918673482e-17 */ ,
+{{0x3FE610B7,0x551D2CDF}} /* +6.8954054474e-01 */ ,
+{{0xBC7251B3,0x52FF2A37}} /* -1.5889323295e-17 */ ,
+{{0x3FE72D08,0x37EFFF96}} /* +7.2424708295e-01 */ ,
+{{0x3C80D4EF,0x0F1D915C}} /* +2.9198471334e-17 */ ,
+{{0x3FE65919,0x25F0783D}} /* +6.9837624941e-01 */ ,
+{{0x3C8C3D64,0xFBF5DE23}} /* +4.8988282436e-17 */ ,
+{{0x3FE6E744,0x54EAA8AF}} /* +7.1573082528e-01 */ ,
+{{0xBC8DBC03,0xC84E226E}} /* -5.1581018476e-17 */ ,
+{{0x3FE6A09E,0x667F3BCD}} /* +7.0710678119e-01 */ ,
+{{0xBC8BDD34,0x13B26456}} /* -4.8336466567e-17 */ ,
+{{0x3FE6A09E,0x667F3BCD}} /* +7.0710678119e-01 */ ,
+{{0xBC8BDD34,0x13B26456}} /* -4.8336466567e-17 */ ,
+
+};
+
+#else
+static db_number const s3 = {{0x55555555,0xBFC55555}} /* -1.6666666667e-01 */;
+static db_number const s5 = {{0x11111111,0x3F811111}} /* +8.3333333333e-03 */;
+static db_number const s7 = {{0x1A01A01A,0xBF2A01A0}} /* -1.9841269841e-04 */;
+
+static db_number const c2 = {{0x00000000,0xBFE00000}} /* -5.0000000000e-01 */;
+static db_number const c4 = {{0x55555555,0x3FA55555}} /* +4.1666666667e-02 */;
+static db_number const c6 = {{0x16C16C17,0xBF56C16C}} /* -1.3888888889e-03 */;
+
+static db_number const t3h = {{0x55555555,0x3FD55555}} /* +3.3333333333e-01 */;
+static db_number const t3l = {{0xB4EE83F1,0x3C7CB8E2}} /* +2.4912545352e-17 */;
+static db_number const t5 = {{0x11110586,0x3FC11111}} /* +1.3333333333e-01 */;
+static db_number const t7 = {{0x1D1301A5,0x3FABA1BA}} /* +5.3968254136e-02 */;
+static db_number const t9 = {{0x751BE4A4,0x3F9664EC}} /* +2.1869368217e-02 */;
+static db_number const t11 = {{0xEFC04F73,0x3F823953}} /* +8.8984067479e-03 */;
+
+
+/*  sine and cos of kPi/256 in double-double */
+static db_number const sincosTable[260] =
+{
+{{0x00000000,0x00000000}} /* +0.0000000000e+00 */ ,
+{{0x00000000,0x00000000}} /* +0.0000000000e+00 */ ,
+{{0x00000000,0x3FF00000}} /* +1.0000000000e+00 */ ,
+{{0x00000000,0x00000000}} /* +0.0000000000e+00 */ ,
+{{0xFCDEC784,0x3F8921D1}} /* +1.2271538286e-02 */ ,
+{{0xBE836D9D,0x3C29878E}} /* +6.9197907640e-19 */ ,
+{{0x169B92DB,0x3FEFFF62}} /* +9.9992470184e-01 */ ,
+{{0xC81FBD0D,0x3C85DDA3}} /* +3.7931082513e-17 */ ,
+{{0xF7A3667E,0x3F992155}} /* +2.4541228523e-02 */ ,
+{{0x091A0130,0xBBFB1D63}} /* -9.1868490126e-20 */ ,
+{{0x6084CD0D,0x3FEFFD88}} /* +9.9969881870e-01 */ ,
+{{0x4556E4CB,0xBC81354D}} /* -2.9851486404e-17 */ ,
+{{0x759455CD,0x3FA2D865}} /* +3.6807222941e-02 */ ,
+{{0x5BA93AC0,0x3C2686F6}} /* +6.1060088804e-19 */ ,
+{{0xEFFEF75D,0x3FEFFA72}} /* +9.9932238459e-01 */ ,
+{{0xCDB25956,0xBC88B4CD}} /* -4.2858538441e-17 */ ,
+{{0xF10DD814,0x3FA91F65}} /* +4.9067674327e-02 */ ,
+{{0x0D569A90,0xBC2912BD}} /* -6.7961037205e-19 */ ,
+{{0xE3796D7E,0x3FEFF621}} /* +9.9879545621e-01 */ ,
+{{0x2E24AA15,0xBC6C57BC}} /* -1.2291693337e-17 */ ,
+{{0x79F820E0,0x3FAF656E}} /* +6.1320736302e-02 */ ,
+{{0xE392BFFE,0xBC22E1EB}} /* -5.1181134065e-19 */ ,
+{{0x658E71AD,0x3FEFF095}} /* +9.9811811290e-01 */ ,
+{{0xE18A4B9E,0x3C801A8C}} /* +2.7935487558e-17 */ ,
+{{0x92CE19F6,0x3FB2D520}} /* +7.3564563600e-02 */ ,
+{{0xA8BF6B2C,0xBC49A088}} /* -2.7784941506e-18 */ ,
+{{0xAD01883A,0x3FEFE9CD}} /* +9.9729045668e-01 */ ,
+{{0xD0C67E35,0x3C6521EC}} /* +9.1647695371e-18 */ ,
+{{0x0A9AA419,0x3FB5F6D0}} /* +8.5797312344e-02 */ ,
+{{0xD03F6C9A,0xBC4F4022}} /* -3.3881893831e-18 */ ,
+{{0xFCBD5B09,0x3FEFE1CA}} /* +9.9631261218e-01 */ ,
+{{0x202A884E,0x3C6A23E3}} /* +1.1336497892e-17 */ ,
+{{0xBC29B42C,0x3FB917A6}} /* +9.8017140330e-02 */ ,
+{{0xD26ED688,0xBC3E2718}} /* -1.6345823622e-18 */ ,
+{{0xA3D12526,0x3FEFD88D}} /* +9.9518472667e-01 */ ,
+{{0x378811C7,0xBC887DF6}} /* -4.2486913678e-17 */ ,
+{{0xC79EC2D5,0x3FBC3785}} /* +1.1022220729e-01 */ ,
+{{0xF133FB21,0xBC24F39D}} /* -5.6789503538e-19 */ ,
+{{0xFD6DA67B,0x3FEFCE15}} /* +9.9390697000e-01 */ ,
+{{0x830D4C09,0xBC75DD6F}} /* -1.8964849471e-17 */ ,
+{{0x56A9730E,0x3FBF564E}} /* +1.2241067520e-01 */ ,
+{{0x729AE56D,0x3C4A2704}} /* +2.8354501490e-18 */ ,
+{{0x70E19FD3,0x3FEFC264}} /* +9.9247953460e-01 */ ,
+{{0x68ECACEE,0x3C81EC86}} /* +3.1093055095e-17 */ ,
+{{0xCEDAF577,0x3FC139F0}} /* +1.3458070851e-01 */ ,
+{{0x4D1B3CFA,0xBC652343}} /* -9.1670359171e-18 */ ,
+{{0x7195D741,0x3FEFB579}} /* +9.9090263543e-01 */ ,
+{{0x7397CC08,0x3C71BFAC}} /* +1.5394565095e-17 */ ,
+{{0x6E8E613A,0x3FC2C810}} /* +1.4673047446e-01 */ ,
+{{0xA89A11E0,0x3C513000}} /* +3.7269471470e-18 */ ,
+{{0x7F08A517,0x3FEFA755}} /* +9.8917650996e-01 */ ,
+{{0xCA13571F,0xBC87A0A8}} /* -4.0987309937e-17 */ ,
+{{0xB1293E5A,0x3FC45576}} /* +1.5885814333e-01 */ ,
+{{0x4119F7B1,0xBC5285A2}} /* -4.0163200574e-18 */ ,
+{{0x24C9099B,0x3FEF97F9}} /* +9.8730141816e-01 */ ,
+{{0xEEA5963B,0xBC8E2AE0}} /* -5.2332261256e-17 */ ,
+{{0x448B3FC6,0x3FC5E214}} /* +1.7096188876e-01 */ ,
+{{0x779DDAC6,0x3C6531FF}} /* +9.1919980182e-18 */ ,
+{{0xFA714BA9,0x3FEF8764}} /* +9.8527764239e-01 */ ,
+{{0x778FFCB6,0x3C7AB256}} /* +2.3155637028e-17 */ ,
+{{0xDE50BF31,0x3FC76DD9}} /* +1.8303988796e-01 */ ,
+{{0xEC501B2F,0x3C61D5EE}} /* +7.7349918689e-18 */ ,
+{{0xA3A12077,0x3FEF7599}} /* +9.8310548743e-01 */ ,
+{{0xD743195C,0x3C884F31}} /* +4.2170007523e-17 */ ,
+{{0x3C69A60B,0x3FC8F8B8}} /* +1.9509032202e-01 */ ,
+{{0xB9FF8D82,0xBC626D19}} /* -7.9910790685e-18 */ ,
+{{0xCFF75CB0,0x3FEF6297}} /* +9.8078528040e-01 */ ,
+{{0x2A361FD3,0x3C756217}} /* +1.8546939998e-17 */ ,
+{{0x25B00451,0x3FCA82A0}} /* +2.0711137619e-01 */ ,
+{{0xFFD084AD,0xBC687905}} /* -1.0613362529e-17 */ ,
+{{0x3B0B2F2D,0x3FEF4E60}} /* +9.7831737072e-01 */ ,
+{{0xE695AC05,0xBC78EE01}} /* -2.1623082233e-17 */ ,
+{{0x6A7E4F63,0x3FCC0B82}} /* +2.1910124016e-01 */ ,
+{{0x9E521935,0xBC1AF143}} /* -3.6513812299e-19 */ ,
+{{0xAC64E589,0x3FEF38F3}} /* +9.7570213004e-01 */ ,
+{{0xB51F72E6,0xBC7D7BAF}} /* -2.5572556081e-17 */ ,
+{{0xE5454311,0x3FCD934F}} /* +2.3105810828e-01 */ ,
+{{0x277107AD,0x3C675B92}} /* +1.0129787150e-17 */ ,
+{{0xF7763ADA,0x3FEF2252}} /* +9.7293995221e-01 */ ,
+{{0x1C8D94AB,0xBC820CB8}} /* -3.1311211122e-17 */ ,
+{{0x7B215F1B,0x3FCF19F9}} /* +2.4298017990e-01 */ ,
+{{0xF11DA2C4,0xBC642DEE}} /* -8.7514315297e-18 */ ,
+{{0xFB9230D7,0x3FEF0A7E}} /* +9.7003125319e-01 */ ,
+{{0xDC6B4989,0x3C752C7A}} /* +1.8365300348e-17 */ ,
+{{0x0E37FDAE,0x3FD04FB8}} /* +2.5486565960e-01 */ ,
+{{0xB72583CC,0xBC0412CD}} /* -1.3602299807e-19 */ ,
+{{0xA3E473C2,0x3FEEF178}} /* +9.6697647104e-01 */ ,
+{{0x67FE774F,0x3C86310A}} /* +3.8496228837e-17 */ ,
+{{0x62B1F677,0x3FD111D2}} /* +2.6671275747e-01 */ ,
+{{0x0AB7AA9A,0x3C7824C2}} /* +2.0941222579e-17 */ ,
+{{0xE7684963,0x3FEED740}} /* +9.6377606580e-01 */ ,
+{{0x91F59CC2,0x3C7E82C7}} /* +2.6463950561e-17 */ ,
+{{0x3F4CDB3E,0x3FD1D344}} /* +2.7851968938e-01 */ ,
+{{0x1C13519E,0xBC6720D4}} /* -1.0030273720e-17 */ ,
+{{0xC8DF0B74,0x3FEEBBD8}} /* +9.6043051942e-01 */ ,
+{{0x615E7277,0x3C7C6C8C}} /* +2.4653904815e-17 */ ,
+{{0x2ED59F06,0x3FD29406}} /* +2.9028467725e-01 */ ,
+{{0xA2C4612D,0xBC75D28D}} /* -1.8927978708e-17 */ ,
+{{0x56C62DDA,0x3FEE9F41}} /* +9.5694033573e-01 */ ,
+{{0xE2E3F81E,0x3C8760B1}} /* +4.0553869862e-17 */ ,
+{{0xC2E18152,0x3FD35410}} /* +3.0200594932e-01 */ ,
+{{0x2F96E062,0xBC73CB00}} /* -1.7167666235e-17 */ ,
+{{0xAB4CD10D,0x3FEE817B}} /* +9.5330604035e-01 */ ,
+{{0x686B5E0A,0xBC7D0AFE}} /* -2.5190738780e-17 */ ,
+{{0x94176601,0x3FD4135C}} /* +3.1368174040e-01 */ ,
+{{0x4AFA2518,0x3C70C97C}} /* +1.4560447300e-17 */ ,
+{{0xEC48E112,0x3FEE6288}} /* +9.4952818059e-01 */ ,
+{{0xF2847754,0xBC616B56}} /* -7.5544151928e-18 */ ,
+{{0x4278E76A,0x3FD4D1E2}} /* +3.2531029216e-01 */ ,
+{{0x18792858,0x3C624172}} /* +7.9171249464e-18 */ ,
+{{0x4B2BC17E,0x3FEE426A}} /* +9.4560732538e-01 */ ,
+{{0x89744882,0x3C8A8738}} /* +4.6019102479e-17 */ ,
+{{0x75AB1FDD,0x3FD58F9A}} /* +3.3688985339e-01 */ ,
+{{0xD58CF620,0xBC1EFDC0}} /* -4.2000940033e-19 */ ,
+{{0x04F686E5,0x3FEE2121}} /* +9.4154406518e-01 */ ,
+{{0x6C126527,0xBC8014C7}} /* -2.7896379548e-17 */ ,
+{{0xDD3F27C6,0x3FD64C7D}} /* +3.4841868025e-01 */ ,
+{{0x4A664121,0x3C510D2B}} /* +3.6974420514e-18 */ ,
+{{0x622DBE2B,0x3FEDFEAE}} /* +9.3733901191e-01 */ ,
+{{0x88425567,0xBC8514EA}} /* -3.6570926284e-17 */ ,
+{{0x30FA459F,0x3FD70885}} /* +3.5989503653e-01 */ ,
+{{0xE0864C5D,0xBC744B19}} /* -1.7601687124e-17 */ ,
+{{0xB6CCC23C,0x3FEDDB13}} /* +9.3299279883e-01 */ ,
+{{0xC6107DB3,0x3C883C37}} /* +4.2041415555e-17 */ ,
+{{0x311DCCE7,0x3FD7C3A9}} /* +3.7131719395e-01 */ ,
+{{0x1EF3E8D9,0x3C19A3F2}} /* +3.4749239648e-19 */ ,
+{{0x6238A09B,0x3FEDB652}} /* +9.2850608047e-01 */ ,
+{{0xEAE69460,0xBC7ADEE7}} /* -2.3306639848e-17 */ ,
+{{0xA6AEA963,0x3FD87DE2}} /* +3.8268343236e-01 */ ,
+{{0xD3D5A610,0xBC672CED}} /* -1.0050772696e-17 */ ,
+{{0xCF328D46,0x3FED906B}} /* +9.2387953251e-01 */ ,
+{{0x10231AC2,0x3C7457E6}} /* +1.7645047084e-17 */ ,
+{{0x63BC93D7,0x3FD9372A}} /* +3.9399204006e-01 */ ,
+{{0x9E5AD5B1,0x3C668431}} /* +9.7649241641e-18 */ ,
+{{0x73C9E68B,0x3FED6961}} /* +9.1911385169e-01 */ ,
+{{0xC6393D55,0xBC7E8C61}} /* -2.6496484622e-17 */ ,
+{{0x43A8ED8A,0x3FD9EF79}} /* +4.0524131400e-01 */ ,
+{{0x290BDBAB,0x3C66DA81}} /* +9.9111401943e-18 */ ,
+{{0xD14DC93A,0x3FED4134}} /* +9.1420975570e-01 */ ,
+{{0x95D25AF2,0xBC84EF52}} /* -3.6316182528e-17 */ ,
+{{0x2B6D3FCA,0x3FDAA6C8}} /* +4.1642956010e-01 */ ,
+{{0x6EE5CCF7,0xBC7D5F10}} /* -2.5475580413e-17 */ ,
+{{0x743E35DC,0x3FED17E7}} /* +9.0916798309e-01 */ ,
+{{0x3540130A,0xBC5101DA}} /* -3.6878564091e-18 */ ,
+{{0x09E15CC0,0x3FDB5D10}} /* +4.2755509343e-01 */ ,
+{{0xCB974183,0x3C65B362}} /* +9.4111898163e-18 */ ,
+{{0xF43CC773,0x3FECED7A}} /* +9.0398929312e-01 */ ,
+{{0xB5AB58AE,0xBC5E7B6B}} /* -6.6097544687e-18 */ ,
+{{0xD8011EE7,0x3FDC1249}} /* +4.3861623854e-01 */ ,
+{{0xBB515206,0xBC7813AA}} /* -2.0883315831e-17 */ ,
+{{0xF3FCFC5C,0x3FECC1F0}} /* +8.9867446569e-01 */ ,
+{{0x3B68F6AB,0x3C7E5761}} /* +2.6316906461e-17 */ ,
+{{0x9931C45E,0x3FDCC66E}} /* +4.4961132965e-01 */ ,
+{{0x59C37F8F,0x3C56850E}} /* +4.8831924232e-18 */ ,
+{{0x213411F5,0x3FEC954B}} /* +8.9322430120e-01 */ ,
+{{0x1E946603,0xBC52FB76}} /* -4.1161239152e-18 */ ,
+{{0x5B86E389,0x3FDD7977}} /* +4.6053871096e-01 */ ,
+{{0x87BC0575,0x3C7550EC}} /* +1.8488777492e-17 */ ,
+{{0x3488739B,0x3FEC678B}} /* +8.8763962040e-01 */ ,
+{{0xC7C5FF5B,0x3C6D86CA}} /* +1.2805091919e-17 */ ,
+{{0x3806F63B,0x3FDE2B5D}} /* +4.7139673683e-01 */ ,
+{{0x1D3C6841,0x3C5E0D89}} /* +6.5166781361e-18 */ ,
+{{0xF180BDB1,0x3FEC38B2}} /* +8.8192126435e-01 */ ,
+{{0x757C8D07,0xBC76E0B1}} /* -1.9843248406e-17 */ ,
+{{0x52EF78D6,0x3FDEDC19}} /* +4.8218377208e-01 */ ,
+{{0xC33EDEE6,0xBC7DD0F7}} /* -2.5861500926e-17 */ ,
+{{0x26725549,0x3FEC08C4}} /* +8.7607009420e-01 */ ,
+{{0xD80E2946,0x3C5B157F}} /* +5.8729024235e-18 */ ,
+{{0xDBF89ABA,0x3FDF8BA4}} /* +4.9289819223e-01 */ ,
+{{0xC1B776B8,0xBC32EC1F}} /* -1.0257831677e-18 */ ,
+{{0xAC6F952A,0x3FEBD7C0}} /* +8.7008699111e-01 */ ,
+{{0x32AC700A,0xBC8825A7}} /* -4.1888510869e-17 */ ,
+{{0x874C3EB7,0x3FE01CFC}} /* +5.0353838373e-01 */ ,
+{{0xE7C2368C,0xBC734A35}} /* -1.6731308205e-17 */ ,
+{{0x673590D2,0x3FEBA5AA}} /* +8.6397285612e-01 */ ,
+{{0x370753B6,0x3C87EA4E}} /* +4.1486355957e-17 */ ,
+{{0x9922FFEE,0x3FE07387}} /* +5.1410274419e-01 */ ,
+{{0x4347406C,0xBC8A5A01}} /* -4.5712707524e-17 */ ,
+{{0x45196E3E,0x3FEB7283}} /* +8.5772861000e-01 */ ,
+{{0x324E6D61,0xBC8BC69F}} /* -4.8183447936e-17 */ ,
+{{0x4D5D898F,0x3FE0C970}} /* +5.2458968268e-01 */ ,
+{{0xDE6EE9B2,0xBC88D3D7}} /* -4.3068869040e-17 */ ,
+{{0x3EF55712,0x3FEB3E4D}} /* +8.5135519311e-01 */ ,
+{{0xBF11A493,0xBC8EB6B8}} /* -5.3279874446e-17 */ ,
+{{0x541B4B23,0x3FE11EB3}} /* +5.3499761989e-01 */ ,
+{{0x69ABE4F1,0xBC8EF23B}} /* -5.3683132708e-17 */ ,
+{{0x58150200,0x3FEB090A}} /* +8.4485356525e-01 */ ,
+{{0x300FFCCE,0xBC8926DA}} /* -4.3631360297e-17 */ ,
+{{0x63DEDB49,0x3FE1734D}} /* +5.4532498842e-01 */ ,
+{{0xCCC50575,0xBC87EEF2}} /* -4.1517817538e-17 */ ,
+{{0x9E21D511,0x3FEAD2BC}} /* +8.3822470555e-01 */ ,
+{{0x07BEA548,0xBC847FBE}} /* -3.5560085053e-17 */ ,
+{{0x39AE68C8,0x3FE1C73B}} /* +5.5557023302e-01 */ ,
+{{0x267F6600,0x3C8B25DD}} /* +4.7094109406e-17 */ ,
+{{0x290EA1A3,0x3FEA9B66}} /* +8.3146961230e-01 */ ,
+{{0xE8B6DAC8,0x3C39F630}} /* +1.4073856985e-18 */ ,
+{{0x9933EB59,0x3FE21A79}} /* +5.6573181078e-01 */ ,
+{{0x77C68FB2,0xBC83A7B1}} /* -3.4096079597e-17 */ ,
+{{0x1B02FAE2,0x3FEA6309}} /* +8.2458930278e-01 */ ,
+{{0x52248D10,0xBC7E9111}} /* -2.6512360489e-17 */ ,
+{{0x4CDD12DF,0x3FE26D05}} /* +5.7580819142e-01 */ ,
+{{0x3EF3770C,0xBC85DA74}} /* -3.7909495459e-17 */ ,
+{{0xA0462782,0x3FEA29A7}} /* +8.1758481315e-01 */ ,
+{{0x015DF175,0xBC7128BB}} /* -1.4883149812e-17 */ ,
+{{0x25FAF3EA,0x3FE2BEDB}} /* +5.8579785746e-01 */ ,
+{{0xC796EE46,0xBC514981}} /* -3.7485501964e-18 */ ,
+{{0xEF29AF94,0x3FE9EF43}} /* +8.1045719825e-01 */ ,
+{{0xB60445C2,0x3C7B1DFC}} /* +2.3520367350e-17 */ ,
+{{0xFCE17035,0x3FE30FF7}} /* +5.9569930449e-01 */ ,
+{{0x26F74A6F,0xBC6EFCC6}} /* -1.3438641937e-17 */ ,
+{{0x47F38741,0x3FE9B3E0}} /* +8.0320753148e-01 */ ,
+{{0x86712474,0xBC830EE2}} /* -3.3060609805e-17 */ ,
+{{0xB10659F3,0x3FE36058}} /* +6.0551104140e-01 */ ,
+{{0xA35857E7,0xBC81FCB3}} /* -3.1202672493e-17 */ ,
+{{0xF4C7D742,0x3FE9777E}} /* +7.9583690461e-01 */ ,
+{{0xA240665E,0xBC815479}} /* -3.0062724852e-17 */ ,
+{{0x292050B9,0x3FE3AFFA}} /* +6.1523159058e-01 */ ,
+{{0xE3954964,0x3C7E3E25}} /* +2.6231417767e-17 */ ,
+{{0x499263FB,0x3FE93A22}} /* +7.8834642763e-01 */ ,
+{{0xA920DF0B,0x3C83D419}} /* +3.4396993154e-17 */ ,
+{{0x534556D4,0x3FE3FED9}} /* +6.2485948814e-01 */ ,
+{{0x608C5061,0x3C836916}} /* +3.3671846037e-17 */ ,
+{{0xA3EF940D,0x3FE8FBCC}} /* +7.8073722857e-01 */ ,
+{{0x9C86F2F1,0xBC66DFA9}} /* -9.9198782067e-18 */ ,
+{{0x25091DD6,0x3FE44CF3}} /* +6.3439328416e-01 */ ,
+{{0x2CFDC6B3,0x3C68076A}} /* +1.0420901929e-17 */ ,
+{{0x6B151741,0x3FE8BC80}} /* +7.7301045336e-01 */ ,
+{{0x2ED1336D,0xBC82C5E1}} /* -3.2565907034e-17 */ ,
+{{0x9B9B0939,0x3FE49A44}} /* +6.4383154289e-01 */ ,
+{{0x6D719B94,0xBC827EE1}} /* -3.2084798795e-17 */ ,
+{{0x0FBA2EBF,0x3FE87C40}} /* +7.6516726562e-01 */ ,
+{{0x0C3F64CD,0xBC82DABC}} /* -3.2707225613e-17 */ ,
+{{0xBBE3E5E9,0x3FE4E6CA}} /* +6.5317284295e-01 */ ,
+{{0xEDCEB327,0x3C63C293}} /* +8.5695642060e-18 */ ,
+{{0x0BFF976E,0x3FE83B0E}} /* +7.5720884651e-01 */ ,
+{{0xF8EA3475,0xBC76F420}} /* -1.9909098777e-17 */ ,
+{{0x92A35596,0x3FE53282}} /* +6.6241577759e-01 */ ,
+{{0x89DA0257,0xBC7A12EB}} /* -2.2615508886e-17 */ ,
+{{0xE3571771,0x3FE7F8EC}} /* +7.4913639452e-01 */ ,
+{{0xCE93C917,0xBC89C8D8}} /* -4.4729078447e-17 */ ,
+{{0x348CECA0,0x3FE57D69}} /* +6.7155895485e-01 */ ,
+{{0x992BFBB2,0xBC875720}} /* -4.0489037749e-17 */ ,
+{{0x226AAFAF,0x3FE7B5DF}} /* +7.4095112535e-01 */ ,
+{{0xACDF0AD7,0xBC70F537}} /* -1.4708616952e-17 */ ,
+{{0xBE65018C,0x3FE5C77B}} /* +6.8060099780e-01 */ ,
+{{0x9C0BC32A,0x3C8069EA}} /* +2.8473293355e-17 */ ,
+{{0x5F037261,0x3FE771E7}} /* +7.3265427167e-01 */ ,
+{{0x8D84068F,0x3C75CFCE}} /* +1.8918673482e-17 */ ,
+{{0x551D2CDF,0x3FE610B7}} /* +6.8954054474e-01 */ ,
+{{0x52FF2A37,0xBC7251B3}} /* -1.5889323295e-17 */ ,
+{{0x37EFFF96,0x3FE72D08}} /* +7.2424708295e-01 */ ,
+{{0x0F1D915C,0x3C80D4EF}} /* +2.9198471334e-17 */ ,
+{{0x25F0783D,0x3FE65919}} /* +6.9837624941e-01 */ ,
+{{0xFBF5DE23,0x3C8C3D64}} /* +4.8988282436e-17 */ ,
+{{0x54EAA8AF,0x3FE6E744}} /* +7.1573082528e-01 */ ,
+{{0xC84E226E,0xBC8DBC03}} /* -5.1581018476e-17 */ ,
+{{0x667F3BCD,0x3FE6A09E}} /* +7.0710678119e-01 */ ,
+{{0x13B26456,0xBC8BDD34}} /* -4.8336466567e-17 */ ,
+{{0x667F3BCD,0x3FE6A09E}} /* +7.0710678119e-01 */ ,
+{{0x13B26456,0xBC8BDD34}} /* -4.8336466567e-17 */ ,
+
+};
+
+#endif /* WORDS_BIGENDIAN */
+
+
diff --git a/src/crlibm/trigpi.c b/src/crlibm/trigpi.c
new file mode 100644
index 0000000..ac4ba07
--- /dev/null
+++ b/src/crlibm/trigpi.c
@@ -0,0 +1,1169 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "crlibm.h"
+/*
+ * Correctly rounded trigpi functions
+ *
+ * Authors : F. de Dinechin, S. Chevillard, C. Lauter (the latter two
+ * didn't write a line of this file, but wrote a tool that wrote a
+ * tool that wrote etc that wrote bits of code related to polynomial
+ * evaluation.)
+ *
+ * This file is part of the crlibm library developed by the Arenaire
+ * project at Ecole Normale Superieure de Lyon
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or 
+ * (at your option) any later version.
+ * 
+ * This program 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+*/
+#include "crlibm_private.h"
+#include "triple-double.h"
+#include "trigpi.h"
+ 
+
+/*   TODO
+
+
+Use the symmetries of the tables
+
+Actually, use the tables from the standard trigo.
+
+Write decent quick steps. Or hammer Christoph and Sylvain to do so.
+
+ */
+
+
+
+
+
+/* This ugly bits of code in the beginning are polynomial evaluations
+   automagically generated and proven by Chevillard and Lauter's
+   tools 
+*/
+
+
+#define sinpiacc_coeff_1h 3.14159265358979311599796346854418516159057617187500000000000000000000000000000000e+00
+#define sinpiacc_coeff_1m 1.22464679914735320717376402945839660462569212467758006379625612680683843791484833e-16
+#define sinpiacc_coeff_1l -2.87889731599645993207191707893463395148177292198731390393739579574603302514349608e-33
+#define sinpiacc_coeff_3h -5.16771278004997025590228076907806098461151123046875000000000000000000000000000000e+00
+#define sinpiacc_coeff_3m 2.26656228257550136196266687046492287115561324595258696490418515168130397796630859e-16
+#define sinpiacc_coeff_5h 2.55016403987734552316624103696085512638092041015625000000000000000000000000000000e+00
+#define sinpiacc_coeff_5m -7.93098961936403945684716222915171282926664203267314023904077657789457589387893677e-17
+#define sinpiacc_coeff_7h -5.99264529320792105338000510528218001127243041992187500000000000000000000000000000e-01
+#define sinpiacc_coeff_9h 8.21458866130424236740026344705256633460521697998046875000000000000000000000000000e-02
+#define sinpiacc_coeff_11h -7.37046804820839888960914976223648409359157085418701171875000000000000000000000000e-03
+
+
+#define cospiacc_coeff_0h 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+#define cospiacc_coeff_2h -4.93480220054467899615247006295248866081237792968750000000000000000000000000000000e+00
+#define cospiacc_coeff_2m -3.13264775437072047133490817894057799839785556899468543790021612949203699827194214e-16
+#define cospiacc_coeff_4h 4.05871212641676848420502210501581430435180664062500000000000000000000000000000000e+00
+#define cospiacc_coeff_4m -2.66019969731660223662555032718185048048635055542576743903282476821914315223693848e-16
+#define cospiacc_coeff_6h -1.33526276885458949905682857206556946039199829101562500000000000000000000000000000e+00
+#define cospiacc_coeff_8h 2.35330630358513925859398341344785876572132110595703125000000000000000000000000000e-01
+#define cospiacc_coeff_10h -2.58068327360992909313974763563237502239644527435302734375000000000000000000000000e-02
+
+static void sincospiacc(double *sinpiacc_resh, double *sinpiacc_resm, double *sinpiacc_resl,
+		 double *cospiacc_resh, double *cospiacc_resm, double *cospiacc_resl,
+		 double x) {
+  double x2h, x2m;
+  double sinpiacc_t_1_0h;
+  double sinpiacc_t_2_0h;
+  double sinpiacc_t_3_0h;
+  double sinpiacc_t_4_0h;
+  double sinpiacc_t_5_0h, sinpiacc_t_5_0m;
+  double sinpiacc_t_6_0h, sinpiacc_t_6_0m;
+  double sinpiacc_t_7_0h, sinpiacc_t_7_0m;
+  double sinpiacc_t_8_0h, sinpiacc_t_8_0m;
+  double sinpiacc_t_9_0h, sinpiacc_t_9_0m, sinpiacc_t_9_0l;
+  double sinpiacc_t_10_0h, sinpiacc_t_10_0m, sinpiacc_t_10_0l;
+ 
+  double cospiacc_t_1_0h;
+  double cospiacc_t_2_0h;
+  double cospiacc_t_3_0h;
+  double cospiacc_t_4_0h;
+  double cospiacc_t_5_0h, cospiacc_t_5_0m;
+  double cospiacc_t_6_0h, cospiacc_t_6_0m;
+  double cospiacc_t_7_0h, cospiacc_t_7_0m;
+  double cospiacc_t_8_0h, cospiacc_t_8_0m;
+  double cospiacc_t_9_0h, cospiacc_t_9_0m, cospiacc_t_9_0l;
+
+  Mul12(&x2h,&x2m,x,x);  
+
+  sinpiacc_t_1_0h = sinpiacc_coeff_11h;
+  sinpiacc_t_2_0h = sinpiacc_t_1_0h * x2h;
+  sinpiacc_t_3_0h = sinpiacc_coeff_9h + sinpiacc_t_2_0h;
+  sinpiacc_t_4_0h = sinpiacc_t_3_0h * x2h;
+  Add12(sinpiacc_t_5_0h,sinpiacc_t_5_0m,sinpiacc_coeff_7h,sinpiacc_t_4_0h);
+  MulAdd22(&sinpiacc_t_6_0h,&sinpiacc_t_6_0m,sinpiacc_coeff_5h,sinpiacc_coeff_5m,x2h,x2m,sinpiacc_t_5_0h,sinpiacc_t_5_0m);
+  MulAdd22(&sinpiacc_t_7_0h,&sinpiacc_t_7_0m,sinpiacc_coeff_3h,sinpiacc_coeff_3m,x2h,x2m,sinpiacc_t_6_0h,sinpiacc_t_6_0m);
+  Mul22(&sinpiacc_t_8_0h,&sinpiacc_t_8_0m,sinpiacc_t_7_0h,sinpiacc_t_7_0m,x2h,x2m);
+  Add233Cond(&sinpiacc_t_9_0h,&sinpiacc_t_9_0m,&sinpiacc_t_9_0l,sinpiacc_t_8_0h,sinpiacc_t_8_0m,sinpiacc_coeff_1h,sinpiacc_coeff_1m,sinpiacc_coeff_1l);
+  Mul133(&sinpiacc_t_10_0h,&sinpiacc_t_10_0m,&sinpiacc_t_10_0l,x,sinpiacc_t_9_0h,sinpiacc_t_9_0m,sinpiacc_t_9_0l);
+  Renormalize3(sinpiacc_resh,sinpiacc_resm,sinpiacc_resl,sinpiacc_t_10_0h,sinpiacc_t_10_0m,sinpiacc_t_10_0l);
+
+  
+  cospiacc_t_1_0h = cospiacc_coeff_10h;
+  cospiacc_t_2_0h = cospiacc_t_1_0h * x2h;
+  cospiacc_t_3_0h = cospiacc_coeff_8h + cospiacc_t_2_0h;
+  cospiacc_t_4_0h = cospiacc_t_3_0h * x2h;
+  Add12(cospiacc_t_5_0h,cospiacc_t_5_0m,cospiacc_coeff_6h,cospiacc_t_4_0h);
+  MulAdd22(&cospiacc_t_6_0h,&cospiacc_t_6_0m,cospiacc_coeff_4h,cospiacc_coeff_4m,x2h,x2m,cospiacc_t_5_0h,cospiacc_t_5_0m);
+  MulAdd22(&cospiacc_t_7_0h,&cospiacc_t_7_0m,cospiacc_coeff_2h,cospiacc_coeff_2m,x2h,x2m,cospiacc_t_6_0h,cospiacc_t_6_0m);
+  Mul22(&cospiacc_t_8_0h,&cospiacc_t_8_0m,cospiacc_t_7_0h,cospiacc_t_7_0m,x2h,x2m);
+  Add123(&cospiacc_t_9_0h,&cospiacc_t_9_0m,&cospiacc_t_9_0l,cospiacc_coeff_0h,cospiacc_t_8_0h,cospiacc_t_8_0m);
+  *cospiacc_resh = cospiacc_t_9_0h; *cospiacc_resm = cospiacc_t_9_0m; *cospiacc_resl = cospiacc_t_9_0l;
+
+}
+
+
+
+
+
+
+
+
+
+
+
+/* Comment on comparing sa, ca, sy and cy 
+   either index=0, then sa=0 and ca=1, therefore t2=0, and the Add33 will be exact 
+   or index !=0, and       
+	-eps1 < sy < eps1  (but sy may be negative)
+	sa > eps1 (sa>0)
+	1-eps2 < cy < 1
+	ca < 1-eps2
+	therefore 
+	sacy = t2 >0
+	casy = t1 may be negative
+	abs(t1) <=  abs(t2)
+	Unfortunately we need a stronger condition to use the Add33 
+*/
+
+
+
+
+static void sinpi_accurate(double *rh, double *rm, double *rl,
+			   double y, int index, int quadrant)
+{
+   double syh, sym, syl, cyh, cym, cyl, sah, sam, sal, cah, cam, cal;
+   double t1h, t1m, t1l, t2h, t2m, t2l;
+
+   sincospiacc(&syh, &sym, &syl, &cyh, &cym, &cyl, y);
+   
+   sah=sincosTable[index].sh;
+   cah=sincosTable[index].ch;
+   sam=sincosTable[index].sm;
+   cam=sincosTable[index].cm;
+   sal=sincosTable[index].sl;
+   cal=sincosTable[index].cl;
+
+   if(quadrant==0 || quadrant==2) {
+     /* compute sy*ca+sa*cy   :    t1 = sy*ca,     t2 =  sa*cy*/
+     Mul33(&t1h,&t1m,&t1l, syh,sym,syl, cah,cam,cal);
+     Mul33(&t2h,&t2m,&t2l, sah,sam,sal, cyh,cym,cyl);
+     Add33Cond(rh, rm, rl, t2h,t2m,t2l, t1h,t1m,t1l);
+   }
+   else {
+     /* compute cy*ca - sa*sy : t1 = cy*ca,    t2 =  sa*sy */
+     Mul33(&t1h,&t1m,&t1l, cyh,cym,cyl, cah,cam,cal);
+     Mul33(&t2h,&t2m,&t2l, sah,sam,sal, syh,sym,syl);     
+     Add33Cond(rh, rm, rl, t1h,t1m,t1l, -t2h,-t2m,-t2l);
+   }
+
+   if (quadrant>=2) {
+     *rh = -*rh;
+     *rm = -*rm;
+     *rl = -*rl;
+   }
+
+};
+
+
+
+
+
+
+#define sinpiquick_coeff_1h 3.14159265358979311599796346854418516159057617187500000000000000000000000000000000e+00
+#define sinpiquick_coeff_1m 1.22464971683184787123862072310058851157814368464452070561776508839102461934089661e-16
+#define sinpiquick_coeff_3h -5.16771278004997025590228076907806098461151123046875000000000000000000000000000000e+00
+#define sinpiquick_coeff_5h 2.55016403989992213041659852024167776107788085937500000000000000000000000000000000e+00
+#define sinpiquick_coeff_7h -5.99263913290728922333983064163476228713989257812500000000000000000000000000000000e-01
+#define cospiquick_coeff_0h 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000e+00
+#define cospiquick_coeff_2h -4.93480220054467899615247006295248866081237792968750000000000000000000000000000000e+00
+#define cospiquick_coeff_4h 4.05871212632582167856298838160000741481781005859375000000000000000000000000000000e+00
+#define cospiquick_coeff_6h -1.33525456323720947970912220625905320048332214355468750000000000000000000000000000e+00
+
+
+
+static void cospi_accurate(double *rh, double *rm, double *rl,
+			   double y, int index, int quadrant)
+{
+   double syh, sym, syl, cyh, cym, cyl, sah, sam, sal, cah, cam, cal;
+   double t1h, t1m, t1l, t2h, t2m, t2l;
+
+   sincospiacc(&syh, &sym, &syl, &cyh, &cym, &cyl, y);
+   
+   sah=sincosTable[index].sh;
+   cah=sincosTable[index].ch;
+   sam=sincosTable[index].sm;
+   cam=sincosTable[index].cm;
+   sal=sincosTable[index].sl;
+   cal=sincosTable[index].cl;
+
+   if(quadrant==0 || quadrant==2) {
+     /* compute cy*ca - sa*sy : t1 = cy*ca,    t2 =  sa*sy */
+     Mul33(&t1h,&t1m,&t1l, cyh,cym,cyl, cah,cam,cal);
+     Mul33(&t2h,&t2m,&t2l, sah,sam,sal, syh,sym,syl);     
+     Add33Cond(rh, rm, rl, t1h,t1m,t1l, -t2h,-t2m,-t2l);
+   }
+   else {
+     /* compute sy*ca+sa*cy   :    t1 = sy*ca,     t2 =  sa*cy*/
+     Mul33(&t1h,&t1m,&t1l, syh,sym,syl, cah,cam,cal);
+     Mul33(&t2h,&t2m,&t2l, sah,sam,sal, cyh,cym,cyl);
+     Add33Cond(rh, rm, rl, t2h,t2m,t2l, t1h,t1m,t1l);
+   }
+
+   if (quadrant==1 || quadrant==2) {
+     *rh = -*rh;
+     *rm = -*rm;
+     *rl = -*rl;
+   }
+
+};
+
+
+
+
+
+
+/* This one can clearly be improved. It was set up in less than one hour */
+void sinpiquick(double *rh, double *rm, double x, int index, int quadrant) {
+  double x2h, x2m;
+  double sinpiquick_t_1_0h;
+  double sinpiquick_t_2_0h;
+  double sinpiquick_t_3_0h;
+  double sinpiquick_t_4_0h;
+  double sinpiquick_t_5_0h, sinpiquick_t_5_0m;
+  double sinpiquick_t_6_0h, sinpiquick_t_6_0m;
+  double sinpiquick_t_7_0h, sinpiquick_t_7_0m;
+  double syh, sym;
+  double cospiquick_t_1_0h;
+  double cospiquick_t_2_0h;
+  double cospiquick_t_3_0h;
+  double cospiquick_t_4_0h;
+  double cospiquick_t_5_0h, cospiquick_t_5_0m;
+  double cospiquick_t_6_0h, cospiquick_t_6_0m;
+  double cospiquick_t_7_0h, cospiquick_t_7_0m;
+  double cyh, cym;
+  double t1h, t1m, t2h, t2m, sah, sam, cah,cam;
+
+  Mul12(&x2h,&x2m,x,x);
+  
+  sah=sincosTable[index].sh;
+  cah=sincosTable[index].ch;
+  sam=sincosTable[index].sm;
+  cam=sincosTable[index].cm;
+
+  sinpiquick_t_1_0h = sinpiquick_coeff_7h;
+  sinpiquick_t_2_0h = sinpiquick_t_1_0h * x2h;
+  sinpiquick_t_3_0h = sinpiquick_coeff_5h + sinpiquick_t_2_0h;
+  sinpiquick_t_4_0h = sinpiquick_t_3_0h * x2h;
+  Add12(sinpiquick_t_5_0h,sinpiquick_t_5_0m,sinpiquick_coeff_3h,sinpiquick_t_4_0h);
+  MulAdd22(&sinpiquick_t_6_0h,&sinpiquick_t_6_0m,sinpiquick_coeff_1h,sinpiquick_coeff_1m,x2h,x2m,sinpiquick_t_5_0h,sinpiquick_t_5_0m);
+  Mul122(&sinpiquick_t_7_0h,&sinpiquick_t_7_0m,x,sinpiquick_t_6_0h,sinpiquick_t_6_0m);
+  syh = sinpiquick_t_7_0h; sym = sinpiquick_t_7_0m;
+
+  cospiquick_t_1_0h = cospiquick_coeff_6h;
+  cospiquick_t_2_0h = cospiquick_t_1_0h * x2h;
+  cospiquick_t_3_0h = cospiquick_coeff_4h + cospiquick_t_2_0h;
+  cospiquick_t_4_0h = cospiquick_t_3_0h * x2h;
+  Add12(cospiquick_t_5_0h,cospiquick_t_5_0m,cospiquick_coeff_2h,cospiquick_t_4_0h);
+  Mul22(&cospiquick_t_6_0h,&cospiquick_t_6_0m,cospiquick_t_5_0h,cospiquick_t_5_0m,x2h,x2m);
+  Add122(&cospiquick_t_7_0h,&cospiquick_t_7_0m,cospiquick_coeff_0h,cospiquick_t_6_0h,cospiquick_t_6_0m);
+  cyh = cospiquick_t_7_0h; cym = cospiquick_t_7_0m;
+
+  /* Here comes the hand-written, unproven yet code */
+   if(quadrant==0 || quadrant==2) {
+     /* compute sy*ca+sa*cy   :    t1 = sy*ca,     t2 =  sa*cy*/
+     Mul22(&t1h,&t1m, syh,sym, cah,cam);
+     Mul22(&t2h,&t2m, sah,sam, cyh,cym);
+     Add22Cond(rh, rm, t2h,t2m, t1h,t1m);
+   }
+   else {
+     /* compute cy*ca - sa*sy : t1 = cy*ca,    t2 =  sa*sy */
+     Mul22(&t1h,&t1m, cyh,cym, cah,cam);
+     Mul22(&t2h,&t2m, sah,sam, syh,sym);     
+     Add22Cond(rh, rm, t1h,t1m, -t2h,-t2m);
+   }
+
+   if (quadrant>=2) {
+     *rh = -*rh;
+     *rm = -*rm;
+   }
+
+}
+
+
+
+
+
+
+
+ double sinpi_rn(double x){
+   double xs, y,u, rh, rm, rl, sign,absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx = -x;   else absx = x; 
+
+   xdb.d = x;
+
+   xs = x*128.0;
+
+   /* argument reduction */
+   if(absx>  TWOTO42 ) {  /* x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part. The point is somewhere there since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+   if (xih>>31)  sign=-1.;   else sign=1.; /* consider the sign bit */
+
+   if(index==0 && y==0.0 && ((quadrant&1)==0)) return sign*0.0; /*signed, inspired by LIA-2 */
+
+   y = y * INV128;
+
+   /* SPECIAL CASES: x=(Nan, Inf) sin(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43300000) /* 2^52, which entails that x is an integer */
+     return sign*0.0; /*signed */
+
+   if(absxih<=0x3E000000) /*2^{-31}*/ {
+     if (absxih<0x01700000) { /* 2^{-1000} :  Get rid of possible subnormals  */
+       /* in this case, SCS computation, accurate to 2^-210 which is provably enough */
+       scs_t result;
+       scs_set_d(result, x );
+       scs_mul(result, PiSCS_ptr, result);
+       scs_get_d(&rh, result);
+       return rh;
+     }
+     /* First step for Pi*x. TODO: FMA-based optimisation */
+     const double DekkerConst  = 134217729.; /* 2^27 +1 */   
+     double tt, xh, xl;                           
+     /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+     tt = x*DekkerConst;     
+     xh = (x-tt)+tt;
+     xl = x-xh;   
+     Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIM + xl*PIHM) );               
+     if(rh == (rh + (rl * PIX_RNCST_SIN)))
+       return rh;
+   }
+   /* Fall here either if we have a large input, or if we have a small
+      input and the rounding test fails.  */
+   sinpiquick(&rh, &rm,  y, index, quadrant);
+   if (rh==rh+1.00001*rm) /* See trigpiquick.gappa. This first step is ridiculously too accurate */
+     return rh;
+   sinpi_accurate(&rh, &rm, &rl, y, index, quadrant);
+   ReturnRoundToNearest3(rh,rm,rl);   
+ }
+
+ 
+
+
+
+
+
+
+
+ double sinpi_rd(double x){
+   double xs, y,u, rh, rm, rl, sign,absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx = -x;   else absx = x; 
+
+   xdb.d = x;
+
+   xs = x*128.0;
+
+   /* argument reduction */
+   if(absx>  TWOTO42 ) {  /* x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part. The point is somewhere there since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+   if (xih>>31)  sign=-1.;   else sign=1.; /* consider the sign bit */
+
+   if(index==0 && y==0.0 && ((quadrant&1)==0)) return -0.0; /*signed, inspired by LIA-2 */
+
+   y = y * INV128;
+
+   /* SPECIAL CASES: x=(Nan, Inf) sin(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43300000) /* 2^52, which entails that x is an integer */
+     return sign*0.0; /*signed */
+
+    if(absxih<=0x3E000000) /*2^{-31}*/ {
+     if (absxih<0x01700000) { /* 2^{-1000} :  Get rid of possible subnormals  */
+       /* in this case, SCS computation, accurate to 2^-210 which is provably enough */
+       scs_t result;
+       scs_set_d(result, x );
+       scs_mul(result, PiSCS_ptr, result);
+       scs_get_d_minf(&rh, result);
+       return rh;
+     }
+     /* First step for Pi*x. TODO: FMA-based optimisation */
+     const double DekkerConst  = 134217729.; /* 2^27 +1 */   
+     double tt, xh, xl;                           
+     /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+     tt = x*DekkerConst;     
+     xh = (x-tt)+tt;
+     xl = x-xh;   
+     Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIM + xl*PIHM) );               
+     TEST_AND_RETURN_RD(rh,rl,PIX_EPS_SIN);
+   }
+   /* Fall here either if we have a large input, or if we have a small
+      input and the rounding test fails.  */
+   sinpi_accurate(&rh, &rm, &rl, y, index, quadrant);
+
+   ReturnRoundDownwards3(rh,rm,rl);   
+}; 
+
+
+
+ double sinpi_ru(double x){
+   double xs, y,u, rh, rm, rl, sign,absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx = -x;   else absx = x; 
+
+   xdb.d = x;
+
+   xs = x*128.0;
+
+   /* argument reduction */
+   if(absx>  TWOTO42 ) {  /* x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part. The point is somewhere there since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+   if (xih>>31)  sign=-1.;   else sign=1.; /* consider the sign bit */
+
+   if(index==0 && y==0.0 && ((quadrant&1)==0)) return +0.0; /*signed, inspired by LIA-2 */
+
+   y = y * INV128;
+
+   /* SPECIAL CASES: x=(Nan, Inf) sin(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43300000) /* 2^52, which entails that x is an integer */
+     return sign*0.0; /*signed */
+
+    if(absxih<=0x3E000000) /*2^{-31}*/ {
+     if (absxih<0x01700000) { /* 2^{-1000} :  Get rid of possible subnormals  */
+       /* in this case, SCS computation, accurate to 2^-210 which is provably enough */
+       scs_t result;
+       scs_set_d(result, x );
+       scs_mul(result, PiSCS_ptr, result);
+       scs_get_d_pinf(&rh, result);
+       return rh;
+     }
+     /* First step for Pi*x. TODO: FMA-based optimisation */
+     const double DekkerConst  = 134217729.; /* 2^27 +1 */   
+     double tt, xh, xl;                           
+     /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+     tt = x*DekkerConst;     
+     xh = (x-tt)+tt;
+     xl = x-xh;   
+     Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIM + xl*PIHM) );               
+     TEST_AND_RETURN_RU(rh,rl,PIX_EPS_SIN);
+   }
+   /* Fall here either if we have a large input, or if we have a small
+      input and the rounding test fails.  */
+   sinpi_accurate(&rh, &rm, &rl, y, index, quadrant);
+
+   ReturnRoundUpwards3(rh,rm,rl);   
+   
+};  
+
+
+
+
+ double sinpi_rz(double x){
+   double xs, y,u, rh, rm, rl, sign,absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx = -x;   else absx = x; 
+
+   xdb.d = x;
+
+   xs = x*128.0;
+
+   /* argument reduction */
+   if(absx>  TWOTO42 ) {  /* x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part. The point is somewhere there since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+   if (xih>>31)  sign=-1.;   else sign=1.; /* consider the sign bit */
+
+   if(index==0 && y==0.0 && ((quadrant&1)==0)) return sign*0.0; /*signed, inspired by LIA-2 */
+
+   y = y * INV128;
+
+   /* SPECIAL CASES: x=(Nan, Inf) sin(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43300000) /* 2^52, which entails that x is an integer */
+     return sign*0.0; /*signed */
+
+    if(absxih<=0x3E000000) /*2^{-31}*/ {
+     if (absxih<0x01700000) { /* 2^{-1000} :  Get rid of possible subnormals  */
+       /* in this case, SCS computation, accurate to 2^-210 which is provably enough */
+       scs_t result;
+       scs_set_d(result, x );
+       scs_mul(result, PiSCS_ptr, result);
+       scs_get_d_zero(&rh, result);
+       return rh;
+     }
+     /* First step for Pi*x. TODO: FMA-based optimisation */
+     const double DekkerConst  = 134217729.; /* 2^27 +1 */   
+     double tt, xh, xl;                           
+     /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+     tt = x*DekkerConst;     
+     xh = (x-tt)+tt;
+     xl = x-xh;   
+     Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIM + xl*PIHM) );               
+     TEST_AND_RETURN_RZ(rh,rl,PIX_EPS_SIN);
+   }
+   /* Fall here either if we have a large input, or if we have a small
+      input and the rounding test fails.  */
+   sinpi_accurate(&rh, &rm, &rl, y, index, quadrant);
+
+   ReturnRoundTowardsZero3(rh,rm,rl);   
+};
+
+
+
+
+
+
+
+
+
+ /* to nearest  */
+ double cospi_rn(double x){
+   double xs, y,u, rh, rm, rl, absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx =-x; else absx=x; 
+
+   xdb.d=x;
+   xs = x*128.0;
+
+   /* argument reduction. 
+      We do it before the special case tests for performance, 
+      it might compute garbage for inf, very large inputs, etc */
+   if(absx>  TWOTO42 ) {  /* 2^42, x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part, in which was the coma since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   y = y * INV128;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+
+   /* SPECIAL CASES: x=(Nan, Inf) cos(pi*x)=Nan */
+
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+
+   if(absxih>=0x43400000) /* 2^53, which entails that x is an even integer */
+     return 1.0; 
+
+   if(index==0 && y==0. && ((quadrant&1)==1)) return +0.; 
+   /* Always +0, inpired by LIA2; We do not have cos(x+pi) == - cos(x)
+      in this case */
+
+   if(index==0 && y==0. && quadrant==0) return 1.; 
+   if(index==0 && y==0. && quadrant==2) return -1.; 
+
+   if (absxih<0x3E26A09E) /* sqrt(2^-53)/4 */
+     return 1.0;
+   /* printf("\n\nint part = %f    frac part = %f     index=%d   quadrant=%d   \n", u, y, index, quadrant);
+    */
+
+   cospi_accurate(&rh, &rm, &rl, y, index, quadrant);
+   ReturnRoundToNearest3(rh,rm,rl);   
+};
+
+
+
+
+
+ double cospi_rd(double x){
+   double xs, y,u, rh, rm, rl, absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx =-x; else absx=x; 
+
+   xdb.d=x;
+   xs = x*128.0;
+
+
+   /* argument reduction. 
+      We do it before the special case tests for performance, 
+      it might compute garbage for inf, very large inputs, etc */
+   if(absx>  TWOTO42 ) {  /* 2^42, x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part, in which was the coma since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   y = y * INV128;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+
+   /* SPECIAL CASES: x=(Nan, Inf) cos(pi*x)=Nan */
+
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43400000) /* 2^53, which entails that x is an even integer */
+     return 1.0; /*signed */
+
+   if(index==0 && y==0. && ((quadrant&1)==1)) return -0.; 
+
+   if(index==0 && y==0. && quadrant==0) return 1.; 
+   if(index==0 && y==0. && quadrant==2) return -1.; 
+
+   if (absxih<0x3E200000) /* 2^-29 */
+     return 0.9999999999999998889776975374843459576368331909179687500; /* 1-2^-53 */
+   /* Always +0, inpired by LIA2; We do not have cos(x+pi) == - cos(x)
+      in this case */
+
+   cospi_accurate(&rh, &rm, &rl, y, index, quadrant);
+   ReturnRoundDownwards3(rh,rm,rl);  
+ }; 
+
+
+
+ 
+ double cospi_ru(double x){
+   double xs, y,u, rh, rm, rl, absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx =-x; else absx=x; 
+
+   xdb.d=x;
+   xs = x*128.0;
+
+
+   /* argument reduction. 
+      We do it before the special case tests for performance, 
+      it might compute garbage for inf, very large inputs, etc */
+   if(absx>  TWOTO42 ) {  /* 2^42, x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part, in which was the coma since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   y = y * INV128;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+
+   /* SPECIAL CASES: x=(Nan, Inf) cos(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43400000) /* 2^53, which entails that x is an even integer */
+     return 1.0; /*signed */
+
+   if(index==0 && y==0. && quadrant==0) return 1.; 
+   if(index==0 && y==0. && quadrant==2) return -1.; 
+
+   if(index==0 && y==0. && ((quadrant&1)==1)) return +0.; 
+   /* Always +0, inpired by LIA2; We do not have cos(x+pi) == - cos(x)
+      in this case */
+
+   if (absxih<0x3E200000) /* 2^-29 */
+     return 1;
+
+   cospi_accurate(&rh, &rm, &rl, y, index, quadrant);
+   ReturnRoundUpwards3(rh,rm,rl);  
+}; 
+
+
+
+
+double cospi_rz(double x){
+   double xs, y,u, rh, rm, rl, absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx =-x; else absx=x; 
+
+   xdb.d=x;
+   xs = x*128.0;
+
+
+   /* argument reduction. 
+      We do it before the special case tests for performance, 
+      it might compute garbage for inf, very large inputs, etc */
+   if(absx>  TWOTO42 ) {  /* 2^42, x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part, in which was the coma since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   y = y * INV128;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+
+   /* SPECIAL CASES: x=(Nan, Inf) cos(pi*x)=Nan */
+
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43400000) /* 2^53, which entails that x is an even integer */
+     return 1.0; /*signed */
+
+   if(index==0 && y==0. && ((quadrant&1)==1)) return +0.; 
+   /* Always +0, inpired by LIA2; We do not have cos(x+pi) == - cos(x)
+      in this case */
+
+   if(index==0 && y==0. && quadrant==0) return 1.; 
+   if(index==0 && y==0. && quadrant==2) return -1.; 
+
+   if (absxih<0x3E200000) /* 2^-29 */
+     return 0.9999999999999998889776975374843459576368331909179687500; /* 1-2^-53 */
+
+   cospi_accurate(&rh, &rm, &rl, y, index, quadrant);
+   ReturnRoundTowardsZero3(rh,rm,rl);
+  }; 
+
+
+
+
+
+
+/*  tangent of pi times x */
+ double tanpi_rn(double x){
+   double xs, y,u, rh, rm, rl, ch,cm,cl, ich,icm,icl, sh,sm,sl, sign,absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx = -x;   else absx = x; 
+
+   xdb.d = x;
+
+   xs = x*128.0;
+
+   /* argument reduction */
+   if(absx>  TWOTO42 ) {  /* x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part. The point is somewhere there since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+   if (xih>>31)  sign=-1.;   else sign=1.; /* consider the sign bit */
+
+   if(index==0 && y==0.0 && ((quadrant&1)==0)) return sign*0.0; /*signed, inspired by LIA-2 */
+   /* TODO ? No test for Pi/4. Such a value will lauch the accurate phase. */
+
+   y = y * INV128;
+
+   /* SPECIAL CASES: x=(Nan, Inf) sin(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43300000) /* 2^52, which entails that x is an integer */
+     return sign*0.0; /*signed */
+
+   if(absxih<=0x3E000000) /*2^{-31}*/ {
+     if (absxih<0x01700000) { /* 2^{-1000} :  Get rid of possible subnormals  */
+       /* in this case, SCS computation, accurate to 2^-210 which is provably enough */
+       scs_t result;
+       scs_set_d(result, x );
+       scs_mul(result, PiSCS_ptr, result);
+       scs_get_d(&rh, result);
+       return rh;
+     }
+     /* First step for Pi*x. TODO: FMA-based optimisation */
+     const double DekkerConst  = 134217729.; /* 2^27 +1 */   
+     double tt, xh, xl;                           
+     /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+     tt = x*DekkerConst;     
+     xh = (x-tt)+tt;
+     xl = x-xh;   
+     Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIM + xl*PIHM) );               
+     if(rh == (rh + (rl * PIX_RNCST_TAN)))
+       return rh;
+   }
+   /* Fall here either if we have a large input, or if we have a small
+      input and the rounding test fails.  */
+   cospi_accurate(&ch, &cm, &cl, y, index, quadrant);
+   Recpr33(&ich, &icm, &icl, ch, cm, cl);
+   sinpi_accurate(&sh, &sm, &sl, y, index, quadrant);
+   Mul33(&rh,&rm,&rl, sh,sm,sl, ich,icm,icl);
+   ReturnRoundToNearest3(rh,rm,rl);   
+
+}; 
+
+
+
+
+ double tanpi_rd(double x){
+   double xs, y,u, rh, rm, rl, ch,cm,cl, ich,icm,icl, sh,sm,sl, sign,absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx = -x;   else absx = x; 
+
+   xdb.d = x;
+
+   xs = x*128.0;
+
+   /* argument reduction */
+   if(absx>  TWOTO42 ) {  /* x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part. The point is somewhere there since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+   if (xih>>31)  sign=-1.;   else sign=1.; /* consider the sign bit */
+
+   if(index==0 && y==0.0 && ((quadrant&1)==0)) return sign*0.0; /*signed, inspired by LIA-2 */
+
+   y = y * INV128;
+
+   /* SPECIAL CASES: x=(Nan, Inf) sin(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43300000) /* 2^52, which entails that x is an integer */
+     return sign*0.0; /*signed */
+
+   if(absxih<=0x3E000000) /*2^{-31}*/ {
+     if (absxih<0x01700000) { /* 2^{-1000} :  Get rid of possible subnormals  */
+       /* in this case, SCS computation, accurate to 2^-210 which is provably enough */
+       scs_t result;
+       scs_set_d(result, x );
+       scs_mul(result, PiSCS_ptr, result);
+       scs_get_d_minf(&rh, result);
+       return rh;
+     }
+     /* First step for Pi*x. TODO: FMA-based optimisation */
+     const double DekkerConst  = 134217729.; /* 2^27 +1 */   
+     double tt, xh, xl;                           
+     /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+     tt = x*DekkerConst;     
+     xh = (x-tt)+tt;
+     xl = x-xh;   
+     Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIM + xl*PIHM) );               
+     TEST_AND_RETURN_RD(rh,rl,PIX_EPS_SIN);
+   }
+   /* Fall here either if we have a large input, or if we have a small
+      input and the rounding test fails.  */
+   cospi_accurate(&ch, &cm, &cl, y, index, quadrant);
+   Recpr33(&ich, &icm, &icl, ch, cm, cl);
+   sinpi_accurate(&sh, &sm, &sl, y, index, quadrant);
+   Mul33(&rh,&rm,&rl, sh,sm,sl, ich,icm,icl);
+   ReturnRoundDownwards3(rh,rm,rl);   
+};
+
+
+ 
+
+
+
+
+
+
+
+ double tanpi_ru(double x){
+   double xs, y,u, rh, rm, rl, ch,cm,cl, ich,icm,icl, sh,sm,sl, sign,absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx = -x;   else absx = x; 
+
+   xdb.d = x;
+
+   xs = x*128.0;
+
+   /* argument reduction */
+   if(absx>  TWOTO42 ) {  /* x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part. The point is somewhere there since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+   if (xih>>31)  sign=-1.;   else sign=1.; /* consider the sign bit */
+
+   if(index==0 && y==0.0 && ((quadrant&1)==0)) return sign*0.0; /*signed, inspired by LIA-2 */
+
+   y = y * INV128;
+
+   /* SPECIAL CASES: x=(Nan, Inf) sin(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43300000) /* 2^52, which entails that x is an integer */
+     return sign*0.0; /*signed */
+
+   if(absxih<=0x3E000000) /*2^{-31}*/ {
+     if (absxih<0x01700000) { /* 2^{-1000} :  Get rid of possible subnormals  */
+       /* in this case, SCS computation, accurate to 2^-210 which is provably enough */
+       scs_t result;
+       scs_set_d(result, x );
+       scs_mul(result, PiSCS_ptr, result);
+       scs_get_d_pinf(&rh, result);
+       return rh;
+     }
+     /* First step for Pi*x. TODO: FMA-based optimisation */
+     const double DekkerConst  = 134217729.; /* 2^27 +1 */   
+     double tt, xh, xl;                           
+     /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+     tt = x*DekkerConst;     
+     xh = (x-tt)+tt;
+     xl = x-xh;   
+     Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIM + xl*PIHM) );               
+     TEST_AND_RETURN_RU(rh,rl,PIX_EPS_TAN);
+   }
+   /* Fall here either if we have a large input, or if we have a small
+      input and the rounding test fails.  */
+   cospi_accurate(&ch, &cm, &cl, y, index, quadrant);
+   Recpr33(&ich, &icm, &icl, ch, cm, cl);
+   sinpi_accurate(&sh, &sm, &sl, y, index, quadrant);
+   Mul33(&rh,&rm,&rl, sh,sm,sl, ich,icm,icl);
+   ReturnRoundUpwards3(rh,rm,rl);   
+};
+
+
+
+ double tanpi_rz(double x){
+   double xs, y,u, rh, rm, rl, ch,cm,cl, ich,icm,icl, sh,sm,sl, sign,absx;
+   db_number xdb, t;
+   int32_t xih, absxih, index, quadrant;
+   
+   if (x<0) absx = -x;   else absx = x; 
+
+   xdb.d = x;
+
+   xs = x*128.0;
+
+   /* argument reduction */
+   if(absx>  TWOTO42 ) {  /* x is very large, let us first subtract a large integer from it */
+     t.d = xs;
+     t.i[LO] =0; /* remove the low part. The point is somewhere there since x > 2^42. 
+		    So what remains in t is an FP integer almost as large as x */
+     xs = xs-t.d; /* we are going to throw away the int part anyway */ 
+   }
+
+   t.d = TWOTO5251 + xs;
+   u = t.d - TWOTO5251;
+   y = xs - u;
+   index = t.i[LO] & 0x3f;
+   quadrant = (t.i[LO] & 0xff) >>6;
+
+   /* Special case tests come late because the conversion FP to int is slow */
+   xih = xdb.i[HI];
+   absxih = xih & 0x7fffffff;
+   if (xih>>31)  sign=-1.;   else sign=1.; /* consider the sign bit */
+
+   if(index==0 && y==0.0 && ((quadrant&1)==0)) return sign*0.0; /*signed, inspired by LIA-2 */
+
+   y = y * INV128;
+
+   /* SPECIAL CASES: x=(Nan, Inf) sin(pi*x)=Nan */
+   if (absxih>=0x7ff00000) {
+     xdb.l=0xfff8000000000000LL;
+     return xdb.d - xdb.d; 
+   }
+      
+   if(absxih>=0x43300000) /* 2^52, which entails that x is an integer */
+     return sign*0.0; /*signed */
+
+   if(absxih<=0x3E000000) /*2^{-31}*/ {
+     if (absxih<0x01700000) { /* 2^{-1000} :  Get rid of possible subnormals  */
+       /* in this case, SCS computation, accurate to 2^-210 which is provably enough */
+       scs_t result;
+       scs_set_d(result, x );
+       scs_mul(result, PiSCS_ptr, result);
+       scs_get_d_zero(&rh, result);
+       return rh;
+     }
+     /* First step for Pi*x. TODO: FMA-based optimisation */
+     const double DekkerConst  = 134217729.; /* 2^27 +1 */   
+     double tt, xh, xl;                           
+     /* Splitting of x. Both xh and xl have at least 26 consecutive LSB zeroes */
+     tt = x*DekkerConst;     
+     xh = (x-tt)+tt;
+     xl = x-xh;   
+     Add12(rh,rl, xh*PIHH, (xl*PIHH + xh*PIHM) + (xh*PIM + xl*PIHM) );               
+     TEST_AND_RETURN_RZ(rh,rl,PIX_EPS_SIN);
+   }
+   /* Fall here either if we have a large input, or if we have a small
+      input and the rounding test fails.  */
+   cospi_accurate(&ch, &cm, &cl, y, index, quadrant);
+   Recpr33(&ich, &icm, &icl, ch, cm, cl);
+   sinpi_accurate(&sh, &sm, &sl, y, index, quadrant);
+   Mul33(&rh,&rm,&rl, sh,sm,sl, ich,icm,icl);
+   ReturnRoundTowardsZero3(rh,rm,rl);   
+}; 
+
+
diff --git a/src/crlibm/trigpi.h b/src/crlibm/trigpi.h
new file mode 100644
index 0000000..98b7dc0
--- /dev/null
+++ b/src/crlibm/trigpi.h
@@ -0,0 +1,556 @@
+#include "crlibm.h"
+#include "crlibm_private.h"
+
+/*File generated by maple/trigpi.pl*/
+#define TWOTO42     4.39804651110400000000000000000000000000000000000000e+12 
+
+#define TWOTO52     4.50359962737049600000000000000000000000000000000000e+15 
+
+#define INV128      7.81250000000000000000000000000000000000000000000000e-03 
+
+#define TWOTO5251        6.75539944105574400000000000000000000000000000000000e+15 
+
+#define SMALLEST       4.94065645841246544176568792868221372365059802614325e-324
+
+#define PIH 3.14159265358979311599796346854418516159057617187500e+00
+
+#define PIM 1.22464679914735320717376402945839660462569212467758e-16
+
+#define PIL -2.99476980971833966588701635421198401670550095233904e-33
+
+#define PIHH 3.14159268140792846679687500000000000000000000000000e+00
+
+#define PIHM -2.78181353507989115314558148384094238281250000000000e-08
+
+#define PIX_RNCST_SIN 1.00787401574803160796292764473221714405939530505554e+00
+
+#define PIX_EPS_SIN   4.33680868994201773602981120347976684570312500000000e-19
+
+#define PIX_RNCST_TAN 1.01587301587301598581442042834326647273327977070694e+00
+
+#define PIX_EPS_TAN   8.67361737988403547205962240695953369140625000000000e-19
+
+static const scs PiSCS=
+{{0x00000003, 0x090fdaa2, 0x085a308d, 0x0c4c6628, 
+0x2e037073, 0x1129024e, 0x022299f3, 0x074020bb},
+DB_ONE,   0,   1 } 
+;
+#define PiSCS_ptr  (scs_ptr)(& PiSCS)
+
+typedef struct tPi_t_tag {double sh; double ch; double sm; double cm; double sl; double cl;} tPi_t;
+static const tPi_t sincosTable[64] =
+{
+  { /* sin/cos(0*pi/128) */
+    0.00000000000000000000000000000000000000000000000000e+00, /* sh */ 
+    1.00000000000000000000000000000000000000000000000000e+00, /* ch */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* sm */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* cm */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* sl */ 
+    0.00000000000000000000000000000000000000000000000000e+00, /* cl */ 
+  } , 
+  { /* sin/cos(1*pi/128) */
+    2.45412285229122881236030195850617019459605216979980e-02, /* sh */ 
+    9.99698818696204249967252053465927019715309143066406e-01, /* ch */ 
+    -9.18684901257787817511092729052523410277440947511204e-20, /* sm */ 
+    -2.98514864037997529143865109884349378101639351597209e-17, /* cm */ 
+    4.87061487044670605326897942323184237088370497395221e-36, /* sl */ 
+    -1.90847873707337374441321797545527262287132421960372e-33, /* cl */ 
+  } , 
+  { /* sin/cos(2*pi/128) */
+    4.90676743274180149345653489945107139647006988525391e-02, /* sh */ 
+    9.98795456205172405006464941834565252065658569335938e-01, /* ch */ 
+    -6.79610372051828011331087211108459897310458406639606e-19, /* sm */ 
+    -1.22916933370754648023069228195440464413706083235769e-17, /* cm */ 
+    -4.43188681247183252512131377148380367335867976105441e-35, /* sl */ 
+    2.44684467864912710011822340186994056439724387642614e-34, /* cl */ 
+  } , 
+  { /* sin/cos(3*pi/128) */
+    7.35645635996674263079597722025937400758266448974609e-02, /* sh */ 
+    9.97290456678690206970827603072393685579299926757812e-01, /* ch */ 
+    -2.77849415062735932702215188936675076042592110809248e-18, /* sm */ 
+    9.16476953711017345735104565501545052170255011497269e-18, /* cm */ 
+    -9.12403754898528209738897073370755128458265201364941e-35, /* sl */ 
+    6.78241343097392959213418956364511469074601099596281e-34, /* cl */ 
+  } , 
+  { /* sin/cos(4*pi/128) */
+    9.80171403295606036287779261328978464007377624511719e-02, /* sh */ 
+    9.95184726672196928731750631413888186216354370117188e-01, /* ch */ 
+    -1.63458236224425598733036227927721717477694202336940e-18, /* sm */ 
+    -4.24869136783044095961919567518488446851237034975878e-17, /* cm */ 
+    -1.32092388100064537760551925056417985745657226089355e-35, /* sl */ 
+    1.33155107725046144631896989941148168106742079450765e-33, /* cl */ 
+  } , 
+  { /* sin/cos(5*pi/128) */
+    1.22410675199216195663254325154412072151899337768555e-01, /* sh */ 
+    9.92479534598709967063712156232213601469993591308594e-01, /* ch */ 
+    2.83545014899653353390676675638351012269446701684827e-18, /* sm */ 
+    3.10930550954289060565003028451274795448754407491652e-17, /* cm */ 
+    1.81516557514933045310042069477077268403843802536068e-34, /* sl */ 
+    -1.83795947578180190975980887553298238967275792441039e-33, /* cl */ 
+  } , 
+  { /* sin/cos(6*pi/128) */
+    1.46730474455361747931902982600149698555469512939453e-01, /* sh */ 
+    9.89176509964781014438983675063354894518852233886719e-01, /* ch */ 
+    3.72694714704656774762676429108167171813186218775477e-18, /* sm */ 
+    -4.09873099370471113819595571800653989851994072636781e-17, /* cm */ 
+    3.73523981512508271311947760640000952122222968339672e-34, /* sl */ 
+    -4.48575605520484372949276939500710783945639583248830e-34, /* cl */ 
+  } , 
+  { /* sin/cos(7*pi/128) */
+    1.70961888760301217171644339032354764640331268310547e-01, /* sh */ 
+    9.85277642388941221618381405278341844677925109863281e-01, /* ch */ 
+    9.19199801817590944421343720066011137609803605455754e-18, /* sm */ 
+    2.31556370279002066952419195035978530309724519300942e-17, /* cm */ 
+    -6.76887439409826056872126962280395760312157075744208e-34, /* sl */ 
+    -7.52759715457648329988759858960284250572199307609030e-34, /* cl */ 
+  } , 
+  { /* sin/cos(8*pi/128) */
+    1.95090322016128275839363936938752885907888412475586e-01, /* sh */ 
+    9.80785280403230430579242238309234380722045898437500e-01, /* ch */ 
+    -7.99107906846173126344289703693072234842489650708062e-18, /* sm */ 
+    1.85469399978250057259083323855314298012062932205111e-17, /* cm */ 
+    6.18462700242207127058950316629513247512028088300259e-34, /* sl */ 
+    -1.06965644455307566037437785239692763829708493768038e-33, /* cl */ 
+  } , 
+  { /* sin/cos(9*pi/128) */
+    2.19101240156869797592875670488865580409765243530273e-01, /* sh */ 
+    9.75702130038528570032951847679214552044868469238281e-01, /* ch */ 
+    -3.65138122991507758201905028218239594431466287621283e-19, /* sm */ 
+    -2.55725560812596856486584111140239960382614753072513e-17, /* cm */ 
+    -2.33594994186064420524188910640554529764134815908088e-35, /* sl */ 
+    -9.31742445089422233678739018667912651409612658394109e-34, /* cl */ 
+  } , 
+  { /* sin/cos(10*pi/128) */
+    2.42980179903263898699705691797134932130575180053711e-01, /* sh */ 
+    9.70031253194543974238683858857257291674613952636719e-01, /* ch */ 
+    -8.75143152971966315657698066597556045463081095367626e-18, /* sm */ 
+    1.83653003484288443908920092041031891826103053310748e-17, /* cm */ 
+    -6.57232603730794308023668785032351777033485854907112e-34, /* sl */ 
+    -1.43110975719449184241630500775446481526298855330310e-33, /* cl */ 
+  } , 
+  { /* sin/cos(11*pi/128) */
+    2.66712757474898365384063936289749108254909515380859e-01, /* sh */ 
+    9.63776065795439840222513794287806376814842224121094e-01, /* ch */ 
+    2.09412225788266884161338599457742136857657480229159e-17, /* sm */ 
+    2.64639505612200287797555650837254713865234329571181e-17, /* cm */ 
+    -1.13034665247279893680679089609736970876966889026874e-33, /* sl */ 
+    -2.90732345901993230283123062176090186865215463253595e-36, /* cl */ 
+  } , 
+  { /* sin/cos(12*pi/128) */
+    2.90284677254462386564171083591645583510398864746094e-01, /* sh */ 
+    9.56940335732208824381928025104571133852005004882812e-01, /* ch */ 
+    -1.89279787077742514611142383006534872375212090104104e-17, /* sm */ 
+    4.05538698618757005503321806309621067670667256244675e-17, /* cm */ 
+    1.15229531571423146986028622140694357073680581126202e-33, /* sl */ 
+    -1.71470133643021490774251081375403695480671459421111e-33, /* cl */ 
+  } , 
+  { /* sin/cos(13*pi/128) */
+    3.13681740398891462096031546025187708437442779541016e-01, /* sh */ 
+    9.49528180593036674750351266993675380945205688476562e-01, /* ch */ 
+    1.45604472999689122359140657497995731581857682115574e-17, /* sm */ 
+    -7.55441519280432984009053129417731398148166729726062e-18, /* cm */ 
+    3.65641868980115946347742781527870762816609669157526e-34, /* sl */ 
+    -5.12602450240466855759717750777748877302823219800281e-34, /* cl */ 
+  } , 
+  { /* sin/cos(14*pi/128) */
+    3.36889853392220051109262612953898496925830841064453e-01, /* sh */ 
+    9.41544065183020806308888950297841802239418029785156e-01, /* ch */ 
+    -4.20009400334750923530198764394686942499166950042589e-19, /* sm */ 
+    -2.78963795476983410723774639073498160082587681962273e-17, /* cm */ 
+    -2.91786529699854378247553773743757458316226497390670e-36, /* sl */ 
+    1.62732363567338984793340006492231780038121787494388e-33, /* cl */ 
+  } , 
+  { /* sin/cos(15*pi/128) */
+    3.59895036534988166376791696166037581861019134521484e-01, /* sh */ 
+    9.32992798834738845670244700158946216106414794921875e-01, /* ch */ 
+    -1.76016871238392824991712490180716397399893409400325e-17, /* sm */ 
+    4.20414155553843553793296357703776047390203635491842e-17, /* cm */ 
+    1.33751254730467910174693675743357144631063005169968e-33, /* sl */ 
+    9.02858964955212762289886973560835699430495731315468e-34, /* cl */ 
+  } , 
+  { /* sin/cos(16*pi/128) */
+    3.82683432365089781779232680491986684501171112060547e-01, /* sh */ 
+    9.23879532511286738483136105060111731290817260742188e-01, /* ch */ 
+    -1.00507726964615876116866635215079604149716565502162e-17, /* sm */ 
+    1.76450470843366770599569725809896737820548554530071e-17, /* cm */ 
+    -2.06053163028066946700869844728951806226449919556645e-34, /* sl */ 
+    -5.04425373215868178317262040897837818667759555267340e-34, /* cl */ 
+  } , 
+  { /* sin/cos(17*pi/128) */
+    4.05241314004989860997341111215064302086830139160156e-01, /* sh */ 
+    9.14209755703530690951197357208002358675003051757812e-01, /* ch */ 
+    9.91114019428998841611582656929141002790524150916273e-18, /* sm */ 
+    -3.63161825278144230137483342238202646129279797999369e-17, /* cm */ 
+    -2.51690708954346477356872397338259880052208425689270e-34, /* sl */ 
+    -1.94388197771225539922639474168732176327545733871664e-33, /* cl */ 
+  } , 
+  { /* sin/cos(18*pi/128) */
+    4.27555093430282084909777040593326091766357421875000e-01, /* sh */ 
+    9.03989293123443338195954765978967770934104919433594e-01, /* ch */ 
+    9.41118981629547261700504547345546652274077429814600e-18, /* sm */ 
+    -6.60975446874843084950410324118654757730786778092578e-18, /* cm */ 
+    -1.74466824265988005677926664445477172311534261793862e-34, /* sl */ 
+    1.27280130346803566179582264758403917100160817972220e-34, /* cl */ 
+  } , 
+  { /* sin/cos(19*pi/128) */
+    4.49611329654606595163102156220702454447746276855469e-01, /* sh */ 
+    8.93224301195515324458540362684288993477821350097656e-01, /* ch */ 
+    4.88319242320352434992459578960859391755338197539985e-18, /* sm */ 
+    -4.11612391519089126927973381825877743981647578251702e-18, /* cm */ 
+    2.71510844981913810248805367518978860016097711671055e-34, /* sl */ 
+    2.53802538057159989694478858192415647688294380587576e-34, /* cl */ 
+  } , 
+  { /* sin/cos(20*pi/128) */
+    4.71396736825997642039709489836241118609905242919922e-01, /* sh */ 
+    8.81921264348355049556005269550951197743415832519531e-01, /* ch */ 
+    6.51667813606901296447208541365272563671678644989260e-18, /* sm */ 
+    -1.98432484058905621441138331351064557464910578392153e-17, /* cm */ 
+    2.94575469662359839325656601464778797771834866677748e-34, /* sl */ 
+    -7.04121140076738336886106234154968299762349001311189e-34, /* cl */ 
+  } , 
+  { /* sin/cos(21*pi/128) */
+    4.92898192229784037898809856415027752518653869628906e-01, /* sh */ 
+    8.70086991108711460540803273033816367387771606445312e-01, /* ch */ 
+    -1.02578316765621855379978432396560880807423053235781e-18, /* sm */ 
+    -4.18885108685499682324788024356996724212552957633711e-17, /* cm */ 
+    6.95208177608850685652817838158830003461259862153976e-35, /* sl */ 
+    7.09001858618784147808113574428963243591875515454078e-34, /* cl */ 
+  } , 
+  { /* sin/cos(22*pi/128) */
+    5.14102744193221772306401362584438174962997436523438e-01, /* sh */ 
+    8.57728610000272118085717920621391385793685913085938e-01, /* ch */ 
+    -4.57127075236156239511828925399355339402327136821488e-17, /* sm */ 
+    -4.81834479363366201443381433448989495956683085629586e-17, /* cm */ 
+    1.54882794422382834009847995565726593342335634635644e-33, /* sl */ 
+    -1.10441305176875333754243497414965343357566732409805e-33, /* cl */ 
+  } , 
+  { /* sin/cos(23*pi/128) */
+    5.34997619887097264346209612995153293013572692871094e-01, /* sh */ 
+    8.44853565249707116890931501984596252441406250000000e-01, /* ch */ 
+    -5.36831327083581339873963151168879848386957514422019e-17, /* sm */ 
+    -4.36313602968796371239489349318562331730725440347672e-17, /* cm */ 
+    -1.39005699188381123579693330118086965951478315829762e-33, /* sl */ 
+    -2.03077268533675470129749465480265274351493013855507e-33, /* cl */ 
+  } , 
+  { /* sin/cos(24*pi/128) */
+    5.55570233019602177648721408331766724586486816406250e-01, /* sh */ 
+    8.31469612302545235671402679145103320479393005371094e-01, /* ch */ 
+    4.70941094056167682138404887426404929202505139640422e-17, /* sm */ 
+    1.40738569847280238930785242263532116993349751072869e-18, /* cm */ 
+    -2.06405203836829206177595824610721979274646969038677e-33, /* sl */ 
+    4.69513153839808352458514422733246165217408979962725e-35, /* cl */ 
+  } , 
+  { /* sin/cos(25*pi/128) */
+    5.75808191417845338655467912758467718958854675292969e-01, /* sh */ 
+    8.17584813151583711388070696557406336069107055664062e-01, /* ch */ 
+    -3.79094954589427341338090415345480342563618583176174e-17, /* sm */ 
+    -1.48831498124267717438654368251080189181059728497540e-17, /* cm */ 
+    -2.74337380468543094919985039492410424892033458032374e-33, /* sl */ 
+    -7.82732627712989170819884242480669228359664723248350e-34, /* cl */ 
+  } , 
+  { /* sin/cos(26*pi/128) */
+    5.95699304492433356905678465409437194466590881347656e-01, /* sh */ 
+    8.03207531480644942867286317778052762150764465332031e-01, /* ch */ 
+    -1.34386419365794672370769766351890963879615472923649e-17, /* sm */ 
+    -3.30606098048149096139985697961182567790418192774440e-17, /* cm */ 
+    -6.78776879077210601615057451734157494786909383904135e-35, /* sl */ 
+    -1.22427262524204334204965494469832525240861319271513e-33, /* cl */ 
+  } , 
+  { /* sin/cos(27*pi/128) */
+    6.15231590580626819253495796147035434842109680175781e-01, /* sh */ 
+    7.88346427626606227612171551299979910254478454589844e-01, /* ch */ 
+    2.62314177672669502523539824382601959772978459707084e-17, /* sm */ 
+    3.43969931540597076013396400088425960673639156185612e-17, /* cm */ 
+    -1.40953666211067162505853387634546257268806948654638e-33, /* sl */ 
+    1.77106237467371703799173999194548788681155596718637e-33, /* cl */ 
+  } , 
+  { /* sin/cos(28*pi/128) */
+    6.34393284163645487794269683945458382368087768554688e-01, /* sh */ 
+    7.73010453362736993376813643408240750432014465332031e-01, /* ch */ 
+    1.04209019292800345765620100334821189439770902041504e-17, /* sm */ 
+    -3.25659070336497723355416983248241127086331816976265e-17, /* cm */ 
+    4.11745589292804916608872033177616781045056039843844e-34, /* sl */ 
+    1.38608072515239293103931950218033658496575955944579e-33, /* cl */ 
+  } , 
+  { /* sin/cos(29*pi/128) */
+    6.53172842953776755514638807653682306408882141113281e-01, /* sh */ 
+    7.57208846506484567484562830941285938024520874023438e-01, /* ch */ 
+    8.56956420600262380032120093330718187007118037955581e-18, /* sm */ 
+    -1.99090987773355018590769198198766615206267472536943e-17, /* cm */ 
+    -6.91653223050706326446309100906668805486226797380063e-34, /* sl */ 
+    3.94092832661584820126428051219691386352890448827143e-34, /* cl */ 
+  } , 
+  { /* sin/cos(30*pi/128) */
+    6.71558954847018441114414599724113941192626953125000e-01, /* sh */ 
+    7.40951125354959105884233849792508408427238464355469e-01, /* ch */ 
+    -4.04890377492966924579222325744820057841320210868276e-17, /* sm */ 
+    -1.47086169522973451831939448836260932254009548735474e-17, /* cm */ 
+    3.19958356253556814327429889830897695603712398130540e-34, /* sl */ 
+    -4.95504338271420316912995166818275952337135785088300e-34, /* cl */ 
+  } , 
+  { /* sin/cos(31*pi/128) */
+    6.89540544737066940506053924764273688197135925292969e-01, /* sh */ 
+    7.24247082951466891742597908887546509504318237304688e-01, /* ch */ 
+    -1.58893232948067898977751614830710021398692474578962e-17, /* sm */ 
+    2.91984713344030043552462778935493159883806968705675e-17, /* cm */ 
+    9.12423562402057118300276915582756301317547938020558e-34, /* sl */ 
+    2.30273249687394643468466642789742491277527364150754e-33, /* cl */ 
+  } , 
+  { /* sin/cos(32*pi/128) */
+    7.07106781186547572737310929369414225220680236816406e-01, /* sh */ 
+    7.07106781186547572737310929369414225220680236816406e-01, /* ch */ 
+    -4.83364665672645672552734986488347382506490835271488e-17, /* sm */ 
+    -4.83364665672645672552734986488347382506490835271488e-17, /* cm */ 
+    2.06933765434970678135950246605438944725492854770064e-33, /* sl */ 
+    2.06933765434970678135950246605438944725492854770064e-33, /* cl */ 
+  } , 
+  { /* sin/cos(33*pi/128) */
+    7.24247082951466891742597908887546509504318237304688e-01, /* sh */ 
+    6.89540544737066940506053924764273688197135925292969e-01, /* ch */ 
+    2.91984713344030043552462778935493159883806968705675e-17, /* sm */ 
+    -1.58893232948067898977751614830710021398692474578962e-17, /* cm */ 
+    2.30273249687394643468466642789742491277527364150754e-33, /* sl */ 
+    9.12423562402057118300276915582756301317547938020558e-34, /* cl */ 
+  } , 
+  { /* sin/cos(34*pi/128) */
+    7.40951125354959105884233849792508408427238464355469e-01, /* sh */ 
+    6.71558954847018441114414599724113941192626953125000e-01, /* ch */ 
+    -1.47086169522973451831939448836260932254009548735474e-17, /* sm */ 
+    -4.04890377492966924579222325744820057841320210868276e-17, /* cm */ 
+    -4.95504338271420316912995166818275952337135785088300e-34, /* sl */ 
+    3.19958356253556814327429889830897695603712398130540e-34, /* cl */ 
+  } , 
+  { /* sin/cos(35*pi/128) */
+    7.57208846506484567484562830941285938024520874023438e-01, /* sh */ 
+    6.53172842953776755514638807653682306408882141113281e-01, /* ch */ 
+    -1.99090987773355018590769198198766615206267472536943e-17, /* sm */ 
+    8.56956420600262380032120093330718187007118037955581e-18, /* cm */ 
+    3.94092832661584820126428051219691386352890448827143e-34, /* sl */ 
+    -6.91653223050706326446309100906668805486226797380063e-34, /* cl */ 
+  } , 
+  { /* sin/cos(36*pi/128) */
+    7.73010453362736993376813643408240750432014465332031e-01, /* sh */ 
+    6.34393284163645487794269683945458382368087768554688e-01, /* ch */ 
+    -3.25659070336497723355416983248241127086331816976265e-17, /* sm */ 
+    1.04209019292800345765620100334821189439770902041504e-17, /* cm */ 
+    1.38608072515239293103931950218033658496575955944579e-33, /* sl */ 
+    4.11745589292804916608872033177616781045056039843844e-34, /* cl */ 
+  } , 
+  { /* sin/cos(37*pi/128) */
+    7.88346427626606227612171551299979910254478454589844e-01, /* sh */ 
+    6.15231590580626819253495796147035434842109680175781e-01, /* ch */ 
+    3.43969931540597076013396400088425960673639156185612e-17, /* sm */ 
+    2.62314177672669502523539824382601959772978459707084e-17, /* cm */ 
+    1.77106237467371703799173999194548788681155596718637e-33, /* sl */ 
+    -1.40953666211067162505853387634546257268806948654638e-33, /* cl */ 
+  } , 
+  { /* sin/cos(38*pi/128) */
+    8.03207531480644942867286317778052762150764465332031e-01, /* sh */ 
+    5.95699304492433356905678465409437194466590881347656e-01, /* ch */ 
+    -3.30606098048149096139985697961182567790418192774440e-17, /* sm */ 
+    -1.34386419365794672370769766351890963879615472923649e-17, /* cm */ 
+    -1.22427262524204334204965494469832525240861319271513e-33, /* sl */ 
+    -6.78776879077210601615057451734157494786909383904135e-35, /* cl */ 
+  } , 
+  { /* sin/cos(39*pi/128) */
+    8.17584813151583711388070696557406336069107055664062e-01, /* sh */ 
+    5.75808191417845338655467912758467718958854675292969e-01, /* ch */ 
+    -1.48831498124267717438654368251080189181059728497540e-17, /* sm */ 
+    -3.79094954589427341338090415345480342563618583176174e-17, /* cm */ 
+    -7.82732627712989170819884242480669228359664723248350e-34, /* sl */ 
+    -2.74337380468543094919985039492410424892033458032374e-33, /* cl */ 
+  } , 
+  { /* sin/cos(40*pi/128) */
+    8.31469612302545235671402679145103320479393005371094e-01, /* sh */ 
+    5.55570233019602177648721408331766724586486816406250e-01, /* ch */ 
+    1.40738569847280238930785242263532116993349751072869e-18, /* sm */ 
+    4.70941094056167682138404887426404929202505139640422e-17, /* cm */ 
+    4.69513153839808352458514422733246165217408979962725e-35, /* sl */ 
+    -2.06405203836829206177595824610721979274646969038677e-33, /* cl */ 
+  } , 
+  { /* sin/cos(41*pi/128) */
+    8.44853565249707116890931501984596252441406250000000e-01, /* sh */ 
+    5.34997619887097264346209612995153293013572692871094e-01, /* ch */ 
+    -4.36313602968796371239489349318562331730725440347672e-17, /* sm */ 
+    -5.36831327083581339873963151168879848386957514422019e-17, /* cm */ 
+    -2.03077268533675470129749465480265274351493013855507e-33, /* sl */ 
+    -1.39005699188381123579693330118086965951478315829762e-33, /* cl */ 
+  } , 
+  { /* sin/cos(42*pi/128) */
+    8.57728610000272118085717920621391385793685913085938e-01, /* sh */ 
+    5.14102744193221772306401362584438174962997436523438e-01, /* ch */ 
+    -4.81834479363366201443381433448989495956683085629586e-17, /* sm */ 
+    -4.57127075236156239511828925399355339402327136821488e-17, /* cm */ 
+    -1.10441305176875333754243497414965343357566732409805e-33, /* sl */ 
+    1.54882794422382834009847995565726593342335634635644e-33, /* cl */ 
+  } , 
+  { /* sin/cos(43*pi/128) */
+    8.70086991108711460540803273033816367387771606445312e-01, /* sh */ 
+    4.92898192229784037898809856415027752518653869628906e-01, /* ch */ 
+    -4.18885108685499682324788024356996724212552957633711e-17, /* sm */ 
+    -1.02578316765621855379978432396560880807423053235781e-18, /* cm */ 
+    7.09001858618784147808113574428963243591875515454078e-34, /* sl */ 
+    6.95208177608850685652817838158830003461259862153976e-35, /* cl */ 
+  } , 
+  { /* sin/cos(44*pi/128) */
+    8.81921264348355049556005269550951197743415832519531e-01, /* sh */ 
+    4.71396736825997642039709489836241118609905242919922e-01, /* ch */ 
+    -1.98432484058905621441138331351064557464910578392153e-17, /* sm */ 
+    6.51667813606901296447208541365272563671678644989260e-18, /* cm */ 
+    -7.04121140076738336886106234154968299762349001311189e-34, /* sl */ 
+    2.94575469662359839325656601464778797771834866677748e-34, /* cl */ 
+  } , 
+  { /* sin/cos(45*pi/128) */
+    8.93224301195515324458540362684288993477821350097656e-01, /* sh */ 
+    4.49611329654606595163102156220702454447746276855469e-01, /* ch */ 
+    -4.11612391519089126927973381825877743981647578251702e-18, /* sm */ 
+    4.88319242320352434992459578960859391755338197539985e-18, /* cm */ 
+    2.53802538057159989694478858192415647688294380587576e-34, /* sl */ 
+    2.71510844981913810248805367518978860016097711671055e-34, /* cl */ 
+  } , 
+  { /* sin/cos(46*pi/128) */
+    9.03989293123443338195954765978967770934104919433594e-01, /* sh */ 
+    4.27555093430282084909777040593326091766357421875000e-01, /* ch */ 
+    -6.60975446874843084950410324118654757730786778092578e-18, /* sm */ 
+    9.41118981629547261700504547345546652274077429814600e-18, /* cm */ 
+    1.27280130346803566179582264758403917100160817972220e-34, /* sl */ 
+    -1.74466824265988005677926664445477172311534261793862e-34, /* cl */ 
+  } , 
+  { /* sin/cos(47*pi/128) */
+    9.14209755703530690951197357208002358675003051757812e-01, /* sh */ 
+    4.05241314004989860997341111215064302086830139160156e-01, /* ch */ 
+    -3.63161825278144230137483342238202646129279797999369e-17, /* sm */ 
+    9.91114019428998841611582656929141002790524150916273e-18, /* cm */ 
+    -1.94388197771225539922639474168732176327545733871664e-33, /* sl */ 
+    -2.51690708954346477356872397338259880052208425689270e-34, /* cl */ 
+  } , 
+  { /* sin/cos(48*pi/128) */
+    9.23879532511286738483136105060111731290817260742188e-01, /* sh */ 
+    3.82683432365089781779232680491986684501171112060547e-01, /* ch */ 
+    1.76450470843366770599569725809896737820548554530071e-17, /* sm */ 
+    -1.00507726964615876116866635215079604149716565502162e-17, /* cm */ 
+    -5.04425373215868178317262040897837818667759555267340e-34, /* sl */ 
+    -2.06053163028066946700869844728951806226449919556645e-34, /* cl */ 
+  } , 
+  { /* sin/cos(49*pi/128) */
+    9.32992798834738845670244700158946216106414794921875e-01, /* sh */ 
+    3.59895036534988166376791696166037581861019134521484e-01, /* ch */ 
+    4.20414155553843553793296357703776047390203635491842e-17, /* sm */ 
+    -1.76016871238392824991712490180716397399893409400325e-17, /* cm */ 
+    9.02858964955212762289886973560835699430495731315468e-34, /* sl */ 
+    1.33751254730467910174693675743357144631063005169968e-33, /* cl */ 
+  } , 
+  { /* sin/cos(50*pi/128) */
+    9.41544065183020806308888950297841802239418029785156e-01, /* sh */ 
+    3.36889853392220051109262612953898496925830841064453e-01, /* ch */ 
+    -2.78963795476983410723774639073498160082587681962273e-17, /* sm */ 
+    -4.20009400334750923530198764394686942499166950042589e-19, /* cm */ 
+    1.62732363567338984793340006492231780038121787494388e-33, /* sl */ 
+    -2.91786529699854378247553773743757458316226497390670e-36, /* cl */ 
+  } , 
+  { /* sin/cos(51*pi/128) */
+    9.49528180593036674750351266993675380945205688476562e-01, /* sh */ 
+    3.13681740398891462096031546025187708437442779541016e-01, /* ch */ 
+    -7.55441519280432984009053129417731398148166729726062e-18, /* sm */ 
+    1.45604472999689122359140657497995731581857682115574e-17, /* cm */ 
+    -5.12602450240466855759717750777748877302823219800281e-34, /* sl */ 
+    3.65641868980115946347742781527870762816609669157526e-34, /* cl */ 
+  } , 
+  { /* sin/cos(52*pi/128) */
+    9.56940335732208824381928025104571133852005004882812e-01, /* sh */ 
+    2.90284677254462386564171083591645583510398864746094e-01, /* ch */ 
+    4.05538698618757005503321806309621067670667256244675e-17, /* sm */ 
+    -1.89279787077742514611142383006534872375212090104104e-17, /* cm */ 
+    -1.71470133643021490774251081375403695480671459421111e-33, /* sl */ 
+    1.15229531571423146986028622140694357073680581126202e-33, /* cl */ 
+  } , 
+  { /* sin/cos(53*pi/128) */
+    9.63776065795439840222513794287806376814842224121094e-01, /* sh */ 
+    2.66712757474898365384063936289749108254909515380859e-01, /* ch */ 
+    2.64639505612200287797555650837254713865234329571181e-17, /* sm */ 
+    2.09412225788266884161338599457742136857657480229159e-17, /* cm */ 
+    -2.90732345901993230283123062176090186865215463253595e-36, /* sl */ 
+    -1.13034665247279893680679089609736970876966889026874e-33, /* cl */ 
+  } , 
+  { /* sin/cos(54*pi/128) */
+    9.70031253194543974238683858857257291674613952636719e-01, /* sh */ 
+    2.42980179903263898699705691797134932130575180053711e-01, /* ch */ 
+    1.83653003484288443908920092041031891826103053310748e-17, /* sm */ 
+    -8.75143152971966315657698066597556045463081095367626e-18, /* cm */ 
+    -1.43110975719449184241630500775446481526298855330310e-33, /* sl */ 
+    -6.57232603730794308023668785032351777033485854907112e-34, /* cl */ 
+  } , 
+  { /* sin/cos(55*pi/128) */
+    9.75702130038528570032951847679214552044868469238281e-01, /* sh */ 
+    2.19101240156869797592875670488865580409765243530273e-01, /* ch */ 
+    -2.55725560812596856486584111140239960382614753072513e-17, /* sm */ 
+    -3.65138122991507758201905028218239594431466287621283e-19, /* cm */ 
+    -9.31742445089422233678739018667912651409612658394109e-34, /* sl */ 
+    -2.33594994186064420524188910640554529764134815908088e-35, /* cl */ 
+  } , 
+  { /* sin/cos(56*pi/128) */
+    9.80785280403230430579242238309234380722045898437500e-01, /* sh */ 
+    1.95090322016128275839363936938752885907888412475586e-01, /* ch */ 
+    1.85469399978250057259083323855314298012062932205111e-17, /* sm */ 
+    -7.99107906846173126344289703693072234842489650708062e-18, /* cm */ 
+    -1.06965644455307566037437785239692763829708493768038e-33, /* sl */ 
+    6.18462700242207127058950316629513247512028088300259e-34, /* cl */ 
+  } , 
+  { /* sin/cos(57*pi/128) */
+    9.85277642388941221618381405278341844677925109863281e-01, /* sh */ 
+    1.70961888760301217171644339032354764640331268310547e-01, /* ch */ 
+    2.31556370279002066952419195035978530309724519300942e-17, /* sm */ 
+    9.19199801817590944421343720066011137609803605455754e-18, /* cm */ 
+    -7.52759715457648329988759858960284250572199307609030e-34, /* sl */ 
+    -6.76887439409826056872126962280395760312157075744208e-34, /* cl */ 
+  } , 
+  { /* sin/cos(58*pi/128) */
+    9.89176509964781014438983675063354894518852233886719e-01, /* sh */ 
+    1.46730474455361747931902982600149698555469512939453e-01, /* ch */ 
+    -4.09873099370471113819595571800653989851994072636781e-17, /* sm */ 
+    3.72694714704656774762676429108167171813186218775477e-18, /* cm */ 
+    -4.48575605520484372949276939500710783945639583248830e-34, /* sl */ 
+    3.73523981512508271311947760640000952122222968339672e-34, /* cl */ 
+  } , 
+  { /* sin/cos(59*pi/128) */
+    9.92479534598709967063712156232213601469993591308594e-01, /* sh */ 
+    1.22410675199216195663254325154412072151899337768555e-01, /* ch */ 
+    3.10930550954289060565003028451274795448754407491652e-17, /* sm */ 
+    2.83545014899653353390676675638351012269446701684827e-18, /* cm */ 
+    -1.83795947578180190975980887553298238967275792441039e-33, /* sl */ 
+    1.81516557514933045310042069477077268403843802536068e-34, /* cl */ 
+  } , 
+  { /* sin/cos(60*pi/128) */
+    9.95184726672196928731750631413888186216354370117188e-01, /* sh */ 
+    9.80171403295606036287779261328978464007377624511719e-02, /* ch */ 
+    -4.24869136783044095961919567518488446851237034975878e-17, /* sm */ 
+    -1.63458236224425598733036227927721717477694202336940e-18, /* cm */ 
+    1.33155107725046144631896989941148168106742079450765e-33, /* sl */ 
+    -1.32092388100064537760551925056417985745657226089355e-35, /* cl */ 
+  } , 
+  { /* sin/cos(61*pi/128) */
+    9.97290456678690206970827603072393685579299926757812e-01, /* sh */ 
+    7.35645635996674263079597722025937400758266448974609e-02, /* ch */ 
+    9.16476953711017345735104565501545052170255011497269e-18, /* sm */ 
+    -2.77849415062735932702215188936675076042592110809248e-18, /* cm */ 
+    6.78241343097392959213418956364511469074601099596281e-34, /* sl */ 
+    -9.12403754898528209738897073370755128458265201364941e-35, /* cl */ 
+  } , 
+  { /* sin/cos(62*pi/128) */
+    9.98795456205172405006464941834565252065658569335938e-01, /* sh */ 
+    4.90676743274180149345653489945107139647006988525391e-02, /* ch */ 
+    -1.22916933370754648023069228195440464413706083235769e-17, /* sm */ 
+    -6.79610372051828011331087211108459897310458406639606e-19, /* cm */ 
+    2.44684467864912710011822340186994056439724387642614e-34, /* sl */ 
+    -4.43188681247183252512131377148380367335867976105441e-35, /* cl */ 
+  } , 
+  { /* sin/cos(63*pi/128) */
+    9.99698818696204249967252053465927019715309143066406e-01, /* sh */ 
+    2.45412285229122881236030195850617019459605216979980e-02, /* ch */ 
+    -2.98514864037997529143865109884349378101639351597209e-17, /* sm */ 
+    -9.18684901257787817511092729052523410277440947511204e-20, /* cm */ 
+    -1.90847873707337374441321797545527262287132421960372e-33, /* sl */ 
+    4.87061487044670605326897942323184237088370497395221e-36, /* cl */ 
+  } , 
+}; 
+ 
diff --git a/src/crlibm/triple-double.c b/src/crlibm/triple-double.c
new file mode 100644
index 0000000..e3e259a
--- /dev/null
+++ b/src/crlibm/triple-double.c
@@ -0,0 +1,57 @@
+/*
+ *  triple_double.c
+ *  
+ * This file contains useful tools and data for triple double data representation.
+ *
+ */
+
+#include "triple-double.h"
+#include "crlibm_private.h"
+
+
+#if TRIPLEDOUBLE_AS_FUNCTIONS
+
+#if 0
+void Renormalize3(double* resh, double* resm, double* resl, double ah, double am, double al)
+{                                                      
+  DoRenormalize3(resh, resm, resl, ah, am, al);
+}
+#endif
+
+
+void Mul23(double* resh, double* resm, double* resl, double ah, double al, double bh, double bl)                
+{
+  DoMul23(resh, resm, resl, ah, al, bh, bl);
+}
+
+void Mul233(double* resh, double* resm, double* resl, double ah, double al, double bh, double bm, double bl)            
+{
+  DoMul233(resh, resm, resl, ah, al, bh, bm, bl);
+}
+
+void Mul33(double* resh, double* resm, double* resl, double ah, double am, double al, double bh, double bm, double bl)            
+{
+  DoMul33(resh, resm, resl, ah, am, al, bh, bm, bl);
+}
+
+void Mul133(double* resh, double* resm, double* resl, double a, double bh, double bm, double bl)
+{
+  DoMul133(resh, resm, resl, a, bh, bm, bl);
+}
+
+void Mul123(double* resh, double* resm, double* resl, double a, double bh,  double bl)
+{
+  DoMul123(resh, resm, resl, a, bh, bl);
+}
+
+void Sqrt13(double* resh, double* resm, double* resl, double x)
+{
+  DoSqrt13(resh, resm, resl , x);
+}
+
+void Recpr33(double* resh, double* resm, double* resl, double dh, double dm, double dl)
+{
+  DoRecpr33(resh, resm, resl, dh, dm, dl);
+}
+
+#endif /* TRIPLEDOUBLE_AS_FUNCTIONS*/
diff --git a/src/crlibm/triple-double.h b/src/crlibm/triple-double.h
new file mode 100644
index 0000000..a1d3abd
--- /dev/null
+++ b/src/crlibm/triple-double.h
@@ -0,0 +1,1380 @@
+/*
+ *  triple_double.h
+ *  
+ * This file contains useful tools and data for triple double data representation.
+ *
+ */
+
+#ifndef TRIPLE_DOUBLE_H
+#define TRIPLE_DOUBLE_H 1
+
+#include "scs_lib/scs.h"
+#include "scs_lib/scs_private.h"
+
+ /* undef all the variables that might have been defined in
+    scs_lib/scs_private.h */
+#undef VERSION 
+#undef PACKAGE 
+#undef HAVE_GMP_H
+#undef HAVE_MPFR_H
+#undef HAVE_MATHLIB_H
+/* then include the proper definitions  */
+#include "crlibm_config.h"
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+ /* Set to O for larger but faster functions.
+    As it only impacts the second step, smaller is preferred */
+#define TRIPLEDOUBLE_AS_FUNCTIONS 0
+
+
+#define  Renormalize3(resh, resm, resl, ah, am, al)     DoRenormalize3(resh, resm, resl, ah, am, al)  
+/*extern void Renormalize3(double* resh, double* resm, double* resl, double ah, double am, double al) ;*/
+
+#if TRIPLEDOUBLE_AS_FUNCTIONS
+extern void Mul23(double* resh, double* resm, double* resl, double ah, double al, double bh, double bl);
+extern void Mul233(double* resh, double* resm, double* resl, double ah, double al, double bh, double bm, double bl);
+extern void Mul33(double* resh, double* resm, double* resl, double ah, double am, double al, double bh, double bm, double bl);
+extern void Mul133(double* resh, double* resm, double* resl, double a, double bh, double bm, double bl);
+extern void Mul123(double* resh, double* resm, double* resl, double a, double bh, double bl);
+extern void Sqrt13(double* resh, double* resm, double* resl, double x);
+extern void Recpr33(double* resh, double* resm, double* resl, double dh, double dm, double dl);
+#else
+#define  Mul23(resh, resm, resl, ah, al, bh, bl)           DoMul23(resh, resm, resl, ah, al, bh, bl)
+#define  Mul233(resh, resm, resl, ah, al, bh, bm, bl)      DoMul233(resh, resm, resl, ah, al, bh, bm, bl)
+#define  Mul33(resh, resm, resl, ah, am, al, bh, bm, bl)   DoMul33(resh, resm, resl, ah, am, al, bh, bm, bl)
+#define  Mul133(resh, resm, resl, a, bh, bm, bl)           DoMul133(resh, resm, resl, a, bh, bm, bl)
+#define  Mul123(resh, resm, resl, a, bh, bl)               DoMul123(resh, resm, resl, a, bh, bl)    
+#define  Sqrt13(resh, resm, resl , x)                      DoSqrt13(resh, resm, resl , x)
+#define  Recpr33(resh, resm, resl, dh, dm, dl)             DoRecpr33(resh, resm, resl, dh, dm, dl)
+#endif
+
+
+
+/* Renormalize3
+
+   Procedure for renormalizing a triple double number, i.e.
+   computing exactly an equivalent sum of three non-overlapping
+   double numbers
+
+
+   Arguments:       a triple double number ah, am, al
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(ah) > abs(am) > abs(al)
+                    ah and am are overlapping not more than 51 bits
+                    am and al are overlapping not more than 51 bits
+
+   Guarantees:      abs(resh) > abs(resm) > abs(resl)
+                    resh and resm are non-overlapping
+		    resm and resl are non-overlapping
+		    resm = round-to-nearest(resm + resl)
+
+   Details:         resh, resm and resl are considered to be pointers
+
+*/
+#define  DoRenormalize3(resh, resm, resl, ah, am, al)     \
+{                                                      \
+    double _t1h, _t1l, _t2l;                           \
+                                                       \
+    Add12(_t1h, _t1l, (am), (al));                     \
+    Add12((*(resh)), _t2l, (ah), (_t1h));              \
+    Add12((*(resm)), (*(resl)), _t2l, _t1l);           \
+}
+
+
+/* Mul23
+
+   Procedure for multiplying two double double numbers resulting
+   in a triple double number
+
+
+   Arguments:       two double double numbers:
+                    ah, al and
+		    bh, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(ah) > abs(al) 
+                    ah and al do not overlap
+		    ah = round-to-nearest(ah + al)
+		    abs(bh) > abs(bl) 
+                    bh and bl do not overlap
+		    bh = round-to-nearest(bh + bl)
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(-49) * abs(resh)
+		    resh+resm+resl = (ah+al) * (bh+bl) * (1 + eps)
+		    where
+		    abs(eps) <= 2^(-149)
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  DoMul23(resh, resm, resl, ah, al, bh, bl)                \
+{                                                              \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t10;  \
+                                                               \
+    Mul12((resh),&_t1,(ah),(bh));                              \
+    Mul12(&_t2,&_t3,(ah),(bl));                                \
+    Mul12(&_t4,&_t5,(al),(bh));                                \
+    _t6 = (al) * (bl);                                         \
+    Add22Cond(&_t7,&_t8,_t2,_t3,_t4,_t5);                      \
+    Add12(_t9,_t10,_t1,_t6);                                   \
+    Add22Cond((resm),(resl),_t7,_t8,_t9,_t10);                 \
+}
+
+
+
+/* Mul233
+
+   Procedure for multiplying a double double number by 
+   a triple double number resulting in a triple double number
+
+
+   Arguments:       a double double number ah, al
+                    a triple double number bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(ah) > abs(al)
+                    ah and al do not overlap
+		    ah = round-to-nearest(ah + al)
+		    abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o >= 2
+		    b_u >= 1
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(\gamma) * abs(resh)
+		    where
+		    \gamma >= min(48,b_o-4,b_o+b_u-4)
+		    resh+resm+resl=(ah+al) * (bh+bm+bl) * (1+eps)
+		    where
+		    abs(eps) <= 
+                       (2^(-99-b_o) + 2^(-99-b_o-b_u) + 2^(-152)) / 
+		         (1 - 2^(-53) - 2^(-b_o+1) - 2^(-b_o-b_u+1))
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  DoMul233(resh, resm, resl, ah, al, bh, bm, bl)            \
+{                                                               \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t10;   \
+    double _t11, _t12, _t13, _t14, _t15, _t16, _t17, _t18;      \
+                                                                \
+    Mul12((resh),&_t1,(ah),(bh));                               \
+    Mul12(&_t2,&_t3,(ah),(bm));                                 \
+    Mul12(&_t4,&_t5,(ah),(bl));                                 \
+    Mul12(&_t6,&_t7,(al),(bh));                                 \
+    Mul12(&_t8,&_t9,(al),(bm));                                 \
+    _t10 = (al) * (bl);                                         \
+    Add22Cond(&_t11,&_t12,_t2,_t3,_t4,_t5);                     \
+    Add22Cond(&_t13,&_t14,_t6,_t7,_t8,_t9);                     \
+    Add22Cond(&_t15,&_t16,_t11,_t12,_t13,_t14);                 \
+    Add12Cond(_t17,_t18,_t1,_t10);                              \
+    Add22Cond((resm),(resl),_t17,_t18,_t15,_t16);               \
+}
+
+
+
+
+/* Add33
+
+   Procedure for adding two triple double numbers resulting
+   in a triple double number
+
+
+   Arguments:       two triple double numbers:
+                    ah, am, al and
+		    bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(bh) <= 0.75 * abs(ah)  OR  ( sign(bh) = sign(ah) AND abs(bh) <= abs(ah))  (i)
+                    abs(am) <= 2^(-a_o) * abs(ah)
+		    abs(al) <= 2^(-a_u) * abs(am)
+		    abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o >= a_o >= 4
+		    b_u >= a_u >= 4
+
+		    Condition (i) may not be respected if 
+		    one can assume in this case that ah=am=al=0
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(-min(a_o,b_o) + 5) * abs(resh)
+		    resh+resm+resl = (ah+am+al + bh+bm+bl) * (1+eps)
+                    where 
+		    abs(eps) <= 2^(-min(a_o+a_u,b_o+b_u)-47) + 2^(-min(a_o,a_u)-98)
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+
+#define  Add33(resh, resm, resl, ah, am, al, bh, bm, bl)      \
+{                                                            \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7, _t8;           \
+                                                             \
+    Add12((*(resh)),_t1,(ah),(bh));                          \
+    Add12Cond(_t2,_t3,(am),(bm));                            \
+    _t6 = (al) + (bl);                                       \
+    Add12Cond(_t7,_t4,_t1,_t2);                              \
+    _t5 = _t3 + _t4;                                         \
+    _t8 = _t5 + _t6;                                         \
+    Add12Cond((*(resm)),(*(resl)),_t7,_t8);                  \
+}
+
+/* Add33Cond
+
+   Procedure for adding two triple double numbers resulting
+   in a triple double number
+
+
+   Arguments:       two triple double numbers:
+                    ah, am, al and
+		    bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(am) <= 2^(-a_o) * abs(ah)
+		    abs(al) <= 2^(-a_u) * abs(am)
+		    abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o >= a_o >= 4
+		    b_u >= a_u >= 4
+
+		    Condition (i) may not be respected if 
+		    one can assume in this case that ah=am=al=0
+		    
+   Guarantees:      TODO
+   Details:         resh, resm and resl are considered to be pointers
+*/
+
+#define  Add33Cond(resh, resm, resl, ah, am, al, bh, bm, bl)      \
+{                                                            \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7, _t8;           \
+                                                             \
+    Add12Cond((*(resh)),_t1,(ah),(bh));                          \
+    Add12Cond(_t2,_t3,(am),(bm));                            \
+    _t6 = (al) + (bl);                                       \
+    Add12Cond(_t7,_t4,_t1,_t2);                              \
+    _t5 = _t3 + _t4;                                         \
+    _t8 = _t5 + _t6;                                         \
+    Add12Cond((*(resm)),(*(resl)),_t7,_t8);                  \
+}
+
+
+
+/* Add233
+
+   Procedure for adding a double double number to a triple 
+   double number resulting in a triple double number
+
+
+   Arguments:       a double double number ah, al
+                    a triple double number bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(ah) > abs(al)
+                    ah and al do not overlap
+		    ah = round-to-nearest(ah + al)
+		    abs(bh) <= 2^(-2) * abs(ah)
+		    abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o >= 2
+		    b_u >= 1
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(\gamma) * abs(resh)
+		    where
+		    \gamma >= min(45,b_o-4,b_o+b_u-2)
+		    resh+resm+resl=((ah+al) + (bh+bm+bl)) * (1+eps)
+		    where
+		    abs(eps) <= 
+                       <= 2^(-b_o-b_u-52) + 2^(-b_o-104) + 2^(-153)
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  Add233(resh, resm, resl, ah, al, bh, bm, bl)            \
+{                                                               \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7;                   \
+                                                                \
+    Add12((*(resh)),_t1,(ah),(bh));                             \
+    Add12Cond(_t2,_t3,(al),(bm));                               \
+    Add12Cond(_t4,_t5,_t1,_t2);                                 \
+    _t6 = _t3 + (bl);                                           \
+    _t7 = _t6 + _t5;                                            \
+    Add12Cond((*(resm)),(*(resl)),_t4,_t7);                     \
+}
+
+/* Add123
+
+   Procedure for adding a double number to a double 
+   double number resulting in a triple double number
+
+
+   Arguments:       a double number a 
+                    a double double number bh, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(bh) <= 2^(-2) * abs(a)
+		    abs(bl) <= 2^(-53) * abs(bh)
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(-\gamma) * abs(resh)
+		    where
+		    
+		    \gamma >= 52
+
+		    resh+resm+resl=(a + (bh+bm+bl)) exactly
+		    
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  Add123(resh, resm, resl, a, bh, bl)                     \
+{                                                               \
+    double _t1;                                                 \
+                                                                \
+    Add12((*(resh)),_t1,(a),(bh));                              \
+    Add12((*(resm)),(*(resl)),_t1,(bl));                        \
+}
+
+/* Add213
+
+   Procedure for adding a double double number to a double 
+   number resulting in a triple double number
+
+
+   Arguments:       a double double number ah, al 
+                    a double number b
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(b) <= 2^(-2) * abs(ah)
+		    abs(al) <= 2^(-53) * abs(ah)
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(-\gamma) * abs(resh)
+		    where
+		    
+		    \gamma >= 52
+
+		    resh+resm+resl=(a + (bh+bm+bl)) exactly
+		    
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  Add213(resh, resm, resl, ah, al, b)                     \
+{                                                               \
+    double _t1;                                                 \
+                                                                \
+    Add12((*(resh)),_t1,(ah),(b));                              \
+    Add12Cond((*(resm)),(*(resl)),(al),(b));                    \
+}
+
+
+
+/* Add23
+
+   Procedure for adding a double-double number to a double-double 
+   number resulting in a triple double number
+
+
+   Arguments:       a double double number ah, al
+                    a double double number bh, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(bh) <= 2^(-2) * abs(ah)
+                    abs(al) <= 2^(-53) * abs(ah)
+		    abs(bl) <= 2^(-53) * abs(bh)
+		    
+   Guarantees:      TO DO
+		    
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  Add23(resh, resm, resl, ah, al, bh, bl)                 \
+{                                                               \
+    double _t1, _t2, _t3, _t4, _t5, _t6;                        \
+                                                                \
+    Add12((*(resh)),_t1,(ah),(bh));                             \
+    Add12Cond(_t2,_t3,(al),(bl));                               \
+    Add12Cond(_t4,_t5,_t1,_t2);                                 \
+    _t6 = _t3 + _t5;                                            \
+    Add12Cond((*(resm)),(*(resl)),_t4,_t6);                     \
+}
+
+
+
+
+/* Add133
+
+   Procedure for adding a double number to a triple 
+   double number resulting in a triple double number
+
+
+   Arguments:       a double number a 
+                    a triple double number bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(bh) <= 2^(-2) * abs(a)
+		    abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o >= 2
+		    b_u >= 1
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(\gamma) * abs(resh)
+		    where
+		    \gamma >= min(47,2-b_o,1-b_o-b_u)
+		    resh+resm+resl=(a + (bh+bm+bl)) * (1+eps)
+		    where
+		    abs(eps) <= 
+                       <= 2^(-52-b_o-b_u) + 2^(-154)
+
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  Add133(resh, resm, resl, a, bh, bm, bl)                 \
+{                                                               \
+    double _t1, _t2, _t3, _t4;                                  \
+                                                                \
+    Add12((*(resh)),_t1,(a),(bh));                              \
+    Add12Cond(_t2,_t3,_t1,(bm));                                \
+    _t4 = _t3 + (bl);                                           \
+    Add12Cond((*(resm)),(*(resl)),_t2,_t4);                     \
+}
+
+/* Add133Cond
+
+   Procedure for adding a double number to a triple 
+   double number resulting in a triple double number
+
+
+   Arguments:       a double number a 
+                    a triple double number bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o >= 2
+		    b_u >= 1
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(\gamma) * abs(resh)
+		    where
+
+		    TODO
+
+		    resh+resm+resl=(a + (bh+bm+bl)) * (1+eps)
+		    where
+		    abs(eps) <= 
+
+		    TODO
+
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  Add133Cond(resh, resm, resl, a, bh, bm, bl)             \
+{                                                               \
+    double _t1, _t2, _t3, _t4;                                  \
+                                                                \
+    Add12Cond((*(resh)),_t1,(a),(bh));                          \
+    Add12Cond(_t2,_t3,_t1,(bm));                                \
+    _t4 = _t3 + (bl);                                           \
+    Add12Cond((*(resm)),(*(resl)),_t2,_t4);                     \
+}
+
+
+
+/* Add233Cond
+
+   Procedure for adding a double double number to a triple 
+   double number resulting in a triple double number
+
+
+   Arguments:       a double double number ah, al
+                    a triple double number bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(ah) > abs(al)
+                    ah and al do not overlap
+		    ah = round-to-nearest(ah + al)
+		    abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o >= 2
+		    b_u >= 1
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(\gamma) * abs(resh)
+		    where
+		    \gamma >= ????
+		    resh+resm+resl=((ah+al) + (bh+bm+bl)) * (1+eps)
+		    where
+		    abs(eps) <= 
+                       <= ????
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  Add233Cond(resh, resm, resl, ah, al, bh, bm, bl)        \
+{                                                               \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7;                   \
+                                                                \
+    Add12Cond((*(resh)),_t1,(ah),(bh));                         \
+    Add12Cond(_t2,_t3,(al),(bm));                               \
+    Add12Cond(_t4,_t5,_t1,_t2);                                 \
+    _t6 = _t3 + (bl);                                           \
+    _t7 = _t6 + _t5;                                            \
+    Add12Cond((*(resm)),(*(resl)),_t4,_t7);                     \
+}
+
+
+
+
+/* Mul33
+
+   Procedure for multiplying two triple double numbers resulting
+   in a triple double number
+
+
+   Arguments:       two triple double numbers:
+                    ah, am, al and
+		    bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(am) <= 2^(-a_o) * abs(ah)
+		    abs(al) <= 2^(-a_u) * abs(am)
+		    abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o, a_o >= 5
+		    b_u, a_u >= 5
+
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(-g_o) * abs(resh)
+		    with
+		    g_o > min(48,-4+a_o,-4+b_o,-4+a_o-b_o)
+		    resh+resm+resl = (ah+am+al) * (bh+bm+bl) * (1+eps)
+                    where 
+		    abs(eps) <= 2^-151 + 2^-99-a_o + 2^-99-b_o +
+		    + 2^-49-a_o-a_u + 2^-49-b_o-b_u + 2^50-a_o-b_o-b_u + 
+		    + 2^50-a_o-b_o-b_u + 2^-101-a_o-b_o + 2^-52-a_o-a_u-b_o-b_u
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+
+#define  DoMul33(resh, resm, resl, ah, am, al, bh, bm, bl)      \
+{                                                            \
+    double _t1, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9;      \
+    double _t10, _t11, _t12, _t13, _t14, _t15, _t16, _t17;   \
+    double _t18, _t19, _t20, _t21, _t22;                     \
+                                                             \
+    Mul12((resh),&_t1,(ah),(bh));                            \
+    Mul12(&_t2,&_t3,(ah),(bm));                              \
+    Mul12(&_t4,&_t5,(am),(bh));                              \
+    Mul12(&_t6,&_t7,(am),(bm));                              \
+    _t8 = (ah) * (bl);                                       \
+    _t9 = (al) * (bh);                                       \
+    _t10 = (am) * (bl);                                      \
+    _t11 = (al) * (bm);                                      \
+    _t12 = _t8 + _t9;                                        \
+    _t13 = _t10 + _t11;                                      \
+    Add12Cond(_t14,_t15,_t1,_t6);                            \
+    _t16 = _t7 + _t15;                                       \
+    _t17 = _t12 + _t13;                                      \
+    _t18 = _t16 + _t17;                                      \
+    Add12Cond(_t19,_t20,_t14,_t18);                          \
+    Add22Cond(&_t21,&_t22,_t2,_t3,_t4,_t5);                  \
+    Add22Cond((resm),(resl),_t21,_t22,_t19,_t20);            \
+}
+
+
+/* Mul133
+
+   Procedure for multiplying double by a triple double number resulting
+   in a triple double number
+
+
+   Arguments:       a double a
+		    a triple double bh, bm, bl
+   
+   Results:         a triple double number resh, resm, resl
+
+   Preconditions:   abs(bm) <= 2^(-b_o) * abs(bh)
+		    abs(bl) <= 2^(-b_u) * abs(bm)
+		    where
+		    b_o >= 2
+		    b_u >= 2
+
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(-g_o) * abs(resh)
+		    with
+		    g_o > min(47,-5-b_o,-5+b_o+b_u) 
+		    resh+resm+resl = a * (bh+bm+bl) * (1+eps)
+                    where 
+		    abs(eps) <= 2^-49-b_o-b_u + 2^-101-b_o + 2^-156
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  DoMul133(resh, resm, resl, a, bh, bm, bl)            \
+{                                                          \
+    double _t2, _t3, _t4, _t5, _t7, _t8, _t9, _t10;        \
+                                                           \
+    Mul12((resh),&_t2,(a),(bh));                           \
+    Mul12(&_t3,&_t4,(a),(bm));                             \
+    _t5 = (a) * (bl);                                      \
+    Add12Cond(_t9,_t7,_t2,_t3);                            \
+    _t8 = _t4 + _t5;                                       \
+    _t10 = _t7 + _t8;                                      \
+    Add12Cond((*(resm)),(*(resl)),_t9,_t10);               \
+}
+
+/* Mul123
+
+   Procedure for multiplying double by a double double number resulting
+   in a triple double number
+
+
+   Arguments:       a double a
+		    a double double bh, bl
+   
+   Results:         a triple double number resh, resm, resl
+		    
+   Guarantees:      resm and resl are non-overlapping
+                    resm = round-to-nearest(resm + resl)
+		    abs(resm) <= 2^(-g_o) * abs(resh)
+		    with
+		    g_o > 47 
+		    resh+resm+resl = a * (bh+bm) * (1+eps)
+                    where 
+		    abs(eps) <= 2^-154
+
+   Details:         resh, resm and resl are considered to be pointers
+*/
+#define  DoMul123(resh, resm, resl, a, bh, bl)                \
+{                                                          \
+    double _t1, _t2, _t3, _t4, _t5, _t6;                   \
+                                                           \
+    Mul12((resh),&_t1,(a),(bh));                           \
+    Mul12(&_t2,&_t3,(a),(bl));                             \
+    Add12Cond(_t5,_t4,_t1,_t2);                            \
+    _t6 = _t3 + _t4;                                       \
+    Add12Cond((*(resm)),(*(resl)),_t5,_t6);                \
+}
+
+
+
+/* ReturnRoundToNearest3
+
+   Procedure for rounding a triple to a double number
+   in round-to-nearest-ties-to-even mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+		    xl = 0 iff xm != +/- 0.5 * ulp(xh) (0.25 if xh = 2^e)
+		    		    
+   Guarantees:      xprime = RN(xh + xm + xl)
+
+   Sideeffects:     returns, i.e. leaves the function
+
+*/
+#define ReturnRoundToNearest3(xh,xm,xl)                       \
+{                                                             \
+    double _t1, _t2, _t3, _t4, _t5, _t6;                      \
+    db_number _xp, _xn;                                       \
+                                                              \
+    _xp.d = (xh);                                             \
+    _xn.i[HI] = _xp.i[HI];                                    \
+    _xn.i[LO] = _xp.i[LO];                                    \
+    _xn.l--;                                                  \
+    _t1 = _xn.d;                                              \
+    _xp.l++;                                                  \
+    _t4 = _xp.d;                                              \
+    _t2 = (xh) - _t1;                                         \
+    _t3 = _t2 * -0.5;                                         \
+    _t5 = _t4 - (xh);                                         \
+    _t6 = _t5 * 0.5;                                          \
+    if (((xm) != _t3) && ((xm) != _t6)) return ((xh) + (xm)); \
+    if ((xm) * (xl) > 0.0) {                                  \
+      if ((xh) * (xl) > 0.0)                                  \
+        return _t4;                                           \
+      else                                                    \
+        return _t1;                                           \
+    } else return (xh);                                       \
+}
+
+/* ReturnRoundToNearest3Other
+
+   ATTENTION: THIS CURRENTLY UNPROVEN CODE !!!
+
+   Procedure for rounding a triple to a double number
+   in round-to-nearest-ties-to-even mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   |xm + xl| <= 2^(-5) * |xh|
+		    		    
+   Guarantees:      xprime = RN(xh + xm + xl)
+
+   Sideeffects:     returns, i.e. leaves the function
+
+*/
+#define ReturnRoundToNearest3Other(xh,xm,xl)                  \
+{                                                             \
+    double _t3, _t4;                                          \
+    db_number _t3db;                                          \
+                                                              \
+    Add12(_t3,_t4,(xm),(xl));                                 \
+    if (_t4 != 0.0) {                                         \
+      _t3db.d = _t3;                                          \
+      if (!(_t3db.i[LO] & 0x00000001)) {                      \
+        if ((_t4 > 0.0) ^ ((_t3db.i[HI] & 0x80000000) != 0))  \
+           _t3db.l++;                                         \
+        else                                                  \
+           _t3db.l--;                                         \
+        _t3 = _t3db.d;                                        \
+      }                                                       \
+    }                                                         \
+    return (xh) + _t3;                                        \
+}
+
+
+
+/* ReturnRoundUpwards3
+
+   Procedure for rounding a triple to a double number
+   in round-upwards mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+
+		    Exact algebraic images have already
+		    been filtered out.
+		    		    
+   Guarantees:      xprime = RU(xh + xm + xl)
+
+   Sideeffects:     returns, i.e. leaves the function
+
+*/
+#define ReturnRoundUpwards3(xh,xm,xl)                         \
+{                                                             \
+    double _t1, _t2, _t3;                                     \
+    db_number _tdb;                                           \
+                                                              \
+    Add12(_t1,_t2,(xh),(xm));                                 \
+    _t3 = _t2 + (xl);                                         \
+    if (_t3 > 0.0) {                                          \
+      if (_t1 > 0.0) {                                        \
+         _tdb.d = _t1;                                        \
+         _tdb.l++;                                            \
+         return _tdb.d;                                       \
+      } else {                                                \
+         _tdb.d = _t1;                                        \
+         _tdb.l--;                                            \
+         return _tdb.d;                                       \
+      }                                                       \
+    } else return _t1;                                        \
+}
+
+
+/* ReturnRoundDownwards3
+
+   Procedure for rounding a triple to a double number
+   in round-downwards mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+
+		    Exact algebraic images have already
+		    been filtered out.
+		    		    
+   Guarantees:      xprime = RD(xh + xm + xl)
+
+   Sideeffects:     returns, i.e. leaves the function
+
+*/
+#define ReturnRoundDownwards3(xh,xm,xl)                       \
+{                                                             \
+    double _t1, _t2, _t3;                                     \
+    db_number _tdb;                                           \
+                                                              \
+    Add12(_t1,_t2,(xh),(xm));                                 \
+    _t3 = _t2 + (xl);                                         \
+    if (_t3 < 0.0) {                                          \
+      if (_t1 > 0.0) {                                        \
+         _tdb.d = _t1;                                        \
+         _tdb.l--;                                            \
+         return _tdb.d;                                       \
+      } else {                                                \
+         _tdb.d = _t1;                                        \
+         _tdb.l++;                                            \
+         return _tdb.d;                                       \
+      }                                                       \
+    } else return _t1;                                        \
+}
+
+
+/* ReturnRoundTowardsZero3
+
+   Procedure for rounding a triple to a double number
+   in round-towards-zero mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+
+		    Exact algebraic images have already
+		    been filtered out.
+		    		    
+   Guarantees:      xprime = RZ(xh + xm + xl)
+
+   Sideeffects:     returns, i.e. leaves the function
+
+*/
+#define ReturnRoundTowardsZero3(xh,xm,xl)                     \
+{                                                             \
+    double _t1, _t2, _t3;                                     \
+    db_number _tdb;                                           \
+                                                              \
+    Add12(_t1,_t2,(xh),(xm));                                 \
+    _t3 = _t2 + (xl);                                         \
+    if (_t1 > 0.0) {                                          \
+       if (_t3 < 0.0) {                                       \
+         _tdb.d = _t1;                                        \
+         _tdb.l--;                                            \
+         return _tdb.d;                                       \
+       } else return _t1;                                     \
+    } else {                                                  \
+       if (_t3 > 0.0) {                                       \
+         _tdb.d = _t1;                                        \
+         _tdb.l--;                                            \
+         return _tdb.d;                                       \
+       } else return _t1;                                     \
+    }                                                         \
+}
+
+
+/* ReturnRoundUpwards3Unfiltered
+
+   Procedure for rounding a triple to a double number
+   in round-upwards mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+                    a double constant wca representing 2^k
+		    where 2^-k is Lefevre's worst case accuracy
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+		    		    
+   Guarantees:      xprime = RU(xh + xm + xl)
+
+   Sideeffects:     returns, i.e. leaves the function
+
+*/
+#define ReturnRoundUpwards3Unfiltered(xh,xm,xl,wca)               \
+{                                                                 \
+    double _t1, _t2, _t3;                                         \
+    db_number _tdb, _tdb2;                                        \
+                                                                  \
+    Add12(_t1,_t2,(xh),(xm));                                     \
+    _t3 = _t2 + (xl);                                             \
+    if (_t3 > 0.0) {                                              \
+      _tdb2.d = wca * _t3;                                        \
+      _tdb.d = _t1;                                               \
+      if ((_tdb2.i[HI] & 0x7ff00000) < (_tdb.i[HI] & 0x7ff00000)) \
+         return _t1;                                              \
+      if (_t1 > 0.0) {                                            \
+         _tdb.l++;                                                \
+         return _tdb.d;                                           \
+      } else {                                                    \
+         _tdb.l--;                                                \
+         return _tdb.d;                                           \
+      }                                                           \
+    } else return _t1;                                            \
+}
+
+
+
+/* ReturnRoundDownwards3Unfiltered
+
+   Procedure for rounding a triple to a double number
+   in round-downwards mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+                    a double constant wca representing 2^k
+		    where 2^-k is Lefevre's worst case accuracy
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+		    		    
+   Guarantees:      xprime = RD(xh + xm + xl)
+
+   Sideeffects:     returns, i.e. leaves the function
+
+*/
+#define ReturnRoundDownwards3Unfiltered(xh,xm,xl,wca)             \
+{                                                                 \
+    double _t1, _t2, _t3;                                         \
+    db_number _tdb, _tdb2;                                        \
+                                                                  \
+    Add12(_t1,_t2,(xh),(xm));                                     \
+    _t3 = _t2 + (xl);                                             \
+    if (_t3 < 0.0) {                                              \
+      _tdb2.d = wca * _t3;                                        \
+      _tdb.d = _t1;                                               \
+      if ((_tdb2.i[HI] & 0x7ff00000) < (_tdb.i[HI] & 0x7ff00000)) \
+         return _t1;                                              \
+      if (_t1 > 0.0) {                                            \
+         _tdb.l--;                                                \
+         return _tdb.d;                                           \
+      } else {                                                    \
+         _tdb.l++;                                                \
+         return _tdb.d;                                           \
+      }                                                           \
+    } else return _t1;                                            \
+}
+
+/* ReturnRoundTowardsZero3Unfiltered
+
+   Procedure for rounding a triple to a double number
+   in round-towards-zero mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+                    a double constant wca representing 2^k
+		    where 2^-k is Lefevre's worst case accuracy
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+		    		    
+   Guarantees:      xprime = RZ(xh + xm + xl)
+
+   Sideeffects:     returns, i.e. leaves the function
+
+*/
+#define ReturnRoundTowardsZero3Unfiltered(xh,xm,xl,wca)       \
+{                                                             \
+    if ((xh) > 0)                                             \
+      ReturnRoundDownwards3Unfiltered((xh),(xm),(xl),(wca))   \
+    else                                                      \
+      ReturnRoundUpwards3Unfiltered((xh),(xm),(xl),(wca))     \
+}
+
+/* RoundToNearest3
+
+   Procedure for rounding a triple to a double number
+   in round-to-nearest-ties-to-even mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+		    xl = 0 iff xm != +/- 0.5 * ulp(xh) (0.25 if xh = 2^e)
+		    		    
+   Guarantees:      xprime = RN(xh + xm + xl)
+
+   Details:         res is considered to be a pointer
+
+*/
+#define RoundToNearest3(res,xh,xm,xl)                         \
+{                                                             \
+    double _t1, _t2, _t3, _t4, _t5, _t6;                      \
+    db_number _xp, _xn;                                       \
+                                                              \
+    _xp.d = (xh);                                             \
+    _xn.i[HI] = _xp.i[HI];                                    \
+    _xn.i[LO] = _xp.i[LO];                                    \
+    _xn.l--;                                                  \
+    _t1 = _xn.d;                                              \
+    _xp.l++;                                                  \
+    _t4 = _xp.d;                                              \
+    _t2 = (xh) - _t1;                                         \
+    _t3 = _t2 * -0.5;                                         \
+    _t5 = _t4 - (xh);                                         \
+    _t6 = _t5 * 0.5;                                          \
+    if (((xm) != _t3) && ((xm) != _t6))                       \
+      (*(res)) = ((xh) + (xm));                               \
+    else {                                                    \
+      if ((xm) * (xl) > 0.0) {                                \
+        if ((xh) * (xl) > 0.0)                                \
+          (*(res)) = _t4;                                     \
+        else                                                  \
+          (*(res)) = _t1;                                     \
+      } else (*(res)) = (xh);                                 \
+    }                                                         \
+}
+
+/* RoundUpwards3
+
+   Procedure for rounding a triple to a double number
+   in round-upwards mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+
+		    Exact algebraic images have already
+		    been filtered out.
+		    		    
+   Guarantees:      xprime = RU(xh + xm + xl)
+
+   Details:         res is considered to be a pointer
+
+*/
+#define RoundUpwards3(res,xh,xm,xl)                           \
+{                                                             \
+    double _t1, _t2, _t3;                                     \
+    db_number _tdb;                                           \
+                                                              \
+    Add12(_t1,_t2,(xh),(xm));                                 \
+    _t3 = _t2 + (xl);                                         \
+    if (_t3 > 0.0) {                                          \
+      if (_t1 > 0.0) {                                        \
+         _tdb.d = _t1;                                        \
+         _tdb.l++;                                            \
+         (*(res)) = _tdb.d;                                   \
+      } else {                                                \
+         _tdb.d = _t1;                                        \
+         _tdb.l--;                                            \
+         (*(res)) = _tdb.d;                                   \
+      }                                                       \
+    } else (*(res)) = _t1;                                    \
+}
+
+
+/* RoundDownwards3
+
+   Procedure for rounding a triple to a double number
+   in round-downwards mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+
+		    Exact algebraic images have already
+		    been filtered out.
+		    		    
+   Guarantees:      xprime = RD(xh + xm + xl)
+
+   Details:         res is considered to be a pointer
+
+*/
+#define RoundDownwards3(res,xh,xm,xl)                         \
+{                                                             \
+    double _t1, _t2, _t3;                                     \
+    db_number _tdb;                                           \
+                                                              \
+    Add12(_t1,_t2,(xh),(xm));                                 \
+    _t3 = _t2 + (xl);                                         \
+    if (_t3 < 0.0) {                                          \
+      if (_t1 > 0.0) {                                        \
+         _tdb.d = _t1;                                        \
+         _tdb.l--;                                            \
+         (*(res)) = _tdb.d;                                   \
+      } else {                                                \
+         _tdb.d = _t1;                                        \
+         _tdb.l++;                                            \
+         (*(res)) = _tdb.d;                                   \
+      }                                                       \
+    } else (*(res)) = _t1;                                    \
+}
+
+
+/* RoundTowardsZero3
+
+   Procedure for rounding a triple to a double number
+   in round-towards-zero mode.
+
+
+   Arguments:       a triple double number xh, xm, xl
+   
+   Results:         a double number xprime 
+                    returned by a return-statement
+
+   Preconditions:   xh, xm and xl are non-overlapping
+                    xm = RN(xm +math xl)
+		    xh != 0, xm != 0
+
+		    Exact algebraic images have already
+		    been filtered out.
+		    		    
+   Guarantees:      xprime = RZ(xh + xm + xl)
+
+   Details:         res is considered to be a pointer
+
+*/
+#define RoundTowardsZero3(res,xh,xm,xl)                       \
+{                                                             \
+    double _t1, _t2, _t3;                                     \
+    db_number _tdb;                                           \
+                                                              \
+    Add12(_t1,_t2,(xh),(xm));                                 \
+    _t3 = _t2 + (xl);                                         \
+    if (_t1 > 0.0) {                                          \
+       if (_t3 < 0.0) {                                       \
+         _tdb.d = _t1;                                        \
+         _tdb.l--;                                            \
+         (*(res)) = _tdb.d;                                   \
+       } else (*(res)) = _t1;                                 \
+    } else {                                                  \
+       if (_t3 > 0.0) {                                       \
+         _tdb.d = _t1;                                        \
+         _tdb.l--;                                            \
+         (*(res)) = _tdb.d;                                   \
+       } else (*(res)) = _t1;                                 \
+    }                                                         \
+}
+
+/* sqrt13
+
+   Computes a triple-double approximation of sqrt(x)
+   
+   Should be provable to be exact to at least 140 bits.
+
+   Only handles the following special cases:
+   - x == 0
+   - subnormal x 
+   The following cases are not handled:
+   - x < 0
+   - x = +/-Infty, NaN
+
+*/
+
+
+#define  DoSqrt13(resh, resm, resl , x)                                                          \
+{                                                                                             \
+  db_number _xdb;                                                                             \
+  int _E;                                                                                     \
+  double _m, _r0, _r1, _r2, _r3h, _r3l, _r4h, _r4l;                                           \
+  double _r5h, _r5m, _r5l, _srtmh, _srtml, _srtmm;                                            \
+  double _r2PHr2h, _r2PHr2l, _r2Sqh, _r2Sql;                                                  \
+  double _mMr2h, _mMr2l, _mMr2Ch, _mMr2Cl;                                                    \
+  double _MHmMr2Ch, _MHmMr2Cl;                                                                \
+  double _r3Sqh, _r3Sql, _mMr3Sqh, _mMr3Sql;                                                  \
+  double _srtmhover,_srtmmover,_srtmlover;                                                    \
+  double _HmMr4Sqm,_HmMr4Sql, _mMr4Sqhover, _mMr4Sqmover, _mMr4Sqlover;                       \
+  double _mMr4Sqh, _mMr4Sqm, _mMr4Sql, _r4Sqh, _r4Sqm, _r4Sql;                                \
+                                                                                              \
+  /* Special case x = 0 */                                                                    \
+  if ((x) == 0) {                                                                             \
+    (*(resh)) = (x);                                                                          \
+    (*(resm)) = 0;                                                                            \
+    (*(resl)) = 0;                                                                            \
+  } else {                                                                                    \
+                                                                                              \
+    _E = 0;                                                                                   \
+                                                                                              \
+    /* Convert to integer format */                                                           \
+    _xdb.d = (x);                                                                             \
+                                                                                              \
+    /* Handle subnormal case */                                                               \
+    if (_xdb.i[HI] < 0x00100000) {                                                            \
+      _E = -52;                                                                               \
+      _xdb.d *= ((db_number) ((double) SQRTTWO52)).d;                                         \
+                        /* make x a normal number */                                          \
+    }                                                                                         \
+                                                                                              \
+    /* Extract exponent E and mantissa m */                                                   \
+    _E += (_xdb.i[HI]>>20)-1023;                                                              \
+    _xdb.i[HI] = (_xdb.i[HI] & 0x000fffff) | 0x3ff00000;                                      \
+    _m = _xdb.d;                                                                              \
+                                                                                              \
+    /* Make exponent even */                                                                  \
+    if (_E & 0x00000001) {                                                                    \
+      _E++;                                                                                   \
+      _m *= 0.5;    /* Suppose now 1/2 <= m <= 2 */                                           \
+    }                                                                                         \
+                                                                                              \
+    /* Construct sqrt(2^E) = 2^(E/2) */                                                       \
+    _xdb.i[HI] = (_E/2 + 1023) << 20;                                                         \
+    _xdb.i[LO] = 0;                                                                           \
+                                                                                              \
+    /* Compute initial approximation to r = 1/sqrt(m) */                                      \
+                                                                                              \
+    _r0 = SQRTPOLYC0 +                                                                        \
+         _m * (SQRTPOLYC1 + _m * (SQRTPOLYC2 + _m * (SQRTPOLYC3 + _m * SQRTPOLYC4)));         \
+                                                                                              \
+    /* Iterate two times on double precision */                                               \
+                                                                                              \
+    _r1 = 0.5 * _r0 * (3 - _m * (_r0 * _r0));                                                 \
+    _r2 = 0.5 * _r1 * (3 - _m * (_r1 * _r1));                                                 \
+                                                                                              \
+    /* Iterate two times on double-double precision */                                        \
+                                                                                              \
+    Mul12(&_r2Sqh, &_r2Sql, _r2, _r2);                                                        \
+    Add12(_r2PHr2h, _r2PHr2l, _r2, (0.5 * _r2));                                              \
+    Mul12(&_mMr2h, &_mMr2l, _m, _r2);                                                         \
+    Mul22(&_mMr2Ch, &_mMr2Cl, _mMr2h, _mMr2l, _r2Sqh, _r2Sql);                                \
+                                                                                              \
+    _MHmMr2Ch = -0.5 * _mMr2Ch;                                                               \
+    _MHmMr2Cl = -0.5 * _mMr2Cl;                                                               \
+                                                                                              \
+    Add22(&_r3h, &_r3l, _r2PHr2h, _r2PHr2l, _MHmMr2Ch, _MHmMr2Cl);                            \
+                                                                                              \
+    Mul22(&_r3Sqh, &_r3Sql, _r3h, _r3l, _r3h, _r3l);                                          \
+    Mul22(&_mMr3Sqh, &_mMr3Sql, _m, 0.0, _r3Sqh, _r3Sql);                                       \
+             /* To prove: mMr3Sqh = 1.0 in each case */                                       \
+                                                                                              \
+    Mul22(&_r4h, &_r4l, _r3h, _r3l, 1.0, (-0.5 * _mMr3Sql));                                    \
+                                                                                              \
+    /* Iterate once on triple-double precision */                                             \
+                                                                                              \
+    Mul23(&_r4Sqh, &_r4Sqm, &_r4Sql, _r4h, _r4l, _r4h, _r4l);                                 \
+    Mul133(&_mMr4Sqhover, &_mMr4Sqmover, &_mMr4Sqlover, _m, _r4Sqh, _r4Sqm, _r4Sql);          \
+    Renormalize3(&_mMr4Sqh, &_mMr4Sqm, &_mMr4Sql, _mMr4Sqhover, _mMr4Sqmover, _mMr4Sqlover);  \
+    /* To prove: mMr4Sqh = 1.0 in each case */                                                \
+                                                                                              \
+    _HmMr4Sqm = -0.5 * _mMr4Sqm;                                                              \
+    _HmMr4Sql = -0.5 * _mMr4Sql;                                                              \
+                                                                                              \
+    Mul233(&_r5h,&_r5m,&_r5l,_r4h,_r4l,1.0,_HmMr4Sqm,_HmMr4Sql);                                \
+                                                                                              \
+    /* Multiply obtained reciprocal square root by m */                                       \
+                                                                                              \
+    Mul133(&_srtmhover, &_srtmmover, &_srtmlover,_m,_r5h,_r5m,_r5l);                          \
+                                                                                              \
+    Renormalize3(&_srtmh,&_srtmm,&_srtml,_srtmhover,_srtmmover,_srtmlover);                   \
+                                                                                              \
+    /* Multiply componentwise by sqrt(2^E) */                                                 \
+    /* which is an integer power of 2 that may not produce a subnormal */                     \
+                                                                                              \
+    (*(resh)) = _xdb.d * _srtmh;                                                              \
+    (*(resm)) = _xdb.d * _srtmm;                                                              \
+    (*(resl)) = _xdb.d * _srtml;                                                              \
+                                                                                              \
+  } /* End: special case 0 */                                                                 \
+}
+
+
+/* recpr33()
+
+   Computes a triple-double reciprocal of a triple-double
+   
+   Should be provable to be exact to at least 140 bits
+
+   No special case handling is done
+
+   dh + dm + dl must be renormalized
+
+   The result is renormalized
+
+*/
+
+
+#define  DoRecpr33(resh, resm, resl, dh, dm, dl)                                                 \
+{                                                                                             \
+    double _rec_r1, _rec_t1, _rec_t2, _rec_t3, _rec_t4, _rec_t5, _rec_t6, _rec_t7, _rec_t8, _rec_t9, _rec_t10, _rec_t11, _rec_t12, _rec_t13, _rec_t14;    \
+    double _rec_r2h, _rec_r2l, _rec_t15, _rec_t16, _rec_t17, _rec_t18, _rec_t19, _rec_t20, _rec_t21, _rec_t22, _rec_t23;                  \
+                                                                                              \
+    _rec_r1 = 1.0 / (dh);                                                                         \
+    Mul12(&_rec_t1,&_rec_t2,_rec_r1,(dh));                                                                \
+    _rec_t3 = _rec_t1 - 1.0;                                                                          \
+    Add12Cond(_rec_t4,_rec_t5,_rec_t3,_rec_t2);                                                               \
+    Mul12(&_rec_t6,&_rec_t7,_rec_r1,(dm));                                                                \
+    Add12(_rec_t8,_rec_t9,-1.0,_rec_t6);                                                                  \
+    _rec_t10 = _rec_t9 + _rec_t7;                                                                         \
+    Add12(_rec_t11,_rec_t12,_rec_t8,_rec_t10);                                                                \
+    _rec_r1 = -_rec_r1;                                                                               \
+    Add22Cond(&_rec_t13,&_rec_t14,_rec_t4,_rec_t5,_rec_t11,_rec_t12);                                                 \
+    Mul122(&_rec_r2h,&_rec_r2l,_rec_r1,_rec_t13,_rec_t14);                                                        \
+    Mul233(&_rec_t15,&_rec_t16,&_rec_t17,_rec_r2h,_rec_r2l,(dh),(dm),(dl));                                       \
+    Renormalize3(&_rec_t18,&_rec_t19,&_rec_t20,_rec_t15,_rec_t16,_rec_t17);                                           \
+    _rec_t18 = -1.0;                                                                              \
+    Mul233(&_rec_t21,&_rec_t22,&_rec_t23,_rec_r2h,_rec_r2l,_rec_t18,_rec_t19,_rec_t20);                                       \
+    _rec_t21 = -_rec_t21; _rec_t22 = -_rec_t22; _rec_t23 = -_rec_t23;                                                 \
+    Renormalize3((resh),(resm),(resl),_rec_t21,_rec_t22,_rec_t23);                                        \
+}
+
+
+
+#endif /*TRIPLE_rec_DOUBLE_rec_H*/
diff --git a/src/crlibm_function.cc b/src/crlibm_function.cc
new file mode 100644
index 0000000..31228ee
--- /dev/null
+++ b/src/crlibm_function.cc
@@ -0,0 +1,249 @@
+/*
+  Copyright 2015-2016 Oliver Heimlich
+
+  This program 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.
+
+  This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <octave/oct.h>
+#include "crlibm/crlibm.h"
+
+typedef double (*crlibm_unary_fun)
+            (const double op);
+
+// Evaluate an unary crlibm function on a binary64 matrix
+void evaluate (
+  Matrix &arg1,           // Operand 1 and result
+  const crlibm_unary_fun f) // The crlibm function to evaluate (element-wise)
+{
+  uint64_t old_state = crlibm_init ();
+
+  const octave_idx_type n = arg1.numel ();
+  for (octave_idx_type i = 0; i < n; i ++)
+    {
+      arg1.elem (i) = (*f) (arg1.elem (i));
+    }
+
+  crlibm_exit (old_state);
+}
+
+DEFUN_DLD (crlibm_function, args, nargout,
+  "-*- texinfo -*-\n"
+  "@documentencoding UTF-8\n"
+  "@defun crlibm_function ('acos', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('asin', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('atan', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('cos', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('cosh', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('exp', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('expm1', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('log', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('log10', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('log1p', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('log2', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('sin', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('sinh', @var{R}, @var{X})\n"
+  "@defunx crlibm_function ('tan', @var{R}, @var{X})\n"
+  "\n"
+  "Evaluate a function in binary64 with correctly rounded result."
+  "\n\n"
+  "Parameter 1 is the function's name in GNU Octave, Parameter 2 is the "
+  "rounding direction (@option{0}: towards zero, @option{0.5}: towards "
+  "nearest and ties to even, @option{+inf}: towards positive infinity, "
+  "@option{-inf}: towards negative infinity).  "
+  "Parameters 3 is the operand to the function."
+  "\n\n"
+  "Evaluated on matrices, the function will be applied element-wise."
+  "\n\n"
+  "The result is guaranteed to be correctly rounded.  That is, the function "
+  "is evaluated with (virtually) infinite precision and the exact result is "
+  "approximated with a binary64 number using the desired rounding direction."
+  "@seealso{mpfr_function_d}\n"
+  "@end defun"
+  )
+{
+  const int nargin = args.length ();
+  if (nargin != 3)
+    {
+      print_usage ();
+      return octave_value_list ();
+    }
+
+  const std::string function = args(0).string_value ();
+  const double      rnd      = args(1).scalar_value ();
+  Matrix            arg1     = args(2).matrix_value ();
+  
+  if (error_state)
+    return octave_value_list ();
+    
+  if (rnd == INFINITY)
+    {
+      // Round upwards
+      if      (function == "acos")
+        evaluate (arg1, &acos_ru);
+      else if (function == "asin")
+        evaluate (arg1, &asin_ru);
+      else if (function == "atan")
+        evaluate (arg1, &atan_ru);
+      else if (function == "cos")
+        evaluate (arg1, &cos_ru);
+      else if (function == "cosh")
+        evaluate (arg1, &cosh_ru);
+      else if (function == "exp")
+        evaluate (arg1, &exp_ru);
+      else if (function == "expm1")
+        evaluate (arg1, &expm1_ru);
+      else if (function == "log")
+        evaluate (arg1, &log_ru);
+      else if (function == "log10")
+        evaluate (arg1, &log10_ru);
+      else if (function == "log1p")
+        evaluate (arg1, &log1p_ru);
+      else if (function == "log2")
+        evaluate (arg1, &log2_ru);
+      else if (function == "sin")
+        evaluate (arg1, &sin_ru);
+      else if (function == "sinh")
+        evaluate (arg1, &sinh_ru);
+      else if (function == "tan")
+        evaluate (arg1, &tan_ru);
+      else
+        {
+          print_usage();
+          return octave_value_list ();
+        }
+    }
+  else if (rnd == -INFINITY)
+    {
+      // Round downwards
+      if      (function == "acos")
+        evaluate (arg1, &acos_rd);
+      else if (function == "asin")
+        evaluate (arg1, &asin_rd);
+      else if (function == "atan")
+        evaluate (arg1, &atan_rd);
+      else if (function == "cos")
+        evaluate (arg1, &cos_rd);
+      else if (function == "cosh")
+        evaluate (arg1, &cosh_rd);
+      else if (function == "exp")
+        evaluate (arg1, &exp_rd);
+      else if (function == "expm1")
+        evaluate (arg1, &expm1_rd);
+      else if (function == "log")
+        evaluate (arg1, &log_rd);
+      else if (function == "log10")
+        evaluate (arg1, &log10_rd);
+      else if (function == "log1p")
+        evaluate (arg1, &log1p_rd);
+      else if (function == "log2")
+        evaluate (arg1, &log2_rd);
+      else if (function == "sin")
+        evaluate (arg1, &sin_rd);
+      else if (function == "sinh")
+        evaluate (arg1, &sinh_rd);
+      else if (function == "tan")
+        evaluate (arg1, &tan_rd);
+      else
+        {
+          print_usage();
+          return octave_value_list ();
+        }
+    }
+  else if (rnd == 0.0)
+    {
+      // Round towards zero
+      if      (function == "acos")
+        evaluate (arg1, &acos_rz);
+      else if (function == "asin")
+        evaluate (arg1, &asin_rz);
+      else if (function == "atan")
+        evaluate (arg1, &atan_rz);
+      else if (function == "cos")
+        evaluate (arg1, &cos_rz);
+      else if (function == "cosh")
+        evaluate (arg1, &cosh_rz);
+      else if (function == "exp")
+        evaluate (arg1, &exp_rz);
+      else if (function == "expm1")
+        evaluate (arg1, &expm1_rz);
+      else if (function == "log")
+        evaluate (arg1, &log_rz);
+      else if (function == "log10")
+        evaluate (arg1, &log10_rz);
+      else if (function == "log1p")
+        evaluate (arg1, &log1p_rz);
+      else if (function == "log2")
+        evaluate (arg1, &log2_rz);
+      else if (function == "sin")
+        evaluate (arg1, &sin_rz);
+      else if (function == "sinh")
+        evaluate (arg1, &sinh_rz);
+      else if (function == "tan")
+        evaluate (arg1, &tan_rz);
+      else
+        {
+          print_usage();
+          return octave_value_list ();
+        }
+    }
+  else
+    {
+      // Round to nearest
+      if      (function == "acos")
+        evaluate (arg1, &acos_rn);
+      else if (function == "asin")
+        evaluate (arg1, &asin_rn);
+      else if (function == "atan")
+        evaluate (arg1, &atan_rn);
+      else if (function == "cos")
+        evaluate (arg1, &cos_rn);
+      else if (function == "cosh")
+        evaluate (arg1, &cosh_rn);
+      else if (function == "exp")
+        evaluate (arg1, &exp_rn);
+      else if (function == "expm1")
+        evaluate (arg1, &expm1_rn);
+      else if (function == "log")
+        evaluate (arg1, &log_rn);
+      else if (function == "log10")
+        evaluate (arg1, &log10_rn);
+      else if (function == "log1p")
+        evaluate (arg1, &log1p_rn);
+      else if (function == "log2")
+        evaluate (arg1, &log2_rn);
+      else if (function == "sin")
+        evaluate (arg1, &sin_rn);
+      else if (function == "sinh")
+        evaluate (arg1, &sinh_rn);
+      else if (function == "tan")
+        evaluate (arg1, &tan_rn);
+      else
+        {
+          print_usage();
+          return octave_value_list ();
+        }
+    }
+    
+  return octave_value (arg1);
+}
+
+/*
+%!test
+%!  for f = {"acos", "asin", "atan", "cos", "cosh", "exp", "expm1", "log", "log10", "log1p", "log2", "sin", "sinh", "tan"}
+%!    for rnd = {+inf, -inf, 0, 0.5}
+%!      assert (crlibm_function (f{:}, rnd{:}, 0.5), mpfr_function_d (f{:}, rnd{:}, 0.5));
+%!    endfor
+%!  endfor
+*/
+
diff --git a/src/mpfr_commons.cc b/src/mpfr_commons.cc
index 95f2d17..8c00c2f 100644
--- a/src/mpfr_commons.cc
+++ b/src/mpfr_commons.cc
@@ -19,6 +19,7 @@
 #include <mpfr.h>
 
 #define BINARY64_PRECISION 53
+#define BINARY64_EMIN -1073
 #define BINARY64_ACCU_PRECISION 2134 + 2150
 
 mpfr_rnd_t parse_rounding_mode (const double octave_rounding_direction)
diff --git a/src/mpfr_function_d.cc b/src/mpfr_function_d.cc
index 1409395..15c49ab 100644
--- a/src/mpfr_function_d.cc
+++ b/src/mpfr_function_d.cc
@@ -40,16 +40,24 @@ void evaluate (
 {
   mpfr_t mp;
   mpfr_init2 (mp, BINARY64_PRECISION);
+  mpfr_exp_t old_emin = mpfr_get_emin ();
+  mpfr_set_emin (BINARY64_EMIN);
 
   const octave_idx_type n = arg1.numel ();
   for (octave_idx_type i = 0; i < n; i ++)
     {
       mpfr_set_d (mp, arg1.elem (i), MPFR_RNDZ);
-      (*f) (mp, mp, rnd);
+      int rnd_error = (*f) (mp, mp, rnd);
+      if (rnd == MPFR_RNDN)
+        {
+          // Prevent double-rounding errors
+          mpfr_subnormalize (mp, rnd_error, rnd);
+        }
       arg1.elem (i) = mpfr_get_d (mp, rnd);
     }
 
   mpfr_clear (mp);
+  mpfr_set_emin (old_emin);
 }
 
 // Evaluate a binary MPFR function on two binary64 matrices
@@ -62,6 +70,8 @@ void evaluate (
   mpfr_t mp1, mp2;
   mpfr_init2 (mp1, BINARY64_PRECISION);
   mpfr_init2 (mp2, BINARY64_PRECISION);
+  mpfr_exp_t old_emin = mpfr_get_emin ();
+  mpfr_set_emin (BINARY64_EMIN);
 
   // arg1 shall contain the result and must be resized
   if (arg1.rows () == 1 && arg2.rows () != 1)
@@ -87,12 +97,18 @@ void evaluate (
                       : ((broadcast_c) ? arg2.elem (i, 0)
                                        : arg2.elem (i, j))
                     , MPFR_RNDZ);
-        (*f) (mp1, mp1, mp2, rnd);
+        int rnd_error = (*f) (mp1, mp1, mp2, rnd);
+        if (rnd == MPFR_RNDN)
+          {
+            // Prevent double-rounding errors
+            mpfr_subnormalize (mp1, rnd_error, rnd);
+          }
         arg1.elem (i, j) = mpfr_get_d (mp1, rnd);
       }
 
   mpfr_clear (mp1);
   mpfr_clear (mp2);
+  mpfr_set_emin (old_emin);
 }
 
 // Evaluate a ternary MPFR function on three binary64 matrices
@@ -107,6 +123,8 @@ void evaluate (
   mpfr_init2 (mp1, BINARY64_PRECISION);
   mpfr_init2 (mp2, BINARY64_PRECISION);
   mpfr_init2 (mp3, BINARY64_PRECISION);
+  mpfr_exp_t old_emin = mpfr_get_emin ();
+  mpfr_set_emin (BINARY64_EMIN);
 
   bool scalar1 = arg1.numel () == 1;
   bool scalar2 = arg2.numel () == 1;
@@ -140,13 +158,19 @@ void evaluate (
                   (scalar3) ? arg3.elem (0) // broadcast
                             : arg3.elem (i),
                   MPFR_RNDZ);
-      (*f) (mp1, mp1, mp2, mp3, rnd);
+      int rnd_error = (*f) (mp1, mp1, mp2, mp3, rnd);
+      if (rnd == MPFR_RNDN)
+        {
+          // Prevent double-rounding errors
+          mpfr_subnormalize (mp1, rnd_error, rnd);
+        }
       arg1.elem (i) = mpfr_get_d (mp1, rnd);
     }
 
   mpfr_clear (mp1);
   mpfr_clear (mp2);
   mpfr_clear (mp3);
+  mpfr_set_emin (old_emin);
 }
 
 // Evaluate nthroot
@@ -266,8 +290,6 @@ DEFUN_DLD (mpfr_function_d, args, nargout,
   "@defunx mpfr_function_d ('sech', @var{R}, @var{X})\n"
   "@defunx mpfr_function_d ('sin', @var{R}, @var{X})\n"
   "@defunx mpfr_function_d ('sinh', @var{R}, @var{X})\n"
-  "@defunx mpfr_function_d ('sinh', @var{R}, @var{X})\n"
-  "@defunx mpfr_function_d ('sinh', @var{R}, @var{X})\n"
   "@defunx mpfr_function_d ('sqr', @var{R}, @var{X})\n"
   "@defunx mpfr_function_d ('tan', @var{R}, @var{X})\n"
   "@defunx mpfr_function_d ('tanh', @var{R}, @var{X})\n"
@@ -296,7 +318,7 @@ DEFUN_DLD (mpfr_function_d, args, nargout,
   "  @result{} 1\n"
   "@end group\n"
   "@end example\n"
-  "@seealso{fesetround}\n"
+  "@seealso{crlibm_function}\n"
   "@end defun"
   )
 {
@@ -470,4 +492,89 @@ DEFUN_DLD (mpfr_function_d, args, nargout,
 %!assert (mpfr_function_d ('plus', -inf, 1, eps / 2), 1);
 %!assert (mpfr_function_d ('plus', +inf, 1, eps / 2), 1 + eps);
 %!error mpfr_function_d ('Krauskefarben', 0, 47, 11);
+
+%!# Cross-check unit tests from crlibm against the MPFR library.
+%!# We simulate binary64 floating-point arithmetic in MPFR
+%!# with mpfr_function_d and results shall be identical.
+%!#
+%!shared testdata
+%! testdata = load (fullfile (...
+%!   fileparts (file_in_loadpath ("__check_crlibm__.m")), ...
+%!   "test", ...
+%!   "crlibm.mat"));
+
+%!function verify (fname, rnd, data)
+%!  assert (mpfr_function_d (fname, rnd, data.input), data.output);
+%!endfunction
+
+%!test verify ("acos", -inf, testdata.acos_rd);
+%!test verify ("acos", +inf, testdata.acos_ru);
+%!test verify ("acos",  0.5, testdata.acos_rn);
+%!test verify ("acos",  0,   testdata.acos_rz);
+
+%!test verify ("asin", -inf, testdata.asin_rd);
+%!test verify ("asin", +inf, testdata.asin_ru);
+%!test verify ("asin",  0.5, testdata.asin_rn);
+%!test verify ("asin",  0,   testdata.asin_rz);
+
+%!test verify ("atan", -inf, testdata.atan_rd);
+%!test verify ("atan", +inf, testdata.atan_ru);
+%!test verify ("atan",  0.5, testdata.atan_rn);
+%!test verify ("atan",  0,   testdata.atan_rz);
+
+%!test verify ("cos", -inf, testdata.cos_rd);
+%!test verify ("cos", +inf, testdata.cos_ru);
+%!test verify ("cos",  0.5, testdata.cos_rn);
+%!test verify ("cos",  0,   testdata.cos_rz);
+
+%!test verify ("cosh", -inf, testdata.cosh_rd);
+%!test verify ("cosh", +inf, testdata.cosh_ru);
+%!test verify ("cosh",  0.5, testdata.cosh_rn);
+%!test verify ("cosh",  0,   testdata.cosh_rz);
+
+%!test verify ("exp", -inf, testdata.exp_rd);
+%!test verify ("exp", +inf, testdata.exp_ru);
+%!test verify ("exp",  0.5, testdata.exp_rn);
+%!test verify ("exp",  0,   testdata.exp_rz);
+
+%!test verify ("expm1", -inf, testdata.expm1_rd);
+%!test verify ("expm1", +inf, testdata.expm1_ru);
+%!test verify ("expm1",  0.5, testdata.expm1_rn);
+%!test verify ("expm1",  0,   testdata.expm1_rz);
+
+%!test verify ("log", -inf, testdata.log_rd);
+%!test verify ("log", +inf, testdata.log_ru);
+%!test verify ("log",  0.5, testdata.log_rn);
+%!test verify ("log",  0,   testdata.log_rz);
+
+%!test verify ("log10", -inf, testdata.log10_rd);
+%!test verify ("log10", +inf, testdata.log10_ru);
+%!test verify ("log10",  0.5, testdata.log10_rn);
+%!test verify ("log10",  0,   testdata.log10_rz);
+
+%!test verify ("log1p", -inf, testdata.log1p_rd);
+%!test verify ("log1p", +inf, testdata.log1p_ru);
+%!test verify ("log1p",  0.5, testdata.log1p_rn);
+%!test verify ("log1p",  0,   testdata.log1p_rz);
+
+%!test verify ("log2", -inf, testdata.log2_rd);
+%!test verify ("log2", +inf, testdata.log2_ru);
+%!test verify ("log2",  0.5, testdata.log2_rn);
+%!test verify ("log2",  0,   testdata.log2_rz);
+
+%!test verify ("sin", -inf, testdata.sin_rd);
+%!test verify ("sin", +inf, testdata.sin_ru);
+%!test verify ("sin",  0.5, testdata.sin_rn);
+%!test verify ("sin",  0,   testdata.sin_rz);
+
+%!test verify ("sinh", -inf, testdata.sinh_rd);
+%!test verify ("sinh", +inf, testdata.sinh_ru);
+%!test verify ("sinh",  0.5, testdata.sinh_rn);
+%!test verify ("sinh",  0,   testdata.sinh_rz);
+
+%!test verify ("tan", -inf, testdata.tan_rd);
+%!test verify ("tan", +inf, testdata.tan_ru);
+%!test verify ("tan",  0.5, testdata.tan_rn);
+%!test verify ("tan",  0,   testdata.tan_rz);
+
 */
diff --git a/src/mpfr_to_string_d.cc b/src/mpfr_to_string_d.cc
index d5a49c7..6a2d21d 100644
--- a/src/mpfr_to_string_d.cc
+++ b/src/mpfr_to_string_d.cc
@@ -201,7 +201,7 @@ DEFUN_DLD (mpfr_to_string_d, args, nargout,
               // Make subnormal numbers use the exponent -1022
               if (exponent < std::numeric_limits <double>::min_exponent)
                 {
-                  mantissa /= std::pow (2.0, 
+                  mantissa /= uint64_t (1) << (
                                         std::numeric_limits
                                           <double>::min_exponent - 1
                                         - exponent);
@@ -219,7 +219,7 @@ DEFUN_DLD (mpfr_to_string_d, args, nargout,
               
               // shift mantissa by 32 bits to format the first part
               // sprintf (... "%x" ...) requires an unsigned 4-byte int 
-              mantissa *= std::pow (2.0, sizeof (uint32_t) * 8);
+              mantissa *= uint64_t (1) << (sizeof (uint32_t) * 8);
               uint32_t first_part = static_cast <uint32_t> (mantissa);
               
               // remove first mantissa part
@@ -227,7 +227,7 @@ DEFUN_DLD (mpfr_to_string_d, args, nargout,
               
               // shift mantissa by remaining 20 bits such that
               // it is an integer
-              mantissa *= std::pow (2.0,
+              mantissa *= uint64_t (1) << (
                                     std::numeric_limits
                                       <double>::digits - 1 - 32);
               uint32_t second_part = static_cast <uint32_t> (mantissa);
diff --git a/test/ieee1788-constructors.itl b/test/ieee1788-constructors.itl
new file mode 100644
index 0000000..0e5b72e
--- /dev/null
+++ b/test/ieee1788-constructors.itl
@@ -0,0 +1,92 @@
+/*
+
+Test Cases for interval constructors from IEEE Std 1788-2015
+
+Copyright 2016 Oliver Heimlich
+
+This program 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.
+
+This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+// According to the examples in Section 7.4.2, unbounded intervals can be constructed with non-common inputs.
+testcase IEEE1788.a {
+    b-numsToInterval -infinity infinity = [entire];
+}
+
+// Examples from Sections 9.7.1 and 9.8
+testcase IEEE1788.b {
+    b-textToInterval "[1.2345]" = [0X1.3C083126E978DP+0, 0X1.3C083126E978EP+0];
+    b-textToInterval "[1,+infinity]" = [1.0, infinity];
+    d-textToInterval "[1,1e3]_com" = [1.0, 1000.0]_com;
+    d-textToInterval "[1,1E3]_COM" = [1.0, 1000.0]_com;
+}
+
+// Examples from Table 9.4
+testcase IEEE1788.c {
+    b-textToInterval "[1.e-3, 1.1e-3]" = [0X4.189374BC6A7ECP-12, 0X4.816F0068DB8BCP-12];
+    b-textToInterval "[-0x1.3p-1, 2/3]" = [-0X9.8000000000000P-4, +0XA.AAAAAAAAAAAB0P-4];
+    b-textToInterval "[3.56]" = [0X3.8F5C28F5C28F4P+0, 0X3.8F5C28F5C28F6P+0];
+    b-textToInterval "3.56?1" = [0X3.8CCCCCCCCCCCCP+0, 0X3.91EB851EB8520P+0];
+    b-textToInterval "3.56?1e2" = [355.0, 357.0];
+    b-textToInterval "3.560?2" = [0X3.8ED916872B020P+0, 0X3.8FDF3B645A1CCP+0];
+    b-textToInterval "3.56?" = [0X3.8E147AE147AE0P+0, 0X3.90A3D70A3D70CP+0];
+    b-textToInterval "3.560?2u" = [0X3.8F5C28F5C28F4P+0, 0X3.8FDF3B645A1CCP+0];
+    b-textToInterval "-10?" = [-10.5, -9.5];
+    b-textToInterval "-10?u" = [-10.0, -9.5];
+    b-textToInterval "-10?12" = [-22.0, 2.0];
+}
+
+// Examples from Section 10.5.1
+testcase IEEE1788.d {
+    b-textToInterval "[1.234e5,Inf]" = [123400.0, infinity];
+    b-textToInterval "3.1416?1" = [0X3.24395810624DCP+0, 0X3.24467381D7DC0P+0];
+    b-textToInterval "[Empty]" = [empty];
+}
+
+// Example from Section 11.3
+testcase IEEE1788.e {
+    d-numsToInterval 2 1 = [nai];
+}
+
+// Examples from Table 12.1
+testcase IEEE1788.e {
+    d-textToInterval "[ ]" = [empty]_trv;
+    d-textToInterval "[entire]" = [-infinity, +infinity]_dac;
+    d-textToInterval "[1.e-3, 1.1e-3]" = [0X4.189374BC6A7ECP-12, 0X4.816F0068DB8BCP-12]_com;
+    d-textToInterval "[-Inf, 2/3]" = [-infinity, +0XA.AAAAAAAAAAAB0P-4]_dac;
+    d-textToInterval "[0x1.3p-1,]" = [0x1.3p-1, infinity]_dac;
+    d-textToInterval "[,]" = [entire]_dac;
+    d-textToInterval "3.56?1" = [0X3.8CCCCCCCCCCCCP+0, 0X3.91EB851EB8520P+0]_com;
+    d-textToInterval "3.56?1e2" = [355.0, 357.0]_com;
+    d-textToInterval "3.560?2" = [0X3.8ED916872B020P+0, 0X3.8FDF3B645A1CCP+0]_com;
+    d-textToInterval "3.56?" = [0X3.8E147AE147AE0P+0, 0X3.90A3D70A3D70CP+0]_com;
+    d-textToInterval "3.560?2u" = [0X3.8F5C28F5C28F4P+0, 0X3.8FDF3B645A1CCP+0]_com;
+    d-textToInterval "-10?" = [-10.5, -9.5]_com;
+    d-textToInterval "-10?u" = [-10.0, -9.5]_com;
+    d-textToInterval "-10?12" = [-22.0, 2.0]_com;
+    d-textToInterval "-10??u" = [-10.0, infinity]_dac;
+    d-textToInterval "-10??" = [-infinity, infinity]_dac;
+    d-textToInterval "[nai]" = [nai];
+    d-textToInterval "3.56?1_def" = [0X3.8CCCCCCCCCCCCP+0, 0X3.91EB851EB8520P+0]_def;
+}
+
+// Examples from Section 12.11.3
+testcase IEEE1788.f {
+    b-textToInterval "[]" = [empty];
+    b-textToInterval "[empty]" = [empty];
+    b-textToInterval "[ empty ]" = [empty];
+    b-textToInterval "[,]" = [entire];
+    b-textToInterval "[ entire ]" = [entire];
+}

-- 
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-interval.git



More information about the Pkg-octave-commit mailing list